diff --git a/.gitignore b/.gitignore index e941da68..88d11e1c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*.swp +*.swo +.DS_Store .bundle vendor/bundle -.DS_Store diff --git a/.rspec b/.rspec deleted file mode 100644 index 660778bd..00000000 --- a/.rspec +++ /dev/null @@ -1 +0,0 @@ ---colour --format documentation diff --git a/Gemfile b/Gemfile index 1f478929..337e89d6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ -source 'https://rubygems.org' -ruby '2.0.0' +source "https://rubygems.org" -gem 'rspec', '~> 2.14.1' -gem 'pry-byebug' +gem 'pg' +gem 'activerecord', '~> 4.1.0' +gem 'active_record_tasks', '~> 1.1.0' diff --git a/Gemfile.lock b/Gemfile.lock index a885a8c7..5fa409d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,35 +1,39 @@ GEM remote: https://rubygems.org/ specs: - byebug (3.5.1) - columnize (~> 0.8) - debugger-linecache (~> 1.2) - slop (~> 3.6) - coderay (1.1.0) - columnize (0.8.9) - debugger-linecache (1.2.0) - diff-lcs (1.2.5) - method_source (0.8.2) - pry (0.10.1) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-byebug (2.0.0) - byebug (~> 3.4) - pry (~> 0.10) - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.7) - rspec-expectations (2.14.5) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.5) - slop (3.6.0) + active_record_tasks (1.1.0) + activerecord (>= 4.0) + rainbow + rake + activemodel (4.1.8) + activesupport (= 4.1.8) + builder (~> 3.1) + activerecord (4.1.8) + activemodel (= 4.1.8) + activesupport (= 4.1.8) + arel (~> 5.0.0) + activesupport (4.1.8) + i18n (~> 0.6, >= 0.6.9) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.1) + tzinfo (~> 1.1) + arel (5.0.1.20140414130214) + builder (3.2.2) + i18n (0.7.0) + json (1.8.1) + minitest (5.5.0) + pg (0.18.0) + rainbow (2.0.0) + rake (10.4.2) + thread_safe (0.3.4) + tzinfo (1.2.2) + thread_safe (~> 0.1) PLATFORMS ruby DEPENDENCIES - pry-byebug - rspec (~> 2.14.1) + active_record_tasks (~> 1.1.0) + activerecord (~> 4.1.0) + pg diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..488a5913 --- /dev/null +++ b/Rakefile @@ -0,0 +1,11 @@ +require 'active_record_tasks' + +ActiveRecordTasks.configure do |config| + # These are all the default values + config.db_dir = 'db' + config.db_config_path = 'db/config.yml' + config.env = 'development' +end + +# Run this AFTER you've configured +ActiveRecordTasks.load_tasks diff --git a/db/config.yml b/db/config.yml new file mode 100644 index 00000000..2a90f368 --- /dev/null +++ b/db/config.yml @@ -0,0 +1,11 @@ +development: + adapter: postgresql + database: migrations_dev + pool: 5 + timeout: 5000 + +test: + adapter: postgresql + database: migrations_test + pool: 5 + timeout: 5000 diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 00000000..acd5b07c --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,23 @@ +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20150105104003) do + + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "test", force: true do |t| + t.string "name" + end + +end diff --git a/spec/.gitkeep b/spec/.gitkeep deleted file mode 100644 index e69de29b..00000000