From 969397d55d1277bb0ad15e22a37538b87a8a4ccc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Mathieu Date: Sun, 6 Aug 2017 20:31:55 -0400 Subject: [PATCH 1/6] change version --- .gitignore | 1 + lib/obfuscate_id/version.rb | 2 +- obfuscate_id.gemspec | 2 +- spec/dummy/Gemfile | 7 +- spec/dummy/Gemfile.lock | 261 +++++++++++++++++++----------------- spec/dummy/bin/rails | 4 - spec/dummy/bin/rake | 4 - 7 files changed, 144 insertions(+), 137 deletions(-) diff --git a/.gitignore b/.gitignore index dea279d..5755c6c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ spec/dummy/log/*.log spec/dummy/tmp/ spec/dummy/.sass-cache *.swp +*.gem diff --git a/lib/obfuscate_id/version.rb b/lib/obfuscate_id/version.rb index 310eaf6..2f05729 100644 --- a/lib/obfuscate_id/version.rb +++ b/lib/obfuscate_id/version.rb @@ -1,3 +1,3 @@ module ObfuscateId - VERSION = "0.2.0" + VERSION = "0.3.0" end diff --git a/obfuscate_id.gemspec b/obfuscate_id.gemspec index f675277..d8be7c0 100644 --- a/obfuscate_id.gemspec +++ b/obfuscate_id.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"] s.add_dependency "scatter_swap", "~> 0.0.3" - s.add_dependency "rails", "~> 4.2.0" + s.add_dependency "rails", "~> 5.1.2" s.add_development_dependency "sqlite3" s.add_development_dependency "rspec-rails" diff --git a/spec/dummy/Gemfile b/spec/dummy/Gemfile index 5461f82..c524a57 100644 --- a/spec/dummy/Gemfile +++ b/spec/dummy/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.2.0' +gem 'rails', '5.1.2' # Use sqlite3 as the database for Active Record gem 'sqlite3' # Use SCSS for stylesheets @@ -10,7 +10,7 @@ gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .coffee assets and views -gem 'coffee-rails', '~> 4.1.0' +gem 'coffee-rails', '~> 4.2.2' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby @@ -23,7 +23,7 @@ gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc -gem 'obfuscate_id', '~> 0.2.0' +gem 'obfuscate_id', path: "./../.." # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' @@ -44,4 +44,3 @@ group :development, :test do # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' end - diff --git a/spec/dummy/Gemfile.lock b/spec/dummy/Gemfile.lock index f29776d..5ee66af 100644 --- a/spec/dummy/Gemfile.lock +++ b/spec/dummy/Gemfile.lock @@ -1,165 +1,177 @@ +PATH + remote: ../.. + specs: + obfuscate_id (0.3.0) + rails (~> 5.1.2) + scatter_swap (~> 0.0.3) + GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) + actioncable (5.1.2) + actionpack (= 5.1.2) + nio4r (~> 2.0) + websocket-driver (~> 0.6.1) + actionmailer (5.1.2) + actionpack (= 5.1.2) + actionview (= 5.1.2) + activejob (= 5.1.2) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.0) - actionview (= 4.2.0) - activesupport (= 4.2.0) - rack (~> 1.6.0) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - actionview (4.2.0) - activesupport (= 4.2.0) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.0) - activesupport (= 4.2.0) - globalid (>= 0.3.0) - activemodel (4.2.0) - activesupport (= 4.2.0) + rails-dom-testing (~> 2.0) + actionpack (5.1.2) + actionview (= 5.1.2) + activesupport (= 5.1.2) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.1.2) + activesupport (= 5.1.2) builder (~> 3.1) - activerecord (4.2.0) - activemodel (= 4.2.0) - activesupport (= 4.2.0) - arel (~> 6.0) - activesupport (4.2.0) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.1.2) + activesupport (= 5.1.2) + globalid (>= 0.3.6) + activemodel (5.1.2) + activesupport (= 5.1.2) + activerecord (5.1.2) + activemodel (= 5.1.2) + activesupport (= 5.1.2) + arel (~> 8.0) + activesupport (5.1.2) + concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - arel (6.0.0) + arel (8.0.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - builder (3.2.2) - byebug (3.5.1) - columnize (~> 0.8) - debugger-linecache (~> 1.2) - slop (~> 3.6) - coffee-rails (4.1.0) + builder (3.2.3) + byebug (9.0.6) + coffee-rails (4.2.2) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.0) - coffee-script (2.3.0) + railties (>= 4.0.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.9.0) - columnize (0.9.0) - debug_inspector (0.0.2) - debugger-linecache (1.2.0) - erubis (2.7.0) - execjs (2.3.0) - globalid (0.3.2) - activesupport (>= 4.1.0) - hike (1.2.3) - i18n (0.7.0) - jbuilder (2.2.6) - activesupport (>= 3.0.0, < 5) - multi_json (~> 1.2) - jquery-rails (4.0.3) - rails-dom-testing (~> 1.0) + coffee-script-source (1.12.2) + concurrent-ruby (1.0.5) + debug_inspector (0.0.3) + erubi (1.6.1) + execjs (2.7.0) + ffi (1.9.18) + globalid (0.4.0) + activesupport (>= 4.2.0) + i18n (0.8.6) + jbuilder (2.7.0) + activesupport (>= 4.2.0) + multi_json (>= 1.2) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.2) - loofah (2.0.1) + json (1.8.6) + loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) - mime-types (2.4.3) - mini_portile (0.6.2) - minitest (5.5.1) - multi_json (1.10.1) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) - obfuscate_id (0.2.0) - rails (~> 4.2.0) - scatter_swap (~> 0.0.3) - rack (1.6.0) + mail (2.6.6) + mime-types (>= 1.16, < 4) + method_source (0.8.2) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.2.0) + minitest (5.10.3) + multi_json (1.12.1) + nio4r (2.1.0) + nokogiri (1.8.0) + mini_portile2 (~> 2.2.0) + rack (2.0.3) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.0) - actionmailer (= 4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - activemodel (= 4.2.0) - activerecord (= 4.2.0) - activesupport (= 4.2.0) + rails (5.1.2) + actioncable (= 5.1.2) + actionmailer (= 5.1.2) + actionpack (= 5.1.2) + actionview (= 5.1.2) + activejob (= 5.1.2) + activemodel (= 5.1.2) + activerecord (= 5.1.2) + activesupport (= 5.1.2) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.0) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.5) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.1) + railties (= 5.1.2) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.0) - actionpack (= 4.2.0) - activesupport (= 4.2.0) + railties (5.1.2) + actionpack (= 5.1.2) + activesupport (= 5.1.2) + method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.4.2) - rdoc (4.2.0) - json (~> 1.4) - sass (3.4.11) - sass-rails (5.0.1) - railties (>= 4.0.0, < 5.0) + rake (12.0.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rdoc (4.3.0) + sass (3.5.1) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) - tilt (~> 1.1) + tilt (>= 1.1, < 3) scatter_swap (0.0.3) - sdoc (0.4.1) + sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - slop (3.6.0) - spring (1.3.0) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.2.4) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.10) - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - turbolinks (2.5.3) - coffee-rails - tzinfo (1.2.2) + spring (2.0.2) + activesupport (>= 4.2) + sprockets (3.7.1) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.3.13) + thor (0.19.4) + thread_safe (0.3.6) + tilt (2.0.8) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.3) + tzinfo (1.2.3) thread_safe (~> 0.1) - uglifier (2.7.0) - execjs (>= 0.3.0) - json (>= 1.8.0) - web-console (2.0.0) - activemodel (~> 4.0) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + web-console (2.3.0) + activemodel (>= 4.0) binding_of_caller (>= 0.7.2) - railties (~> 4.0) + railties (>= 4.0) sprockets-rails (>= 2.0, < 4.0) + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) PLATFORMS ruby DEPENDENCIES byebug - coffee-rails (~> 4.1.0) + coffee-rails (~> 4.2.2) jbuilder (~> 2.0) jquery-rails - obfuscate_id (~> 0.2.0) - rails (= 4.2.0) + obfuscate_id! + rails (= 5.1.2) sass-rails (~> 5.0) sdoc (~> 0.4.0) spring @@ -167,3 +179,6 @@ DEPENDENCIES turbolinks uglifier (>= 1.3.0) web-console (~> 2.0) + +BUNDLED WITH + 1.15.3 diff --git a/spec/dummy/bin/rails b/spec/dummy/bin/rails index 4d608ed..5191e69 100755 --- a/spec/dummy/bin/rails +++ b/spec/dummy/bin/rails @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' diff --git a/spec/dummy/bin/rake b/spec/dummy/bin/rake index 8017a02..1724048 100755 --- a/spec/dummy/bin/rake +++ b/spec/dummy/bin/rake @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end require_relative '../config/boot' require 'rake' Rake.application.run From ddec9584ff4a8dc49615ebe351d8758acc250574 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Mathieu Date: Mon, 7 Aug 2017 07:42:55 -0400 Subject: [PATCH 2/6] update dummy app and fix test for rails 5 --- Gemfile.lock | 270 +++++++++--------- spec/dummy/Gemfile | 3 - spec/dummy/bin/rails | 2 +- spec/dummy/bin/setup | 33 ++- spec/dummy/bin/update | 29 ++ spec/dummy/bin/yarn | 11 + spec/dummy/config/application.rb | 16 +- spec/dummy/config/boot.rb | 2 +- spec/dummy/config/cable.yml | 10 + spec/dummy/config/environment.rb | 2 +- spec/dummy/config/environments/development.rb | 35 ++- spec/dummy/config/environments/production.rb | 44 +-- spec/dummy/config/environments/test.rb | 12 +- .../application_controller_renderer.rb | 6 + spec/dummy/config/initializers/assets.rb | 9 +- .../config/initializers/cookies_serializer.rb | 2 + .../new_framework_defaults_5_1.rb | 14 + .../config/initializers/wrap_parameters.rb | 4 +- spec/dummy/config/locales/en.yml | 10 + spec/dummy/config/puma.rb | 56 ++++ spec/dummy/config/spring.rb | 6 + .../db/migrate/20120201032713_create_posts.rb | 2 +- .../migrate/20120201053634_create_comments.rb | 2 +- .../db/migrate/20120208222551_create_users.rb | 2 +- ...class_that_you_wouldnt_have_thought_ofs.rb | 7 + spec/dummy/db/schema.rb | 16 +- spec/dummy/db/test.sqlite3 | Bin 28672 -> 40960 bytes spec/lib/obfuscate_id_spec.rb | 4 +- 28 files changed, 402 insertions(+), 207 deletions(-) create mode 100755 spec/dummy/bin/update create mode 100755 spec/dummy/bin/yarn create mode 100644 spec/dummy/config/cable.yml create mode 100644 spec/dummy/config/initializers/application_controller_renderer.rb create mode 100644 spec/dummy/config/initializers/new_framework_defaults_5_1.rb create mode 100644 spec/dummy/config/puma.rb create mode 100644 spec/dummy/config/spring.rb create mode 100644 spec/dummy/db/migrate/20170807004445_some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs.rb diff --git a/Gemfile.lock b/Gemfile.lock index 23731cd..8563877 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,76 +1,82 @@ PATH remote: . specs: - obfuscate_id (0.2.0) - rails (~> 4.2.0) + obfuscate_id (0.3.0) + rails (~> 5.1.2) scatter_swap (~> 0.0.3) GEM remote: http://rubygems.org/ specs: - actionmailer (4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) + actioncable (5.1.3) + actionpack (= 5.1.3) + nio4r (~> 2.0) + websocket-driver (~> 0.6.1) + actionmailer (5.1.3) + actionpack (= 5.1.3) + actionview (= 5.1.3) + activejob (= 5.1.3) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.0) - actionview (= 4.2.0) - activesupport (= 4.2.0) - rack (~> 1.6.0) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - actionview (4.2.0) - activesupport (= 4.2.0) + rails-dom-testing (~> 2.0) + actionpack (5.1.3) + actionview (= 5.1.3) + activesupport (= 5.1.3) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.1.3) + activesupport (= 5.1.3) builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.0) - activesupport (= 4.2.0) - globalid (>= 0.3.0) - activemodel (4.2.0) - activesupport (= 4.2.0) - builder (~> 3.1) - activerecord (4.2.0) - activemodel (= 4.2.0) - activesupport (= 4.2.0) - arel (~> 6.0) - activesupport (4.2.0) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.1.3) + activesupport (= 5.1.3) + globalid (>= 0.3.6) + activemodel (5.1.3) + activesupport (= 5.1.3) + activerecord (5.1.3) + activemodel (= 5.1.3) + activesupport (= 5.1.3) + arel (~> 8.0) + activesupport (5.1.3) + concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.3.6) - arel (6.0.0) - builder (3.2.2) - capybara (2.4.4) - mime-types (>= 1.16) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) + arel (8.0.0) + builder (3.2.3) + capybara (2.15.1) + addressable + mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - celluloid (0.16.0) - timers (~> 4.0.0) - childprocess (0.5.5) + childprocess (0.7.1) ffi (~> 1.0, >= 1.0.11) - coderay (1.1.0) - diff-lcs (1.2.5) - erubis (2.7.0) - ffi (1.9.6) + coderay (1.1.1) + concurrent-ruby (1.0.5) + diff-lcs (1.3) + erubi (1.6.1) + ffi (1.9.18) formatador (0.2.5) - globalid (0.3.2) - activesupport (>= 4.1.0) - guard (2.10.2) + globalid (0.4.0) + activesupport (>= 4.2.0) + guard (2.14.1) formatador (>= 0.2.4) - listen (~> 2.7) + listen (>= 2.7, < 4.0) lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) pry (>= 0.9.12) + shellany (~> 0.0) thor (>= 0.18.1) - guard-compat (1.1.0) - guard-rspec (4.5.0) + guard-compat (1.2.1) + guard-rspec (4.7.3) guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) @@ -79,104 +85,109 @@ GEM guard (~> 2.0) guard-compat (~> 1.0) spork (>= 0.8.4) - hike (1.2.3) - hitimes (1.2.2) - i18n (0.7.0) - json (1.8.2) + i18n (0.8.6) launchy (2.4.3) addressable (~> 2.3) - listen (2.8.3) - celluloid (>= 0.15.2) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - loofah (2.0.1) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.0.3) nokogiri (>= 1.5.9) - lumberjack (1.0.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) + lumberjack (1.0.12) + mail (2.6.6) + mime-types (>= 1.16, < 4) method_source (0.8.2) - mime-types (2.4.3) - mini_portile (0.6.1) - minitest (5.5.1) - multi_json (1.10.1) - nokogiri (1.6.5) - mini_portile (~> 0.6.0) - pry (0.10.1) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_mime (0.1.3) + mini_portile2 (2.2.0) + minitest (5.10.3) + nenv (0.3.0) + nio4r (2.1.0) + nokogiri (1.8.0) + mini_portile2 (~> 2.2.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - rack (1.6.0) + public_suffix (2.0.5) + rack (2.0.3) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.0) - actionmailer (= 4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - activemodel (= 4.2.0) - activerecord (= 4.2.0) - activesupport (= 4.2.0) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.0) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.5) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.1) + rails (5.1.3) + actioncable (= 5.1.3) + actionmailer (= 5.1.3) + actionpack (= 5.1.3) + actionview (= 5.1.3) + activejob (= 5.1.3) + activemodel (= 5.1.3) + activerecord (= 5.1.3) + activesupport (= 5.1.3) + bundler (>= 1.3.0) + railties (= 5.1.3) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.0) - actionpack (= 4.2.0) - activesupport (= 4.2.0) + railties (5.1.3) + actionpack (= 5.1.3) + activesupport (= 5.1.3) + method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.4.2) - rb-fsevent (0.9.4) - rb-inotify (0.9.5) - ffi (>= 0.5.0) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) + rake (12.0.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rspec (3.6.0) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-core (3.6.0) + rspec-support (~> 3.6.0) + rspec-expectations (3.6.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.6.0) + rspec-mocks (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) + rspec-support (~> 3.6.0) + rspec-rails (3.6.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-support (~> 3.6.0) + rspec-support (3.6.0) + ruby_dep (1.5.0) scatter_swap (0.0.3) + shellany (0.0.1) slop (3.6.0) spork (0.9.2) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.2.4) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.10) - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - timers (4.0.1) - hitimes - tzinfo (1.2.2) + sprockets (3.7.1) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.3.13) + thor (0.19.4) + thread_safe (0.3.6) + tzinfo (1.2.3) thread_safe (~> 0.1) - xpath (2.0.0) + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + xpath (2.1.0) nokogiri (~> 1.3) PLATFORMS @@ -192,3 +203,6 @@ DEPENDENCIES rb-inotify rspec-rails sqlite3 + +BUNDLED WITH + 1.15.3 diff --git a/spec/dummy/Gemfile b/spec/dummy/Gemfile index c524a57..3347c5f 100644 --- a/spec/dummy/Gemfile +++ b/spec/dummy/Gemfile @@ -38,9 +38,6 @@ group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' - # Access an IRB console on exception pages or by using <%= console %> in views - gem 'web-console', '~> 2.0' - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' end diff --git a/spec/dummy/bin/rails b/spec/dummy/bin/rails index 5191e69..0739660 100755 --- a/spec/dummy/bin/rails +++ b/spec/dummy/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path('../../config/application', __FILE__) +APP_PATH = File.expand_path('../config/application', __dir__) require_relative '../config/boot' require 'rails/commands' diff --git a/spec/dummy/bin/setup b/spec/dummy/bin/setup index acdb2c1..78c4e86 100755 --- a/spec/dummy/bin/setup +++ b/spec/dummy/bin/setup @@ -1,29 +1,38 @@ #!/usr/bin/env ruby require 'pathname' +require 'fileutils' +include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) -Dir.chdir APP_ROOT do +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do # This script is a starting point to setup your application. - # Add necessary setup steps to this file: + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') - puts "== Installing dependencies ==" - system "gem install bundler --conservative" - system "bundle check || bundle install" # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # system "cp config/database.yml.sample config/database.yml" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system "bin/rake db:setup" + system! 'bin/rails db:setup' puts "\n== Removing old logs and tempfiles ==" - system "rm -f log/*" - system "rm -rf tmp/cache" + system! 'bin/rails log:clear tmp:clear' puts "\n== Restarting application server ==" - system "touch tmp/restart.txt" + system! 'bin/rails restart' end diff --git a/spec/dummy/bin/update b/spec/dummy/bin/update new file mode 100755 index 0000000..a8e4462 --- /dev/null +++ b/spec/dummy/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/spec/dummy/bin/yarn b/spec/dummy/bin/yarn new file mode 100755 index 0000000..c2bacef --- /dev/null +++ b/spec/dummy/bin/yarn @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +VENDOR_PATH = File.expand_path('..', __dir__) +Dir.chdir(VENDOR_PATH) do + begin + exec "yarnpkg #{ARGV.join(" ")}" + rescue Errno::ENOENT + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end +end diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index c1e5d67..8ca82af 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('../boot', __FILE__) +require_relative 'boot' require 'rails/all' @@ -9,19 +9,11 @@ module Dummy class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 5.1 + # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Do not swallow errors in after_commit/after_rollback callbacks. - config.active_record.raise_in_transactional_callbacks = true end end diff --git a/spec/dummy/config/boot.rb b/spec/dummy/config/boot.rb index 6b750f0..30f5120 100644 --- a/spec/dummy/config/boot.rb +++ b/spec/dummy/config/boot.rb @@ -1,3 +1,3 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/spec/dummy/config/cable.yml b/spec/dummy/config/cable.yml new file mode 100644 index 0000000..d3dfabd --- /dev/null +++ b/spec/dummy/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 + channel_prefix: dummy_production diff --git a/spec/dummy/config/environment.rb b/spec/dummy/config/environment.rb index ee8d90d..426333b 100644 --- a/spec/dummy/config/environment.rb +++ b/spec/dummy/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require File.expand_path('../application', __FILE__) +require_relative 'application' # Initialize the Rails application. Rails.application.initialize! diff --git a/spec/dummy/config/environments/development.rb b/spec/dummy/config/environments/development.rb index b55e214..55d8c9e 100644 --- a/spec/dummy/config/environments/development.rb +++ b/spec/dummy/config/environments/development.rb @@ -9,13 +9,28 @@ # Do not eager load code on boot. config.eager_load = false - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + config.action_mailer.perform_caching = false + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log @@ -27,15 +42,13 @@ # number of complex assets. config.assets.debug = true - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - - # Adds additional error checking when serving assets at runtime. - # Checks for improperly declared sprockets dependencies. - # Raises helpful error messages. - config.assets.raise_runtime_errors = true + # Suppress logger output for asset requests. + config.assets.quiet = true # Raises error for missing translations # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + # config.file_watcher = ActiveSupport::EventedFileUpdateChecker end diff --git a/spec/dummy/config/environments/production.rb b/spec/dummy/config/environments/production.rb index 5c1b32e..6ea0018 100644 --- a/spec/dummy/config/environments/production.rb +++ b/spec/dummy/config/environments/production.rb @@ -14,15 +14,14 @@ config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Enable Rack::Cache to put a simple HTTP cache in front of your application - # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like - # NGINX, varnish or squid. - # config.action_dispatch.rack_cache = true + # Attempt to read encrypted secrets from `config/secrets.yml.enc`. + # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or + # `config/secrets.yml.key`. + config.read_encrypted_secrets = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -31,16 +30,20 @@ # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true @@ -49,16 +52,15 @@ config.log_level = :debug # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + config.log_tags = [ :request_id ] # Use a different cache store in production. # config.cache_store = :mem_cache_store - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "dummy_#{Rails.env}" + config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -74,6 +76,16 @@ # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false end diff --git a/spec/dummy/config/environments/test.rb b/spec/dummy/config/environments/test.rb index 1c19f08..8e5cbde 100644 --- a/spec/dummy/config/environments/test.rb +++ b/spec/dummy/config/environments/test.rb @@ -12,9 +12,11 @@ # preloads Rails for running tests, you may have to set it to true. config.eager_load = false - # Configure static file server for tests with Cache-Control for performance. - config.serve_static_files = true - config.static_cache_control = 'public, max-age=3600' + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" + } # Show full error reports and disable caching. config.consider_all_requests_local = true @@ -25,15 +27,13 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - # Randomize the order test cases are executed. - config.active_support.test_order = :random - # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/spec/dummy/config/initializers/application_controller_renderer.rb b/spec/dummy/config/initializers/application_controller_renderer.rb new file mode 100644 index 0000000..51639b6 --- /dev/null +++ b/spec/dummy/config/initializers/application_controller_renderer.rb @@ -0,0 +1,6 @@ +# Be sure to restart your server when you modify this file. + +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) diff --git a/spec/dummy/config/initializers/assets.rb b/spec/dummy/config/initializers/assets.rb index 01ef3e6..4b828e8 100644 --- a/spec/dummy/config/initializers/assets.rb +++ b/spec/dummy/config/initializers/assets.rb @@ -3,9 +3,12 @@ # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' -# Add additional assets to the asset load path +# Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path +# Add Yarn node_modules folder to the asset load path. +Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -# Rails.application.config.assets.precompile += %w( search.js ) +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/spec/dummy/config/initializers/cookies_serializer.rb b/spec/dummy/config/initializers/cookies_serializer.rb index 7f70458..5a6a32d 100644 --- a/spec/dummy/config/initializers/cookies_serializer.rb +++ b/spec/dummy/config/initializers/cookies_serializer.rb @@ -1,3 +1,5 @@ # Be sure to restart your server when you modify this file. +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/spec/dummy/config/initializers/new_framework_defaults_5_1.rb b/spec/dummy/config/initializers/new_framework_defaults_5_1.rb new file mode 100644 index 0000000..9010abd --- /dev/null +++ b/spec/dummy/config/initializers/new_framework_defaults_5_1.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.1 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Make `form_with` generate non-remote forms. +Rails.application.config.action_view.form_with_generates_remote_forms = false + +# Unknown asset fallback will return the path passed in when the given +# asset is not present in the asset pipeline. +# Rails.application.config.assets.unknown_asset_fallback = false diff --git a/spec/dummy/config/initializers/wrap_parameters.rb b/spec/dummy/config/initializers/wrap_parameters.rb index 33725e9..bbfc396 100644 --- a/spec/dummy/config/initializers/wrap_parameters.rb +++ b/spec/dummy/config/initializers/wrap_parameters.rb @@ -5,10 +5,10 @@ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] if respond_to?(:wrap_parameters) + wrap_parameters format: [:json] end # To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true +# self.include_root_in_json = true # end diff --git a/spec/dummy/config/locales/en.yml b/spec/dummy/config/locales/en.yml index 0653957..decc5a8 100644 --- a/spec/dummy/config/locales/en.yml +++ b/spec/dummy/config/locales/en.yml @@ -16,6 +16,16 @@ # # This would use the information in config/locales/es.yml. # +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# 'true': 'foo' +# # To learn more, please read the Rails Internationalization guide # available at http://guides.rubyonrails.org/i18n.html. diff --git a/spec/dummy/config/puma.rb b/spec/dummy/config/puma.rb new file mode 100644 index 0000000..1e19380 --- /dev/null +++ b/spec/dummy/config/puma.rb @@ -0,0 +1,56 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# If you are preloading your application and using Active Record, it's +# recommended that you close any connections to the database before workers +# are forked to prevent connection leakage. +# +# before_fork do +# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) +# end + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted, this block will be run. If you are using the `preload_app!` +# option, you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, as Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end +# + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/spec/dummy/config/spring.rb b/spec/dummy/config/spring.rb new file mode 100644 index 0000000..c9119b4 --- /dev/null +++ b/spec/dummy/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } diff --git a/spec/dummy/db/migrate/20120201032713_create_posts.rb b/spec/dummy/db/migrate/20120201032713_create_posts.rb index c3c7176..df48ea2 100644 --- a/spec/dummy/db/migrate/20120201032713_create_posts.rb +++ b/spec/dummy/db/migrate/20120201032713_create_posts.rb @@ -1,4 +1,4 @@ -class CreatePosts < ActiveRecord::Migration +class CreatePosts < ActiveRecord::Migration[4.2] def change create_table :posts do |t| t.string :content diff --git a/spec/dummy/db/migrate/20120201053634_create_comments.rb b/spec/dummy/db/migrate/20120201053634_create_comments.rb index 91348ab..4cc6104 100644 --- a/spec/dummy/db/migrate/20120201053634_create_comments.rb +++ b/spec/dummy/db/migrate/20120201053634_create_comments.rb @@ -1,4 +1,4 @@ -class CreateComments < ActiveRecord::Migration +class CreateComments < ActiveRecord::Migration[4.2] def change create_table :comments do |t| t.integer :post_id diff --git a/spec/dummy/db/migrate/20120208222551_create_users.rb b/spec/dummy/db/migrate/20120208222551_create_users.rb index 37ce317..7187df3 100644 --- a/spec/dummy/db/migrate/20120208222551_create_users.rb +++ b/spec/dummy/db/migrate/20120208222551_create_users.rb @@ -1,4 +1,4 @@ -class CreateUsers < ActiveRecord::Migration +class CreateUsers < ActiveRecord::Migration[4.2] def change create_table :users do |t| t.string :name diff --git a/spec/dummy/db/migrate/20170807004445_some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs.rb b/spec/dummy/db/migrate/20170807004445_some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs.rb new file mode 100644 index 0000000..4ebe1f2 --- /dev/null +++ b/spec/dummy/db/migrate/20170807004445_some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs.rb @@ -0,0 +1,7 @@ +class SomeReallyAbsurdlyLongNamedClassThatYouWouldntHaveThoughtOfs < ActiveRecord::Migration[5.1] + def change + create_table :some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs do |t| + t.timestamps + end + end +end diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb index 361b35f..e677af8 100644 --- a/spec/dummy/db/schema.rb +++ b/spec/dummy/db/schema.rb @@ -1,4 +1,3 @@ -# 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. @@ -11,23 +10,28 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20120208222551) do +ActiveRecord::Schema.define(version: 20170807004445) do create_table "comments", force: :cascade do |t| - t.integer "post_id" - t.string "content" + t.integer "post_id" + t.string "content" t.datetime "created_at" t.datetime "updated_at" end create_table "posts", force: :cascade do |t| - t.string "content" + t.string "content" t.datetime "created_at" t.datetime "updated_at" end + create_table "some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs", force: :cascade do |t| + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "users", force: :cascade do |t| - t.string "name" + t.string "name" t.datetime "created_at" t.datetime "updated_at" end diff --git a/spec/dummy/db/test.sqlite3 b/spec/dummy/db/test.sqlite3 index eac4a5c129170522de58997d74faa2f4813e59bd..e8e1bd600fc1b0198a663198599a17bc121ccd0a 100644 GIT binary patch delta 853 zcmZp8z}RqrX@az%I0FL%7ZAgM@I)PBd2t5ak2`pIHZgE=88GmD&p<3ZF>5f}ekgf?ueQkB)*;X+cV2 z3DB#FB}xh)R!L@VDqLQ((T|s1+|-n@$sQbDiAC|5c_pbud5Jmkxv3?IKn;o5#5hnr zf~Ld>tPkX@?9@sng|ft=}E-?3RxU zlwVkgS(6b}A z(y41;p=)5SU}$J%VrXS*s%L6!Xlh}JTLzR%82LXk@P7oF{G6Ykk6D=$$=F2#0stz- B5*h#i delta 105 zcmZoTz|`=7ae}m<2m=EHI}pQw;6xo`Nf8F!XRN$HAvT^}416DXU3hl!JM#tbZrUs; y;KZ|e7mt@S7c>7U2L5;aclb{M1^4hzJ{4~T6g$Ddf1CdV|2v@AF8;|U@+| Date: Mon, 7 Aug 2017 07:44:26 -0400 Subject: [PATCH 3/6] add back old rails 4 --- spec/dummy_rails_4/.gitignore | 17 ++ spec/dummy_rails_4/Gemfile | 47 +++++ spec/dummy_rails_4/Gemfile.lock | 169 ++++++++++++++++++ spec/dummy_rails_4/README.rdoc | 28 +++ spec/dummy_rails_4/Rakefile | 6 + spec/dummy_rails_4/app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 13 ++ .../app/assets/stylesheets/application.css | 15 ++ .../app/controllers/application_controller.rb | 5 + .../app/controllers/comments_controller.rb | 22 +++ .../app/controllers/concerns/.keep | 0 .../app/controllers/posts_controller.rb | 38 ++++ .../app/helpers/application_helper.rb | 2 + spec/dummy_rails_4/app/mailers/.keep | 0 spec/dummy_rails_4/app/models/.keep | 0 spec/dummy_rails_4/app/models/comment.rb | 3 + spec/dummy_rails_4/app/models/concerns/.keep | 0 spec/dummy_rails_4/app/models/post.rb | 5 + spec/dummy_rails_4/app/models/user.rb | 2 + .../app/views/layouts/application.html.erb | 14 ++ .../app/views/posts/_form.html.erb | 21 +++ .../app/views/posts/edit.html.erb | 6 + .../app/views/posts/index.html.erb | 5 + .../app/views/posts/new.html.erb | 5 + .../app/views/posts/show.html.erb | 34 ++++ spec/dummy_rails_4/bin/bundle | 3 + spec/dummy_rails_4/bin/rails | 8 + spec/dummy_rails_4/bin/rake | 8 + spec/dummy_rails_4/bin/setup | 29 +++ spec/dummy_rails_4/bin/spring | 18 ++ spec/dummy_rails_4/config.ru | 4 + spec/dummy_rails_4/config/application.rb | 27 +++ spec/dummy_rails_4/config/boot.rb | 3 + spec/dummy_rails_4/config/database.yml | 25 +++ spec/dummy_rails_4/config/environment.rb | 5 + .../config/environments/development.rb | 41 +++++ .../config/environments/production.rb | 79 ++++++++ .../dummy_rails_4/config/environments/test.rb | 42 +++++ .../config/initializers/assets.rb | 11 ++ .../initializers/backtrace_silencers.rb | 7 + .../config/initializers/cookies_serializer.rb | 3 + .../initializers/filter_parameter_logging.rb | 4 + .../config/initializers/inflections.rb | 16 ++ .../config/initializers/mime_types.rb | 4 + .../config/initializers/session_store.rb | 3 + .../config/initializers/wrap_parameters.rb | 14 ++ spec/dummy_rails_4/config/locales/en.yml | 23 +++ spec/dummy_rails_4/config/routes.rb | 4 + spec/dummy_rails_4/config/secrets.yml | 22 +++ .../db/migrate/20120201032713_create_posts.rb | 9 + .../migrate/20120201053634_create_comments.rb | 10 ++ .../db/migrate/20120208222551_create_users.rb | 9 + spec/dummy_rails_4/db/schema.rb | 35 ++++ spec/dummy_rails_4/db/seeds.rb | 7 + spec/dummy_rails_4/db/test.sqlite3 | Bin 0 -> 28672 bytes spec/dummy_rails_4/lib/assets/.keep | 0 spec/dummy_rails_4/lib/tasks/.keep | 0 spec/dummy_rails_4/log/.keep | 0 spec/dummy_rails_4/public/404.html | 67 +++++++ spec/dummy_rails_4/public/422.html | 67 +++++++ spec/dummy_rails_4/public/500.html | 66 +++++++ spec/dummy_rails_4/public/favicon.ico | 0 spec/dummy_rails_4/public/robots.txt | 5 + spec/dummy_rails_4/test/controllers/.keep | 0 spec/dummy_rails_4/test/fixtures/.keep | 0 spec/dummy_rails_4/test/helpers/.keep | 0 spec/dummy_rails_4/test/integration/.keep | 0 spec/dummy_rails_4/test/mailers/.keep | 0 spec/dummy_rails_4/test/models/.keep | 0 spec/dummy_rails_4/test/test_helper.rb | 10 ++ .../vendor/assets/javascripts/.keep | 0 .../vendor/assets/stylesheets/.keep | 0 72 files changed, 1145 insertions(+) create mode 100644 spec/dummy_rails_4/.gitignore create mode 100644 spec/dummy_rails_4/Gemfile create mode 100644 spec/dummy_rails_4/Gemfile.lock create mode 100644 spec/dummy_rails_4/README.rdoc create mode 100644 spec/dummy_rails_4/Rakefile create mode 100644 spec/dummy_rails_4/app/assets/images/.keep create mode 100644 spec/dummy_rails_4/app/assets/javascripts/application.js create mode 100644 spec/dummy_rails_4/app/assets/stylesheets/application.css create mode 100644 spec/dummy_rails_4/app/controllers/application_controller.rb create mode 100644 spec/dummy_rails_4/app/controllers/comments_controller.rb create mode 100644 spec/dummy_rails_4/app/controllers/concerns/.keep create mode 100644 spec/dummy_rails_4/app/controllers/posts_controller.rb create mode 100644 spec/dummy_rails_4/app/helpers/application_helper.rb create mode 100644 spec/dummy_rails_4/app/mailers/.keep create mode 100644 spec/dummy_rails_4/app/models/.keep create mode 100644 spec/dummy_rails_4/app/models/comment.rb create mode 100644 spec/dummy_rails_4/app/models/concerns/.keep create mode 100644 spec/dummy_rails_4/app/models/post.rb create mode 100644 spec/dummy_rails_4/app/models/user.rb create mode 100644 spec/dummy_rails_4/app/views/layouts/application.html.erb create mode 100644 spec/dummy_rails_4/app/views/posts/_form.html.erb create mode 100644 spec/dummy_rails_4/app/views/posts/edit.html.erb create mode 100644 spec/dummy_rails_4/app/views/posts/index.html.erb create mode 100644 spec/dummy_rails_4/app/views/posts/new.html.erb create mode 100644 spec/dummy_rails_4/app/views/posts/show.html.erb create mode 100755 spec/dummy_rails_4/bin/bundle create mode 100755 spec/dummy_rails_4/bin/rails create mode 100755 spec/dummy_rails_4/bin/rake create mode 100755 spec/dummy_rails_4/bin/setup create mode 100755 spec/dummy_rails_4/bin/spring create mode 100644 spec/dummy_rails_4/config.ru create mode 100644 spec/dummy_rails_4/config/application.rb create mode 100644 spec/dummy_rails_4/config/boot.rb create mode 100644 spec/dummy_rails_4/config/database.yml create mode 100644 spec/dummy_rails_4/config/environment.rb create mode 100644 spec/dummy_rails_4/config/environments/development.rb create mode 100644 spec/dummy_rails_4/config/environments/production.rb create mode 100644 spec/dummy_rails_4/config/environments/test.rb create mode 100644 spec/dummy_rails_4/config/initializers/assets.rb create mode 100644 spec/dummy_rails_4/config/initializers/backtrace_silencers.rb create mode 100644 spec/dummy_rails_4/config/initializers/cookies_serializer.rb create mode 100644 spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb create mode 100644 spec/dummy_rails_4/config/initializers/inflections.rb create mode 100644 spec/dummy_rails_4/config/initializers/mime_types.rb create mode 100644 spec/dummy_rails_4/config/initializers/session_store.rb create mode 100644 spec/dummy_rails_4/config/initializers/wrap_parameters.rb create mode 100644 spec/dummy_rails_4/config/locales/en.yml create mode 100644 spec/dummy_rails_4/config/routes.rb create mode 100644 spec/dummy_rails_4/config/secrets.yml create mode 100644 spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb create mode 100644 spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb create mode 100644 spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb create mode 100644 spec/dummy_rails_4/db/schema.rb create mode 100644 spec/dummy_rails_4/db/seeds.rb create mode 100644 spec/dummy_rails_4/db/test.sqlite3 create mode 100644 spec/dummy_rails_4/lib/assets/.keep create mode 100644 spec/dummy_rails_4/lib/tasks/.keep create mode 100644 spec/dummy_rails_4/log/.keep create mode 100644 spec/dummy_rails_4/public/404.html create mode 100644 spec/dummy_rails_4/public/422.html create mode 100644 spec/dummy_rails_4/public/500.html create mode 100644 spec/dummy_rails_4/public/favicon.ico create mode 100644 spec/dummy_rails_4/public/robots.txt create mode 100644 spec/dummy_rails_4/test/controllers/.keep create mode 100644 spec/dummy_rails_4/test/fixtures/.keep create mode 100644 spec/dummy_rails_4/test/helpers/.keep create mode 100644 spec/dummy_rails_4/test/integration/.keep create mode 100644 spec/dummy_rails_4/test/mailers/.keep create mode 100644 spec/dummy_rails_4/test/models/.keep create mode 100644 spec/dummy_rails_4/test/test_helper.rb create mode 100644 spec/dummy_rails_4/vendor/assets/javascripts/.keep create mode 100644 spec/dummy_rails_4/vendor/assets/stylesheets/.keep diff --git a/spec/dummy_rails_4/.gitignore b/spec/dummy_rails_4/.gitignore new file mode 100644 index 0000000..9c6a60a --- /dev/null +++ b/spec/dummy_rails_4/.gitignore @@ -0,0 +1,17 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/development.sqlite3 +/db/*.sqlite3-journal + +# Ignore all logfiles and tempfiles. +/log/* +!/log/.keep +/tmp diff --git a/spec/dummy_rails_4/Gemfile b/spec/dummy_rails_4/Gemfile new file mode 100644 index 0000000..5461f82 --- /dev/null +++ b/spec/dummy_rails_4/Gemfile @@ -0,0 +1,47 @@ +source 'https://rubygems.org' + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '4.2.0' +# Use sqlite3 as the database for Active Record +gem 'sqlite3' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 5.0' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# Use CoffeeScript for .coffee assets and views +gem 'coffee-rails', '~> 4.1.0' +# See https://github.com/sstephenson/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library +gem 'jquery-rails' +# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks +gem 'turbolinks' +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 2.0' +# bundle exec rake doc:rails generates the API under doc/api. +gem 'sdoc', '~> 0.4.0', group: :doc + +gem 'obfuscate_id', '~> 0.2.0' + +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use Unicorn as the app server +# gem 'unicorn' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +group :development, :test do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug' + + # Access an IRB console on exception pages or by using <%= console %> in views + gem 'web-console', '~> 2.0' + + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' +end + diff --git a/spec/dummy_rails_4/Gemfile.lock b/spec/dummy_rails_4/Gemfile.lock new file mode 100644 index 0000000..f29776d --- /dev/null +++ b/spec/dummy_rails_4/Gemfile.lock @@ -0,0 +1,169 @@ +GEM + remote: https://rubygems.org/ + specs: + actionmailer (4.2.0) + actionpack (= 4.2.0) + actionview (= 4.2.0) + activejob (= 4.2.0) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.0) + actionview (= 4.2.0) + activesupport (= 4.2.0) + rack (~> 1.6.0) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + actionview (4.2.0) + activesupport (= 4.2.0) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + activejob (4.2.0) + activesupport (= 4.2.0) + globalid (>= 0.3.0) + activemodel (4.2.0) + activesupport (= 4.2.0) + builder (~> 3.1) + activerecord (4.2.0) + activemodel (= 4.2.0) + activesupport (= 4.2.0) + arel (~> 6.0) + activesupport (4.2.0) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + arel (6.0.0) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + builder (3.2.2) + byebug (3.5.1) + columnize (~> 0.8) + debugger-linecache (~> 1.2) + slop (~> 3.6) + coffee-rails (4.1.0) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.0) + coffee-script (2.3.0) + coffee-script-source + execjs + coffee-script-source (1.9.0) + columnize (0.9.0) + debug_inspector (0.0.2) + debugger-linecache (1.2.0) + erubis (2.7.0) + execjs (2.3.0) + globalid (0.3.2) + activesupport (>= 4.1.0) + hike (1.2.3) + i18n (0.7.0) + jbuilder (2.2.6) + activesupport (>= 3.0.0, < 5) + multi_json (~> 1.2) + jquery-rails (4.0.3) + rails-dom-testing (~> 1.0) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + json (1.8.2) + loofah (2.0.1) + nokogiri (>= 1.5.9) + mail (2.6.3) + mime-types (>= 1.16, < 3) + mime-types (2.4.3) + mini_portile (0.6.2) + minitest (5.5.1) + multi_json (1.10.1) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + obfuscate_id (0.2.0) + rails (~> 4.2.0) + scatter_swap (~> 0.0.3) + rack (1.6.0) + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.0) + actionmailer (= 4.2.0) + actionpack (= 4.2.0) + actionview (= 4.2.0) + activejob (= 4.2.0) + activemodel (= 4.2.0) + activerecord (= 4.2.0) + activesupport (= 4.2.0) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.0) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.5) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.1) + loofah (~> 2.0) + railties (4.2.0) + actionpack (= 4.2.0) + activesupport (= 4.2.0) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.4.2) + rdoc (4.2.0) + json (~> 1.4) + sass (3.4.11) + sass-rails (5.0.1) + railties (>= 4.0.0, < 5.0) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (~> 1.1) + scatter_swap (0.0.3) + sdoc (0.4.1) + json (~> 1.7, >= 1.7.7) + rdoc (~> 4.0) + slop (3.6.0) + spring (1.3.0) + sprockets (2.12.3) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-rails (2.2.4) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (>= 2.8, < 4.0) + sqlite3 (1.3.10) + thor (0.19.1) + thread_safe (0.3.4) + tilt (1.4.1) + turbolinks (2.5.3) + coffee-rails + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (2.7.0) + execjs (>= 0.3.0) + json (>= 1.8.0) + web-console (2.0.0) + activemodel (~> 4.0) + binding_of_caller (>= 0.7.2) + railties (~> 4.0) + sprockets-rails (>= 2.0, < 4.0) + +PLATFORMS + ruby + +DEPENDENCIES + byebug + coffee-rails (~> 4.1.0) + jbuilder (~> 2.0) + jquery-rails + obfuscate_id (~> 0.2.0) + rails (= 4.2.0) + sass-rails (~> 5.0) + sdoc (~> 0.4.0) + spring + sqlite3 + turbolinks + uglifier (>= 1.3.0) + web-console (~> 2.0) diff --git a/spec/dummy_rails_4/README.rdoc b/spec/dummy_rails_4/README.rdoc new file mode 100644 index 0000000..dd4e97e --- /dev/null +++ b/spec/dummy_rails_4/README.rdoc @@ -0,0 +1,28 @@ +== README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... + + +Please feel free to use a different markup language if you do not plan to run +rake doc:app. diff --git a/spec/dummy_rails_4/Rakefile b/spec/dummy_rails_4/Rakefile new file mode 100644 index 0000000..ba6b733 --- /dev/null +++ b/spec/dummy_rails_4/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require File.expand_path('../config/application', __FILE__) + +Rails.application.load_tasks diff --git a/spec/dummy_rails_4/app/assets/images/.keep b/spec/dummy_rails_4/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/app/assets/javascripts/application.js b/spec/dummy_rails_4/app/assets/javascripts/application.js new file mode 100644 index 0000000..c28e5ba --- /dev/null +++ b/spec/dummy_rails_4/app/assets/javascripts/application.js @@ -0,0 +1,13 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. +// +// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require_tree . diff --git a/spec/dummy_rails_4/app/assets/stylesheets/application.css b/spec/dummy_rails_4/app/assets/stylesheets/application.css new file mode 100644 index 0000000..f9cd5b3 --- /dev/null +++ b/spec/dummy_rails_4/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any styles + * defined in the other CSS/SCSS files in this directory. It is generally better to create a new + * file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/spec/dummy_rails_4/app/controllers/application_controller.rb b/spec/dummy_rails_4/app/controllers/application_controller.rb new file mode 100644 index 0000000..d83690e --- /dev/null +++ b/spec/dummy_rails_4/app/controllers/application_controller.rb @@ -0,0 +1,5 @@ +class ApplicationController < ActionController::Base + # Prevent CSRF attacks by raising an exception. + # For APIs, you may want to use :null_session instead. + protect_from_forgery with: :exception +end diff --git a/spec/dummy_rails_4/app/controllers/comments_controller.rb b/spec/dummy_rails_4/app/controllers/comments_controller.rb new file mode 100644 index 0000000..9d47079 --- /dev/null +++ b/spec/dummy_rails_4/app/controllers/comments_controller.rb @@ -0,0 +1,22 @@ +class CommentsController < ApplicationController + + def create + @comment = Comment.create! comment_params + redirect_to post_path(@comment.post) + end + + def update + @comment = Comment.find(params[:id]) + if @comment.update(comment_params) + redirect_to @comment.post + else + render :edit + end + end + + private + + def comment_params + params.require(:comment).permit(:id, :content, :post_id) + end +end diff --git a/spec/dummy_rails_4/app/controllers/concerns/.keep b/spec/dummy_rails_4/app/controllers/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/app/controllers/posts_controller.rb b/spec/dummy_rails_4/app/controllers/posts_controller.rb new file mode 100644 index 0000000..01c6215 --- /dev/null +++ b/spec/dummy_rails_4/app/controllers/posts_controller.rb @@ -0,0 +1,38 @@ +class PostsController < ApplicationController + + def index + @posts = Post.all + end + + def new + @post = Post.new + end + + def edit + @post = Post.find(params[:id]) + end + + def create + @post = Post.create!(post_params) + redirect_to @post + end + + def show + @post = Post.find(params[:id]) + end + + def update + @post = Post.find(params[:id]) + if @post.update(post_params) + redirect_to @post + else + render :edit + end + end + + private + + def post_params + params.require(:post).permit(:id, :content) + end +end diff --git a/spec/dummy_rails_4/app/helpers/application_helper.rb b/spec/dummy_rails_4/app/helpers/application_helper.rb new file mode 100644 index 0000000..de6be79 --- /dev/null +++ b/spec/dummy_rails_4/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/spec/dummy_rails_4/app/mailers/.keep b/spec/dummy_rails_4/app/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/app/models/.keep b/spec/dummy_rails_4/app/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/app/models/comment.rb b/spec/dummy_rails_4/app/models/comment.rb new file mode 100644 index 0000000..4e76c5b --- /dev/null +++ b/spec/dummy_rails_4/app/models/comment.rb @@ -0,0 +1,3 @@ +class Comment < ActiveRecord::Base + belongs_to :post +end diff --git a/spec/dummy_rails_4/app/models/concerns/.keep b/spec/dummy_rails_4/app/models/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/app/models/post.rb b/spec/dummy_rails_4/app/models/post.rb new file mode 100644 index 0000000..a5d7f9b --- /dev/null +++ b/spec/dummy_rails_4/app/models/post.rb @@ -0,0 +1,5 @@ +class Post < ActiveRecord::Base + has_many :comments + + obfuscate_id :spin => 123456789 +end diff --git a/spec/dummy_rails_4/app/models/user.rb b/spec/dummy_rails_4/app/models/user.rb new file mode 100644 index 0000000..4a57cf0 --- /dev/null +++ b/spec/dummy_rails_4/app/models/user.rb @@ -0,0 +1,2 @@ +class User < ActiveRecord::Base +end diff --git a/spec/dummy_rails_4/app/views/layouts/application.html.erb b/spec/dummy_rails_4/app/views/layouts/application.html.erb new file mode 100644 index 0000000..593a778 --- /dev/null +++ b/spec/dummy_rails_4/app/views/layouts/application.html.erb @@ -0,0 +1,14 @@ + + + + Dummy + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> + <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> + <%= csrf_meta_tags %> + + + +<%= yield %> + + + diff --git a/spec/dummy_rails_4/app/views/posts/_form.html.erb b/spec/dummy_rails_4/app/views/posts/_form.html.erb new file mode 100644 index 0000000..3f645ac --- /dev/null +++ b/spec/dummy_rails_4/app/views/posts/_form.html.erb @@ -0,0 +1,21 @@ +<%= form_for(@post) do |f| %> + <% if @post.errors.any? %> +
+

<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:

+ +
    + <% @post.errors.full_messages.each do |message| %> +
  • <%= message %>
  • + <% end %> +
+
+ <% end %> + +
+ <%= f.label :content %> + <%= f.text_field :content %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/spec/dummy_rails_4/app/views/posts/edit.html.erb b/spec/dummy_rails_4/app/views/posts/edit.html.erb new file mode 100644 index 0000000..f1e9acb --- /dev/null +++ b/spec/dummy_rails_4/app/views/posts/edit.html.erb @@ -0,0 +1,6 @@ +

Editing Post

+ +<%= render 'form' %> + +<%= link_to 'Show', @post %> | +<%= link_to 'Back', posts_path %> diff --git a/spec/dummy_rails_4/app/views/posts/index.html.erb b/spec/dummy_rails_4/app/views/posts/index.html.erb new file mode 100644 index 0000000..ffd14ac --- /dev/null +++ b/spec/dummy_rails_4/app/views/posts/index.html.erb @@ -0,0 +1,5 @@ +
    + <% @posts.each do |post| %> +
  • <%= link_to post.content, post %>
  • + <% end %> +
diff --git a/spec/dummy_rails_4/app/views/posts/new.html.erb b/spec/dummy_rails_4/app/views/posts/new.html.erb new file mode 100644 index 0000000..3e5f187 --- /dev/null +++ b/spec/dummy_rails_4/app/views/posts/new.html.erb @@ -0,0 +1,5 @@ +

New Post

+ +<%= render 'form' %> + +<%= link_to 'Back', posts_path %> diff --git a/spec/dummy_rails_4/app/views/posts/show.html.erb b/spec/dummy_rails_4/app/views/posts/show.html.erb new file mode 100644 index 0000000..97a6c57 --- /dev/null +++ b/spec/dummy_rails_4/app/views/posts/show.html.erb @@ -0,0 +1,34 @@ +post: <%= @post.content %>
+post.id: <%= @post.id %>
+post.to_param: <%= @post.to_param %>
+post_path: <%= post_path @post %>. + +
    + <% @post.comments.each do |comment| %> +
  • + comment: <%= comment.content %>
    + comment.id: <%= comment.id %>
    + comment.to_param: <%= comment.to_param %>
    + comment_path: <%= comment_path comment %>. + <%= form_for(comment) do |f| %> +
  • +
    + <%= f.label :content %> + <%= f.text_field :content %> +
    +
    + <%= f.submit %> +
    + <% end %> +
  • + <% end %> +
+ +<%= link_to 'Edit Post', edit_post_path(@post) %> | + +<%= form_for @post.comments.new do |f| %> + <%= f.hidden_field :post_id %> + <%= f.label :content %> + <%= f.text_field :content %> + <%= f.submit %> +<% end %> diff --git a/spec/dummy_rails_4/bin/bundle b/spec/dummy_rails_4/bin/bundle new file mode 100755 index 0000000..66e9889 --- /dev/null +++ b/spec/dummy_rails_4/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/spec/dummy_rails_4/bin/rails b/spec/dummy_rails_4/bin/rails new file mode 100755 index 0000000..4d608ed --- /dev/null +++ b/spec/dummy_rails_4/bin/rails @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +begin + load File.expand_path("../spring", __FILE__) +rescue LoadError +end +APP_PATH = File.expand_path('../../config/application', __FILE__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/spec/dummy_rails_4/bin/rake b/spec/dummy_rails_4/bin/rake new file mode 100755 index 0000000..8017a02 --- /dev/null +++ b/spec/dummy_rails_4/bin/rake @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +begin + load File.expand_path("../spring", __FILE__) +rescue LoadError +end +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/spec/dummy_rails_4/bin/setup b/spec/dummy_rails_4/bin/setup new file mode 100755 index 0000000..acdb2c1 --- /dev/null +++ b/spec/dummy_rails_4/bin/setup @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +Dir.chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file: + + puts "== Installing dependencies ==" + system "gem install bundler --conservative" + system "bundle check || bundle install" + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # system "cp config/database.yml.sample config/database.yml" + # end + + puts "\n== Preparing database ==" + system "bin/rake db:setup" + + puts "\n== Removing old logs and tempfiles ==" + system "rm -f log/*" + system "rm -rf tmp/cache" + + puts "\n== Restarting application server ==" + system "touch tmp/restart.txt" +end diff --git a/spec/dummy_rails_4/bin/spring b/spec/dummy_rails_4/bin/spring new file mode 100755 index 0000000..de6070b --- /dev/null +++ b/spec/dummy_rails_4/bin/spring @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast +# It gets overwritten when you run the `spring binstub` command + +unless defined?(Spring) + require "rubygems" + require "bundler" + + if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) + ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) + ENV["GEM_HOME"] = nil + Gem.paths = ENV + + gem "spring", match[1] + require "spring/binstub" + end +end diff --git a/spec/dummy_rails_4/config.ru b/spec/dummy_rails_4/config.ru new file mode 100644 index 0000000..bd83b25 --- /dev/null +++ b/spec/dummy_rails_4/config.ru @@ -0,0 +1,4 @@ +# This file is used by Rack-based servers to start the application. + +require ::File.expand_path('../config/environment', __FILE__) +run Rails.application diff --git a/spec/dummy_rails_4/config/application.rb b/spec/dummy_rails_4/config/application.rb new file mode 100644 index 0000000..c1e5d67 --- /dev/null +++ b/spec/dummy_rails_4/config/application.rb @@ -0,0 +1,27 @@ +require File.expand_path('../boot', __FILE__) + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) +require File.expand_path("../../../../lib/obfuscate_id", __FILE__) + +module Dummy + class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. + # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. + # config.time_zone = 'Central Time (US & Canada)' + + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + # config.i18n.default_locale = :de + + # Do not swallow errors in after_commit/after_rollback callbacks. + config.active_record.raise_in_transactional_callbacks = true + end +end diff --git a/spec/dummy_rails_4/config/boot.rb b/spec/dummy_rails_4/config/boot.rb new file mode 100644 index 0000000..6b750f0 --- /dev/null +++ b/spec/dummy_rails_4/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/spec/dummy_rails_4/config/database.yml b/spec/dummy_rails_4/config/database.yml new file mode 100644 index 0000000..1c1a37c --- /dev/null +++ b/spec/dummy_rails_4/config/database.yml @@ -0,0 +1,25 @@ +# SQLite version 3.x +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +# +default: &default + adapter: sqlite3 + pool: 5 + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/spec/dummy_rails_4/config/environment.rb b/spec/dummy_rails_4/config/environment.rb new file mode 100644 index 0000000..ee8d90d --- /dev/null +++ b/spec/dummy_rails_4/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require File.expand_path('../application', __FILE__) + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/spec/dummy_rails_4/config/environments/development.rb b/spec/dummy_rails_4/config/environments/development.rb new file mode 100644 index 0000000..b55e214 --- /dev/null +++ b/spec/dummy_rails_4/config/environments/development.rb @@ -0,0 +1,41 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. + config.assets.digest = true + + # Adds additional error checking when serving assets at runtime. + # Checks for improperly declared sprockets dependencies. + # Raises helpful error messages. + config.assets.raise_runtime_errors = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/spec/dummy_rails_4/config/environments/production.rb b/spec/dummy_rails_4/config/environments/production.rb new file mode 100644 index 0000000..5c1b32e --- /dev/null +++ b/spec/dummy_rails_4/config/environments/production.rb @@ -0,0 +1,79 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like + # NGINX, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. + config.assets.digest = true + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + # config.log_tags = [ :subdomain, :uuid ] + + # Use a different logger for distributed setups. + # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/spec/dummy_rails_4/config/environments/test.rb b/spec/dummy_rails_4/config/environments/test.rb new file mode 100644 index 0000000..1c19f08 --- /dev/null +++ b/spec/dummy_rails_4/config/environments/test.rb @@ -0,0 +1,42 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure static file server for tests with Cache-Control for performance. + config.serve_static_files = true + config.static_cache_control = 'public, max-age=3600' + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Randomize the order test cases are executed. + config.active_support.test_order = :random + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/spec/dummy_rails_4/config/initializers/assets.rb b/spec/dummy_rails_4/config/initializers/assets.rb new file mode 100644 index 0000000..01ef3e6 --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/assets.rb @@ -0,0 +1,11 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/spec/dummy_rails_4/config/initializers/backtrace_silencers.rb b/spec/dummy_rails_4/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..59385cd --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/spec/dummy_rails_4/config/initializers/cookies_serializer.rb b/spec/dummy_rails_4/config/initializers/cookies_serializer.rb new file mode 100644 index 0000000..7f70458 --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/cookies_serializer.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb b/spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..4a994e1 --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/spec/dummy_rails_4/config/initializers/inflections.rb b/spec/dummy_rails_4/config/initializers/inflections.rb new file mode 100644 index 0000000..ac033bf --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/spec/dummy_rails_4/config/initializers/mime_types.rb b/spec/dummy_rails_4/config/initializers/mime_types.rb new file mode 100644 index 0000000..dc18996 --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/spec/dummy_rails_4/config/initializers/session_store.rb b/spec/dummy_rails_4/config/initializers/session_store.rb new file mode 100644 index 0000000..e766b67 --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/session_store.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.session_store :cookie_store, key: '_dummy_session' diff --git a/spec/dummy_rails_4/config/initializers/wrap_parameters.rb b/spec/dummy_rails_4/config/initializers/wrap_parameters.rb new file mode 100644 index 0000000..33725e9 --- /dev/null +++ b/spec/dummy_rails_4/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/spec/dummy_rails_4/config/locales/en.yml b/spec/dummy_rails_4/config/locales/en.yml new file mode 100644 index 0000000..0653957 --- /dev/null +++ b/spec/dummy_rails_4/config/locales/en.yml @@ -0,0 +1,23 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/spec/dummy_rails_4/config/routes.rb b/spec/dummy_rails_4/config/routes.rb new file mode 100644 index 0000000..cacd98d --- /dev/null +++ b/spec/dummy_rails_4/config/routes.rb @@ -0,0 +1,4 @@ +Rails.application.routes.draw do + resources :comments + resources :posts +end diff --git a/spec/dummy_rails_4/config/secrets.yml b/spec/dummy_rails_4/config/secrets.yml new file mode 100644 index 0000000..2f00f6c --- /dev/null +++ b/spec/dummy_rails_4/config/secrets.yml @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rake secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: a483fbd95f24c265697443cc5d06a20b3d02270001f5df82307f48f709c4ad5646a836a0f880b9f1a481112184179aefb93bc5c0319dd215b3eb214fa8849e0f + +test: + secret_key_base: c676a70370715f1e512a0a81e919a641da823a6aa8c904d7acfff4f842edfd90ceab730eb3a61ed9bdb196bb0b6f0a5f41c84138b97af15b9644fdfcfad4e554 + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb b/spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb new file mode 100644 index 0000000..c3c7176 --- /dev/null +++ b/spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb @@ -0,0 +1,9 @@ +class CreatePosts < ActiveRecord::Migration + def change + create_table :posts do |t| + t.string :content + + t.timestamps + end + end +end diff --git a/spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb b/spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb new file mode 100644 index 0000000..91348ab --- /dev/null +++ b/spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb @@ -0,0 +1,10 @@ +class CreateComments < ActiveRecord::Migration + def change + create_table :comments do |t| + t.integer :post_id + t.string :content + + t.timestamps + end + end +end diff --git a/spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb b/spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb new file mode 100644 index 0000000..37ce317 --- /dev/null +++ b/spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb @@ -0,0 +1,9 @@ +class CreateUsers < ActiveRecord::Migration + def change + create_table :users do |t| + t.string :name + + t.timestamps + end + end +end diff --git a/spec/dummy_rails_4/db/schema.rb b/spec/dummy_rails_4/db/schema.rb new file mode 100644 index 0000000..361b35f --- /dev/null +++ b/spec/dummy_rails_4/db/schema.rb @@ -0,0 +1,35 @@ +# 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: 20120208222551) do + + create_table "comments", force: :cascade do |t| + t.integer "post_id" + t.string "content" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "posts", force: :cascade do |t| + t.string "content" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "users", force: :cascade do |t| + t.string "name" + t.datetime "created_at" + t.datetime "updated_at" + end + +end diff --git a/spec/dummy_rails_4/db/seeds.rb b/spec/dummy_rails_4/db/seeds.rb new file mode 100644 index 0000000..4edb1e8 --- /dev/null +++ b/spec/dummy_rails_4/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). +# +# Examples: +# +# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) +# Mayor.create(name: 'Emanuel', city: cities.first) diff --git a/spec/dummy_rails_4/db/test.sqlite3 b/spec/dummy_rails_4/db/test.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..eac4a5c129170522de58997d74faa2f4813e59bd GIT binary patch literal 28672 zcmeI#-)qxQ6bJC6*&3Yf(#a$bV{*yU!Y2J?RRqDhg;DI%uC`#GN|s)?K$C7sI(+T^ zBp>$|4F3gv_Hp2U;7QiXVkzQ$8TA`Ta_>p*&AFeOm-GIx?u49u9Qv*mva*m9L{WId zm>>x2bjoy2k2Pv6O*?cKZ?)$&*M+Cwm$URVow*cNe`NPEm&)#HGy8eo0K_2x0SG_< z0uX=z1Rwwb2+RtM<+QB6&Wq!`{L^crUO|xNG%X=h(MGXXphp0eQD&RNDsY zn6<->!D{B7@quachHI>0GHqrOjcsY?+z;prnm$;T)jTC4ht|=6&%8SmNKZ0oSKro+ zKTOWfE#E$|d}cP<%TE#OZ!h5V>v%Q~ zl3gj0@^25fBBdP~sgGZ+$m-^%c(EVPX%AhO@(ZT-RALrw8otxoBeh<%pAH!ub3a=9 zzi~vhITiglAOHafKmY;|fB*y_009U<00IzLU;)(s3%t2l8U!E!0SG_<0uX=z1Rwwb z2tZ&WfchW50t6rc0SG_<0uX=z1Rwwb2tZ)*1yKJl{vKn65P$##AOHafKmY;|fB*y_ z0D-9fmy|Dpa;}#T8nUq+AKgSLI5%zSj#xau9$31Rwwb2tWV=5P$##AOL~? aUf_|Wi^=L=N`&I_KeZ<54<>I->i?gvj5h@U literal 0 HcmV?d00001 diff --git a/spec/dummy_rails_4/lib/assets/.keep b/spec/dummy_rails_4/lib/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/lib/tasks/.keep b/spec/dummy_rails_4/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/log/.keep b/spec/dummy_rails_4/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/public/404.html b/spec/dummy_rails_4/public/404.html new file mode 100644 index 0000000..b612547 --- /dev/null +++ b/spec/dummy_rails_4/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/spec/dummy_rails_4/public/422.html b/spec/dummy_rails_4/public/422.html new file mode 100644 index 0000000..a21f82b --- /dev/null +++ b/spec/dummy_rails_4/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/spec/dummy_rails_4/public/500.html b/spec/dummy_rails_4/public/500.html new file mode 100644 index 0000000..061abc5 --- /dev/null +++ b/spec/dummy_rails_4/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/spec/dummy_rails_4/public/favicon.ico b/spec/dummy_rails_4/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/public/robots.txt b/spec/dummy_rails_4/public/robots.txt new file mode 100644 index 0000000..3c9c7c0 --- /dev/null +++ b/spec/dummy_rails_4/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-agent: * +# Disallow: / diff --git a/spec/dummy_rails_4/test/controllers/.keep b/spec/dummy_rails_4/test/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/test/fixtures/.keep b/spec/dummy_rails_4/test/fixtures/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/test/helpers/.keep b/spec/dummy_rails_4/test/helpers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/test/integration/.keep b/spec/dummy_rails_4/test/integration/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/test/mailers/.keep b/spec/dummy_rails_4/test/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/test/models/.keep b/spec/dummy_rails_4/test/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/test/test_helper.rb b/spec/dummy_rails_4/test/test_helper.rb new file mode 100644 index 0000000..92e39b2 --- /dev/null +++ b/spec/dummy_rails_4/test/test_helper.rb @@ -0,0 +1,10 @@ +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../../config/environment', __FILE__) +require 'rails/test_help' + +class ActiveSupport::TestCase + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/spec/dummy_rails_4/vendor/assets/javascripts/.keep b/spec/dummy_rails_4/vendor/assets/javascripts/.keep new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy_rails_4/vendor/assets/stylesheets/.keep b/spec/dummy_rails_4/vendor/assets/stylesheets/.keep new file mode 100644 index 0000000..e69de29 From 95340be623fbb54a990cc88bf6cdf44b440b0437 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Mathieu Date: Mon, 7 Aug 2017 07:49:20 -0400 Subject: [PATCH 4/6] add rails 5 version in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6007403..faffc95 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ ActiveRecord reverses this obfuscated id back to the plain id before building th ## Versions -This is tested with Rails 4.2.0. For other versions of Rails, please see [the releases](https://github.com/namick/obfuscate_id/releases). +This is tested with Rails 5.1.2. For other versions of Rails, please see [the releases](https://github.com/namick/obfuscate_id/releases). If you are trying to get it to work with a different version of rails that is not tested, let me know in [the issues](https://github.com/namick/obfuscate_id/issues) From d2dab838f29aa0e9a784e1944b96847d9f3897cb Mon Sep 17 00:00:00 2001 From: Pierre-Yves Mathieu Date: Mon, 7 Aug 2017 09:17:29 -0400 Subject: [PATCH 5/6] fix specs --- lib/obfuscate_id.rb | 20 +++++++++++++------- spec/integration/post_with_comment_spec.rb | 12 ++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/lib/obfuscate_id.rb b/lib/obfuscate_id.rb index 319f8fd..069b56b 100644 --- a/lib/obfuscate_id.rb +++ b/lib/obfuscate_id.rb @@ -4,19 +4,25 @@ def obfuscate_id(options = {}) extend ClassMethods include InstanceMethods - cattr_accessor :obfuscate_id_spin + cattr_accessor :obfuscate_id_spin, :clean_url_class_name self.obfuscate_id_spin = (options[:spin] || obfuscate_id_default_spin) + set_clean_url_class_name end - def self.hide(id, spin) - ScatterSwap.hash(id, spin) + def self.hide(id,name, spin) + name + ScatterSwap.hash(id, spin) end - def self.show(id, spin) - ScatterSwap.reverse_hash(id, spin) + def self.show(id,name, spin) + ScatterSwap.reverse_hash(id.gsub(name, ""), spin) end module ClassMethods + + def set_clean_url_class_name + self.clean_url_class_name = self.name.gsub("::", "-").underscore + end + def find(*args) scope = args.slice!(0) options = args.slice!(0) || {} @@ -35,7 +41,7 @@ def has_obfuscated_id? end def deobfuscate_id(obfuscated_id) - ObfuscateId.show(obfuscated_id, self.obfuscate_id_spin) + ObfuscateId.show(obfuscated_id, self.clean_url_class_name, self.obfuscate_id_spin) end # Generate a default spin from the Model name @@ -53,7 +59,7 @@ def obfuscate_id_default_spin module InstanceMethods def to_param - ObfuscateId.hide(self.id, self.class.obfuscate_id_spin) + ObfuscateId.hide(self.id, self.clean_url_class_name, self.class.obfuscate_id_spin) end # Override ActiveRecord::Persistence#reload diff --git a/spec/integration/post_with_comment_spec.rb b/spec/integration/post_with_comment_spec.rb index f68b89c..f70bc01 100644 --- a/spec/integration/post_with_comment_spec.rb +++ b/spec/integration/post_with_comment_spec.rb @@ -30,8 +30,8 @@ class Comment < ActiveRecord::Base it "has plain id attibute" do should have_content("post: First Post") should have_content("post.id: 1") - should have_content("post.to_param: 0587646369") - should have_content('post_path: /posts/0587646369.') + should have_content("post.to_param: post0587646369") + should have_content('post_path: /posts/post0587646369.') end end @@ -69,15 +69,15 @@ class Comment < ActiveRecord::Base it "Post is updated and has obfuscated_id" do should have_content("post: Updated first post") should have_content("post.id: 1") - should have_content("post.to_param: 0587646369") - should have_content("post_path: /posts/0587646369") + should have_content("post.to_param: post0587646369") + should have_content("post_path: /posts/post0587646369") end it "Comment is updated and has obfuscated_id" do should have_content("comment: Updated first comment") should have_content("comment.id: 1") - should have_content("comment.to_param: 2985164038") - should have_content("comment_path: /comments/2985164038") + should have_content("comment.to_param: comment2985164038") + should have_content("comment_path: /comments/comment2985164038") end end end From 1b3b77cc92772ca99b3ce3c0797281a0efd70b1d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Mathieu Date: Mon, 7 Aug 2017 09:46:53 -0400 Subject: [PATCH 6/6] add rails 5 tests for rails sub models --- spec/dummy/app/models/application_record.rb | 3 + spec/dummy/app/models/post.rb | 5 + spec/dummy/app/models/post/sub_post.rb | 3 + .../20170807131852_create_post_sub_posts.rb | 8 + spec/dummy/db/schema.rb | 8 +- spec/dummy/db/test.sqlite3 | Bin 40960 -> 45056 bytes spec/dummy/test/fixtures/post/sub_posts.yml | 11 + spec/dummy/test/models/post/sub_post_test.rb | 7 + spec/dummy_rails_3/.rspec | 1 - spec/dummy_rails_3/README.rdoc | 261 --- spec/dummy_rails_3/Rakefile | 7 - .../app/assets/javascripts/application.js | 13 - .../app/assets/stylesheets/application.css | 13 - .../app/controllers/application_controller.rb | 3 - .../app/controllers/comments_controller.rb | 13 - .../app/controllers/posts_controller.rb | 23 - .../app/helpers/application_helper.rb | 2 - .../app/helpers/comments_helper.rb | 2 - .../dummy_rails_3/app/helpers/posts_helper.rb | 2 - spec/dummy_rails_3/app/mailers/.gitkeep | 0 spec/dummy_rails_3/app/models/.gitkeep | 0 spec/dummy_rails_3/app/models/comment.rb | 3 - spec/dummy_rails_3/app/models/post.rb | 5 - spec/dummy_rails_3/app/models/user.rb | 2 - .../app/views/layouts/application.html.erb | 14 - .../app/views/posts/index.html.erb | 5 - .../app/views/posts/new.html.erb | 6 - .../app/views/posts/show.html.erb | 20 - spec/dummy_rails_3/config.ru | 4 - spec/dummy_rails_3/config/application.rb | 62 - spec/dummy_rails_3/config/boot.rb | 10 - spec/dummy_rails_3/config/database.yml | 25 - spec/dummy_rails_3/config/environment.rb | 5 - .../config/environments/development.rb | 37 - .../config/environments/production.rb | 67 - .../dummy_rails_3/config/environments/test.rb | 37 - .../initializers/backtrace_silencers.rb | 7 - .../config/initializers/inflections.rb | 15 - .../config/initializers/mime_types.rb | 5 - .../config/initializers/secret_token.rb | 7 - .../config/initializers/session_store.rb | 8 - .../config/initializers/wrap_parameters.rb | 14 - spec/dummy_rails_3/config/locales/en.yml | 5 - spec/dummy_rails_3/config/routes.rb | 5 - spec/dummy_rails_3/db/development.sqlite3 | 0 .../db/migrate/20120201032713_create_posts.rb | 9 - .../migrate/20120201053634_create_comments.rb | 10 - .../db/migrate/20120208222551_create_users.rb | 9 - spec/dummy_rails_3/db/schema.rb | 40 - spec/dummy_rails_3/db/test.sqlite3 | Bin 32768 -> 0 bytes spec/dummy_rails_3/lib/assets/.gitkeep | 0 spec/dummy_rails_3/log/.gitkeep | 0 spec/dummy_rails_3/log/development.log | 24 - spec/dummy_rails_3/log/test.log | 1998 ----------------- spec/dummy_rails_3/public/404.html | 26 - spec/dummy_rails_3/public/422.html | 26 - spec/dummy_rails_3/public/500.html | 25 - spec/dummy_rails_3/public/favicon.ico | 0 spec/dummy_rails_3/script/rails | 6 - .../13fe41fee1fe35b49d145bcc06610705 | Bin 921 -> 0 bytes .../2f5173deea6c795b8fdde723bb4b63af | Bin 1004 -> 0 bytes .../357970feca3ac29060c1e3861e2c0953 | Bin 921 -> 0 bytes .../cffd775d018f68ce5dba1ee0d951a994 | Bin 1004 -> 0 bytes .../d771ace226fc8215a3572e0aa35bb0d6 | Bin 1291 -> 0 bytes .../f7cbd26ba1d28d48de824f0e94586655 | Bin 1372 -> 0 bytes spec/dummy_rails_4/.gitignore | 17 - spec/dummy_rails_4/Gemfile | 47 - spec/dummy_rails_4/Gemfile.lock | 169 -- spec/dummy_rails_4/README.rdoc | 28 - spec/dummy_rails_4/Rakefile | 6 - spec/dummy_rails_4/app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 13 - .../app/assets/stylesheets/application.css | 15 - .../app/controllers/application_controller.rb | 5 - .../app/controllers/comments_controller.rb | 22 - .../app/controllers/concerns/.keep | 0 .../app/controllers/posts_controller.rb | 38 - .../app/helpers/application_helper.rb | 2 - spec/dummy_rails_4/app/mailers/.keep | 0 spec/dummy_rails_4/app/models/.keep | 0 spec/dummy_rails_4/app/models/comment.rb | 3 - spec/dummy_rails_4/app/models/concerns/.keep | 0 spec/dummy_rails_4/app/models/post.rb | 5 - spec/dummy_rails_4/app/models/user.rb | 2 - .../app/views/layouts/application.html.erb | 14 - .../app/views/posts/_form.html.erb | 21 - .../app/views/posts/edit.html.erb | 6 - .../app/views/posts/index.html.erb | 5 - .../app/views/posts/new.html.erb | 5 - .../app/views/posts/show.html.erb | 34 - spec/dummy_rails_4/bin/bundle | 3 - spec/dummy_rails_4/bin/rails | 8 - spec/dummy_rails_4/bin/rake | 8 - spec/dummy_rails_4/bin/setup | 29 - spec/dummy_rails_4/bin/spring | 18 - spec/dummy_rails_4/config.ru | 4 - spec/dummy_rails_4/config/application.rb | 27 - spec/dummy_rails_4/config/boot.rb | 3 - spec/dummy_rails_4/config/database.yml | 25 - spec/dummy_rails_4/config/environment.rb | 5 - .../config/environments/development.rb | 41 - .../config/environments/production.rb | 79 - .../dummy_rails_4/config/environments/test.rb | 42 - .../config/initializers/assets.rb | 11 - .../initializers/backtrace_silencers.rb | 7 - .../config/initializers/cookies_serializer.rb | 3 - .../initializers/filter_parameter_logging.rb | 4 - .../config/initializers/inflections.rb | 16 - .../config/initializers/mime_types.rb | 4 - .../config/initializers/session_store.rb | 3 - .../config/initializers/wrap_parameters.rb | 14 - spec/dummy_rails_4/config/locales/en.yml | 23 - spec/dummy_rails_4/config/routes.rb | 4 - spec/dummy_rails_4/config/secrets.yml | 22 - .../db/migrate/20120201032713_create_posts.rb | 9 - .../migrate/20120201053634_create_comments.rb | 10 - .../db/migrate/20120208222551_create_users.rb | 9 - spec/dummy_rails_4/db/schema.rb | 35 - spec/dummy_rails_4/db/seeds.rb | 7 - spec/dummy_rails_4/db/test.sqlite3 | Bin 28672 -> 0 bytes spec/dummy_rails_4/lib/assets/.keep | 0 spec/dummy_rails_4/lib/tasks/.keep | 0 spec/dummy_rails_4/log/.keep | 0 spec/dummy_rails_4/public/404.html | 67 - spec/dummy_rails_4/public/422.html | 67 - spec/dummy_rails_4/public/500.html | 66 - spec/dummy_rails_4/public/favicon.ico | 0 spec/dummy_rails_4/public/robots.txt | 5 - spec/dummy_rails_4/test/controllers/.keep | 0 spec/dummy_rails_4/test/fixtures/.keep | 0 spec/dummy_rails_4/test/helpers/.keep | 0 spec/dummy_rails_4/test/integration/.keep | 0 spec/dummy_rails_4/test/mailers/.keep | 0 spec/dummy_rails_4/test/models/.keep | 0 spec/dummy_rails_4/test/test_helper.rb | 10 - .../vendor/assets/javascripts/.keep | 0 .../vendor/assets/stylesheets/.keep | 0 spec/models/sub_post_spec.rb | 41 + 138 files changed, 85 insertions(+), 4027 deletions(-) create mode 100644 spec/dummy/app/models/application_record.rb create mode 100644 spec/dummy/app/models/post/sub_post.rb create mode 100644 spec/dummy/db/migrate/20170807131852_create_post_sub_posts.rb create mode 100644 spec/dummy/test/fixtures/post/sub_posts.yml create mode 100644 spec/dummy/test/models/post/sub_post_test.rb delete mode 100644 spec/dummy_rails_3/.rspec delete mode 100644 spec/dummy_rails_3/README.rdoc delete mode 100644 spec/dummy_rails_3/Rakefile delete mode 100644 spec/dummy_rails_3/app/assets/javascripts/application.js delete mode 100644 spec/dummy_rails_3/app/assets/stylesheets/application.css delete mode 100644 spec/dummy_rails_3/app/controllers/application_controller.rb delete mode 100644 spec/dummy_rails_3/app/controllers/comments_controller.rb delete mode 100644 spec/dummy_rails_3/app/controllers/posts_controller.rb delete mode 100644 spec/dummy_rails_3/app/helpers/application_helper.rb delete mode 100644 spec/dummy_rails_3/app/helpers/comments_helper.rb delete mode 100644 spec/dummy_rails_3/app/helpers/posts_helper.rb delete mode 100644 spec/dummy_rails_3/app/mailers/.gitkeep delete mode 100644 spec/dummy_rails_3/app/models/.gitkeep delete mode 100644 spec/dummy_rails_3/app/models/comment.rb delete mode 100644 spec/dummy_rails_3/app/models/post.rb delete mode 100644 spec/dummy_rails_3/app/models/user.rb delete mode 100644 spec/dummy_rails_3/app/views/layouts/application.html.erb delete mode 100644 spec/dummy_rails_3/app/views/posts/index.html.erb delete mode 100644 spec/dummy_rails_3/app/views/posts/new.html.erb delete mode 100644 spec/dummy_rails_3/app/views/posts/show.html.erb delete mode 100644 spec/dummy_rails_3/config.ru delete mode 100644 spec/dummy_rails_3/config/application.rb delete mode 100644 spec/dummy_rails_3/config/boot.rb delete mode 100644 spec/dummy_rails_3/config/database.yml delete mode 100644 spec/dummy_rails_3/config/environment.rb delete mode 100644 spec/dummy_rails_3/config/environments/development.rb delete mode 100644 spec/dummy_rails_3/config/environments/production.rb delete mode 100644 spec/dummy_rails_3/config/environments/test.rb delete mode 100644 spec/dummy_rails_3/config/initializers/backtrace_silencers.rb delete mode 100644 spec/dummy_rails_3/config/initializers/inflections.rb delete mode 100644 spec/dummy_rails_3/config/initializers/mime_types.rb delete mode 100644 spec/dummy_rails_3/config/initializers/secret_token.rb delete mode 100644 spec/dummy_rails_3/config/initializers/session_store.rb delete mode 100644 spec/dummy_rails_3/config/initializers/wrap_parameters.rb delete mode 100644 spec/dummy_rails_3/config/locales/en.yml delete mode 100644 spec/dummy_rails_3/config/routes.rb delete mode 100644 spec/dummy_rails_3/db/development.sqlite3 delete mode 100644 spec/dummy_rails_3/db/migrate/20120201032713_create_posts.rb delete mode 100644 spec/dummy_rails_3/db/migrate/20120201053634_create_comments.rb delete mode 100644 spec/dummy_rails_3/db/migrate/20120208222551_create_users.rb delete mode 100644 spec/dummy_rails_3/db/schema.rb delete mode 100644 spec/dummy_rails_3/db/test.sqlite3 delete mode 100644 spec/dummy_rails_3/lib/assets/.gitkeep delete mode 100644 spec/dummy_rails_3/log/.gitkeep delete mode 100644 spec/dummy_rails_3/log/development.log delete mode 100644 spec/dummy_rails_3/log/test.log delete mode 100644 spec/dummy_rails_3/public/404.html delete mode 100644 spec/dummy_rails_3/public/422.html delete mode 100644 spec/dummy_rails_3/public/500.html delete mode 100644 spec/dummy_rails_3/public/favicon.ico delete mode 100755 spec/dummy_rails_3/script/rails delete mode 100644 spec/dummy_rails_3/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 delete mode 100644 spec/dummy_rails_3/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af delete mode 100644 spec/dummy_rails_3/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 delete mode 100644 spec/dummy_rails_3/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 delete mode 100644 spec/dummy_rails_3/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 delete mode 100644 spec/dummy_rails_3/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 delete mode 100644 spec/dummy_rails_4/.gitignore delete mode 100644 spec/dummy_rails_4/Gemfile delete mode 100644 spec/dummy_rails_4/Gemfile.lock delete mode 100644 spec/dummy_rails_4/README.rdoc delete mode 100644 spec/dummy_rails_4/Rakefile delete mode 100644 spec/dummy_rails_4/app/assets/images/.keep delete mode 100644 spec/dummy_rails_4/app/assets/javascripts/application.js delete mode 100644 spec/dummy_rails_4/app/assets/stylesheets/application.css delete mode 100644 spec/dummy_rails_4/app/controllers/application_controller.rb delete mode 100644 spec/dummy_rails_4/app/controllers/comments_controller.rb delete mode 100644 spec/dummy_rails_4/app/controllers/concerns/.keep delete mode 100644 spec/dummy_rails_4/app/controllers/posts_controller.rb delete mode 100644 spec/dummy_rails_4/app/helpers/application_helper.rb delete mode 100644 spec/dummy_rails_4/app/mailers/.keep delete mode 100644 spec/dummy_rails_4/app/models/.keep delete mode 100644 spec/dummy_rails_4/app/models/comment.rb delete mode 100644 spec/dummy_rails_4/app/models/concerns/.keep delete mode 100644 spec/dummy_rails_4/app/models/post.rb delete mode 100644 spec/dummy_rails_4/app/models/user.rb delete mode 100644 spec/dummy_rails_4/app/views/layouts/application.html.erb delete mode 100644 spec/dummy_rails_4/app/views/posts/_form.html.erb delete mode 100644 spec/dummy_rails_4/app/views/posts/edit.html.erb delete mode 100644 spec/dummy_rails_4/app/views/posts/index.html.erb delete mode 100644 spec/dummy_rails_4/app/views/posts/new.html.erb delete mode 100644 spec/dummy_rails_4/app/views/posts/show.html.erb delete mode 100755 spec/dummy_rails_4/bin/bundle delete mode 100755 spec/dummy_rails_4/bin/rails delete mode 100755 spec/dummy_rails_4/bin/rake delete mode 100755 spec/dummy_rails_4/bin/setup delete mode 100755 spec/dummy_rails_4/bin/spring delete mode 100644 spec/dummy_rails_4/config.ru delete mode 100644 spec/dummy_rails_4/config/application.rb delete mode 100644 spec/dummy_rails_4/config/boot.rb delete mode 100644 spec/dummy_rails_4/config/database.yml delete mode 100644 spec/dummy_rails_4/config/environment.rb delete mode 100644 spec/dummy_rails_4/config/environments/development.rb delete mode 100644 spec/dummy_rails_4/config/environments/production.rb delete mode 100644 spec/dummy_rails_4/config/environments/test.rb delete mode 100644 spec/dummy_rails_4/config/initializers/assets.rb delete mode 100644 spec/dummy_rails_4/config/initializers/backtrace_silencers.rb delete mode 100644 spec/dummy_rails_4/config/initializers/cookies_serializer.rb delete mode 100644 spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb delete mode 100644 spec/dummy_rails_4/config/initializers/inflections.rb delete mode 100644 spec/dummy_rails_4/config/initializers/mime_types.rb delete mode 100644 spec/dummy_rails_4/config/initializers/session_store.rb delete mode 100644 spec/dummy_rails_4/config/initializers/wrap_parameters.rb delete mode 100644 spec/dummy_rails_4/config/locales/en.yml delete mode 100644 spec/dummy_rails_4/config/routes.rb delete mode 100644 spec/dummy_rails_4/config/secrets.yml delete mode 100644 spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb delete mode 100644 spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb delete mode 100644 spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb delete mode 100644 spec/dummy_rails_4/db/schema.rb delete mode 100644 spec/dummy_rails_4/db/seeds.rb delete mode 100644 spec/dummy_rails_4/db/test.sqlite3 delete mode 100644 spec/dummy_rails_4/lib/assets/.keep delete mode 100644 spec/dummy_rails_4/lib/tasks/.keep delete mode 100644 spec/dummy_rails_4/log/.keep delete mode 100644 spec/dummy_rails_4/public/404.html delete mode 100644 spec/dummy_rails_4/public/422.html delete mode 100644 spec/dummy_rails_4/public/500.html delete mode 100644 spec/dummy_rails_4/public/favicon.ico delete mode 100644 spec/dummy_rails_4/public/robots.txt delete mode 100644 spec/dummy_rails_4/test/controllers/.keep delete mode 100644 spec/dummy_rails_4/test/fixtures/.keep delete mode 100644 spec/dummy_rails_4/test/helpers/.keep delete mode 100644 spec/dummy_rails_4/test/integration/.keep delete mode 100644 spec/dummy_rails_4/test/mailers/.keep delete mode 100644 spec/dummy_rails_4/test/models/.keep delete mode 100644 spec/dummy_rails_4/test/test_helper.rb delete mode 100644 spec/dummy_rails_4/vendor/assets/javascripts/.keep delete mode 100644 spec/dummy_rails_4/vendor/assets/stylesheets/.keep create mode 100644 spec/models/sub_post_spec.rb diff --git a/spec/dummy/app/models/application_record.rb b/spec/dummy/app/models/application_record.rb new file mode 100644 index 0000000..10a4cba --- /dev/null +++ b/spec/dummy/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/spec/dummy/app/models/post.rb b/spec/dummy/app/models/post.rb index a5d7f9b..360a816 100644 --- a/spec/dummy/app/models/post.rb +++ b/spec/dummy/app/models/post.rb @@ -2,4 +2,9 @@ class Post < ActiveRecord::Base has_many :comments obfuscate_id :spin => 123456789 + module Post + def self.table_name_prefix + 'post_' + end + end end diff --git a/spec/dummy/app/models/post/sub_post.rb b/spec/dummy/app/models/post/sub_post.rb new file mode 100644 index 0000000..b8ec7a7 --- /dev/null +++ b/spec/dummy/app/models/post/sub_post.rb @@ -0,0 +1,3 @@ +class Post::SubPost < ActiveRecord::Base + obfuscate_id :spin => 123456789 +end diff --git a/spec/dummy/db/migrate/20170807131852_create_post_sub_posts.rb b/spec/dummy/db/migrate/20170807131852_create_post_sub_posts.rb new file mode 100644 index 0000000..f305630 --- /dev/null +++ b/spec/dummy/db/migrate/20170807131852_create_post_sub_posts.rb @@ -0,0 +1,8 @@ +class CreatePostSubPosts < ActiveRecord::Migration[5.1] + def change + create_table :post_sub_posts do |t| + t.string :content + t.timestamps + end + end +end diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb index e677af8..ffe7113 100644 --- a/spec/dummy/db/schema.rb +++ b/spec/dummy/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170807004445) do +ActiveRecord::Schema.define(version: 20170807131852) do create_table "comments", force: :cascade do |t| t.integer "post_id" @@ -19,6 +19,12 @@ t.datetime "updated_at" end + create_table "post_sub_posts", force: :cascade do |t| + t.string "content" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "posts", force: :cascade do |t| t.string "content" t.datetime "created_at" diff --git a/spec/dummy/db/test.sqlite3 b/spec/dummy/db/test.sqlite3 index e8e1bd600fc1b0198a663198599a17bc121ccd0a..4f50db34455cf2cb3b6789c9e0405f289a97e8cb 100644 GIT binary patch delta 247 zcmZoTz|`=7X@az%1Oo#DHxR>s$V44uMF|Gok2`pIHZgEF9Ir^z%MMstjUO~ly&pgd~btA3IYJE Cjz>-a delta 116 zcmZp8z|?SnX@az%I0FL%7ZAgM@I)PBd2t5ak2`pIHZgE=88GmDeMyeSo4{8TfDWp8(2i1&S`^ K-@G;7+W-JB)*u@I diff --git a/spec/dummy/test/fixtures/post/sub_posts.yml b/spec/dummy/test/fixtures/post/sub_posts.yml new file mode 100644 index 0000000..80aed36 --- /dev/null +++ b/spec/dummy/test/fixtures/post/sub_posts.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/spec/dummy/test/models/post/sub_post_test.rb b/spec/dummy/test/models/post/sub_post_test.rb new file mode 100644 index 0000000..6b4242e --- /dev/null +++ b/spec/dummy/test/models/post/sub_post_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Post::SubPostTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/spec/dummy_rails_3/.rspec b/spec/dummy_rails_3/.rspec deleted file mode 100644 index 53607ea..0000000 --- a/spec/dummy_rails_3/.rspec +++ /dev/null @@ -1 +0,0 @@ ---colour diff --git a/spec/dummy_rails_3/README.rdoc b/spec/dummy_rails_3/README.rdoc deleted file mode 100644 index 7c36f23..0000000 --- a/spec/dummy_rails_3/README.rdoc +++ /dev/null @@ -1,261 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" -templates that are primarily responsible for inserting pre-built data in between -HTML tags. The model contains the "smart" domain objects (such as Account, -Product, Person, Post) that holds all the business logic and knows how to -persist themselves to a database. The controller handles the incoming requests -(such as Save New Account, Update Product, Show Post) by manipulating the model -and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, create a new Rails application: - rails new myapp (where myapp is the application name) - -2. Change directory to myapp and start the web server: - cd myapp; rails server (run with --help for options) - -3. Go to http://localhost:3000/ and you'll see: - "Welcome aboard: You're riding Ruby on Rails!" - -4. Follow the guidelines to start developing your application. You can find -the following resources handy: - -* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html -* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands -running on the server.log and development.log. Rails will automatically display -debugging and runtime information to these files. Debugging info will also be -shown in the browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code -using the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are -several books available online as well: - -* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two books will bring you up to speed on the Ruby language and also on -programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your -Mongrel or WEBrick server with --debugger. This means that you can break out of -execution at any point in the code, investigate and change the model, and then, -resume execution! You need to install ruby-debug to run the server in debugging -mode. With gems, use sudo gem install ruby-debug. Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.all - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#nil, "body"=>nil, "id"=>"1"}>, - #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better, you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you can enter "cont". - - -== Console - -The console is a Ruby shell, which allows you to interact with your -application's domain model. Here you'll have all parts of the application -configured, just like it is when the application is running. You can inspect -domain models, change values, and save to the database. Starting the script -without arguments will launch it in the development environment. - -To start the console, run rails console from the application -directory. - -Options: - -* Passing the -s, --sandbox argument will rollback any modifications - made to the database. -* Passing an environment name as an argument will load the corresponding - environment. Example: rails console production. - -To reload your controllers and models after launching the console run -reload! - -More information about irb can be found at: -link:http://www.rubycentral.org/pickaxe/irb.html - - -== dbconsole - -You can go to the command line of your database directly through rails -dbconsole. You would be connected to the database with the credentials -defined in database.yml. Starting the script without arguments will connect you -to the development database. Passing an argument will connect you to a different -database, like rails dbconsole production. Currently works for MySQL, -PostgreSQL and SQLite 3. - -== Description of Contents - -The default directory structure of a generated Ruby on Rails application: - - |-- app - | |-- assets - | |-- images - | |-- javascripts - | `-- stylesheets - | |-- controllers - | |-- helpers - | |-- mailers - | |-- models - | `-- views - | `-- layouts - |-- config - | |-- environments - | |-- initializers - | `-- locales - |-- db - |-- doc - |-- lib - | `-- tasks - |-- log - |-- public - |-- script - |-- test - | |-- fixtures - | |-- functional - | |-- integration - | |-- performance - | `-- unit - |-- tmp - | |-- cache - | |-- pids - | |-- sessions - | `-- sockets - `-- vendor - |-- assets - `-- stylesheets - `-- plugins - -app - Holds all the code that's specific to this particular application. - -app/assets - Contains subdirectories for images, stylesheets, and JavaScript files. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from - ApplicationController which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. Models descend from - ActiveRecord::Base by default. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use - eRuby syntax by default. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the - common header/footer method of wrapping views. In your views, define a layout - using the layout :default and create a file named default.html.erb. - Inside default.html.erb, call <% yield %> to render the view using this - layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are - generated for you automatically when using generators for controllers. - Helpers can be used to wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, - and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all the - sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when - generated using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that - doesn't belong under controllers, models, or helpers. This directory is in - the load path. - -public - The directory available for the web server. Also contains the dispatchers and the - default HTML files. This should be set as the DOCUMENT_ROOT of your web - server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the rails generate - command, template test files will be generated for you and placed in this - directory. - -vendor - External libraries that the application depends on. Also includes the plugins - subdirectory. If the app has frozen rails, those gems also go here, under - vendor/rails/. This directory is in the load path. diff --git a/spec/dummy_rails_3/Rakefile b/spec/dummy_rails_3/Rakefile deleted file mode 100644 index 3645852..0000000 --- a/spec/dummy_rails_3/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/spec/dummy_rails_3/app/assets/javascripts/application.js b/spec/dummy_rails_3/app/assets/javascripts/application.js deleted file mode 100644 index 15ebed9..0000000 --- a/spec/dummy_rails_3/app/assets/javascripts/application.js +++ /dev/null @@ -1,13 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require_tree . diff --git a/spec/dummy_rails_3/app/assets/stylesheets/application.css b/spec/dummy_rails_3/app/assets/stylesheets/application.css deleted file mode 100644 index 3b5cc66..0000000 --- a/spec/dummy_rails_3/app/assets/stylesheets/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . -*/ diff --git a/spec/dummy_rails_3/app/controllers/application_controller.rb b/spec/dummy_rails_3/app/controllers/application_controller.rb deleted file mode 100644 index e8065d9..0000000 --- a/spec/dummy_rails_3/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/spec/dummy_rails_3/app/controllers/comments_controller.rb b/spec/dummy_rails_3/app/controllers/comments_controller.rb deleted file mode 100644 index 1d811bc..0000000 --- a/spec/dummy_rails_3/app/controllers/comments_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CommentsController < ApplicationController - - def create - @comment = Comment.create! comment_params - redirect_to post_path(@comment.post) - end - - private - - def comment_params - params.require(:comment).permit(:post_id, :content) - end -end diff --git a/spec/dummy_rails_3/app/controllers/posts_controller.rb b/spec/dummy_rails_3/app/controllers/posts_controller.rb deleted file mode 100644 index ec9b559..0000000 --- a/spec/dummy_rails_3/app/controllers/posts_controller.rb +++ /dev/null @@ -1,23 +0,0 @@ -class PostsController < ApplicationController - - def index - @posts = Post.all - end - - def new - @post = Post.new - end - - def create - @post = Post.create!(post_params) - redirect_to @post - end - - def show - @post = Post.find(params[:id]) - end - - def post_params - params.require(:post).permit(:id, :content) - end -end diff --git a/spec/dummy_rails_3/app/helpers/application_helper.rb b/spec/dummy_rails_3/app/helpers/application_helper.rb deleted file mode 100644 index de6be79..0000000 --- a/spec/dummy_rails_3/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/spec/dummy_rails_3/app/helpers/comments_helper.rb b/spec/dummy_rails_3/app/helpers/comments_helper.rb deleted file mode 100644 index 0ec9ca5..0000000 --- a/spec/dummy_rails_3/app/helpers/comments_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module CommentsHelper -end diff --git a/spec/dummy_rails_3/app/helpers/posts_helper.rb b/spec/dummy_rails_3/app/helpers/posts_helper.rb deleted file mode 100644 index a7b8cec..0000000 --- a/spec/dummy_rails_3/app/helpers/posts_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module PostsHelper -end diff --git a/spec/dummy_rails_3/app/mailers/.gitkeep b/spec/dummy_rails_3/app/mailers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_3/app/models/.gitkeep b/spec/dummy_rails_3/app/models/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_3/app/models/comment.rb b/spec/dummy_rails_3/app/models/comment.rb deleted file mode 100644 index 4e76c5b..0000000 --- a/spec/dummy_rails_3/app/models/comment.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Comment < ActiveRecord::Base - belongs_to :post -end diff --git a/spec/dummy_rails_3/app/models/post.rb b/spec/dummy_rails_3/app/models/post.rb deleted file mode 100644 index a5d7f9b..0000000 --- a/spec/dummy_rails_3/app/models/post.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Post < ActiveRecord::Base - has_many :comments - - obfuscate_id :spin => 123456789 -end diff --git a/spec/dummy_rails_3/app/models/user.rb b/spec/dummy_rails_3/app/models/user.rb deleted file mode 100644 index 4a57cf0..0000000 --- a/spec/dummy_rails_3/app/models/user.rb +++ /dev/null @@ -1,2 +0,0 @@ -class User < ActiveRecord::Base -end diff --git a/spec/dummy_rails_3/app/views/layouts/application.html.erb b/spec/dummy_rails_3/app/views/layouts/application.html.erb deleted file mode 100644 index 4cab268..0000000 --- a/spec/dummy_rails_3/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application", :media => "all" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/spec/dummy_rails_3/app/views/posts/index.html.erb b/spec/dummy_rails_3/app/views/posts/index.html.erb deleted file mode 100644 index ffd14ac..0000000 --- a/spec/dummy_rails_3/app/views/posts/index.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -
    - <% @posts.each do |post| %> -
  • <%= link_to post.content, post %>
  • - <% end %> -
diff --git a/spec/dummy_rails_3/app/views/posts/new.html.erb b/spec/dummy_rails_3/app/views/posts/new.html.erb deleted file mode 100644 index 443fb35..0000000 --- a/spec/dummy_rails_3/app/views/posts/new.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%= form_for(@post) do |f| %> - <%= f.label :content %> - <%= f.text_field :content %> - - <%= f.submit %> -<% end %> diff --git a/spec/dummy_rails_3/app/views/posts/show.html.erb b/spec/dummy_rails_3/app/views/posts/show.html.erb deleted file mode 100644 index 28bfe46..0000000 --- a/spec/dummy_rails_3/app/views/posts/show.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -post: <%= @post.content %>
-post.id: <%= @post.id %>
-post_path: <%= post_path @post %>. - -
    -<% @post.comments.each do |comment| %> -
  • - comment: <%= comment.content %>
    - comment.id: <%= comment.id %>
    - comment_path: <%= comment_path comment %>. -
  • -<% end %> -
- -<%= form_for @post.comments.new do |f| %> - <%= f.hidden_field :post_id %> - <%= f.label :content %> - <%= f.text_field :content %> - <%= f.submit %> -<% end %> diff --git a/spec/dummy_rails_3/config.ru b/spec/dummy_rails_3/config.ru deleted file mode 100644 index 1989ed8..0000000 --- a/spec/dummy_rails_3/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/spec/dummy_rails_3/config/application.rb b/spec/dummy_rails_3/config/application.rb deleted file mode 100644 index 6c51a3e..0000000 --- a/spec/dummy_rails_3/config/application.rb +++ /dev/null @@ -1,62 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -# Pick the frameworks you want: -require "active_record/railtie" -require "action_controller/railtie" -require "action_mailer/railtie" -require "active_resource/railtie" -require "sprockets/railtie" -# require "rails/test_unit/railtie" - -Bundler.require -require "obfuscate_id" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Use SQL instead of Active Record's schema dumper when creating the database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Enforce whitelist mode for mass assignment. - # This will create an empty whitelist of attributes available for mass-assignment for all models - # in your app. As such, your models will need to explicitly whitelist or blacklist accessible - # parameters by using an attr_accessible or attr_protected declaration. - # config.active_record.whitelist_attributes = true - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/spec/dummy_rails_3/config/boot.rb b/spec/dummy_rails_3/config/boot.rb deleted file mode 100644 index eba0681..0000000 --- a/spec/dummy_rails_3/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/spec/dummy_rails_3/config/database.yml b/spec/dummy_rails_3/config/database.yml deleted file mode 100644 index 51a4dd4..0000000 --- a/spec/dummy_rails_3/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/spec/dummy_rails_3/config/environment.rb b/spec/dummy_rails_3/config/environment.rb deleted file mode 100644 index 3da5eb9..0000000 --- a/spec/dummy_rails_3/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/spec/dummy_rails_3/config/environments/development.rb b/spec/dummy_rails_3/config/environments/development.rb deleted file mode 100644 index 50105b3..0000000 --- a/spec/dummy_rails_3/config/environments/development.rb +++ /dev/null @@ -1,37 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Raise exception on mass assignment protection for Active Record models - # config.active_record.mass_assignment_sanitizer = :strict - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/spec/dummy_rails_3/config/environments/production.rb b/spec/dummy_rails_3/config/environments/production.rb deleted file mode 100644 index 56e3066..0000000 --- a/spec/dummy_rails_3/config/environments/production.rb +++ /dev/null @@ -1,67 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Prepend all log lines with the following tags - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 -end diff --git a/spec/dummy_rails_3/config/environments/test.rb b/spec/dummy_rails_3/config/environments/test.rb deleted file mode 100644 index 6feb3d2..0000000 --- a/spec/dummy_rails_3/config/environments/test.rb +++ /dev/null @@ -1,37 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Raise exception on mass assignment protection for Active Record models - # config.active_record.mass_assignment_sanitizer = :strict - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/spec/dummy_rails_3/config/initializers/backtrace_silencers.rb b/spec/dummy_rails_3/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/spec/dummy_rails_3/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/spec/dummy_rails_3/config/initializers/inflections.rb b/spec/dummy_rails_3/config/initializers/inflections.rb deleted file mode 100644 index 5d8d9be..0000000 --- a/spec/dummy_rails_3/config/initializers/inflections.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end -# -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/spec/dummy_rails_3/config/initializers/mime_types.rb b/spec/dummy_rails_3/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e..0000000 --- a/spec/dummy_rails_3/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/spec/dummy_rails_3/config/initializers/secret_token.rb b/spec/dummy_rails_3/config/initializers/secret_token.rb deleted file mode 100644 index e80d881..0000000 --- a/spec/dummy_rails_3/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = '0b951dceda932ac82fb8195f5704e52e61832a45ab28684f0f689b099cc45f5e13a1a1653898682d6d261c4a056dd627adb32fd6c8c31c5d7e90351febb1c637' diff --git a/spec/dummy_rails_3/config/initializers/session_store.rb b/spec/dummy_rails_3/config/initializers/session_store.rb deleted file mode 100644 index 952473f..0000000 --- a/spec/dummy_rails_3/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/spec/dummy_rails_3/config/initializers/wrap_parameters.rb b/spec/dummy_rails_3/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df20..0000000 --- a/spec/dummy_rails_3/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/spec/dummy_rails_3/config/locales/en.yml b/spec/dummy_rails_3/config/locales/en.yml deleted file mode 100644 index 179c14c..0000000 --- a/spec/dummy_rails_3/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/spec/dummy_rails_3/config/routes.rb b/spec/dummy_rails_3/config/routes.rb deleted file mode 100644 index 3259030..0000000 --- a/spec/dummy_rails_3/config/routes.rb +++ /dev/null @@ -1,5 +0,0 @@ -Dummy::Application.routes.draw do - resources :comments - - resources :posts -end diff --git a/spec/dummy_rails_3/db/development.sqlite3 b/spec/dummy_rails_3/db/development.sqlite3 deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_3/db/migrate/20120201032713_create_posts.rb b/spec/dummy_rails_3/db/migrate/20120201032713_create_posts.rb deleted file mode 100644 index c3c7176..0000000 --- a/spec/dummy_rails_3/db/migrate/20120201032713_create_posts.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreatePosts < ActiveRecord::Migration - def change - create_table :posts do |t| - t.string :content - - t.timestamps - end - end -end diff --git a/spec/dummy_rails_3/db/migrate/20120201053634_create_comments.rb b/spec/dummy_rails_3/db/migrate/20120201053634_create_comments.rb deleted file mode 100644 index 91348ab..0000000 --- a/spec/dummy_rails_3/db/migrate/20120201053634_create_comments.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateComments < ActiveRecord::Migration - def change - create_table :comments do |t| - t.integer :post_id - t.string :content - - t.timestamps - end - end -end diff --git a/spec/dummy_rails_3/db/migrate/20120208222551_create_users.rb b/spec/dummy_rails_3/db/migrate/20120208222551_create_users.rb deleted file mode 100644 index 37ce317..0000000 --- a/spec/dummy_rails_3/db/migrate/20120208222551_create_users.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateUsers < ActiveRecord::Migration - def change - create_table :users do |t| - t.string :name - - t.timestamps - end - end -end diff --git a/spec/dummy_rails_3/db/schema.rb b/spec/dummy_rails_3/db/schema.rb deleted file mode 100644 index a9f3f5a..0000000 --- a/spec/dummy_rails_3/db/schema.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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 to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20140219090804) do - - create_table "comments", :force => true do |t| - t.integer "post_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "posts", :force => true do |t| - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "users", :force => true do |t| - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end diff --git a/spec/dummy_rails_3/db/test.sqlite3 b/spec/dummy_rails_3/db/test.sqlite3 deleted file mode 100644 index fd5d4a2387560db5305d7f12f01b9d66ba0ae779..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI*%Wl&^6b4{BH}{HDHeOVfMqbrwQ5`3Nc7a4F7K%vIHY5^VS#B~-EX8)~OQFk@ zH{e|=A)Wy72*8?UpMkNPpqQvaYKy4CZz;+6ICFgF^JH;WdA(n=0!oft&o%>6mr&_o!_ew$=5_z;YdbA~3Vv&?`-y zwCdIUmQJem7y26_UpHMQyLBQ@B$3Igd`dl^-9c7Pa)PwM3Rw!w!#sFmzGvvOTH?1{GItz{inTg2TWV8( zsW-@8qqKq?qU9QB0Hu{<;2}tu~!#wmuufqm?*XbIOTE}SjP2V?yo*5WtZfLx9!+ysJjGlQ)S=0@?y})pf zeE)9JWRiM!l=Wu*x7r_jshqU7#vfc6pY&OqYxtD?s+~6Vlc(v#nt!{v8a;(|Hd7hw z^MbUp!k>q6&bDjYYCvV&qFA_cWvd|WK$Q)7{$_M}kE^Kqo4YK1LzOWjmU(VzTf#0yUR zCVmz##LIiLKokN22tWV=5P$##AOHafKmY;|_}>K{rWHQf{Ab2O!|p$w2*vGxYALPE JvWa8;|4(bD)DHjv diff --git a/spec/dummy_rails_3/lib/assets/.gitkeep b/spec/dummy_rails_3/lib/assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_3/log/.gitkeep b/spec/dummy_rails_3/log/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_3/log/development.log b/spec/dummy_rails_3/log/development.log deleted file mode 100644 index 4749dc1..0000000 --- a/spec/dummy_rails_3/log/development.log +++ /dev/null @@ -1,24 +0,0 @@ -Connecting to database specified by database.yml -  (0.5ms) select sqlite_version(*) -  (2.6ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "content" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) -  (1.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)  -  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) -  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  -  (0.0ms) PRAGMA index_list("schema_migrations") -  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") -  (0.0ms) SELECT version FROM "schema_migrations" -  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120208222551') -  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20120201032713') -  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20120201053634') -  (2.7ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "content" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)  -  (1.0ms) CREATE TABLE "some_really_absurdly_long_named_class_that_you_wouldnt_have_thought_ofs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) -  (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)  -  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) -  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  -  (0.4ms) select sqlite_version(*) -  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") -  (0.1ms) SELECT version FROM "schema_migrations" -  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140219090804') -  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120201032713') -  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120201053634') -  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120208222551') diff --git a/spec/dummy_rails_3/log/test.log b/spec/dummy_rails_3/log/test.log deleted file mode 100644 index 4cb346a..0000000 --- a/spec/dummy_rails_3/log/test.log +++ /dev/null @@ -1,1998 +0,0 @@ -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (26.8ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.0ms) SAVEPOINT active_record_1 -  (0.9ms) UPDATE "posts" SET "content" = 'new', "updated_at" = '2013-10-29 02:06:03.337373' WHERE "posts"."id" = 1 -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.2ms) rollback transaction -  (0.0ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (33.5ms) -Completed 200 OK in 39ms (Views: 38.9ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (16.9ms) -Completed 200 OK in 19ms (Views: 18.3ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  - Rendered posts/index.html.erb within layouts/application (0.7ms) -Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.1ms) -Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 6ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.3ms) -Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms) -  (0.8ms) rollback transaction -  (0.1ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.0ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.3ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.1ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.0ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.1ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:06:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:06:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.1ms) -  (0.5ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.1ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (2.7ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["name", nil], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (5.3ms) rollback transaction -  (0.1ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (1.6ms) rollback transaction -  (0.1ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.0ms) SAVEPOINT active_record_1 -  (0.9ms) UPDATE "posts" SET "content" = 'new', "updated_at" = '2013-10-29 02:17:58.259209' WHERE "posts"."id" = 1 -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.2ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "one"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "two"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (1, 2) -  (0.4ms) rollback transaction -  (0.1ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (33.8ms) -Completed 200 OK in 40ms (Views: 39.5ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (39.2ms) -Completed 200 OK in 41ms (Views: 40.6ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  - Rendered posts/index.html.erb within layouts/application (0.6ms) -Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (1.8ms) -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 6ms (ActiveRecord: 0.6ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.7ms) -Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.1ms) -  (1.9ms) rollback transaction -  (0.1ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.0ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.3ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms) -  (0.5ms) rollback transaction -  (0.0ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:17:58 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:17:58 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.1ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (5.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["name", nil], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.0ms) SAVEPOINT active_record_1 -  (0.7ms) UPDATE "posts" SET "content" = 'new', "updated_at" = '2013-10-29 02:19:03.048425' WHERE "posts"."id" = 1 -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (1.9ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "one"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "two"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (1, 2) -  (0.3ms) rollback transaction -  (0.0ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (31.4ms) -Completed 200 OK in 36ms (Views: 36.0ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (41.6ms) -Completed 200 OK in 44ms (Views: 43.0ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  - Rendered posts/index.html.erb within layouts/application (0.7ms) -Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (1.8ms) -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 6ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.4ms) -Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) -  (1.8ms) rollback transaction -  (0.1ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.3ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.0ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.3ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.1ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.2ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.1ms) -  (1.8ms) rollback transaction -  (0.1ms) begin transaction - - -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.0ms) - - -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms) - - -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms) - - -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:19:03 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.5ms) - - -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:19:03 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) -  (1.8ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (2.8ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["name", nil], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.0ms) SAVEPOINT active_record_1 -  (0.8ms) UPDATE "posts" SET "content" = 'new', "updated_at" = '2013-10-29 02:26:41.040404' WHERE "posts"."id" = 1 -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "one"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "two"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (1, 2) -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (8.3ms) -Completed 200 OK in 17.0ms (Views: 16.6ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.4ms (ActiveRecord: 0.5ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (50.2ms) -Completed 200 OK in 52.5ms (Views: 51.6ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  - Rendered posts/index.html.erb within layouts/application (0.7ms) -Completed 200 OK in 2.4ms (Views: 1.8ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (1.8ms) -Completed 200 OK in 3.1ms (Views: 2.4ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 6.7ms (ActiveRecord: 0.5ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.4ms) -Completed 200 OK in 3.8ms (Views: 3.2ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 1.9ms (Views: 1.8ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.6ms (ActiveRecord: 0.3ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.9ms (Views: 2.4ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.2ms (Views: 0.9ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.4ms (Views: 2.0ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.8ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.7ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.5ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.5ms (Views: 2.3ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.0ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.5ms (Views: 2.8ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.4ms (Views: 1.0ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.2ms (Views: 2.5ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.5ms (ActiveRecord: 0.6ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.2ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 5.3ms (Views: 4.4ms | ActiveRecord: 0.2ms) -  (0.9ms) rollback transaction -  (0.1ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.2ms (Views: 2.0ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.8ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.2ms (Views: 2.5ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.2ms (Views: 0.9ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.6ms (Views: 2.1ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:26:41 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.9ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:26:41 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.7ms (Views: 2.2ms | ActiveRecord: 0.1ms) -  (0.5ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (3.5ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["name", nil], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.0ms) SAVEPOINT active_record_1 -  (0.9ms) UPDATE "posts" SET "content" = 'new', "updated_at" = '2013-10-29 02:43:54.051549' WHERE "posts"."id" = 1 -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.4ms) rollback transaction -  (0.1ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "one"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "two"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (1, 2) -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (5.5ms) -Completed 200 OK in 12.0ms (Views: 11.6ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.4ms (ActiveRecord: 0.5ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (47.5ms) -Completed 200 OK in 49.8ms (Views: 49.0ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  - Rendered posts/index.html.erb within layouts/application (0.8ms) -Completed 200 OK in 2.5ms (Views: 1.9ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (1.9ms) -Completed 200 OK in 3.2ms (Views: 2.6ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 7.7ms (ActiveRecord: 0.6ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.5ms) -Completed 200 OK in 4.1ms (Views: 3.5ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.0ms (Views: 1.8ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.6ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.0ms (Views: 2.4ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.2ms (Views: 0.9ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.6ms (Views: 2.1ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.9ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.7ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.1ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.0ms (Views: 1.8ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.8ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.3ms (Views: 2.7ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.7ms (Views: 1.2ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.4ms (Views: 2.6ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.0ms (ActiveRecord: 0.5ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 32.7ms (Views: 31.9ms | ActiveRecord: 0.1ms) -  (1.2ms) rollback transaction -  (0.1ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.2ms (Views: 2.0ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.7ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 5.1ms (Views: 3.9ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.6ms (Views: 1.2ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 4.0ms (Views: 3.4ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:54 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.4ms (ActiveRecord: 0.5ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:54 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.3ms (Views: 2.7ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (2.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["name", nil], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (1.8ms) rollback transaction -  (0.1ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.0ms) SAVEPOINT active_record_1 -  (0.8ms) UPDATE "posts" SET "content" = 'new', "updated_at" = '2013-10-29 02:43:59.106379' WHERE "posts"."id" = 1 -  (0.1ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "one"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "two"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (1, 2) -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (5.1ms) -Completed 200 OK in 10.1ms (Views: 9.7ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.2ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (40.5ms) -Completed 200 OK in 42.9ms (Views: 41.9ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  - Rendered posts/index.html.erb within layouts/application (0.7ms) -Completed 200 OK in 2.4ms (Views: 1.8ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (1.9ms) -Completed 200 OK in 3.2ms (Views: 2.5ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 5.8ms (ActiveRecord: 0.5ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.4ms) -Completed 200 OK in 3.8ms (Views: 3.3ms | ActiveRecord: 0.1ms) -  (1.7ms) rollback transaction -  (0.1ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.2ms (Views: 2.0ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.7ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.1ms (Views: 2.4ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.2ms (Views: 0.9ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.5ms (Views: 2.1ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.8ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.8ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.5ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.6ms (Views: 2.3ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.8ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.6ms (Views: 2.9ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.5ms (Views: 1.0ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.7ms (Views: 2.2ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.9ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 35.7ms (Views: 35.1ms | ActiveRecord: 0.1ms) -  (0.8ms) rollback transaction -  (0.1ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.3ms (Views: 2.1ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.8ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.2ms (Views: 2.5ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.2ms (Views: 0.9ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.4ms (Views: 2.0ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:43:59 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.9ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:43:59 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.7ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -Connecting to database specified by database.yml -  (0.1ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (2.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00], ["name", nil], ["updated_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (1.7ms) rollback transaction -  (0.1ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] -  (0.0ms) SAVEPOINT active_record_1 -  (0.7ms) UPDATE "posts" SET "content" = 'new', "updated_at" = '2013-10-29 02:46:21.989401' WHERE "posts"."id" = 1 -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "one"], ["created_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "two"], ["created_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:21 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (1, 2) -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (5.5ms) -Completed 200 OK in 11.1ms (Views: 10.7ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.2ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (40.7ms) -Completed 200 OK in 43.0ms (Views: 42.1ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts"  - Rendered posts/index.html.erb within layouts/application (0.7ms) -Completed 200 OK in 2.4ms (Views: 1.8ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (1.8ms) -Completed 200 OK in 3.1ms (Views: 2.5ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.5ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 5.9ms (ActiveRecord: 0.6ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 - Rendered posts/show.html.erb within layouts/application (2.3ms) -Completed 200 OK in 3.6ms (Views: 3.1ms | ActiveRecord: 0.1ms) -  (1.8ms) rollback transaction -  (0.2ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.3ms (Views: 2.1ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.7ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 4.7ms (Views: 3.6ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.6ms (Views: 1.2ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.1ms (Views: 2.4ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.8ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.7ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.5ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.3ms (Views: 2.0ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.1ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.7ms (Views: 2.9ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.4ms (Views: 1.0ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.4ms (Views: 2.7ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.4ms (ActiveRecord: 0.6ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 31.3ms (Views: 30.7ms | ActiveRecord: 0.1ms) -  (0.6ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#new as HTML -Completed 200 OK in 2.8ms (Views: 2.5ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2.1ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 3.4ms (Views: 2.7ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#index as HTML - Post Load (0.0ms) SELECT "posts".* FROM "posts"  -Completed 200 OK in 1.3ms (Views: 1.0ms | ActiveRecord: 0.0ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.7ms (Views: 2.2ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.4ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00], ["post_id", 1], ["updated_at", Tue, 29 Oct 2013 02:46:22 UTC +00:00]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 1.9ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2013-10-28 19:46:22 -0700 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "0000000001"]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 -Completed 200 OK in 2.8ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.4ms) rollback transaction -  (0.3ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.3ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "users" ("created_at", "id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-07 19:14:54.394866"], ["id", 1], ["updated_at", "2015-02-07 19:14:54.394866"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.4ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", "2015-02-07 19:14:54.403716"], ["updated_at", "2015-02-07 19:14:54.403716"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", "2015-02-07 19:14:54.406755"], ["updated_at", "2015-02-07 19:14:54.406755"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.9ms) UPDATE "posts" SET "content" = ?, "updated_at" = ? WHERE "posts"."id" = 1 [["content", "new"], ["updated_at", "2015-02-07 19:14:54.408136"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.6ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "original"], ["created_at", "2015-02-07 19:14:54.411549"], ["updated_at", "2015-02-07 19:14:54.411549"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -  (0.3ms) rollback transaction -  (0.0ms) begin transaction -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "one"], ["created_at", "2015-02-07 19:14:54.413862"], ["updated_at", "2015-02-07 19:14:54.413862"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "two"], ["created_at", "2015-02-07 19:14:54.414714"], ["updated_at", "2015-02-07 19:14:54.414714"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN (1, 2) -  (0.5ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (5.4ms) -Completed 200 OK in 15ms (Views: 15.1ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", "2015-02-07 19:14:54.444344"], ["updated_at", "2015-02-07 19:14:54.444344"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.3ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (14.1ms) -Completed 200 OK in 16ms (Views: 15.2ms | ActiveRecord: 0.3ms) -Started GET "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts" - Rendered posts/index.html.erb within layouts/application (1.2ms) -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (1.9ms) -Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", "2015-02-07 19:14:54.475251"], ["post_id", 1], ["updated_at", "2015-02-07 19:14:54.475251"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (1.8ms) -Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) -  (0.7ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (1.8ms) -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", "2015-02-07 19:14:54.492492"], ["updated_at", "2015-02-07 19:14:54.492492"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (2.0ms) -Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts" - Rendered posts/index.html.erb within layouts/application (0.6ms) -Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (1.9ms) -Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", "2015-02-07 19:14:54.508293"], ["post_id", 1], ["updated_at", "2015-02-07 19:14:54.508293"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (2.0ms) -Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms) -  (0.5ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (1.0ms) -Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", "2015-02-07 19:14:54.522563"], ["updated_at", "2015-02-07 19:14:54.522563"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.3ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (1.8ms) -Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts" - Rendered posts/index.html.erb within layouts/application (1.1ms) -Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (2.2ms) -Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.3ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", "2015-02-07 19:14:54.539215"], ["post_id", 1], ["updated_at", "2015-02-07 19:14:54.539215"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (2.1ms) -Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms) -  (0.7ms) rollback transaction -  (0.0ms) begin transaction -Started GET "/posts/new" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#new as HTML - Rendered posts/new.html.erb within layouts/application (1.0ms) -Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) -Started POST "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#create as HTML - Parameters: {"utf8"=>"✓", "post"=>{"content"=>"First post"}, "commit"=>"Create Post"} -  (0.1ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "posts" ("content", "created_at", "updated_at") VALUES (?, ?, ?) [["content", "First post"], ["created_at", "2015-02-07 19:14:54.554294"], ["updated_at", "2015-02-07 19:14:54.554294"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.3ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (1.9ms) -Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) -Started GET "/posts" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#index as HTML - Post Load (0.1ms) SELECT "posts".* FROM "posts" - Rendered posts/index.html.erb within layouts/application (0.5ms) -Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.1ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (1.6ms) -Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms) -Started POST "/comments" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by CommentsController#create as HTML - Parameters: {"utf8"=>"✓", "comment"=>{"post_id"=>"1", "content"=>"First comment"}, "commit"=>"Create Comment"} -  (0.0ms) SAVEPOINT active_record_1 - SQL (0.2ms) INSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?) [["content", "First comment"], ["created_at", "2015-02-07 19:14:54.568214"], ["post_id", 1], ["updated_at", "2015-02-07 19:14:54.568214"]] -  (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] -Redirected to http://www.example.com/posts/0195476820 -Completed 302 Found in 2ms (ActiveRecord: 0.4ms) -Started GET "/posts/0195476820" for 127.0.0.1 at 2015-02-07 11:14:54 -0800 -Processing by PostsController#show as HTML - Parameters: {"id"=>"0195476820"} - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]] - Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Rendered posts/show.html.erb within layouts/application (1.9ms) -Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) -  (0.6ms) rollback transaction diff --git a/spec/dummy_rails_3/public/404.html b/spec/dummy_rails_3/public/404.html deleted file mode 100644 index 9a48320..0000000 --- a/spec/dummy_rails_3/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
- - diff --git a/spec/dummy_rails_3/public/422.html b/spec/dummy_rails_3/public/422.html deleted file mode 100644 index 83660ab..0000000 --- a/spec/dummy_rails_3/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
- - diff --git a/spec/dummy_rails_3/public/500.html b/spec/dummy_rails_3/public/500.html deleted file mode 100644 index f3648a0..0000000 --- a/spec/dummy_rails_3/public/500.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
-

We're sorry, but something went wrong.

-
- - diff --git a/spec/dummy_rails_3/public/favicon.ico b/spec/dummy_rails_3/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_3/script/rails b/spec/dummy_rails_3/script/rails deleted file mode 100755 index f8da2cf..0000000 --- a/spec/dummy_rails_3/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 b/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 deleted file mode 100644 index b070687eb55a04310331d24eac5afdc9d2a21f4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 921 zcmZ`&O>5gg5DlTEMIn?zp@&|E&=PRn*pe+vZck}x!Ph#MLcy$dN7ll6SJ@rKHU0CQ zmD13U6nq%Z%)a;L@$~4)kEg5iL>dvo$-9$J*Q@hqA3CcHs;dx?PTn7V=9Y0=Err>% zf*Nk|)^pLehI^!)y_Ed8@1Dg4D|R^iO<#HEXu_)##zzX1KnH`N!C3!`5UHfIgqAjR zXzx(Y2*1HG{GD=_s*NqOqKLI;obSzBp3g&?@5279CsS&RjUD*SCT(3b`1?yP! zyn9WJw)~nkDeX~`^M^45R1a7@hFi4C`G-c4!ukI%fUBW3-B#N$23@lZrjf$Ni#^up z(Mp!wZ~U5Q{kO59=?Dce6={ z=rWs%!h@jRHgauL$HREUz5Vgk7^;py(?x(STJ-GnffW;>kLc2)Aod?D?gu|x9`x)G zq-(Jkog|}4k__Q_>G7sxpVeka@aB(XEmS&NF6v@hOIhb-Hp|npEb~08=5m>0H6-h7 lbBjLkhjN$4vYb@~CvUo_=fzyiRFx@2Os6u<3Q;ZNtDm63B#Zz6 diff --git a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af b/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af deleted file mode 100644 index 6d1f1cf3428166123cbc300ad720e194ddfed9b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1004 zcmZ`&%Wl&^6h##(C{=|J%WkeJP!~jv(#uTx3_iQ(sjSk-q3eA<^p|!&8p1&AkNSTFX zM9o*kWf;P$cVx9v7<1C-<9k~L_kCWIrKmoG_qj2yft3w}7tS{B$(mS}%N3sg0q{i3 zXeYFryUpqme#cU$l0R;L}@f&mPrfv5Lgl|Q$&PRDgiDd?no)1 z0+?B@FvLM>XJAV=8dQgeOtK6fB-TpJRKW!hJiAPkK(>Y?N?M2gR4DUsi~%1D^#(qn zZ%OG}f$mN%$a;sM-=*u;dNLG%}xGX%JZ1~{{>)DSgB$mH4Y+E zAR1{H(SGV&q#_rZq3#S1P*|xKXj3i}ZpT`HUy7$;M()UhHVz11OG~IX5Ut`I%|k<~ zA=IWsssk;YXWN(pxIyC5X!KQ(9EdBeqsBS2^!m_9KZf`7&qeqfdZNAyGFpB#AET5Kg{r_a)cU z+wr9*zM4WfoJDa75=UQeM{$&3^LTn!N~oRJsvSJY#rFbli_fdSV*b~H20UmH(xq*7 znsVA9l=XY~c0|8Vs1VI+LHFltkz4%t9@o0pYtimWTLhVP#*x`g(9 F*Kdv9I>P_} diff --git a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 b/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 deleted file mode 100644 index b070687eb55a04310331d24eac5afdc9d2a21f4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 921 zcmZ`&O>5gg5DlTEMIn?zp@&|E&=PRn*pe+vZck}x!Ph#MLcy$dN7ll6SJ@rKHU0CQ zmD13U6nq%Z%)a;L@$~4)kEg5iL>dvo$-9$J*Q@hqA3CcHs;dx?PTn7V=9Y0=Err>% zf*Nk|)^pLehI^!)y_Ed8@1Dg4D|R^iO<#HEXu_)##zzX1KnH`N!C3!`5UHfIgqAjR zXzx(Y2*1HG{GD=_s*NqOqKLI;obSzBp3g&?@5279CsS&RjUD*SCT(3b`1?yP! zyn9WJw)~nkDeX~`^M^45R1a7@hFi4C`G-c4!ukI%fUBW3-B#N$23@lZrjf$Ni#^up z(Mp!wZ~U5Q{kO59=?Dce6={ z=rWs%!h@jRHgauL$HREUz5Vgk7^;py(?x(STJ-GnffW;>kLc2)Aod?D?gu|x9`x)G zq-(Jkog|}4k__Q_>G7sxpVeka@aB(XEmS&NF6v@hOIhb-Hp|npEb~08=5m>0H6-h7 lbBjLkhjN$4vYb@~CvUo_=fzyiRFx@2Os6u<3Q;ZNtDm63B#Zz6 diff --git a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 b/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 deleted file mode 100644 index 6d1f1cf3428166123cbc300ad720e194ddfed9b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1004 zcmZ`&%Wl&^6h##(C{=|J%WkeJP!~jv(#uTx3_iQ(sjSk-q3eA<^p|!&8p1&AkNSTFX zM9o*kWf;P$cVx9v7<1C-<9k~L_kCWIrKmoG_qj2yft3w}7tS{B$(mS}%N3sg0q{i3 zXeYFryUpqme#cU$l0R;L}@f&mPrfv5Lgl|Q$&PRDgiDd?no)1 z0+?B@FvLM>XJAV=8dQgeOtK6fB-TpJRKW!hJiAPkK(>Y?N?M2gR4DUsi~%1D^#(qn zZ%OG}f$mN%$a;sM-=*u;dNLG%}xGX%JZ1~{{>)DSgB$mH4Y+E zAR1{H(SGV&q#_rZq3#S1P*|xKXj3i}ZpT`HUy7$;M()UhHVz11OG~IX5Ut`I%|k<~ zA=IWsssk;YXWN(pxIyC5X!KQ(9EdBeqsBS2^!m_9KZf`7&qeqfdZNAyGFpB#AET5Kg{r_a)cU z+wr9*zM4WfoJDa75=UQeM{$&3^LTn!N~oRJsvSJY#rFbli_fdSV*b~H20UmH(xq*7 znsVA9l=XY~c0|8Vs1VI+LHFltkz4%t9@o0pYtimWTLhVP#*x`g(9 F*Kdv9I>P_} diff --git a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 b/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 deleted file mode 100644 index a1bbaac066e2e01a06af9cccabdc11eb2c2acd89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1291 zcmbVM-D?v;5HCg2n$m|-Kc3WWuoP<2+}`Cr5?@+GA#Y;yA_`$|cP_VZ**$kRjiLX% zvv<{2sS1S+*_O+nIFU&!)Y@k4AH_7Q_X9xz5|I57XX3r5BR3 zYF;x}VhQ`6u)40W=A>3<9G^Fh`@TW3CA3ZSwb9xQv2}*zgTkU&RuMEH8M3muamz)hFvx@{+72HcQ2;l>ox<>`G{mtY@jDbqJ6{rPpUz@U;uIA@43P z2~&bx`a{FJmadcvU!x`=4REK;rjG#mJrVcG6)2(2eOI1Bo4+>@U68t3Eu^x2A`6s( zG@L2#*gydW6i3M=9>~f{wZMoBR5%bQf|^zm7*POzsifT>|VLfp-0u$CA|I~M-B zG1fTszA>bYPZ>i6W(adlY);o+9bS49zvB0=`XpaDBHf843s7J%=?yA&4va_V2AISA ziGp>TXN?yPJF#5X(1`AKPlw%ZJ3P+>)R-Zf-OPU*szlIeoD^wLa9+e&7{xTpvN#U& z5g${?+o3u%@NI=ZlW11QZ^`USXWDzfVm!Sg#K+rW?Og9pdyj9|^5|b1*GjtGpK0%9 z7|>`ygF%?h=y(!DlOP)e=_CkR_rLE^CbBe01swqkQYO+EavmoTQXYjx5TzdfdiVUr z1N@!8`k$EdBi!U7OQ1+%K>_HPj}ux5N@FgvXiSrkC9T8#`4t$8e@v~3<1CBv6gNFc WicvaZk;p>(AB diff --git a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 b/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 deleted file mode 100644 index 75e06cb9e407cc76580de2f14c8e39b86bf50578..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1372 zcmb7EO>fgc5JeR#C5S_X;DUf5qUwQ^tevE`%cX(3t!YUh391l>YP}!HB4;<)n^aN% z1wW48!>nB(NCkwHSnJuDH*em|_~yptW>T-Qj26ZE-g-Pr>i6E|hKZsOyo(RJ{_@6Q zQs2zXSTUNN�ZC$@$UQEJK@BM!)!6RDO5ey{1!9`H*M1F}8`GO-vwc(fmvov|zcK z;rTj%O=h$e+Me6x>+ry;VQw~ ztyaKA{+X14d{>C?jFYL*5B#Rmh#f%yV|d08yGv7)?|G_@gkTT1i9%sWJg} zLhW{zK`MZm=?qOAl(q&|c%wiKxR@w5feVGcO0#Uv1yDTOi70`J8Yan9VKF`xnYnm@ z250N)CA>l1hNW)J*G5WFg&>%nD2))vi>q8PYw~3SQPOJ!Z@@xmZu0A{TppAE*#V4% zSvDUljfE%)RAU-OwW~T8QshE2Q9Kl+Dk58!NDWBm)@56oIdFrCOQBI$L35zClrA;anyKT5Lb@`Xoa^QCfzzZH!`trQWLRFsy#weU!r5_mw2hWNyo%x7p#M4^ z4&#FcbbB9H+BGJhXfe|h^){>5egDSi%oPDwi;M37y-gNnB$^(B!3YjG0# ryH}FmJzt2tz%N}@!&Vr!(!g(HkZcES+Ty9t1vZE<&ktxCIojU=XDp=@ diff --git a/spec/dummy_rails_4/.gitignore b/spec/dummy_rails_4/.gitignore deleted file mode 100644 index 9c6a60a..0000000 --- a/spec/dummy_rails_4/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. -/.bundle - -# Ignore the default SQLite database. -/db/development.sqlite3 -/db/*.sqlite3-journal - -# Ignore all logfiles and tempfiles. -/log/* -!/log/.keep -/tmp diff --git a/spec/dummy_rails_4/Gemfile b/spec/dummy_rails_4/Gemfile deleted file mode 100644 index 5461f82..0000000 --- a/spec/dummy_rails_4/Gemfile +++ /dev/null @@ -1,47 +0,0 @@ -source 'https://rubygems.org' - - -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.2.0' -# Use sqlite3 as the database for Active Record -gem 'sqlite3' -# Use SCSS for stylesheets -gem 'sass-rails', '~> 5.0' -# Use Uglifier as compressor for JavaScript assets -gem 'uglifier', '>= 1.3.0' -# Use CoffeeScript for .coffee assets and views -gem 'coffee-rails', '~> 4.1.0' -# See https://github.com/sstephenson/execjs#readme for more supported runtimes -# gem 'therubyracer', platforms: :ruby - -# Use jquery as the JavaScript library -gem 'jquery-rails' -# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks -gem 'turbolinks' -# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder -gem 'jbuilder', '~> 2.0' -# bundle exec rake doc:rails generates the API under doc/api. -gem 'sdoc', '~> 0.4.0', group: :doc - -gem 'obfuscate_id', '~> 0.2.0' - -# Use ActiveModel has_secure_password -# gem 'bcrypt', '~> 3.1.7' - -# Use Unicorn as the app server -# gem 'unicorn' - -# Use Capistrano for deployment -# gem 'capistrano-rails', group: :development - -group :development, :test do - # Call 'byebug' anywhere in the code to stop execution and get a debugger console - gem 'byebug' - - # Access an IRB console on exception pages or by using <%= console %> in views - gem 'web-console', '~> 2.0' - - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem 'spring' -end - diff --git a/spec/dummy_rails_4/Gemfile.lock b/spec/dummy_rails_4/Gemfile.lock deleted file mode 100644 index f29776d..0000000 --- a/spec/dummy_rails_4/Gemfile.lock +++ /dev/null @@ -1,169 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.0) - actionview (= 4.2.0) - activesupport (= 4.2.0) - rack (~> 1.6.0) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - actionview (4.2.0) - activesupport (= 4.2.0) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.0) - activesupport (= 4.2.0) - globalid (>= 0.3.0) - activemodel (4.2.0) - activesupport (= 4.2.0) - builder (~> 3.1) - activerecord (4.2.0) - activemodel (= 4.2.0) - activesupport (= 4.2.0) - arel (~> 6.0) - activesupport (4.2.0) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - arel (6.0.0) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - builder (3.2.2) - byebug (3.5.1) - columnize (~> 0.8) - debugger-linecache (~> 1.2) - slop (~> 3.6) - coffee-rails (4.1.0) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.0) - coffee-script (2.3.0) - coffee-script-source - execjs - coffee-script-source (1.9.0) - columnize (0.9.0) - debug_inspector (0.0.2) - debugger-linecache (1.2.0) - erubis (2.7.0) - execjs (2.3.0) - globalid (0.3.2) - activesupport (>= 4.1.0) - hike (1.2.3) - i18n (0.7.0) - jbuilder (2.2.6) - activesupport (>= 3.0.0, < 5) - multi_json (~> 1.2) - jquery-rails (4.0.3) - rails-dom-testing (~> 1.0) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - json (1.8.2) - loofah (2.0.1) - nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) - mime-types (2.4.3) - mini_portile (0.6.2) - minitest (5.5.1) - multi_json (1.10.1) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) - obfuscate_id (0.2.0) - rails (~> 4.2.0) - scatter_swap (~> 0.0.3) - rack (1.6.0) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.0) - actionmailer (= 4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - activemodel (= 4.2.0) - activerecord (= 4.2.0) - activesupport (= 4.2.0) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.0) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.5) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.1) - loofah (~> 2.0) - railties (4.2.0) - actionpack (= 4.2.0) - activesupport (= 4.2.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.4.2) - rdoc (4.2.0) - json (~> 1.4) - sass (3.4.11) - sass-rails (5.0.1) - railties (>= 4.0.0, < 5.0) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (~> 1.1) - scatter_swap (0.0.3) - sdoc (0.4.1) - json (~> 1.7, >= 1.7.7) - rdoc (~> 4.0) - slop (3.6.0) - spring (1.3.0) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.2.4) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.10) - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - turbolinks (2.5.3) - coffee-rails - tzinfo (1.2.2) - thread_safe (~> 0.1) - uglifier (2.7.0) - execjs (>= 0.3.0) - json (>= 1.8.0) - web-console (2.0.0) - activemodel (~> 4.0) - binding_of_caller (>= 0.7.2) - railties (~> 4.0) - sprockets-rails (>= 2.0, < 4.0) - -PLATFORMS - ruby - -DEPENDENCIES - byebug - coffee-rails (~> 4.1.0) - jbuilder (~> 2.0) - jquery-rails - obfuscate_id (~> 0.2.0) - rails (= 4.2.0) - sass-rails (~> 5.0) - sdoc (~> 0.4.0) - spring - sqlite3 - turbolinks - uglifier (>= 1.3.0) - web-console (~> 2.0) diff --git a/spec/dummy_rails_4/README.rdoc b/spec/dummy_rails_4/README.rdoc deleted file mode 100644 index dd4e97e..0000000 --- a/spec/dummy_rails_4/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -rake doc:app. diff --git a/spec/dummy_rails_4/Rakefile b/spec/dummy_rails_4/Rakefile deleted file mode 100644 index ba6b733..0000000 --- a/spec/dummy_rails_4/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Rails.application.load_tasks diff --git a/spec/dummy_rails_4/app/assets/images/.keep b/spec/dummy_rails_4/app/assets/images/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/app/assets/javascripts/application.js b/spec/dummy_rails_4/app/assets/javascripts/application.js deleted file mode 100644 index c28e5ba..0000000 --- a/spec/dummy_rails_4/app/assets/javascripts/application.js +++ /dev/null @@ -1,13 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. -// -// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details -// about supported directives. -// -//= require_tree . diff --git a/spec/dummy_rails_4/app/assets/stylesheets/application.css b/spec/dummy_rails_4/app/assets/stylesheets/application.css deleted file mode 100644 index f9cd5b3..0000000 --- a/spec/dummy_rails_4/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any styles - * defined in the other CSS/SCSS files in this directory. It is generally better to create a new - * file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/spec/dummy_rails_4/app/controllers/application_controller.rb b/spec/dummy_rails_4/app/controllers/application_controller.rb deleted file mode 100644 index d83690e..0000000 --- a/spec/dummy_rails_4/app/controllers/application_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ApplicationController < ActionController::Base - # Prevent CSRF attacks by raising an exception. - # For APIs, you may want to use :null_session instead. - protect_from_forgery with: :exception -end diff --git a/spec/dummy_rails_4/app/controllers/comments_controller.rb b/spec/dummy_rails_4/app/controllers/comments_controller.rb deleted file mode 100644 index 9d47079..0000000 --- a/spec/dummy_rails_4/app/controllers/comments_controller.rb +++ /dev/null @@ -1,22 +0,0 @@ -class CommentsController < ApplicationController - - def create - @comment = Comment.create! comment_params - redirect_to post_path(@comment.post) - end - - def update - @comment = Comment.find(params[:id]) - if @comment.update(comment_params) - redirect_to @comment.post - else - render :edit - end - end - - private - - def comment_params - params.require(:comment).permit(:id, :content, :post_id) - end -end diff --git a/spec/dummy_rails_4/app/controllers/concerns/.keep b/spec/dummy_rails_4/app/controllers/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/app/controllers/posts_controller.rb b/spec/dummy_rails_4/app/controllers/posts_controller.rb deleted file mode 100644 index 01c6215..0000000 --- a/spec/dummy_rails_4/app/controllers/posts_controller.rb +++ /dev/null @@ -1,38 +0,0 @@ -class PostsController < ApplicationController - - def index - @posts = Post.all - end - - def new - @post = Post.new - end - - def edit - @post = Post.find(params[:id]) - end - - def create - @post = Post.create!(post_params) - redirect_to @post - end - - def show - @post = Post.find(params[:id]) - end - - def update - @post = Post.find(params[:id]) - if @post.update(post_params) - redirect_to @post - else - render :edit - end - end - - private - - def post_params - params.require(:post).permit(:id, :content) - end -end diff --git a/spec/dummy_rails_4/app/helpers/application_helper.rb b/spec/dummy_rails_4/app/helpers/application_helper.rb deleted file mode 100644 index de6be79..0000000 --- a/spec/dummy_rails_4/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/spec/dummy_rails_4/app/mailers/.keep b/spec/dummy_rails_4/app/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/app/models/.keep b/spec/dummy_rails_4/app/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/app/models/comment.rb b/spec/dummy_rails_4/app/models/comment.rb deleted file mode 100644 index 4e76c5b..0000000 --- a/spec/dummy_rails_4/app/models/comment.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Comment < ActiveRecord::Base - belongs_to :post -end diff --git a/spec/dummy_rails_4/app/models/concerns/.keep b/spec/dummy_rails_4/app/models/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/app/models/post.rb b/spec/dummy_rails_4/app/models/post.rb deleted file mode 100644 index a5d7f9b..0000000 --- a/spec/dummy_rails_4/app/models/post.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Post < ActiveRecord::Base - has_many :comments - - obfuscate_id :spin => 123456789 -end diff --git a/spec/dummy_rails_4/app/models/user.rb b/spec/dummy_rails_4/app/models/user.rb deleted file mode 100644 index 4a57cf0..0000000 --- a/spec/dummy_rails_4/app/models/user.rb +++ /dev/null @@ -1,2 +0,0 @@ -class User < ActiveRecord::Base -end diff --git a/spec/dummy_rails_4/app/views/layouts/application.html.erb b/spec/dummy_rails_4/app/views/layouts/application.html.erb deleted file mode 100644 index 593a778..0000000 --- a/spec/dummy_rails_4/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/spec/dummy_rails_4/app/views/posts/_form.html.erb b/spec/dummy_rails_4/app/views/posts/_form.html.erb deleted file mode 100644 index 3f645ac..0000000 --- a/spec/dummy_rails_4/app/views/posts/_form.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -<%= form_for(@post) do |f| %> - <% if @post.errors.any? %> -
-

<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:

- -
    - <% @post.errors.full_messages.each do |message| %> -
  • <%= message %>
  • - <% end %> -
-
- <% end %> - -
- <%= f.label :content %> - <%= f.text_field :content %> -
-
- <%= f.submit %> -
-<% end %> diff --git a/spec/dummy_rails_4/app/views/posts/edit.html.erb b/spec/dummy_rails_4/app/views/posts/edit.html.erb deleted file mode 100644 index f1e9acb..0000000 --- a/spec/dummy_rails_4/app/views/posts/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Editing Post

- -<%= render 'form' %> - -<%= link_to 'Show', @post %> | -<%= link_to 'Back', posts_path %> diff --git a/spec/dummy_rails_4/app/views/posts/index.html.erb b/spec/dummy_rails_4/app/views/posts/index.html.erb deleted file mode 100644 index ffd14ac..0000000 --- a/spec/dummy_rails_4/app/views/posts/index.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -
    - <% @posts.each do |post| %> -
  • <%= link_to post.content, post %>
  • - <% end %> -
diff --git a/spec/dummy_rails_4/app/views/posts/new.html.erb b/spec/dummy_rails_4/app/views/posts/new.html.erb deleted file mode 100644 index 3e5f187..0000000 --- a/spec/dummy_rails_4/app/views/posts/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New Post

- -<%= render 'form' %> - -<%= link_to 'Back', posts_path %> diff --git a/spec/dummy_rails_4/app/views/posts/show.html.erb b/spec/dummy_rails_4/app/views/posts/show.html.erb deleted file mode 100644 index 97a6c57..0000000 --- a/spec/dummy_rails_4/app/views/posts/show.html.erb +++ /dev/null @@ -1,34 +0,0 @@ -post: <%= @post.content %>
-post.id: <%= @post.id %>
-post.to_param: <%= @post.to_param %>
-post_path: <%= post_path @post %>. - -
    - <% @post.comments.each do |comment| %> -
  • - comment: <%= comment.content %>
    - comment.id: <%= comment.id %>
    - comment.to_param: <%= comment.to_param %>
    - comment_path: <%= comment_path comment %>. - <%= form_for(comment) do |f| %> -
  • -
    - <%= f.label :content %> - <%= f.text_field :content %> -
    -
    - <%= f.submit %> -
    - <% end %> -
  • - <% end %> -
- -<%= link_to 'Edit Post', edit_post_path(@post) %> | - -<%= form_for @post.comments.new do |f| %> - <%= f.hidden_field :post_id %> - <%= f.label :content %> - <%= f.text_field :content %> - <%= f.submit %> -<% end %> diff --git a/spec/dummy_rails_4/bin/bundle b/spec/dummy_rails_4/bin/bundle deleted file mode 100755 index 66e9889..0000000 --- a/spec/dummy_rails_4/bin/bundle +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -load Gem.bin_path('bundler', 'bundle') diff --git a/spec/dummy_rails_4/bin/rails b/spec/dummy_rails_4/bin/rails deleted file mode 100755 index 4d608ed..0000000 --- a/spec/dummy_rails_4/bin/rails +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end -APP_PATH = File.expand_path('../../config/application', __FILE__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/spec/dummy_rails_4/bin/rake b/spec/dummy_rails_4/bin/rake deleted file mode 100755 index 8017a02..0000000 --- a/spec/dummy_rails_4/bin/rake +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/spec/dummy_rails_4/bin/setup b/spec/dummy_rails_4/bin/setup deleted file mode 100755 index acdb2c1..0000000 --- a/spec/dummy_rails_4/bin/setup +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -require 'pathname' - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) - -Dir.chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file: - - puts "== Installing dependencies ==" - system "gem install bundler --conservative" - system "bundle check || bundle install" - - # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # system "cp config/database.yml.sample config/database.yml" - # end - - puts "\n== Preparing database ==" - system "bin/rake db:setup" - - puts "\n== Removing old logs and tempfiles ==" - system "rm -f log/*" - system "rm -rf tmp/cache" - - puts "\n== Restarting application server ==" - system "touch tmp/restart.txt" -end diff --git a/spec/dummy_rails_4/bin/spring b/spec/dummy_rails_4/bin/spring deleted file mode 100755 index de6070b..0000000 --- a/spec/dummy_rails_4/bin/spring +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast -# It gets overwritten when you run the `spring binstub` command - -unless defined?(Spring) - require "rubygems" - require "bundler" - - if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) - ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) - ENV["GEM_HOME"] = nil - Gem.paths = ENV - - gem "spring", match[1] - require "spring/binstub" - end -end diff --git a/spec/dummy_rails_4/config.ru b/spec/dummy_rails_4/config.ru deleted file mode 100644 index bd83b25..0000000 --- a/spec/dummy_rails_4/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Rails.application diff --git a/spec/dummy_rails_4/config/application.rb b/spec/dummy_rails_4/config/application.rb deleted file mode 100644 index c1e5d67..0000000 --- a/spec/dummy_rails_4/config/application.rb +++ /dev/null @@ -1,27 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) -require File.expand_path("../../../../lib/obfuscate_id", __FILE__) - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Do not swallow errors in after_commit/after_rollback callbacks. - config.active_record.raise_in_transactional_callbacks = true - end -end diff --git a/spec/dummy_rails_4/config/boot.rb b/spec/dummy_rails_4/config/boot.rb deleted file mode 100644 index 6b750f0..0000000 --- a/spec/dummy_rails_4/config/boot.rb +++ /dev/null @@ -1,3 +0,0 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) - -require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/spec/dummy_rails_4/config/database.yml b/spec/dummy_rails_4/config/database.yml deleted file mode 100644 index 1c1a37c..0000000 --- a/spec/dummy_rails_4/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -# -default: &default - adapter: sqlite3 - pool: 5 - timeout: 5000 - -development: - <<: *default - database: db/development.sqlite3 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: db/test.sqlite3 - -production: - <<: *default - database: db/production.sqlite3 diff --git a/spec/dummy_rails_4/config/environment.rb b/spec/dummy_rails_4/config/environment.rb deleted file mode 100644 index ee8d90d..0000000 --- a/spec/dummy_rails_4/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the Rails application. -require File.expand_path('../application', __FILE__) - -# Initialize the Rails application. -Rails.application.initialize! diff --git a/spec/dummy_rails_4/config/environments/development.rb b/spec/dummy_rails_4/config/environments/development.rb deleted file mode 100644 index b55e214..0000000 --- a/spec/dummy_rails_4/config/environments/development.rb +++ /dev/null @@ -1,41 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - - # Adds additional error checking when serving assets at runtime. - # Checks for improperly declared sprockets dependencies. - # Raises helpful error messages. - config.assets.raise_runtime_errors = true - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/spec/dummy_rails_4/config/environments/production.rb b/spec/dummy_rails_4/config/environments/production.rb deleted file mode 100644 index 5c1b32e..0000000 --- a/spec/dummy_rails_4/config/environments/production.rb +++ /dev/null @@ -1,79 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Code is not reloaded between requests. - config.cache_classes = true - - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both threaded web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. - config.eager_load = true - - # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Enable Rack::Cache to put a simple HTTP cache in front of your application - # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like - # NGINX, varnish or squid. - # config.action_dispatch.rack_cache = true - - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? - - # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier - # config.assets.css_compressor = :sass - - # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false - - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. - config.log_level = :debug - - # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new - - # Do not dump schema after migrations. - config.active_record.dump_schema_after_migration = false -end diff --git a/spec/dummy_rails_4/config/environments/test.rb b/spec/dummy_rails_4/config/environments/test.rb deleted file mode 100644 index 1c19f08..0000000 --- a/spec/dummy_rails_4/config/environments/test.rb +++ /dev/null @@ -1,42 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false - - # Configure static file server for tests with Cache-Control for performance. - config.serve_static_files = true - config.static_cache_control = 'public, max-age=3600' - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Randomize the order test cases are executed. - config.active_support.test_order = :random - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true -end diff --git a/spec/dummy_rails_4/config/initializers/assets.rb b/spec/dummy_rails_4/config/initializers/assets.rb deleted file mode 100644 index 01ef3e6..0000000 --- a/spec/dummy_rails_4/config/initializers/assets.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' - -# Add additional assets to the asset load path -# Rails.application.config.assets.paths << Emoji.images_path - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/spec/dummy_rails_4/config/initializers/backtrace_silencers.rb b/spec/dummy_rails_4/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/spec/dummy_rails_4/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/spec/dummy_rails_4/config/initializers/cookies_serializer.rb b/spec/dummy_rails_4/config/initializers/cookies_serializer.rb deleted file mode 100644 index 7f70458..0000000 --- a/spec/dummy_rails_4/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,3 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb b/spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index 4a994e1..0000000 --- a/spec/dummy_rails_4/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,4 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] diff --git a/spec/dummy_rails_4/config/initializers/inflections.rb b/spec/dummy_rails_4/config/initializers/inflections.rb deleted file mode 100644 index ac033bf..0000000 --- a/spec/dummy_rails_4/config/initializers/inflections.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/spec/dummy_rails_4/config/initializers/mime_types.rb b/spec/dummy_rails_4/config/initializers/mime_types.rb deleted file mode 100644 index dc18996..0000000 --- a/spec/dummy_rails_4/config/initializers/mime_types.rb +++ /dev/null @@ -1,4 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf diff --git a/spec/dummy_rails_4/config/initializers/session_store.rb b/spec/dummy_rails_4/config/initializers/session_store.rb deleted file mode 100644 index e766b67..0000000 --- a/spec/dummy_rails_4/config/initializers/session_store.rb +++ /dev/null @@ -1,3 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Rails.application.config.session_store :cookie_store, key: '_dummy_session' diff --git a/spec/dummy_rails_4/config/initializers/wrap_parameters.rb b/spec/dummy_rails_4/config/initializers/wrap_parameters.rb deleted file mode 100644 index 33725e9..0000000 --- a/spec/dummy_rails_4/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] if respond_to?(:wrap_parameters) -end - -# To enable root element in JSON for ActiveRecord objects. -# ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true -# end diff --git a/spec/dummy_rails_4/config/locales/en.yml b/spec/dummy_rails_4/config/locales/en.yml deleted file mode 100644 index 0653957..0000000 --- a/spec/dummy_rails_4/config/locales/en.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/spec/dummy_rails_4/config/routes.rb b/spec/dummy_rails_4/config/routes.rb deleted file mode 100644 index cacd98d..0000000 --- a/spec/dummy_rails_4/config/routes.rb +++ /dev/null @@ -1,4 +0,0 @@ -Rails.application.routes.draw do - resources :comments - resources :posts -end diff --git a/spec/dummy_rails_4/config/secrets.yml b/spec/dummy_rails_4/config/secrets.yml deleted file mode 100644 index 2f00f6c..0000000 --- a/spec/dummy_rails_4/config/secrets.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key is used for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! - -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -# You can use `rake secret` to generate a secure secret key. - -# Make sure the secrets in this file are kept private -# if you're sharing your code publicly. - -development: - secret_key_base: a483fbd95f24c265697443cc5d06a20b3d02270001f5df82307f48f709c4ad5646a836a0f880b9f1a481112184179aefb93bc5c0319dd215b3eb214fa8849e0f - -test: - secret_key_base: c676a70370715f1e512a0a81e919a641da823a6aa8c904d7acfff4f842edfd90ceab730eb3a61ed9bdb196bb0b6f0a5f41c84138b97af15b9644fdfcfad4e554 - -# Do not keep production secrets in the repository, -# instead read values from the environment. -production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb b/spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb deleted file mode 100644 index c3c7176..0000000 --- a/spec/dummy_rails_4/db/migrate/20120201032713_create_posts.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreatePosts < ActiveRecord::Migration - def change - create_table :posts do |t| - t.string :content - - t.timestamps - end - end -end diff --git a/spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb b/spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb deleted file mode 100644 index 91348ab..0000000 --- a/spec/dummy_rails_4/db/migrate/20120201053634_create_comments.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateComments < ActiveRecord::Migration - def change - create_table :comments do |t| - t.integer :post_id - t.string :content - - t.timestamps - end - end -end diff --git a/spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb b/spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb deleted file mode 100644 index 37ce317..0000000 --- a/spec/dummy_rails_4/db/migrate/20120208222551_create_users.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateUsers < ActiveRecord::Migration - def change - create_table :users do |t| - t.string :name - - t.timestamps - end - end -end diff --git a/spec/dummy_rails_4/db/schema.rb b/spec/dummy_rails_4/db/schema.rb deleted file mode 100644 index 361b35f..0000000 --- a/spec/dummy_rails_4/db/schema.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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: 20120208222551) do - - create_table "comments", force: :cascade do |t| - t.integer "post_id" - t.string "content" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "posts", force: :cascade do |t| - t.string "content" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "users", force: :cascade do |t| - t.string "name" - t.datetime "created_at" - t.datetime "updated_at" - end - -end diff --git a/spec/dummy_rails_4/db/seeds.rb b/spec/dummy_rails_4/db/seeds.rb deleted file mode 100644 index 4edb1e8..0000000 --- a/spec/dummy_rails_4/db/seeds.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). -# -# Examples: -# -# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) -# Mayor.create(name: 'Emanuel', city: cities.first) diff --git a/spec/dummy_rails_4/db/test.sqlite3 b/spec/dummy_rails_4/db/test.sqlite3 deleted file mode 100644 index eac4a5c129170522de58997d74faa2f4813e59bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28672 zcmeI#-)qxQ6bJC6*&3Yf(#a$bV{*yU!Y2J?RRqDhg;DI%uC`#GN|s)?K$C7sI(+T^ zBp>$|4F3gv_Hp2U;7QiXVkzQ$8TA`Ta_>p*&AFeOm-GIx?u49u9Qv*mva*m9L{WId zm>>x2bjoy2k2Pv6O*?cKZ?)$&*M+Cwm$URVow*cNe`NPEm&)#HGy8eo0K_2x0SG_< z0uX=z1Rwwb2+RtM<+QB6&Wq!`{L^crUO|xNG%X=h(MGXXphp0eQD&RNDsY zn6<->!D{B7@quachHI>0GHqrOjcsY?+z;prnm$;T)jTC4ht|=6&%8SmNKZ0oSKro+ zKTOWfE#E$|d}cP<%TE#OZ!h5V>v%Q~ zl3gj0@^25fBBdP~sgGZ+$m-^%c(EVPX%AhO@(ZT-RALrw8otxoBeh<%pAH!ub3a=9 zzi~vhITiglAOHafKmY;|fB*y_009U<00IzLU;)(s3%t2l8U!E!0SG_<0uX=z1Rwwb z2tZ&WfchW50t6rc0SG_<0uX=z1Rwwb2tZ)*1yKJl{vKn65P$##AOHafKmY;|fB*y_ z0D-9fmy|Dpa;}#T8nUq+AKgSLI5%zSj#xau9$31Rwwb2tWV=5P$##AOL~? aUf_|Wi^=L=N`&I_KeZ<54<>I->i?gvj5h@U diff --git a/spec/dummy_rails_4/lib/assets/.keep b/spec/dummy_rails_4/lib/assets/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/lib/tasks/.keep b/spec/dummy_rails_4/lib/tasks/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/log/.keep b/spec/dummy_rails_4/log/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/public/404.html b/spec/dummy_rails_4/public/404.html deleted file mode 100644 index b612547..0000000 --- a/spec/dummy_rails_4/public/404.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - - -
-
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/spec/dummy_rails_4/public/422.html b/spec/dummy_rails_4/public/422.html deleted file mode 100644 index a21f82b..0000000 --- a/spec/dummy_rails_4/public/422.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - - -
-
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/spec/dummy_rails_4/public/500.html b/spec/dummy_rails_4/public/500.html deleted file mode 100644 index 061abc5..0000000 --- a/spec/dummy_rails_4/public/500.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - - -
-
-

We're sorry, but something went wrong.

-
-

If you are the application owner check the logs for more information.

-
- - diff --git a/spec/dummy_rails_4/public/favicon.ico b/spec/dummy_rails_4/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/public/robots.txt b/spec/dummy_rails_4/public/robots.txt deleted file mode 100644 index 3c9c7c0..0000000 --- a/spec/dummy_rails_4/public/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file -# -# To ban all spiders from the entire site uncomment the next two lines: -# User-agent: * -# Disallow: / diff --git a/spec/dummy_rails_4/test/controllers/.keep b/spec/dummy_rails_4/test/controllers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/test/fixtures/.keep b/spec/dummy_rails_4/test/fixtures/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/test/helpers/.keep b/spec/dummy_rails_4/test/helpers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/test/integration/.keep b/spec/dummy_rails_4/test/integration/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/test/mailers/.keep b/spec/dummy_rails_4/test/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/test/models/.keep b/spec/dummy_rails_4/test/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/test/test_helper.rb b/spec/dummy_rails_4/test/test_helper.rb deleted file mode 100644 index 92e39b2..0000000 --- a/spec/dummy_rails_4/test/test_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../../config/environment', __FILE__) -require 'rails/test_help' - -class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... -end diff --git a/spec/dummy_rails_4/vendor/assets/javascripts/.keep b/spec/dummy_rails_4/vendor/assets/javascripts/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy_rails_4/vendor/assets/stylesheets/.keep b/spec/dummy_rails_4/vendor/assets/stylesheets/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/models/sub_post_spec.rb b/spec/models/sub_post_spec.rb new file mode 100644 index 0000000..498b6e0 --- /dev/null +++ b/spec/models/sub_post_spec.rb @@ -0,0 +1,41 @@ +require 'spec_helper' + +describe Post::SubPost do + describe "Reloading a record" do + subject(:post) { Post::SubPost.create(content: "original") } + + it "does not throw an error" do + expect(lambda { post.reload }).to_not raise_error + end + + it "reloads correctly" do + post = Post::SubPost.find(subject.to_param) + post.update_attribute :content, "new" + + expect(subject.content).to eql "original" + + subject.reload + + expect(subject.content).to eql "new" + end + + it "resets id to original value" do + id = subject.id + param = subject.to_param + subject.reload + + expect(subject.id).to eql id + expect(subject.to_param).to eql param + end + end + + describe "Finding multiple records" do + let (:post1) { Post::SubPost.create content: "one" } + let (:post2) { Post::SubPost.create content: "two" } + subject {Post::SubPost.find([post1.to_param, post2.to_param])} + + it "should load all items" do + should eq([post1, post2]) + end + end +end