Organizing

This commit is contained in:
Gregory Eremin
2013-07-11 02:06:16 +07:00
parent e55a6af258
commit 23fee68790
14 changed files with 162 additions and 103 deletions
+1
View File
@@ -0,0 +1 @@
examples/database.yml
+6
View File
@@ -0,0 +1,6 @@
protocol: postgres
username: pastemaster
password: pastemaster
host: localhost
port: 5432
database: pastemaster
+32
View File
@@ -0,0 +1,32 @@
actionscript: ActionScript
applescript: AppleScript
awk: Awk
c: C
charp: C#
cpp: C++
clojure: Clojure
coffeescript: CoffeeScript
cl: Common Lisp
d: D
dart: Dart
delphi: Delphi
erlang: Erlang
go: Go
groovy: Groovy
haskell: Haskell
java: Java
javascript: JavaScript
json: JSON
lua: Lua
objc: Objective-C
ocaml: OCaml
perl: Perl
php: PHP
python: Python
ruby: Ruby
rust: Rust
scala: Scala
smalltalk: Smalltalk
vim: VimL
xml: XML
xslt: XSLT
+2
View File
@@ -0,0 +1,2 @@
APP_ROOT = Pathname.new(File.expand_path('../../..', __FILE__))
CONFIG = Configuration.new
+9
View File
@@ -0,0 +1,9 @@
DB = Sequel.connect(CONFIG.database_url)
# DB.drop_table(:pastes) if DB.table_exists?(:pastes)
DB.create_table(:pastes) do
primary_key :id
String :syntax
Text :contents
end unless DB.table_exists?(:pastes)
+1
View File
@@ -0,0 +1 @@
examples/syntax.yml