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/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/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) 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/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..3347c5f 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' @@ -38,10 +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/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/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/bin/rails b/spec/dummy/bin/rails index 4d608ed..0739660 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__) +APP_PATH = File.expand_path('../config/application', __dir__) 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 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/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 361b35f..ffe7113 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,34 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20120208222551) do +ActiveRecord::Schema.define(version: 20170807131852) 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 "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.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 eac4a5c..4f50db3 100644 Binary files a/spec/dummy/db/test.sqlite3 and b/spec/dummy/db/test.sqlite3 differ 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 fd5d4a2..0000000 Binary files a/spec/dummy_rails_3/db/test.sqlite3 and /dev/null differ 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 b070687..0000000 Binary files a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 and /dev/null differ 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 6d1f1cf..0000000 Binary files a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af and /dev/null differ 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 b070687..0000000 Binary files a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 and /dev/null differ 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 6d1f1cf..0000000 Binary files a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 and /dev/null differ 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 a1bbaac..0000000 Binary files a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 and /dev/null differ 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 75e06cb..0000000 Binary files a/spec/dummy_rails_3/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 and /dev/null differ 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 diff --git a/spec/lib/obfuscate_id_spec.rb b/spec/lib/obfuscate_id_spec.rb index 254f878..ac461eb 100644 --- a/spec/lib/obfuscate_id_spec.rb +++ b/spec/lib/obfuscate_id_spec.rb @@ -47,7 +47,7 @@ class Post < ActiveRecord::Base describe "for model with long name" do before do - class SomeReallyAbsurdlyLongNamedClassThatYouWouldntHaveThoughtOf < ActiveRecord::Base + class SomeReallyAbsurdlyLongNamedClassThatYouWouldntHaveThoughtOfs < ActiveRecord::Base def self.columns() @columns ||= []; end def self.column(name, sql_type = nil, default = nil, null = true) @@ -59,7 +59,7 @@ def self.column(name, sql_type = nil, default = nil, null = true) end it 'compute default spin correctly' do - rec = SomeReallyAbsurdlyLongNamedClassThatYouWouldntHaveThoughtOf.new(id: 1) + rec = SomeReallyAbsurdlyLongNamedClassThatYouWouldntHaveThoughtOfs.new(id: 1) expect { rec.to_param }.not_to raise_error end end 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