Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- completely refactored the test system to use a fake rails_root

- added XML tests
- renamed should_be_a_resource to should_be_restful



git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@132 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
commit 3a8b77d1a1839ff878d2b3f9dda5049617b74917 1 parent da341ef
tsaleh authored
Showing with 97,457 additions and 141 deletions.
  1. +2 −5 Rakefile
  2. +176 −60 lib/controller_helpers.rb
  3. +1 −1  lib/general.rb
  4. +1 −1  test/{ → disabled}/active_record_test.rb
  5. +1 −1  test/{ → disabled}/context_test.rb
  6. +1 −1  test/{ → disabled}/helpers_test.rb
  7. +1 −1  test/{ → disabled}/private_helpers_test.rb
  8. +5 −5 test/{support → }/fixtures/posts.yml
  9. 0  test/{support/controllers.rb → fixtures/taggings.yml}
  10. +8 −8 test/{support → }/fixtures/tags.yml
  11. +5 −6 test/{support → }/fixtures/users.yml
  12. +27 −0 test/functional/posts_controller_test.rb
  13. +25 −0 test/functional/users_controller_test.rb
  14. +10 −0 test/rails_root/Rakefile
  15. +7 −0 test/rails_root/app/controllers/application.rb
  16. +77 −0 test/rails_root/app/controllers/posts_controller.rb
  17. +81 −0 test/rails_root/app/controllers/users_controller.rb
  18. +3 −0  test/rails_root/app/helpers/application_helper.rb
  19. +2 −0  test/rails_root/app/helpers/posts_helper.rb
  20. +2 −0  test/rails_root/app/helpers/users_helper.rb
  21. +10 −0 test/rails_root/app/models/post.rb
  22. +4 −0 test/rails_root/app/models/tag.rb
  23. +4 −0 test/rails_root/app/models/tagging.rb
  24. +8 −0 test/rails_root/app/models/user.rb
  25. +17 −0 test/rails_root/app/views/layouts/posts.rhtml
  26. +17 −0 test/rails_root/app/views/layouts/users.rhtml
  27. +27 −0 test/rails_root/app/views/posts/edit.rhtml
  28. +24 −0 test/rails_root/app/views/posts/index.rhtml
  29. +26 −0 test/rails_root/app/views/posts/new.rhtml
  30. +18 −0 test/rails_root/app/views/posts/show.rhtml
  31. +22 −0 test/rails_root/app/views/users/edit.rhtml
  32. +22 −0 test/rails_root/app/views/users/index.rhtml
  33. +21 −0 test/rails_root/app/views/users/new.rhtml
  34. +13 −0 test/rails_root/app/views/users/show.rhtml
  35. +45 −0 test/rails_root/config/boot.rb
  36. +4 −0 test/rails_root/config/database.yml
  37. +14 −0 test/rails_root/config/environment.rb
  38. 0  test/rails_root/config/environments/sqlite3.rb
  39. +5 −0 test/rails_root/config/routes.rb
  40. +13 −0 test/rails_root/db/migrate/001_create_users.rb
  41. +13 −0 test/rails_root/db/migrate/002_create_posts.rb
  42. +12 −0 test/rails_root/db/migrate/003_create_taggings.rb
  43. +11 −0 test/rails_root/db/migrate/004_create_tags.rb
  44. 0  test/rails_root/db/schema.rb
  45. +2 −0  test/rails_root/doc/README_FOR_APP
  46. +4 −0 test/rails_root/log/development.log
  47. 0  test/rails_root/log/production.log
  48. 0  test/rails_root/log/server.log
  49. +89,735 −0 test/rails_root/log/sqlite3.log
  50. +950 −0 test/rails_root/log/test.log
  51. +40 −0 test/rails_root/public/.htaccess
  52. +30 −0 test/rails_root/public/404.html
  53. +30 −0 test/rails_root/public/500.html
  54. +10 −0 test/rails_root/public/dispatch.cgi
  55. +24 −0 test/rails_root/public/dispatch.fcgi
  56. +10 −0 test/rails_root/public/dispatch.rb
  57. 0  test/rails_root/public/favicon.ico
  58. BIN  test/rails_root/public/images/rails.png
  59. +277 −0 test/rails_root/public/index.html
  60. +2 −0  test/rails_root/public/javascripts/application.js
  61. +833 −0 test/rails_root/public/javascripts/controls.js
  62. +942 −0 test/rails_root/public/javascripts/dragdrop.js
  63. +1,088 −0 test/rails_root/public/javascripts/effects.js
  64. +2,515 −0 test/rails_root/public/javascripts/prototype.js
  65. +1 −0  test/rails_root/public/robots.txt
  66. +74 −0 test/rails_root/public/stylesheets/scaffold.css
  67. +3 −0  test/rails_root/script/about
  68. +3 −0  test/rails_root/script/breakpointer
  69. +3 −0  test/rails_root/script/console
  70. +3 −0  test/rails_root/script/destroy
  71. +3 −0  test/rails_root/script/generate
  72. +3 −0  test/rails_root/script/performance/benchmarker
  73. +3 −0  test/rails_root/script/performance/profiler
  74. +3 −0  test/rails_root/script/plugin
  75. +3 −0  test/rails_root/script/process/inspector
  76. +3 −0  test/rails_root/script/process/reaper
  77. +3 −0  test/rails_root/script/process/spawner
  78. +3 −0  test/rails_root/script/runner
  79. +3 −0  test/rails_root/script/server
  80. +1 −0  test/rails_root/vendor/plugins/shoulda
  81. +0 −3  test/support/database.yml
  82. +0 −26 test/support/schema.rb
  83. +23 −23 test/test_helper.rb
  84. +13 −0 test/unit/post_test.rb
  85. +8 −0 test/unit/tag_test.rb
  86. +8 −0 test/unit/tagging_test.rb
  87. +13 −0 test/unit/user_test.rb
7 Rakefile
View
@@ -3,13 +3,11 @@ require 'rake/testtask'
require 'rake/rdoctask'
Rake::TestTask.new do |t|
- t.libs << 'test'
- t.pattern = 'test/*_test.rb'
+ t.libs << 'lib'
+ t.pattern = 'test/{unit,functional}/**/*_test.rb' # Update this line
t.verbose = true
end
-# Generate the RDoc documentation
-
Rake::RDocTask.new { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = "Shoulda -- Making your tests easy on the fingers and eyes"
@@ -20,4 +18,3 @@ Rake::RDocTask.new { |rdoc|
desc 'Default: run tests.'
task :default => ['test']
-
236 lib/controller_helpers.rb
View
@@ -6,26 +6,37 @@ class ActionOptions
attr_accessor :redirect, :flash, :params, :render
end
- attr_accessor :identifier, :klass, :object, :parent_params, :test_actions,
+ attr_accessor :identifier, :klass, :object, :parent,
+ :test_html_actions, :test_xml_actions,
:create, :update, :destroy
+
+ alias parents parent
def initialize
@create = ActionOptions.new
@update = ActionOptions.new
@destroy = ActionOptions.new
- @test_actions = [:index, :show, :new, :edit, :create, :update, :destroy]
- end
+
+ @test_html_actions = [:index, :show, :new, :edit, :create, :update, :destroy]
+ @test_xml_actions = [:index, :show, :create, :update, :destroy]
+ end
def normalize!(target)
- @test_actions = @test_actions.map(&:to_sym)
+ @test_html_actions = @test_html_actions.map(&:to_sym)
+ @test_xml_actions = @test_xml_actions.map(&:to_sym)
+
@identifier ||= :id
@klass ||= target.name.gsub(/ControllerTest$/, '').singularize.constantize
@object ||= @klass.name.tableize.singularize
- @parent_params ||= {}
+ @parent ||= []
+ @parent = [@parent] unless @parent.is_a? Array
- @create.redirect ||= "#{@object}_url(record)"
- @update.redirect ||= "#{@object}_url(record)"
- @destroy.redirect ||= "#{@object.pluralize}_url"
+ singular_args = @parent.map {|n| "record.#{n}"}
+ @destroy.redirect ||= "#{@object.pluralize}_url(#{singular_args.join(', ')})"
+
+ singular_args << 'record'
+ @create.redirect ||= "#{@object}_url(#{singular_args.join(', ')})"
+ @update.redirect ||= "#{@object}_url(#{singular_args.join(', ')})"
@create.flash ||= /created/i
@update.flash ||= /updated/i
@@ -36,24 +47,32 @@ def normalize!(target)
end
end
- def self.should_be_a_resource(&blk)
+ def self.should_be_restful(&blk)
resource = ResourceOptions.new
blk.call(resource)
resource.normalize!(self)
- make_show_test(resource) if resource.test_actions.include?(:show)
- make_edit_test(resource) if resource.test_actions.include?(:edit)
- make_index_test(resource) if resource.test_actions.include?(:index)
- make_new_test(resource) if resource.test_actions.include?(:new)
- make_destroy_test(resource) if resource.test_actions.include?(:destroy)
- make_create_test(resource) if resource.test_actions.include?(:create)
- make_update_test(resource) if resource.test_actions.include?(:update)
- end
-
- def self.make_show_test(res)
- should "get show for @#{res.object} via params: #{pretty_param_string(res)}" do
- assert(record = instance_variable_get("@#{res.object}"), "This test requires you to set @#{res.object} in your setup block")
- get :show, res.parent_params.merge({ res.identifier => record.to_param })
+ resource.test_html_actions.each do |action|
+ self.send(:"make_#{action}_html_test", resource) if self.respond_to? :"make_#{action}_html_test"
+ end
+
+ context "XML: " do
+ setup do
+ @request.accept = "application/xml"
+ end
+
+ resource.test_xml_actions.each do |action|
+ self.send(:"make_#{action}_xml_test", resource) if self.respond_to? :"make_#{action}_xml_test"
+ end
+ end
+ end
+
+ def self.make_show_html_test(res)
+ # should "get show for @#{res.object} via params: #{pretty_param_string(res)}" do
+ should "get show for @#{res.object}" do
+ record = get_existing_record(res)
+ parent_params = make_parent_params(res, record)
+ get :show, parent_params.merge({ res.identifier => record.to_param })
assert assigns(res.klass.name.underscore.to_sym), "The show action isn't assigning to @#{res.klass.name.underscore}"
assert_response :success
assert_template 'show'
@@ -61,10 +80,12 @@ def self.make_show_test(res)
end
end
- def self.make_edit_test(res)
- should "get edit for @#{res.object} via params: #{pretty_param_string(res)}" do
- assert(record = instance_variable_get("@#{res.object}"), "This test requires you to set @#{res.object} in your setup block")
- get :edit, res.parent_params.merge({ res.identifier => record.to_param })
+ def self.make_edit_html_test(res)
+ # should "get edit for @#{res.object} via params: #{pretty_param_string(res)}" do
+ should "get edit for @#{res.object}" do
+ record = get_existing_record(res)
+ parent_params = make_parent_params(res, record)
+ get :edit, parent_params.merge({ res.identifier => record.to_param })
assert assigns(res.klass.name.underscore.to_sym), "The edit action isn't assigning to @#{res.klass.name.underscore}"
assert_response :success
assert_select "form", true, "The edit template doesn't contain a <form> element"
@@ -73,9 +94,10 @@ def self.make_edit_test(res)
end
end
- def self.make_index_test(res)
+ def self.make_index_html_test(res)
should "get index" do
- get(:index, res.parent_params)
+ parent_params = make_parent_params(res)
+ get(:index, parent_params)
assert_response :success
assert assigns(res.klass.name.underscore.pluralize.to_sym),
"The index action isn't assigning to @#{res.klass.name.underscore.pluralize}"
@@ -84,9 +106,10 @@ def self.make_index_test(res)
end
end
- def self.make_new_test(res)
+ def self.make_new_html_test(res)
should "show form on get to new" do
- get(:new, res.parent_params)
+ parent_params = make_parent_params(res)
+ get(:new, parent_params)
assert_response :success
assert assigns(res.klass.name.underscore.to_sym),
"The new action isn't assigning to @#{res.klass.name.underscore}"
@@ -95,12 +118,12 @@ def self.make_new_test(res)
end
end
- def self.make_destroy_test(res)
+ def self.make_destroy_html_test(res)
should "destroy @#{res.object} on 'delete' to destroy action" do
- assert(record = instance_variable_get("@#{res.object}"),
- "This test requires you to set @#{res.object} in your setup block")
+ record = get_existing_record(res)
+ parent_params = make_parent_params(res, record)
assert_difference(res.klass, :count, -1) do
- delete :destroy, res.parent_params.merge({ res.identifier => record.to_param })
+ delete :destroy, parent_params.merge({ res.identifier => record.to_param })
assert_redirected_to eval(res.destroy.redirect, self.send(:binding), __FILE__, __LINE__),
"Flash: #{flash.inspect}"
assert_contains flash.values, res.destroy.flash, ", Flash: #{flash.inspect}"
@@ -108,10 +131,12 @@ def self.make_destroy_test(res)
end
end
- def self.make_create_test(res)
+ def self.make_create_html_test(res)
should "create #{res.klass} record on post to 'create'" do
assert_difference(res.klass, :count, 1) do
- post :create, res.parent_params.merge(res.object => res.create.params)
+ # params = res.parent_params.merge(res.object => res.create.params)
+ parent_params = make_parent_params(res)
+ post :create, parent_params.merge(res.object => res.create.params)
assert record = assigns(res.object), "@#{res.object} not set after create"
assert_equal [], record.errors.full_messages, "@#{res.object} has errors:"
assert_redirected_to eval(res.create.redirect, self.send(:binding), __FILE__, __LINE__)
@@ -120,50 +145,141 @@ def self.make_create_test(res)
end
end
- def self.make_update_test(res)
+ def self.make_update_html_test(res)
should "update #{res.klass} record on put to :update" do
- assert(record = instance_variable_get("@#{res.object}"),
- "This test requires you to set @#{res.object} in your setup block")
- put :update, res.parent_params.merge(res.identifier => record.to_param, res.object => res.create.params)
+ record = get_existing_record(res)
+ parent_params = make_parent_params(res, record)
+ put :update, parent_params.merge(res.identifier => record.to_param, res.object => res.update.params)
assert record = assigns(res.object), "@#{res.object} not set after create"
assert_equal [], record.errors.full_messages, "@#{res.object} has errors:"
assert_redirected_to eval(res.update.redirect, self.send(:binding), __FILE__, __LINE__)
assert_contains flash.values, res.update.flash, ", Flash: #{flash.inspect}"
- res.create.params.each do |key, value|
+ res.update.params.each do |key, value|
assert_equal value.to_s, record.send(key.to_sym).to_s,
"#{res.object}.#{key} not set to #{value} after update"
end
end
end
- def self.should_be_denied_on(method, action, opts ={})
- redirect_proc = opts[:redirect]
- klass = opts[:klass] || self.name.gsub(/ControllerTest/, '').singularize.constantize
- params = opts[:params] || {}
- expected_flash = opts[:flash] || /\w+/
-
- should "no be able to #{method.to_s.upcase} #{action}" do
- assert_no_difference(klass, :count) do
- self.send(method, action, params)
- assert_contains flash.values, expected_flash
-
- assert_response :redirect
- if redirect_proc
- assert_redirected_to(@controller.instance_eval(&redirect_proc))
- end
+ def self.make_show_xml_test(res)
+ should "get show for @#{res.object} as xml" do
+ record = get_existing_record(res)
+ parent_params = make_parent_params(res, record)
+
+ get :show, parent_params.merge({ res.identifier => record.to_param }), :format => :xml
+
+ assert_equal "application/xml; charset=utf-8", @response.headers['Content-Type']
+ assert_response :success
+ assert_select "#{res.klass.name.underscore.dasherize}", 1,
+ "Can't find <#{res.klass.name.underscore.dasherize.pluralize}> in \n#{@response.body}"
+ end
+ end
+
+ def self.make_index_xml_test(res)
+ should "get index as xml" do
+ parent_params = make_parent_params(res)
+
+ get(:index, parent_params)
+
+ assert_equal "application/xml; charset=utf-8", @response.headers['Content-Type']
+ assert_response :success
+ assert_select "#{res.klass.name.underscore.dasherize.pluralize}", 1,
+ "Can't find <#{res.klass.name.underscore.dasherize.pluralize}> in \n#{@response.body}"
+ end
+ end
+
+ def self.make_destroy_xml_test(res)
+ should "destroy @#{res.object} on 'delete' to destroy action as xml" do
+ record = get_existing_record(res)
+ parent_params = make_parent_params(res, record)
+
+ assert_difference(res.klass, :count, -1) do
+ delete :destroy, parent_params.merge({ res.identifier => record.to_param })
+ assert_equal "application/xml; charset=utf-8", @response.headers['Content-Type']
+ assert_response :success
+ assert_match(/^\s*$/, @response.body, "The response body was not empty:")
end
end
+ end
+
+ def self.make_create_xml_test(res)
+ should "create #{res.klass} record on post to 'create' as xml" do
+ assert_difference(res.klass, :count, 1) do
+ # params = res.parent_params.merge(res.object => res.create.params)
+ parent_params = make_parent_params(res)
+
+ post :create, parent_params.merge(res.object => res.create.params)
+
+ assert_equal "application/xml; charset=utf-8", @response.headers['Content-Type']
+ assert_response :created
+ assert record = assigns(res.object), "@#{res.object} not set after create"
+ assert_equal [], record.errors.full_messages, "@#{res.object} has errors:"
+ assert_equal eval(res.create.redirect, self.send(:binding), __FILE__, __LINE__),
+ @response.headers["Location"]
+ end
+ end
end
+
+ def self.make_update_xml_test(res)
+ should "update #{res.klass} record on put to :update as xml" do
+ record = get_existing_record(res)
+ parent_params = make_parent_params(res, record)
+
+ put :update, parent_params.merge(res.identifier => record.to_param, res.object => res.update.params)
+
+ assert_equal "application/xml; charset=utf-8", @response.headers['Content-Type']
+ assert record = assigns(res.object), "@#{res.object} not set after create"
+ assert_equal [], record.errors.full_messages, "@#{res.object} has errors:"
+ assert_response :success
+ assert_match(/^\s*$/, @response.body, "The response body was not empty:")
+ res.update.params.each do |key, value|
+ assert_equal value.to_s, record.send(key.to_sym).to_s,
+ "#{res.object}.#{key} not set to #{value} after update"
+ end
+ end
+ end
+
+ # def self.should_be_denied_on(method, action, opts ={})
+ # redirect_proc = opts[:redirect]
+ # klass = opts[:klass] || self.name.gsub(/ControllerTest/, '').singularize.constantize
+ # params = opts[:params] || {}
+ # expected_flash = opts[:flash] || /\w+/
+ #
+ # should "no be able to #{method.to_s.upcase} #{action}" do
+ # assert_no_difference(klass, :count) do
+ # self.send(method, action, params)
+ # assert_contains flash.values, expected_flash
+ #
+ # assert_response :redirect
+ # if redirect_proc
+ # assert_redirected_to(@controller.instance_eval(&redirect_proc))
+ # end
+ # end
+ # end
+ # end
class << self
- private
+ private
include ThoughtBot::Shoulda::Private
end
private
- def self.pretty_param_string(res)
- res.parent_params.merge({ res.identifier => :X }).inspect.gsub(':X', '@object.to_param').gsub('=>', ' => ')
+ def get_existing_record(res)
+ returning(instance_variable_get "@#{res.object}") do |record|
+ assert(record, "This test requires you to set @#{res.object} in your setup block")
+ end
+ end
+
+ def make_parent_params(resource, record = nil, parent_names = nil)
+ parent_names ||= resource.parents.reverse
+
+ return {} if parent_names == [] # Base case
+
+ parent_name = parent_names.shift
+
+ parent = record ? record.send(parent_name) : parent_name.to_s.classify.constantize.find(:first)
+
+ { :"#{parent_name}_id" => parent.id }.merge(make_parent_params(resource, parent, parent_names))
end
-
end
2  lib/general.rb
View
@@ -5,7 +5,7 @@ module General # :nodoc:
module ClassMethods
# Loads all fixture files (<tt>test/fixtures/*.yml</tt>)
def load_all_fixtures
- all_fixtures = Dir.glob(File.join(RAILS_ROOT, "test", "fixtures", "*.yml")).collect do |f|
+ all_fixtures = Dir.glob(File.join(Test::Unit::TestCase.fixture_path, "*.yml")).collect do |f|
File.basename(f, '.yml').to_sym
end
fixtures *all_fixtures
2  test/active_record_test.rb → test/disabled/active_record_test.rb
View
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), 'test_helper')
+require File.join(File.dirname(__FILE__), '..', 'test_helper')
class Post < ActiveRecord::Base
belongs_to :user
2  test/context_test.rb → test/disabled/context_test.rb
View
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), 'test_helper')
+require File.join(File.dirname(__FILE__), '..', 'test_helper')
class ContextTest < Test::Unit::TestCase # :nodoc:
2  test/helpers_test.rb → test/disabled/helpers_test.rb
View
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), 'test_helper')
+require File.join(File.dirname(__FILE__), '..', 'test_helper')
class Val
@@val = 0
2  test/private_helpers_test.rb → test/disabled/private_helpers_test.rb
View
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), 'test_helper')
+require File.join(File.dirname(__FILE__), '..', 'test_helper')
class PrivateHelpersTest < Test::Unit::TestCase # :nodoc:
include ThoughtBot::Shoulda::ActiveRecord
10 test/support/fixtures/posts.yml → test/fixtures/posts.yml 100755 → 100644
View
@@ -1,5 +1,5 @@
-first:
- id: 1
- title: My Cute Kitten!
- body: This is totally a cute kitten
- user_id: 1
+first:
+ id: 1
+ title: My Cute Kitten!
+ body: This is totally a cute kitten
+ user_id: 1
0  test/support/controllers.rb → test/fixtures/taggings.yml
View
File renamed without changes
16 test/support/fixtures/tags.yml → test/fixtures/tags.yml 100755 → 100644
View
@@ -1,9 +1,9 @@
-first:
- id: 1
- name: Stuff
-second:
- id: 2
- name: Rails
-third:
- id: 3
+first:
+ id: 1
+ name: Stuff
+second:
+ id: 2
+ name: Rails
+third:
+ id: 3
name: Nothing
11 test/support/fixtures/users.yml → test/fixtures/users.yml 100755 → 100644
View
@@ -1,6 +1,5 @@
-first:
- id: 1
- name: Some dude
- company_id: 1
- age: 2
- email: none@none.com
+first:
+ id: 1
+ name: Some dude
+ age: 2
+ email: none@none.com
27 test/functional/posts_controller_test.rb
View
@@ -0,0 +1,27 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'posts_controller'
+
+# Re-raise errors caught by the controller.
+class PostsController; def rescue_action(e) raise e end; end
+
+class PostsControllerTest < Test::Unit::TestCase
+ load_all_fixtures
+
+ def setup
+ @controller = PostsController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ @post = Post.find(:first)
+ end
+
+ should_be_restful do |resource|
+ resource.parent = :user
+
+ resource.create.params = { :title => "first post", :body => 'blah blah blah'}
+ resource.update.params = { :title => "changed" }
+
+ # resource.create.redirect = "post_url( record.user, record)"
+ # resource.update.redirect = "post_url( record.user, record)"
+ # resource.destroy.redirect = "posts_url(record.user)"
+ end
+end
25 test/functional/users_controller_test.rb
View
@@ -0,0 +1,25 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'users_controller'
+
+# Re-raise errors caught by the controller.
+class UsersController; def rescue_action(e) raise e end; end
+
+class UsersControllerTest < Test::Unit::TestCase
+ load_all_fixtures
+
+ def setup
+ @controller = UsersController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ @user = User.find(:first)
+ end
+
+ should_be_restful do |resource|
+ resource.create.params = { :name => "bob", :email => 'bob@bob.com', :age => 13}
+ resource.update.params = { :name => "sue" }
+
+ resource.create.redirect = "user_url(record)"
+ resource.update.redirect = "user_url(record)"
+ resource.destroy.redirect = "users_url"
+ end
+end
10 test/rails_root/Rakefile
View
@@ -0,0 +1,10 @@
+# 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.join(File.dirname(__FILE__), 'config', 'boot'))
+
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+require 'tasks/rails'
7 test/rails_root/app/controllers/application.rb
View
@@ -0,0 +1,7 @@
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class ApplicationController < ActionController::Base
+ # Pick a unique cookie name to distinguish our session data from others'
+ session :session_key => '_rails_root_session_id'
+end
77 test/rails_root/app/controllers/posts_controller.rb
View
@@ -0,0 +1,77 @@
+class PostsController < ApplicationController
+ before_filter :load_user
+
+ def index
+ @posts = @user.posts
+
+ respond_to do |format|
+ format.html # index.rhtml
+ format.xml { render :xml => @posts.to_xml }
+ end
+ end
+
+ def show
+ @post = @user.posts.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.rhtml
+ format.xml { render :xml => @post.to_xml }
+ end
+ end
+
+ def new
+ @post = @user.posts.build
+ end
+
+ def edit
+ @post = @user.posts.find(params[:id])
+ end
+
+ def create
+ @post = @user.posts.build(params[:post])
+
+ respond_to do |format|
+ if @post.save
+ flash[:notice] = 'Post was successfully created.'
+ format.html { redirect_to post_url(@post.user, @post) }
+ format.xml { head :created, :location => post_url(@post.user, @post) }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @post.errors.to_xml }
+ end
+ end
+ end
+
+ def update
+ @post = @user.posts.find(params[:id])
+
+ respond_to do |format|
+ if @post.update_attributes(params[:post])
+ flash[:notice] = 'Post was successfully updated.'
+ format.html { redirect_to post_url(@post) }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @post.errors.to_xml }
+ end
+ end
+ end
+
+ def destroy
+ @post = @user.posts.find(params[:id])
+ @post.destroy
+
+ flash[:notice] = "Post was removed"
+
+ respond_to do |format|
+ format.html { redirect_to posts_url }
+ format.xml { head :ok }
+ end
+ end
+
+ private
+
+ def load_user
+ @user = User.find(params[:user_id])
+ end
+end
81 test/rails_root/app/controllers/users_controller.rb
View
@@ -0,0 +1,81 @@
+class UsersController < ApplicationController
+ # GET /users
+ # GET /users.xml
+ def index
+ @users = User.find(:all)
+
+ respond_to do |format|
+ format.html # index.rhtml
+ format.xml { render :xml => @users.to_xml }
+ end
+ end
+
+ # GET /users/1
+ # GET /users/1.xml
+ def show
+ @user = User.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.rhtml
+ format.xml { render :xml => @user.to_xml }
+ end
+ end
+
+ # GET /users/new
+ def new
+ @user = User.new
+ end
+
+ # GET /users/1;edit
+ def edit
+ @user = User.find(params[:id])
+ end
+
+ # POST /users
+ # POST /users.xml
+ def create
+ @user = User.new(params[:user])
+
+ respond_to do |format|
+ if @user.save
+ flash[:notice] = 'User was successfully created.'
+ format.html { redirect_to user_url(@user) }
+ format.xml { head :created, :location => user_url(@user) }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @user.errors.to_xml }
+ end
+ end
+ end
+
+ # PUT /users/1
+ # PUT /users/1.xml
+ def update
+ @user = User.find(params[:id])
+
+ respond_to do |format|
+ if @user.update_attributes(params[:user])
+ flash[:notice] = 'User was successfully updated.'
+ format.html { redirect_to user_url(@user) }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @user.errors.to_xml }
+ end
+ end
+ end
+
+ # DELETE /users/1
+ # DELETE /users/1.xml
+ def destroy
+ @user = User.find(params[:id])
+ @user.destroy
+
+ flash[:notice] = "User was removed"
+
+ respond_to do |format|
+ format.html { redirect_to users_url }
+ format.xml { head :ok }
+ end
+ end
+end
3  test/rails_root/app/helpers/application_helper.rb
View
@@ -0,0 +1,3 @@
+# Methods added to this helper will be available to all templates in the application.
+module ApplicationHelper
+end
2  test/rails_root/app/helpers/posts_helper.rb
View
@@ -0,0 +1,2 @@
+module PostsHelper
+end
2  test/rails_root/app/helpers/users_helper.rb
View
@@ -0,0 +1,2 @@
+module UsersHelper
+end
10 test/rails_root/app/models/post.rb
View
@@ -0,0 +1,10 @@
+class Post < ActiveRecord::Base
+ belongs_to :user
+ has_many :taggings
+ has_many :tags, :through => :taggings
+
+ validates_uniqueness_of :title
+ validates_presence_of :title
+ validates_presence_of :body, :message => 'Seriously... wtf'
+ validates_numericality_of :user_id
+end
4 test/rails_root/app/models/tag.rb
View
@@ -0,0 +1,4 @@
+class Tag < ActiveRecord::Base
+ has_many :taggings
+ has_many :posts, :through => :taggings
+end
4 test/rails_root/app/models/tagging.rb
View
@@ -0,0 +1,4 @@
+class Tagging < ActiveRecord::Base
+ belongs_to :post
+ belongs_to :tag
+end
8 test/rails_root/app/models/user.rb
View
@@ -0,0 +1,8 @@
+class User < ActiveRecord::Base
+ has_many :posts
+
+ attr_protected :password
+ validates_format_of :email, :with => /\w*@\w*.com/
+ validates_length_of :email, :in => 1..100
+ validates_inclusion_of :age, :in => 1..100
+end
17 test/rails_root/app/views/layouts/posts.rhtml
View
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <title>Posts: <%= controller.action_name %></title>
+ <%= stylesheet_link_tag 'scaffold' %>
+</head>
+<body>
+
+<p style="color: green"><%= flash[:notice] %></p>
+
+<%= yield %>
+
+</body>
+</html>
17 test/rails_root/app/views/layouts/users.rhtml
View
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <title>Users: <%= controller.action_name %></title>
+ <%= stylesheet_link_tag 'scaffold' %>
+</head>
+<body>
+
+<p style="color: green"><%= flash[:notice] %></p>
+
+<%= yield %>
+
+</body>
+</html>
27 test/rails_root/app/views/posts/edit.rhtml
View
@@ -0,0 +1,27 @@
+<h1>Editing post</h1>
+
+<%= error_messages_for :post %>
+
+<% form_for(:post, :url => post_path(@post.user, @post), :html => { :method => :put }) do |f| %>
+ <p>
+ <b>User</b><br />
+ <%= f.text_field :user_id %>
+ </p>
+
+ <p>
+ <b>Title</b><br />
+ <%= f.text_field :title %>
+ </p>
+
+ <p>
+ <b>Body</b><br />
+ <%= f.text_area :body %>
+ </p>
+
+ <p>
+ <%= submit_tag "Update" %>
+ </p>
+<% end %>
+
+<%= link_to 'Show', post_path(@post.user, @post) %> |
+<%= link_to 'Back', posts_path(@post.user) %>
24 test/rails_root/app/views/posts/index.rhtml
View
@@ -0,0 +1,24 @@
+<h1>Listing posts</h1>
+
+<table>
+ <tr>
+ <th>User</th>
+ <th>Title</th>
+ <th>Body</th>
+ </tr>
+
+<% for post in @posts %>
+ <tr>
+ <td><%=h post.user_id %></td>
+ <td><%=h post.title %></td>
+ <td><%=h post.body %></td>
+ <td><%= link_to 'Show', post_path(post.user, post) %></td>
+ <td><%= link_to 'Edit', edit_post_path(post.user, post) %></td>
+ <td><%= link_to 'Destroy', post_path(post.user, post), :confirm => 'Are you sure?', :method => :delete %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New post', new_post_path(post.user) %>
26 test/rails_root/app/views/posts/new.rhtml
View
@@ -0,0 +1,26 @@
+<h1>New post</h1>
+
+<%= error_messages_for :post %>
+
+<% form_for(:post, :url => posts_path(@user)) do |f| %>
+ <p>
+ <b>User</b><br />
+ <%= f.text_field :user_id %>
+ </p>
+
+ <p>
+ <b>Title</b><br />
+ <%= f.text_field :title %>
+ </p>
+
+ <p>
+ <b>Body</b><br />
+ <%= f.text_area :body %>
+ </p>
+
+ <p>
+ <%= submit_tag "Create" %>
+ </p>
+<% end %>
+
+<%= link_to 'Back', posts_path(@user) %>
18 test/rails_root/app/views/posts/show.rhtml
View
@@ -0,0 +1,18 @@
+<p>
+ <b>User:</b>
+ <%=h @post.user_id %>
+</p>
+
+<p>
+ <b>Title:</b>
+ <%=h @post.title %>
+</p>
+
+<p>
+ <b>Body:</b>
+ <%=h @post.body %>
+</p>
+
+
+<%= link_to 'Edit', edit_post_path(@post.user, @post) %> |
+<%= link_to 'Back', posts_path(@post.user) %>
22 test/rails_root/app/views/users/edit.rhtml
View
@@ -0,0 +1,22 @@
+<h1>Editing user</h1>
+
+<%= error_messages_for :user %>
+
+<% form_for(:user, :url => user_path(@user), :html => { :method => :put }) do |f| %>
+ <p>
+ <b>Email</b><br />
+ <%= f.text_field :email %>
+ </p>
+
+ <p>
+ <b>Age</b><br />
+ <%= f.text_field :age %>
+ </p>
+
+ <p>
+ <%= submit_tag "Update" %>
+ </p>
+<% end %>
+
+<%= link_to 'Show', user_path(@user) %> |
+<%= link_to 'Back', users_path %>
22 test/rails_root/app/views/users/index.rhtml
View
@@ -0,0 +1,22 @@
+<h1>Listing users</h1>
+
+<table>
+ <tr>
+ <th>Email</th>
+ <th>Age</th>
+ </tr>
+
+<% for user in @users %>
+ <tr>
+ <td><%=h user.email %></td>
+ <td><%=h user.age %></td>
+ <td><%= link_to 'Show', user_path(user) %></td>
+ <td><%= link_to 'Edit', edit_user_path(user) %></td>
+ <td><%= link_to 'Destroy', user_path(user), :confirm => 'Are you sure?', :method => :delete %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New user', new_user_path %>
21 test/rails_root/app/views/users/new.rhtml
View
@@ -0,0 +1,21 @@
+<h1>New user</h1>
+
+<%= error_messages_for :user %>
+
+<% form_for(:user, :url => users_path) do |f| %>
+ <p>
+ <b>Email</b><br />
+ <%= f.text_field :email %>
+ </p>
+
+ <p>
+ <b>Age</b><br />
+ <%= f.text_field :age %>
+ </p>
+
+ <p>
+ <%= submit_tag "Create" %>
+ </p>
+<% end %>
+
+<%= link_to 'Back', users_path %>
13 test/rails_root/app/views/users/show.rhtml
View
@@ -0,0 +1,13 @@
+<p>
+ <b>Email:</b>
+ <%=h @user.email %>
+</p>
+
+<p>
+ <b>Age:</b>
+ <%=h @user.age %>
+</p>
+
+
+<%= link_to 'Edit', edit_user_path(@user) %> |
+<%= link_to 'Back', users_path %>
45 test/rails_root/config/boot.rb
View
@@ -0,0 +1,45 @@
+# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
+
+unless defined?(RAILS_ROOT)
+ root_path = File.join(File.dirname(__FILE__), '..')
+
+ unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
+ require 'pathname'
+ root_path = Pathname.new(root_path).cleanpath(true).to_s
+ end
+
+ RAILS_ROOT = root_path
+end
+
+unless defined?(Rails::Initializer)
+ if File.directory?("#{RAILS_ROOT}/vendor/rails")
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
+ else
+ require 'rubygems'
+
+ environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
+ environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
+ rails_gem_version = $1
+
+ if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
+ # Asking for 1.1.6 will give you 1.1.6.5206, if available -- makes it easier to use beta gems
+ rails_gem = Gem.cache.search('rails', "~>#{version}.0").sort_by { |g| g.version.version }.last
+
+ if rails_gem
+ gem "rails", "=#{rails_gem.version.version}"
+ require rails_gem.full_gem_path + '/lib/initializer'
+ else
+ STDERR.puts %(Cannot find gem for Rails ~>#{version}.0:
+ Install the missing gem with 'gem install -v=#{version} rails', or
+ change environment.rb to define RAILS_GEM_VERSION with your desired version.
+ )
+ exit 1
+ end
+ else
+ gem "rails"
+ require 'initializer'
+ end
+ end
+
+ Rails::Initializer.run(:set_load_path)
+end
4 test/rails_root/config/database.yml
View
@@ -0,0 +1,4 @@
+sqlite3:
+ :adapter: sqlite3
+ # :dbfile: db/sqlite3.db
+ :dbfile: ":memory:"
14 test/rails_root/config/environment.rb
View
@@ -0,0 +1,14 @@
+# Specifies gem version of Rails to use when vendor/rails is not present
+#RAILS_GEM_VERSION = '1.1.6'
+
+require File.join(File.dirname(__FILE__), 'boot')
+
+Rails::Initializer.run do |config|
+ config.log_level = :debug
+ config.cache_classes = false
+ config.whiny_nils = true
+ config.breakpoint_server = true
+ config.load_paths << File.join(File.dirname(__FILE__), *%w{.. .. .. lib})
+end
+
+Dependencies.log_activity = true
0  test/rails_root/config/environments/sqlite3.rb
View
No changes.
5 test/rails_root/config/routes.rb
View
@@ -0,0 +1,5 @@
+ActionController::Routing::Routes.draw do |map|
+ map.resources :users do |user|
+ user.resources :posts
+ end
+end
13 test/rails_root/db/migrate/001_create_users.rb
View
@@ -0,0 +1,13 @@
+class CreateUsers < ActiveRecord::Migration
+ def self.up
+ create_table :users do |t|
+ t.column :name, :string
+ t.column :email, :string
+ t.column :age, :integer
+ end
+ end
+
+ def self.down
+ drop_table :users
+ end
+end
13 test/rails_root/db/migrate/002_create_posts.rb
View
@@ -0,0 +1,13 @@
+class CreatePosts < ActiveRecord::Migration
+ def self.up
+ create_table :posts do |t|
+ t.column :user_id, :integer
+ t.column :title, :string
+ t.column :body, :text
+ end
+ end
+
+ def self.down
+ drop_table :posts
+ end
+end
12 test/rails_root/db/migrate/003_create_taggings.rb
View
@@ -0,0 +1,12 @@
+class CreateTaggings < ActiveRecord::Migration
+ def self.up
+ create_table :taggings do |t|
+ t.column :user_id, :integer
+ t.column :tag_id, :integer
+ end
+ end
+
+ def self.down
+ drop_table :taggings
+ end
+end
11 test/rails_root/db/migrate/004_create_tags.rb
View
@@ -0,0 +1,11 @@
+class CreateTags < ActiveRecord::Migration
+ def self.up
+ create_table :tags do |t|
+ t.column :name, :string
+ end
+ end
+
+ def self.down
+ drop_table :tags
+ end
+end
0  test/rails_root/db/schema.rb
View
No changes.
2  test/rails_root/doc/README_FOR_APP
View
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake appdoc" to generate API documentation for your models and controllers.
4 test/rails_root/log/development.log
View
@@ -0,0 +1,4 @@
+ SQL (0.000000) SQLite3::SQLException: no such table: schema_info: SELECT * FROM schema_info
+ SQL (0.000207) SELECT name FROM sqlite_master WHERE type = 'table'
+ SQL (0.000000) SQLite3::SQLException: no such table: schema_info: SELECT * FROM schema_info
+ SQL (0.000208) SELECT name FROM sqlite_master WHERE type = 'table'
0  test/rails_root/log/production.log
View
No changes.
0  test/rails_root/log/server.log
View
No changes.
89,735 test/rails_root/log/sqlite3.log
View
89,735 additions, 0 deletions not shown
950 test/rails_root/log/test.log
View
@@ -0,0 +1,950 @@
+ SQL (0.079100) CREATE TABLE schema_info (version integer)
+ SQL (0.000229) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000329) SELECT version FROM schema_info
+Migrating to CreateUsers (1)
+ SQL (0.000323) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.000108) UPDATE schema_info SET version = 1
+ SQL (0.000201) SELECT version FROM schema_info
+Migrating to CreatePosts (2)
+ SQL (0.000257) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.000096) UPDATE schema_info SET version = 2
+ SQL (0.000178) SELECT version FROM schema_info
+Migrating to CreateTaggings (3)
+ SQL (0.000387) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.000134) UPDATE schema_info SET version = 3
+ SQL (0.000232) SELECT version FROM schema_info
+Migrating to CreateTags (4)
+ SQL (0.000355) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.000116) UPDATE schema_info SET version = 4
+ SQL (0.000344) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#create (for 0.0.0.0 at 2007-06-27 15:52:58) [POST]
+ Session ID:
+ Parameters: {"action"=>"create", "post"=>{}, "controller"=>"posts"}
+ Post Load (0.000164) SELECT * FROM posts WHERE (posts.title IS NULL) LIMIT 1
+Rendering actionnewlayoutfalse within layouts/posts
+Rendering posts/new
+Completed in 0.00789 (126 reqs/sec) | Rendering: 0.00471 (59%) | DB: 0.08255 (1046%) | 200 OK [http://test.host/posts?post=]
+ SQL (0.000281) SELECT count(*) AS count_all FROM posts 
+ SQL (0.000262) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#destroy (for 0.0.0.0 at 2007-06-27 15:52:59) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000424) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Destroy (0.000120)  DELETE FROM posts
+ WHERE "id" = 1
+
+Redirected to http://test.host/posts
+Completed in 0.00229 (436 reqs/sec) | DB: 0.00109 (47%) | 302 Found [http://test.host/posts/1]
+ SQL (0.000320) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#edit (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000415) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering within layouts/posts
+Rendering posts/edit
+Completed in 0.00538 (185 reqs/sec) | Rendering: 0.00442 (82%) | DB: 0.00074 (13%) | 200 OK [http://test.host/posts/1;edit]
+
+
+Processing PostsController#index (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"posts"}
+ Post Load (0.000574) SELECT * FROM posts 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/index
+Completed in 0.00600 (166 reqs/sec) | Rendering: 0.00458 (76%) | DB: 0.00057 (9%) | 200 OK [http://test.host/posts]
+
+
+Processing PostsController#new (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"posts"}
+Rendering within layouts/posts
+Rendering posts/new
+Completed in 0.00214 (467 reqs/sec) | Rendering: 0.00198 (92%) | DB: 0.00000 (0%) | 200 OK [http://test.host/posts/new]
+
+
+Processing PostsController#show (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000392) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/show
+Completed in 0.00394 (254 reqs/sec) | Rendering: 0.00268 (68%) | DB: 0.00039 (9%) | 200 OK [http://test.host/posts/1]
+
+
+Processing PostsController#update (for 0.0.0.0 at 2007-06-27 15:52:59) [PUT]
+ Session ID:
+ Parameters: {"action"=>"update", "post"=>{}, "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000374) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Load (0.000461) SELECT * FROM posts WHERE (posts.title = 'MyString' AND posts.id <> 1) LIMIT 1
+Rendering actioneditlayoutfalse within layouts/posts
+Rendering posts/edit
+Completed in 0.00600 (166 reqs/sec) | Rendering: 0.00300 (50%) | DB: 0.00084 (13%) | 200 OK [http://test.host/posts/1?post=]
+ SQL (0.000362) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#create (for 0.0.0.0 at 2007-06-27 15:52:59) [POST]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"create", "controller"=>"users"}
+Rendering actionnewlayoutfalse within layouts/users
+Rendering users/new
+Completed in 0.00821 (121 reqs/sec) | Rendering: 0.00539 (65%) | DB: 0.00036 (4%) | 200 OK [http://test.host/users?user=]
+ SQL (0.000319) SELECT count(*) AS count_all FROM users 
+ SQL (0.000285) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#destroy (for 0.0.0.0 at 2007-06-27 15:52:59) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"users"}
+ User Load (0.000387) SELECT * FROM users WHERE (users."id" = 1) 
+ User Destroy (0.000120)  DELETE FROM users
+ WHERE "id" = 1
+
+Redirected to http://test.host/users
+Completed in 0.00212 (471 reqs/sec) | DB: 0.00111 (52%) | 302 Found [http://test.host/users/1]
+ SQL (0.000339) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#edit (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"users"}
+ User Load (0.000410) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering within layouts/users
+Rendering users/edit
+Completed in 0.00544 (183 reqs/sec) | Rendering: 0.00444 (81%) | DB: 0.00075 (13%) | 200 OK [http://test.host/users/1;edit]
+
+
+Processing UsersController#index (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"users"}
+ User Load (0.000482) SELECT * FROM users 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/index
+Completed in 0.00543 (184 reqs/sec) | Rendering: 0.00416 (76%) | DB: 0.00048 (8%) | 200 OK [http://test.host/users]
+
+
+Processing UsersController#new (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"users"}
+Rendering within layouts/users
+Rendering users/new
+Completed in 0.00204 (489 reqs/sec) | Rendering: 0.00187 (91%) | DB: 0.00000 (0%) | 200 OK [http://test.host/users/new]
+
+
+Processing UsersController#show (for 0.0.0.0 at 2007-06-27 15:52:59) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"users"}
+ User Load (0.000340) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/show
+Completed in 0.00337 (297 reqs/sec) | Rendering: 0.00224 (66%) | DB: 0.00034 (10%) | 200 OK [http://test.host/users/1]
+
+
+Processing UsersController#update (for 0.0.0.0 at 2007-06-27 15:52:59) [PUT]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"update", "id"=>"1", "controller"=>"users"}
+ User Load (0.000379) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actioneditlayoutfalse within layouts/users
+Rendering users/edit
+Completed in 0.00437 (228 reqs/sec) | Rendering: 0.00255 (58%) | DB: 0.00038 (8%) | 200 OK [http://test.host/users/1?user=]
+ SQL (0.000597) CREATE TABLE schema_info (version integer)
+ SQL (0.000095) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000265) SELECT version FROM schema_info
+Migrating to CreateUsers (1)
+ SQL (0.000272) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 1
+ SQL (0.000169) SELECT version FROM schema_info
+Migrating to CreatePosts (2)
+ SQL (0.000225) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 2
+ SQL (0.000166) SELECT version FROM schema_info
+Migrating to CreateTaggings (3)
+ SQL (0.000227) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.000086) UPDATE schema_info SET version = 3
+ SQL (0.000162) SELECT version FROM schema_info
+Migrating to CreateTags (4)
+ SQL (0.000204) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.000089) UPDATE schema_info SET version = 4
+ SQL (0.000601) CREATE TABLE schema_info (version integer)
+ SQL (0.000095) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000265) SELECT version FROM schema_info
+Migrating to CreateUsers (1)
+ SQL (0.000261) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.000087) UPDATE schema_info SET version = 1
+ SQL (0.000166) SELECT version FROM schema_info
+Migrating to CreatePosts (2)
+ SQL (0.000231) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 2
+ SQL (0.000383) SELECT version FROM schema_info
+Migrating to CreateTaggings (3)
+ SQL (0.000292) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.000094) UPDATE schema_info SET version = 3
+ SQL (0.000186) SELECT version FROM schema_info
+Migrating to CreateTags (4)
+ SQL (0.000220) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.000085) UPDATE schema_info SET version = 4
+ SQL (0.000287) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#create (for 0.0.0.0 at 2007-06-27 15:53:40) [POST]
+ Session ID:
+ Parameters: {"action"=>"create", "post"=>{}, "controller"=>"posts"}
+ Post Load (0.000152) SELECT * FROM posts WHERE (posts.title IS NULL) LIMIT 1
+Rendering actionnewlayoutfalse within layouts/posts
+Rendering posts/new
+Completed in 0.00737 (135 reqs/sec) | Rendering: 0.00446 (60%) | DB: 0.00349 (47%) | 200 OK [http://test.host/posts?post=]
+ SQL (0.000326) SELECT count(*) AS count_all FROM posts 
+ SQL (0.000216) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#destroy (for 0.0.0.0 at 2007-06-27 15:53:40) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000293) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Destroy (0.000093)  DELETE FROM posts
+ WHERE "id" = 1
+
+Redirected to http://test.host/posts
+Completed in 0.00179 (557 reqs/sec) | DB: 0.00093 (51%) | 302 Found [http://test.host/posts/1]
+ SQL (0.000330) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#edit (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000298) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering within layouts/posts
+Rendering posts/edit
+Completed in 0.00415 (240 reqs/sec) | Rendering: 0.00343 (82%) | DB: 0.00063 (15%) | 200 OK [http://test.host/posts/1;edit]
+
+
+Processing PostsController#index (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"posts"}
+ Post Load (0.000389) SELECT * FROM posts 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/index
+Completed in 0.00430 (232 reqs/sec) | Rendering: 0.00331 (76%) | DB: 0.00039 (9%) | 200 OK [http://test.host/posts]
+
+
+Processing PostsController#new (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"posts"}
+Rendering within layouts/posts
+Rendering posts/new
+Completed in 0.00165 (605 reqs/sec) | Rendering: 0.00153 (92%) | DB: 0.00000 (0%) | 200 OK [http://test.host/posts/new]
+
+
+Processing PostsController#show (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000297) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/show
+Completed in 0.00282 (354 reqs/sec) | Rendering: 0.00189 (66%) | DB: 0.00030 (10%) | 200 OK [http://test.host/posts/1]
+
+
+Processing PostsController#update (for 0.0.0.0 at 2007-06-27 15:53:40) [PUT]
+ Session ID:
+ Parameters: {"action"=>"update", "post"=>{}, "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000314) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Load (0.000334) SELECT * FROM posts WHERE (posts.title = 'MyString' AND posts.id <> 1) LIMIT 1
+Rendering actioneditlayoutfalse within layouts/posts
+Rendering posts/edit
+Completed in 0.00442 (226 reqs/sec) | Rendering: 0.00216 (48%) | DB: 0.00065 (14%) | 200 OK [http://test.host/posts/1?post=]
+ SQL (0.000202) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#create (for 0.0.0.0 at 2007-06-27 15:53:40) [POST]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"create", "controller"=>"users"}
+Rendering actionnewlayoutfalse within layouts/users
+Rendering users/new
+Completed in 0.00616 (162 reqs/sec) | Rendering: 0.00391 (63%) | DB: 0.00020 (3%) | 200 OK [http://test.host/users?user=]
+ SQL (0.000266) SELECT count(*) AS count_all FROM users 
+ SQL (0.000198) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#destroy (for 0.0.0.0 at 2007-06-27 15:53:40) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"users"}
+ User Load (0.000298) SELECT * FROM users WHERE (users."id" = 1) 
+ User Destroy (0.000091)  DELETE FROM users
+ WHERE "id" = 1
+
+Redirected to http://test.host/users
+Completed in 0.00172 (582 reqs/sec) | DB: 0.00085 (49%) | 302 Found [http://test.host/users/1]
+ SQL (0.000278) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#edit (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"users"}
+ User Load (0.000284) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering within layouts/users
+Rendering users/edit
+Completed in 0.00391 (255 reqs/sec) | Rendering: 0.00321 (81%) | DB: 0.00056 (14%) | 200 OK [http://test.host/users/1;edit]
+
+
+Processing UsersController#index (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"users"}
+ User Load (0.000359) SELECT * FROM users 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/index
+Completed in 0.00420 (238 reqs/sec) | Rendering: 0.00323 (76%) | DB: 0.00036 (8%) | 200 OK [http://test.host/users]
+
+
+Processing UsersController#new (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"users"}
+Rendering within layouts/users
+Rendering users/new
+Completed in 0.00151 (660 reqs/sec) | Rendering: 0.00139 (91%) | DB: 0.00000 (0%) | 200 OK [http://test.host/users/new]
+
+
+Processing UsersController#show (for 0.0.0.0 at 2007-06-27 15:53:40) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"users"}
+ User Load (0.000352) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/show
+Completed in 0.00295 (339 reqs/sec) | Rendering: 0.00179 (60%) | DB: 0.00035 (11%) | 200 OK [http://test.host/users/1]
+
+
+Processing UsersController#update (for 0.0.0.0 at 2007-06-27 15:53:40) [PUT]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"update", "id"=>"1", "controller"=>"users"}
+ User Load (0.000327) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actioneditlayoutfalse within layouts/users
+Rendering users/edit
+Completed in 0.00365 (273 reqs/sec) | Rendering: 0.00216 (59%) | DB: 0.00033 (8%) | 200 OK [http://test.host/users/1?user=]
+ SQL (0.000602) CREATE TABLE schema_info (version integer)
+ SQL (0.000094) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000264) SELECT version FROM schema_info
+Migrating to CreateUsers (1)
+ SQL (0.000268) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 1
+ SQL (0.000163) SELECT version FROM schema_info
+Migrating to CreatePosts (2)
+ SQL (0.000223) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.000087) UPDATE schema_info SET version = 2
+ SQL (0.000164) SELECT version FROM schema_info
+Migrating to CreateTaggings (3)
+ SQL (0.000223) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.000085) UPDATE schema_info SET version = 3
+ SQL (0.000158) SELECT version FROM schema_info
+Migrating to CreateTags (4)
+ SQL (0.000209) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 4
+ SQL (0.000616) CREATE TABLE schema_info (version integer)
+ SQL (0.000095) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000264) SELECT version FROM schema_info
+Migrating to CreateUsers (1)
+ SQL (0.000261) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 1
+ SQL (0.000169) SELECT version FROM schema_info
+Migrating to CreatePosts (2)
+ SQL (0.000248) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 2
+ SQL (0.000381) SELECT version FROM schema_info
+Migrating to CreateTaggings (3)
+ SQL (0.000286) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.000093) UPDATE schema_info SET version = 3
+ SQL (0.000177) SELECT version FROM schema_info
+Migrating to CreateTags (4)
+ SQL (0.000219) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.000086) UPDATE schema_info SET version = 4
+ SQL (0.000368) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#create (for 0.0.0.0 at 2007-06-27 15:53:56) [POST]
+ Session ID:
+ Parameters: {"action"=>"create", "post"=>{}, "controller"=>"posts"}
+ Post Load (0.000162) SELECT * FROM posts WHERE (posts.title IS NULL) LIMIT 1
+Rendering actionnewlayoutfalse within layouts/posts
+Rendering posts/new
+Completed in 0.00768 (130 reqs/sec) | Rendering: 0.00471 (61%) | DB: 0.00360 (46%) | 200 OK [http://test.host/posts?post=]
+ SQL (0.000318) SELECT count(*) AS count_all FROM posts 
+ SQL (0.000239) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#destroy (for 0.0.0.0 at 2007-06-27 15:53:56) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000358) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Destroy (0.000095)  DELETE FROM posts
+ WHERE "id" = 1
+
+Redirected to http://test.host/posts
+Completed in 0.00201 (497 reqs/sec) | DB: 0.00101 (50%) | 302 Found [http://test.host/posts/1]
+ SQL (0.000215) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#edit (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000382) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering within layouts/posts
+Rendering posts/edit
+Completed in 0.00463 (215 reqs/sec) | Rendering: 0.00377 (81%) | DB: 0.00060 (12%) | 200 OK [http://test.host/posts/1;edit]
+
+
+Processing PostsController#index (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"posts"}
+ Post Load (0.000374) SELECT * FROM posts 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/index
+Completed in 0.00447 (223 reqs/sec) | Rendering: 0.00348 (77%) | DB: 0.00037 (8%) | 200 OK [http://test.host/posts]
+
+
+Processing PostsController#new (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"posts"}
+Rendering within layouts/posts
+Rendering posts/new
+Completed in 0.00166 (601 reqs/sec) | Rendering: 0.00154 (92%) | DB: 0.00000 (0%) | 200 OK [http://test.host/posts/new]
+
+
+Processing PostsController#show (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000386) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/show
+Completed in 0.00314 (318 reqs/sec) | Rendering: 0.00196 (62%) | DB: 0.00039 (12%) | 200 OK [http://test.host/posts/1]
+
+
+Processing PostsController#update (for 0.0.0.0 at 2007-06-27 15:53:56) [PUT]
+ Session ID:
+ Parameters: {"action"=>"update", "post"=>{}, "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000320) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Load (0.000339) SELECT * FROM posts WHERE (posts.title = 'MyString' AND posts.id <> 1) LIMIT 1
+Rendering actioneditlayoutfalse within layouts/posts
+Rendering posts/edit
+Completed in 0.00457 (218 reqs/sec) | Rendering: 0.00225 (49%) | DB: 0.00066 (14%) | 200 OK [http://test.host/posts/1?post=]
+ SQL (0.000197) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#create (for 0.0.0.0 at 2007-06-27 15:53:56) [POST]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"create", "controller"=>"users"}
+Rendering actionnewlayoutfalse within layouts/users
+Rendering users/new
+Completed in 0.00662 (150 reqs/sec) | Rendering: 0.00423 (63%) | DB: 0.00020 (2%) | 200 OK [http://test.host/users?user=]
+ SQL (0.000275) SELECT count(*) AS count_all FROM users 
+ SQL (0.000199) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#destroy (for 0.0.0.0 at 2007-06-27 15:53:56) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"users"}
+ User Load (0.000267) SELECT * FROM users WHERE (users."id" = 1) 
+ User Destroy (0.000093)  DELETE FROM users
+ WHERE "id" = 1
+
+Redirected to http://test.host/users
+Completed in 0.00163 (614 reqs/sec) | DB: 0.00083 (51%) | 302 Found [http://test.host/users/1]
+ SQL (0.000224) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#edit (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"users"}
+ User Load (0.000304) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering within layouts/users
+Rendering users/edit
+Completed in 0.00384 (260 reqs/sec) | Rendering: 0.00313 (81%) | DB: 0.00053 (13%) | 200 OK [http://test.host/users/1;edit]
+
+
+Processing UsersController#index (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"users"}
+ User Load (0.000344) SELECT * FROM users 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/index
+Completed in 0.00440 (227 reqs/sec) | Rendering: 0.00346 (78%) | DB: 0.00034 (7%) | 200 OK [http://test.host/users]
+
+
+Processing UsersController#new (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"users"}
+Rendering within layouts/users
+Rendering users/new
+Completed in 0.00220 (454 reqs/sec) | Rendering: 0.00205 (93%) | DB: 0.00000 (0%) | 200 OK [http://test.host/users/new]
+
+
+Processing UsersController#show (for 0.0.0.0 at 2007-06-27 15:53:56) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"users"}
+ User Load (0.000290) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/show
+Completed in 0.00268 (372 reqs/sec) | Rendering: 0.00175 (65%) | DB: 0.00029 (10%) | 200 OK [http://test.host/users/1]
+
+
+Processing UsersController#update (for 0.0.0.0 at 2007-06-27 15:53:56) [PUT]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"update", "id"=>"1", "controller"=>"users"}
+ User Load (0.000272) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actioneditlayoutfalse within layouts/users
+Rendering users/edit
+Completed in 0.00332 (301 reqs/sec) | Rendering: 0.00200 (60%) | DB: 0.00027 (8%) | 200 OK [http://test.host/users/1?user=]
+ SQL (0.000655) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.000226) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.000214) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.000193) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.000177) CREATE TABLE schema_info (version integer)
+ SQL (0.000095) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000095) UPDATE schema_info SET version = 1
+ SQL (0.000315) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#create (for 0.0.0.0 at 2007-06-27 15:57:02) [POST]
+ Session ID:
+ Parameters: {"action"=>"create", "post"=>{}, "controller"=>"posts"}
+ Post Load (0.000170) SELECT * FROM posts WHERE (posts.title IS NULL) LIMIT 1
+Rendering actionnewlayoutfalse within layouts/posts
+Rendering posts/new
+Completed in 0.00790 (126 reqs/sec) | Rendering: 0.00492 (62%) | DB: 0.00214 (27%) | 200 OK [http://test.host/posts?post=]
+ SQL (0.000301) SELECT count(*) AS count_all FROM posts 
+ SQL (0.000218) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#destroy (for 0.0.0.0 at 2007-06-27 15:57:02) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000447) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Destroy (0.000114)  DELETE FROM posts
+ WHERE "id" = 1
+
+Redirected to http://test.host/posts
+Completed in 0.00279 (358 reqs/sec) | DB: 0.00108 (38%) | 302 Found [http://test.host/posts/1]
+ SQL (0.000322) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#edit (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000400) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering within layouts/posts
+Rendering posts/edit
+Completed in 0.00443 (225 reqs/sec) | Rendering: 0.00352 (79%) | DB: 0.00072 (16%) | 200 OK [http://test.host/posts/1;edit]
+
+
+Processing PostsController#index (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"posts"}
+ Post Load (0.000397) SELECT * FROM posts 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/index
+Completed in 0.00453 (220 reqs/sec) | Rendering: 0.00351 (77%) | DB: 0.00040 (8%) | 200 OK [http://test.host/posts]
+
+
+Processing PostsController#new (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"posts"}
+Rendering within layouts/posts
+Rendering posts/new
+Completed in 0.00183 (546 reqs/sec) | Rendering: 0.00165 (90%) | DB: 0.00000 (0%) | 200 OK [http://test.host/posts/new]
+
+
+Processing PostsController#show (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000307) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/show
+Completed in 0.00291 (343 reqs/sec) | Rendering: 0.00194 (66%) | DB: 0.00031 (10%) | 200 OK [http://test.host/posts/1]
+
+
+Processing PostsController#update (for 0.0.0.0 at 2007-06-27 15:57:02) [PUT]
+ Session ID:
+ Parameters: {"action"=>"update", "post"=>{}, "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000347) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Load (0.000269) SELECT * FROM posts WHERE (posts.title = 'MyString' AND posts.id <> 1) LIMIT 1
+Rendering actioneditlayoutfalse within layouts/posts
+Rendering posts/edit
+Completed in 0.00435 (229 reqs/sec) | Rendering: 0.00214 (49%) | DB: 0.00062 (14%) | 200 OK [http://test.host/posts/1?post=]
+ SQL (0.000181) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#create (for 0.0.0.0 at 2007-06-27 15:57:02) [POST]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"create", "controller"=>"users"}
+Rendering actionnewlayoutfalse within layouts/users
+Rendering users/new
+Completed in 0.00680 (147 reqs/sec) | Rendering: 0.00436 (64%) | DB: 0.00018 (2%) | 200 OK [http://test.host/users?user=]
+ SQL (0.000305) SELECT count(*) AS count_all FROM users 
+ SQL (0.000229) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#destroy (for 0.0.0.0 at 2007-06-27 15:57:02) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"users"}
+ User Load (0.000344) SELECT * FROM users WHERE (users."id" = 1) 
+ User Destroy (0.000094)  DELETE FROM users
+ WHERE "id" = 1
+
+Redirected to http://test.host/users
+Completed in 0.00207 (483 reqs/sec) | DB: 0.00097 (46%) | 302 Found [http://test.host/users/1]
+ SQL (0.000226) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#edit (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"users"}
+ User Load (0.000298) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering within layouts/users
+Rendering users/edit
+Completed in 0.00430 (232 reqs/sec) | Rendering: 0.00352 (81%) | DB: 0.00052 (12%) | 200 OK [http://test.host/users/1;edit]
+
+
+Processing UsersController#index (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"users"}
+ User Load (0.000498) SELECT * FROM users 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/index
+Completed in 0.00448 (223 reqs/sec) | Rendering: 0.00330 (73%) | DB: 0.00050 (11%) | 200 OK [http://test.host/users]
+
+
+Processing UsersController#new (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"users"}
+Rendering within layouts/users
+Rendering users/new
+Completed in 0.00158 (633 reqs/sec) | Rendering: 0.00144 (91%) | DB: 0.00000 (0%) | 200 OK [http://test.host/users/new]
+
+
+Processing UsersController#show (for 0.0.0.0 at 2007-06-27 15:57:02) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"users"}
+ User Load (0.000329) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/show
+Completed in 0.00288 (347 reqs/sec) | Rendering: 0.00182 (63%) | DB: 0.00033 (11%) | 200 OK [http://test.host/users/1]
+
+
+Processing UsersController#update (for 0.0.0.0 at 2007-06-27 15:57:02) [PUT]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"update", "id"=>"1", "controller"=>"users"}
+ User Load (0.000275) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actioneditlayoutfalse within layouts/users
+Rendering users/edit
+Completed in 0.00329 (303 reqs/sec) | Rendering: 0.00195 (59%) | DB: 0.00027 (8%) | 200 OK [http://test.host/users/1?user=]
+ SQL (0.000643) CREATE TABLE schema_info (version integer)
+ SQL (0.000098) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000272) SELECT version FROM schema_info
+Migrating to CreateUsers (1)
+ SQL (0.000264) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.000088) UPDATE schema_info SET version = 1
+ SQL (0.000166) SELECT version FROM schema_info
+Migrating to CreatePosts (2)
+ SQL (0.000230) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.000087) UPDATE schema_info SET version = 2
+ SQL (0.056447) SELECT version FROM schema_info
+Migrating to CreateTaggings (3)
+ SQL (0.000337) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.000092) UPDATE schema_info SET version = 3
+ SQL (0.000198) SELECT version FROM schema_info
+Migrating to CreateTags (4)
+ SQL (0.000241) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.000085) UPDATE schema_info SET version = 4
+ SQL (0.000218) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#create (for 0.0.0.0 at 2007-06-27 15:58:36) [POST]
+ Session ID:
+ Parameters: {"action"=>"create", "post"=>{}, "controller"=>"posts"}
+ Post Load (0.000155) SELECT * FROM posts WHERE (posts.title IS NULL) LIMIT 1
+Rendering actionnewlayoutfalse within layouts/posts
+Rendering posts/new
+Completed in 0.00745 (134 reqs/sec) | Rendering: 0.00448 (60%) | DB: 0.05962 (799%) | 200 OK [http://test.host/posts?post=]
+ SQL (0.000272) SELECT count(*) AS count_all FROM posts 
+ SQL (0.000250) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#destroy (for 0.0.0.0 at 2007-06-27 15:58:36) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000367) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Destroy (0.000092)  DELETE FROM posts
+ WHERE "id" = 1
+
+Redirected to http://test.host/posts
+Completed in 0.00190 (526 reqs/sec) | DB: 0.00098 (51%) | 302 Found [http://test.host/posts/1]
+ SQL (0.000245) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#edit (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000348) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering within layouts/posts
+Rendering posts/edit
+Completed in 0.00454 (220 reqs/sec) | Rendering: 0.00369 (81%) | DB: 0.00059 (13%) | 200 OK [http://test.host/posts/1;edit]
+
+
+Processing PostsController#index (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"posts"}
+ Post Load (0.000376) SELECT * FROM posts 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/index
+Completed in 0.00433 (230 reqs/sec) | Rendering: 0.00335 (77%) | DB: 0.00038 (8%) | 200 OK [http://test.host/posts]
+
+
+Processing PostsController#new (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"posts"}
+Rendering within layouts/posts
+Rendering posts/new
+Completed in 0.00167 (600 reqs/sec) | Rendering: 0.00154 (92%) | DB: 0.00000 (0%) | 200 OK [http://test.host/posts/new]
+
+
+Processing PostsController#show (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000288) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/show
+Completed in 0.00284 (352 reqs/sec) | Rendering: 0.00191 (67%) | DB: 0.00029 (10%) | 200 OK [http://test.host/posts/1]
+
+
+Processing PostsController#update (for 0.0.0.0 at 2007-06-27 15:58:36) [PUT]
+ Session ID:
+ Parameters: {"action"=>"update", "post"=>{}, "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000346) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Load (0.000271) SELECT * FROM posts WHERE (posts.title = 'MyString' AND posts.id <> 1) LIMIT 1
+Rendering actioneditlayoutfalse within layouts/posts
+Rendering posts/edit
+Completed in 0.00428 (233 reqs/sec) | Rendering: 0.00214 (49%) | DB: 0.00062 (14%) | 200 OK [http://test.host/posts/1?post=]
+ SQL (0.000184) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#create (for 0.0.0.0 at 2007-06-27 15:58:36) [POST]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"create", "controller"=>"users"}
+Rendering actionnewlayoutfalse within layouts/users
+Rendering users/new
+Completed in 0.00608 (164 reqs/sec) | Rendering: 0.00393 (64%) | DB: 0.00018 (3%) | 200 OK [http://test.host/users?user=]
+ SQL (0.000260) SELECT count(*) AS count_all FROM users 
+ SQL (0.000215) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#destroy (for 0.0.0.0 at 2007-06-27 15:58:36) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"users"}
+ User Load (0.000268) SELECT * FROM users WHERE (users."id" = 1) 
+ User Destroy (0.000090)  DELETE FROM users
+ WHERE "id" = 1
+
+Redirected to http://test.host/users
+Completed in 0.00158 (632 reqs/sec) | DB: 0.00083 (52%) | 302 Found [http://test.host/users/1]
+ SQL (0.000210) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#edit (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"users"}
+ User Load (0.000376) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering within layouts/users
+Rendering users/edit
+Completed in 0.00415 (240 reqs/sec) | Rendering: 0.00328 (78%) | DB: 0.00059 (14%) | 200 OK [http://test.host/users/1;edit]
+
+
+Processing UsersController#index (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"users"}
+ User Load (0.000379) SELECT * FROM users 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/index
+Completed in 0.00458 (218 reqs/sec) | Rendering: 0.00352 (76%) | DB: 0.00038 (8%) | 200 OK [http://test.host/users]
+
+
+Processing UsersController#new (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"users"}
+Rendering within layouts/users
+Rendering users/new
+Completed in 0.00185 (539 reqs/sec) | Rendering: 0.00168 (90%) | DB: 0.00000 (0%) | 200 OK [http://test.host/users/new]
+
+
+Processing UsersController#show (for 0.0.0.0 at 2007-06-27 15:58:36) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"users"}
+ User Load (0.000273) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/show
+Completed in 0.00263 (380 reqs/sec) | Rendering: 0.00173 (65%) | DB: 0.00027 (10%) | 200 OK [http://test.host/users/1]
+
+
+Processing UsersController#update (for 0.0.0.0 at 2007-06-27 15:58:36) [PUT]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"update", "id"=>"1", "controller"=>"users"}
+ User Load (0.000279) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actioneditlayoutfalse within layouts/users
+Rendering users/edit
+Completed in 0.00332 (300 reqs/sec) | Rendering: 0.00199 (59%) | DB: 0.00028 (8%) | 200 OK [http://test.host/users/1?user=]
+ SQL (0.003821) CREATE TABLE schema_info (version integer)
+ SQL (0.106481) INSERT INTO schema_info (version) VALUES(0)
+ SQL (0.000000) SQLite3::SQLException: table schema_info already exists: CREATE TABLE schema_info (version integer)
+ SQL (0.000416) SELECT version FROM schema_info
+Migrating to CreateUsers (1)
+ SQL (0.003526) CREATE TABLE users ("id" INTEGER PRIMARY KEY NOT NULL, "email" varchar(255) DEFAULT NULL, "age" integer DEFAULT NULL) 
+ SQL (0.003211) UPDATE schema_info SET version = 1
+ SQL (0.000470) SELECT version FROM schema_info
+Migrating to CreatePosts (2)
+ SQL (0.003677) CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "body" text DEFAULT NULL) 
+ SQL (0.003985) UPDATE schema_info SET version = 2
+ SQL (0.000505) SELECT version FROM schema_info
+Migrating to CreateTaggings (3)
+ SQL (0.004088) CREATE TABLE taggings ("id" INTEGER PRIMARY KEY NOT NULL, "user_id" integer DEFAULT NULL, "tag_id" integer DEFAULT NULL) 
+ SQL (0.003982) UPDATE schema_info SET version = 3
+ SQL (0.000423) SELECT version FROM schema_info
+Migrating to CreateTags (4)
+ SQL (0.003873) CREATE TABLE tags ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255) DEFAULT NULL) 
+ SQL (0.003629) UPDATE schema_info SET version = 4
+ SQL (0.000459) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#create (for 0.0.0.0 at 2007-06-27 16:15:06) [POST]
+ Session ID:
+ Parameters: {"action"=>"create", "post"=>{}, "controller"=>"posts"}
+ Post Load (0.000384) SELECT * FROM posts WHERE (posts.title IS NULL) LIMIT 1
+Rendering actionnewlayoutfalse within layouts/posts
+Rendering posts/new
+Completed in 0.00991 (100 reqs/sec) | Rendering: 0.00575 (58%) | DB: 0.14293 (1442%) | 200 OK [http://test.host/posts?post=]
+ SQL (0.000398) SELECT count(*) AS count_all FROM posts 
+ SQL (0.000442) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#destroy (for 0.0.0.0 at 2007-06-27 16:15:06) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000578) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Destroy (0.000481)  DELETE FROM posts
+ WHERE "id" = 1
+
+Redirected to http://test.host/posts
+Completed in 0.00576 (173 reqs/sec) | DB: 0.00190 (32%) | 302 Found [http://test.host/posts/1]
+ SQL (0.000441) SELECT count(*) AS count_all FROM posts 
+
+
+Processing PostsController#edit (for 0.0.0.0 at 2007-06-27 16:15:06) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000584) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering within layouts/posts
+Rendering posts/edit
+Completed in 0.00578 (173 reqs/sec) | Rendering: 0.00460 (79%) | DB: 0.00103 (17%) | 200 OK [http://test.host/posts/1;edit]
+
+
+Processing PostsController#index (for 0.0.0.0 at 2007-06-27 16:15:06) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"posts"}
+ Post Load (0.000643) SELECT * FROM posts 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/index
+Completed in 0.00585 (170 reqs/sec) | Rendering: 0.00436 (74%) | DB: 0.00064 (10%) | 200 OK [http://test.host/posts]
+
+
+Processing PostsController#new (for 0.0.0.0 at 2007-06-27 16:15:06) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"posts"}
+Rendering within layouts/posts
+Rendering posts/new
+Completed in 0.00234 (426 reqs/sec) | Rendering: 0.00213 (90%) | DB: 0.00000 (0%) | 200 OK [http://test.host/posts/new]
+
+
+Processing PostsController#show (for 0.0.0.0 at 2007-06-27 16:15:06) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000627) SELECT * FROM posts WHERE (posts."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/posts
+Rendering posts/show
+Completed in 0.00411 (243 reqs/sec) | Rendering: 0.00255 (61%) | DB: 0.00063 (15%) | 200 OK [http://test.host/posts/1]
+
+
+Processing PostsController#update (for 0.0.0.0 at 2007-06-27 16:15:06) [PUT]
+ Session ID:
+ Parameters: {"action"=>"update", "post"=>{}, "id"=>"1", "controller"=>"posts"}
+ Post Load (0.000550) SELECT * FROM posts WHERE (posts."id" = 1) 
+ Post Load (0.000450) SELECT * FROM posts WHERE (posts.title = 'MyString' AND posts.id <> 1) LIMIT 1
+Rendering actioneditlayoutfalse within layouts/posts
+Rendering posts/edit
+Completed in 0.00587 (170 reqs/sec) | Rendering: 0.00292 (49%) | DB: 0.00100 (17%) | 200 OK [http://test.host/posts/1?post=]
+ SQL (0.000377) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#create (for 0.0.0.0 at 2007-06-27 16:15:06) [POST]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"create", "controller"=>"users"}
+Rendering actionnewlayoutfalse within layouts/users
+Rendering users/new
+Completed in 0.00806 (124 reqs/sec) | Rendering: 0.00489 (60%) | DB: 0.00038 (4%) | 200 OK [http://test.host/users?user=]
+ SQL (0.000360) SELECT count(*) AS count_all FROM users 
+ SQL (0.000503) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#destroy (for 0.0.0.0 at 2007-06-27 16:15:06) [DELETE]
+ Session ID:
+ Parameters: {"action"=>"destroy", "id"=>"1", "controller"=>"users"}
+ User Load (0.000474) SELECT * FROM users WHERE (users."id" = 1) 
+ User Destroy (0.000466)  DELETE FROM users
+ WHERE "id" = 1
+
+Redirected to http://test.host/users
+Completed in 0.00528 (189 reqs/sec) | DB: 0.00180 (34%) | 302 Found [http://test.host/users/1]
+ SQL (0.000477) SELECT count(*) AS count_all FROM users 
+
+
+Processing UsersController#edit (for 0.0.0.0 at 2007-06-27 16:15:07) [GET]
+ Session ID:
+ Parameters: {"action"=>"edit", "id"=>"1", "controller"=>"users"}
+ User Load (0.000646) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering within layouts/users
+Rendering users/edit
+Completed in 0.00548 (182 reqs/sec) | Rendering: 0.00423 (77%) | DB: 0.00112 (20%) | 200 OK [http://test.host/users/1;edit]
+
+
+Processing UsersController#index (for 0.0.0.0 at 2007-06-27 16:15:07) [GET]
+ Session ID:
+ Parameters: {"action"=>"index", "controller"=>"users"}
+ User Load (0.000596) SELECT * FROM users 
+Rendering actionindexcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/index
+Completed in 0.00606 (164 reqs/sec) | Rendering: 0.00464 (76%) | DB: 0.00060 (9%) | 200 OK [http://test.host/users]
+
+
+Processing UsersController#new (for 0.0.0.0 at 2007-06-27 16:15:07) [GET]
+ Session ID:
+ Parameters: {"action"=>"new", "controller"=>"users"}
+Rendering within layouts/users
+Rendering users/new
+Completed in 0.00208 (480 reqs/sec) | Rendering: 0.00191 (91%) | DB: 0.00000 (0%) | 200 OK [http://test.host/users/new]
+
+
+Processing UsersController#show (for 0.0.0.0 at 2007-06-27 16:15:07) [GET]
+ Session ID:
+ Parameters: {"action"=>"show", "id"=>"1", "controller"=>"users"}
+ User Load (0.000636) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actionshowcontent_typetext/htmllayoutfalse within layouts/users
+Rendering users/show
+Completed in 0.00394 (253 reqs/sec) | Rendering: 0.00237 (60%) | DB: 0.00064 (16%) | 200 OK [http://test.host/users/1]
+
+
+Processing UsersController#update (for 0.0.0.0 at 2007-06-27 16:15:07) [PUT]
+ Session ID:
+ Parameters: {"user"=>{}, "action"=>"update", "id"=>"1", "controller"=>"users"}
+ User Load (0.000600) SELECT * FROM users WHERE (users."id" = 1) 
+Rendering actioneditlayoutfalse within layouts/users
+Rendering users/edit
+Completed in 0.00464 (215 reqs/sec) | Rendering: 0.00256 (55%) | DB: 0.00060 (12%) | 200 OK [http://test.host/users/1?user=]
40 test/rails_root/public/.htaccess
View
@@ -0,0 +1,40 @@
+# General Apache options
+AddHandler fastcgi-script .fcgi
+AddHandler cgi-script .cgi
+Options +FollowSymLinks +ExecCGI
+
+# If you don't want Rails to look in certain directories,
+# use the following rewrite rules so that Apache won't rewrite certain requests
+#
+# Example:
+# RewriteCond %{REQUEST_URI} ^/notrails.*
+# RewriteRule .* - [L]
+
+# Redirect all requests not available on the filesystem to Rails
+# By default the cgi dispatcher is used which is very slow
+#
+# For better performance replace the dispatcher with the fastcgi one
+#
+# Example:
+# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
+RewriteEngine On
+
+# If your Rails application is accessed via an Alias directive,
+# then you MUST also set the RewriteBase in this htaccess file.
+#
+# Example:
+# Alias /myrailsapp /path/to/myrailsapp/public
+# RewriteBase /myrailsapp
+
+RewriteRule ^$ index.html [QSA]
+RewriteRule ^([^.]+)$ $1.html [QSA]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
+
+# In case Rails experiences terminal errors
+# Instead of displaying this message you can supply a file here which will be rendered instead
+#
+# Example:
+# ErrorDocument 500 /500.html
+
+ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
30 test/rails_root/public/404.html
View
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title>The page you were looking for doesn't exist (404)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/404.html -->
+ <div class="dialog">
+ <h1>The page you were looking for doesn't exist.</h1>
+ <p>You may have mistyped the address or the page may have moved.</p>
+ </div>
+</body>
+</html>
30 test/rails_root/public/500.html
View
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title>We're sorry, but something went wrong</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/500.html -->
+ <div class="dialog">
+ <h1>We're sorry, but something went wrong.</h1>
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
+ </div>
+</body>
+</html>
10 test/rails_root/public/dispatch.cgi
View
@@ -0,0 +1,10 @@
+#!/opt/local/bin/ruby
+
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+
+# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
+# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
+require "dispatcher"
+
+ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
+Dispatcher.dispatch
24 test/rails_root/public/dispatch.fcgi
View
@@ -0,0 +1,24 @@
+#!/opt/local/bin/ruby
+#
+# You may specify the path to the FastCGI crash log (a log of unhandled
+# exceptions which forced the FastCGI instance to exit, great for debugging)
+# and the number of requests to process before running garbage collection.
+#
+# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
+# and the GC period is nil (turned off). A reasonable number of requests
+# could range from 10-100 depending on the memory footprint of your app.
+#
+# Example:
+# # Default log path, normal GC behavior.
+# RailsFCGIHandler.process!
+#
+# # Default log path, 50 requests between GC.
+# RailsFCGIHandler.process! nil, 50
+#
+# # Custom log path, normal GC behavior.
+# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
+#
+require File.dirname(__FILE__) + "/../config/environment"
+require 'fcgi_handler'
+
+RailsFCGIHandler.process!
10 test/rails_root/public/dispatch.rb
View
@@ -0,0 +1,10 @@
+#!/opt/local/bin/ruby
+
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+
+# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
+# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
+require "dispatcher"
+
+ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
+Dispatcher.dispatch
0  test/rails_root/public/favicon.ico
View
No changes.
BIN  test/rails_root/public/images/rails.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
277 test/rails_root/public/index.html
View
@@ -0,0 +1,277 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <title>Ruby on Rails: Welcome aboard</title>
+ <style type="text/css" media="screen">
+ body {
+ margin: 0;
+ margin-bottom: 25px;
+ padding: 0;
+ background-color: #f0f0f0;
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
+ font-size: 13px;
+ color: #333;
+ }
+
+ h1 {
+ font-size: 28px;
+ color: #000;
+ }
+
+ a {color: #03c}
+ a:hover {
+ background-color: #03c;
+ color: white;
+ text-decoration: none;
+ }
+
+
+ #page {
+ background-color: #f0f0f0;
+ width: 750px;
+ margin: 0;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ #content {
+ float: left;
+ background-color: