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
+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)