tuning 1.0.0 → 4.0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -14
  3. data/Rakefile +1 -17
  4. data/lib/tuning.rb +1 -0
  5. data/lib/tuning/railtie.rb +1 -1
  6. data/lib/tuning/version.rb +1 -1
  7. data/test/{controllers_test.rb → controller_test.rb} +1 -1
  8. data/test/dummy/app/models/session.rb +6 -0
  9. data/test/dummy/app/models/user.rb +5 -0
  10. data/test/dummy/bin/bundle +1 -0
  11. data/test/dummy/bin/rails +1 -0
  12. data/test/dummy/bin/rake +1 -0
  13. data/test/dummy/bin/setup +1 -0
  14. data/test/dummy/config/database.yml.travis +2 -11
  15. data/test/dummy/config/environments/development.rb +1 -1
  16. data/test/dummy/config/environments/production.rb +1 -1
  17. data/test/dummy/config/environments/test.rb +2 -2
  18. data/test/dummy/config/routes.rb +52 -1
  19. data/test/dummy/config/secrets.yml +2 -2
  20. data/test/dummy/db/migrate/20161020200126_create_users.rb +9 -0
  21. data/test/dummy/db/schema.rb +2 -7
  22. data/test/dummy/log/development.log +21 -0
  23. data/test/dummy/log/test.log +383 -15
  24. data/test/dummy/public/404.html +57 -63
  25. data/test/dummy/public/422.html +57 -63
  26. data/test/dummy/public/500.html +56 -62
  27. data/test/{helpers_test.rb → helper_test.rb} +17 -5
  28. data/test/mailer_test.rb +13 -0
  29. data/test/record_test.rb +16 -0
  30. data/test/test_helper.rb +5 -2
  31. data/test/validation_test.rb +172 -0
  32. metadata +21 -19
  33. data/test/dummy/app/models/shop.rb +0 -2
  34. data/test/dummy/db/migrate/20161020200126_create_shops.rb +0 -9
  35. data/test/dummy/db/migrate/20161022144717_create_records.rb +0 -6
  36. data/test/mailers_test.rb +0 -10
  37. data/test/records_test.rb +0 -16
  38. data/test/validations_test.rb +0 -192
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 343b848737c55c9904274280fa22d39825774cd6
4
- data.tar.gz: d958a82c6f8109cc0349978d59bbc23fda0ce85c
3
+ metadata.gz: a6bad467e42fd19ccb808852cfb011f729f11ba2
4
+ data.tar.gz: 0482a7ce6b4dfae1b211fc0e0622b51dd5426843
5
5
  SHA512:
6
- metadata.gz: 49d74ede892d4044c00902cc3ddd33cb405fa79b00406e3ad975a3b2b1eb0b72337ad13fad9899580da53b4e9983b25562b8be877abc49bbded7c8fb4a651f1a
7
- data.tar.gz: 3641e84db0a2bc40ab09def6907be2b3a60e6efccd3c2ede3de92f620583f1eaad6655efec327171623f5767c81867807bc035e64a23cf48f95556335130f0dc
6
+ metadata.gz: 038433485de3fc9137b4aa96bb5397262f352640e4c54b9d5cb805ccc1dae209427d9fc1f672273cae31c2220136edfc2727a016ef2c29432c945178d99449bf
7
+ data.tar.gz: 59b2a30d3096e1c973e9da195e5db45ed3ee5e4e4e80f80e017d71b4491e6a129697847a0c41e869587d47a36f66a0c1f6bf390fde81dea6b6e91adf15695f22
data/README.md CHANGED
@@ -7,6 +7,13 @@
7
7
 
8
8
  Common tools used in rails extracted into a gem.
9
9
 
10
+ ## Why
11
+
12
+ I did this gem to:
13
+
14
+ - Make features I commonly need work nice together.
15
+ - Have an extensible container to continue adding new general purpose tools.
16
+
10
17
  ## Install
11
18
 
12
19
  Put this line in your Gemfile:
@@ -19,7 +26,9 @@ Then bundle:
19
26
  $ bundle
20
27
  ```
21
28
 
22
- ## Controllers
29
+ ## Usage
30
+
31
+ ### Controllers
23
32
 
24
33
  New callbacks before, after, around render are available:
25
34
  ```ruby
@@ -44,7 +53,7 @@ class ProductsController < ApplicationController
44
53
  end
45
54
  ```
46
55
 
47
- ## Mailers
56
+ ### Mailers
48
57
 
49
58
  Text email templates will normalize spaces and new lines like html:
50
59
  ```erb
@@ -62,7 +71,7 @@ Your order has been confirmed.
62
71
  Will be delivered right the way.
63
72
  ```
64
73
 
65
- ## Views
74
+ ### Views
66
75
 
67
76
  New content_tag_if method to wrap content into some tag if certain condition it's true:
68
77
  ```erb
@@ -83,7 +92,7 @@ New extending method to extend layouts:
83
92
  <% end %>
84
93
  ```
85
94
 
86
- ## Records
95
+ ### Records
87
96
 
88
97
  Empty strings will be nilify in the database to avoid sql errors or complex queries:
89
98
  ```ruby
@@ -94,30 +103,30 @@ shop.name # Will be nil
94
103
 
95
104
  New method validate is available to allow a more expressive syntax:
96
105
  ```ruby
97
- record.validate # Same as valid?
106
+ record.validate
98
107
  ```
99
108
 
100
- ## Validations
109
+ ### Validations
101
110
 
102
- Complexity validator to avoid weak passwords:
111
+ New complexity validator to avoid weak passwords:
103
112
  ```ruby
104
113
  class User < ActiveRecord::Base
105
114
  validates_complexity_of :password
106
115
  end
107
116
  ```
108
117
 
109
- Count validator to express count messages instead of length messages:
118
+ New time validator to validate Date/Time using after, after_or_equal_to, before or before_or_equal_to:
110
119
  ```ruby
111
- class Product < ActiveRecord::Base
112
- validates_count_of :pictures, minimum: 1, maximum: 4 # Or in/within: 1..4
120
+ class Schedule < ActiveRecord::Base
121
+ validates_time_of :opens_at
122
+ validates_time_of :closes_at, after: :opens_at
113
123
  end
114
124
  ```
115
125
 
116
- Time validator to validate Date/Time values:
126
+ New count validator to express count messages using minimum, maximum, in o within:
117
127
  ```ruby
118
- class Schedule < ActiveRecord::Base
119
- validates_time_of :opens_at
120
- validates_time_of :closes_at, after: :opens_at # Or before, after_or_equal_to or before_or_equal_to
128
+ class Product < ActiveRecord::Base
129
+ validates_count_of :pictures, minimum: 1, maximum: 4
121
130
  end
122
131
  ```
123
132
 
data/Rakefile CHANGED
@@ -4,24 +4,8 @@ rescue LoadError
4
4
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
5
  end
6
6
 
7
- require 'rdoc/task'
8
-
9
- RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'Tuning'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.rdoc')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
15
- end
16
-
17
-
18
-
19
-
20
7
  Bundler::GemHelper.install_tasks
21
8
 
22
- APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
23
- load 'rails/tasks/engine.rake'
24
-
25
9
  require 'rake/testtask'
26
10
 
27
11
  Rake::TestTask.new(:test) do |t|
@@ -29,7 +13,7 @@ Rake::TestTask.new(:test) do |t|
29
13
  t.libs << 'test'
30
14
  t.pattern = 'test/**/*_test.rb'
31
15
  t.verbose = false
16
+ t.warning = false
32
17
  end
33
18
 
34
-
35
19
  task default: :test
data/lib/tuning.rb CHANGED
@@ -6,6 +6,7 @@ require 'tuning/validations/complexity'
6
6
  require 'tuning/validations/count'
7
7
  require 'tuning/validations/time'
8
8
  require 'tuning/railtie'
9
+ require 'tuning/version'
9
10
 
10
11
  module Tuning
11
12
  end
@@ -1,7 +1,7 @@
1
1
  module Tuning
2
2
  class Railtie < Rails::Railtie
3
3
 
4
- initializer :tuning do
4
+ initializer 'tuning.extensions' do
5
5
  ::ActionController::Base.include(
6
6
  Tuning::Extensions::ActionController::Base
7
7
  )
@@ -1,5 +1,5 @@
1
1
  module Tuning
2
2
 
3
- VERSION = '1.0.0'
3
+ VERSION = '4.0.0.0'
4
4
 
5
5
  end
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class ControllersTest < ActiveSupport::TestCase
3
+ class ControllerTest < ActiveSupport::TestCase
4
4
 
5
5
  test 'render' do
6
6
  controller = ActionController::Base.new
@@ -0,0 +1,6 @@
1
+ class Session
2
+ include ActiveModel::Model
3
+
4
+ attr_accessor :list, :password, :created_at, :updated_at
5
+
6
+ end
@@ -0,0 +1,5 @@
1
+ class User < ActiveRecord::Base
2
+
3
+ attr_accessor :password, :list
4
+
5
+ end
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
+
2
3
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
4
  load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+
2
3
  APP_PATH = File.expand_path('../../config/application', __FILE__)
3
4
  require_relative '../config/boot'
4
5
  require 'rails/commands'
data/test/dummy/bin/rake CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+
2
3
  require_relative '../config/boot'
3
4
  require 'rake'
4
5
  Rake.application.run
data/test/dummy/bin/setup CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+
2
3
  require 'pathname'
3
4
 
4
5
  # path to your application root.
@@ -1,12 +1,3 @@
1
- mysql: &mysql
2
- adapter: <%= 'jdbc' if RUBY_ENGINE == 'jruby' %>mysql<%= '2' if RUBY_ENGINE != 'jruby' %>
3
-
4
- postgres: &postgres
5
- adapter: <%= 'jdbc' if RUBY_ENGINE == 'jruby' %>postgresql
6
-
7
- sqlite: &sqlite
8
- adapter: <%= 'jdbc' if RUBY_ENGINE == 'jruby' %>sqlite3
9
-
10
1
  test:
11
- <<: *<%= ENV['DB'] %>
12
- database: <%= ENV['DB'] == 'sqlite' ? 'db/travis.sqlite3' : 'travis' %>
2
+ adapter: <%= 'jdbc' if RUBY_ENGINE == 'jruby' %>postgresql
3
+ database: travis
@@ -1,4 +1,4 @@
1
- Dummy::Application.configure do
1
+ Rails.application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
@@ -1,4 +1,4 @@
1
- Dummy::Application.configure do
1
+ Rails.application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # Code is not reloaded between requests.
@@ -1,4 +1,4 @@
1
- Dummy::Application.configure do
1
+ Rails.application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
@@ -17,7 +17,7 @@ Dummy::Application.configure do
17
17
  config.static_cache_control = 'public, max-age=3600'
18
18
 
19
19
  # Show full error reports and disable caching.
20
- config.consider_all_requests_local = true
20
+ config.consider_all_requests_local = true
21
21
  config.action_controller.perform_caching = false
22
22
 
23
23
  # Raise exceptions instead of rendering exception templates.
@@ -1,5 +1,56 @@
1
1
  Rails.application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
2
4
 
3
- resources :shops
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
4
7
 
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
5
56
  end
@@ -11,10 +11,10 @@
11
11
  # if you're sharing your code publicly.
12
12
 
13
13
  development:
14
- secret_key_base: 921ea9f25943669d3a4b0a6c8762cb6a97a00c42732c84b3a4c80900d4f2be79081cad03e0ec8d5d0f2f293874b2bbd04c1444e7a6d6b9147de8f4ffb3acff11
14
+ secret_key_base: 2c1c8d4cbaa726b21aa6483b7d556125f4897508e2b94f8b3ddaec675168382c9b3b6eb5a9359d2fade03f539c16ac1ef905891c2410f2fd00b83b76c1666feb
15
15
 
16
16
  test:
17
- secret_key_base: 0e085a62fbfd58069441e0eb7dd8c3d0a7035017443181a5fba2c04041a03f8d0d427216ac56a51da79125898d125bb9fb8badb48404919fe3188eb309231570
17
+ secret_key_base: 9dd531171128e7c3d11dd2c5c18c84ba43d29b677043002634a6f4d58bf2687a283b7b6dc6af741d63c3824f11fa1f858010d7c2509a932023f2ece0d3bfe6cf
18
18
 
19
19
  # Do not keep production secrets in the repository,
20
20
  # instead read values from the environment.
@@ -0,0 +1,9 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+
6
+ t.timestamps null: false
7
+ end
8
+ end
9
+ end
@@ -11,17 +11,12 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20161022144717) do
14
+ ActiveRecord::Schema.define(version: 20161020200126) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
18
18
 
19
- create_table "records", force: :cascade do |t|
20
- end
21
-
22
- create_table "shops", force: :cascade do |t|
23
- t.boolean "enabled"
24
- t.boolean "visible"
19
+ create_table "users", force: :cascade do |t|
25
20
  t.string "name"
26
21
  t.datetime "created_at", null: false
27
22
  t.datetime "updated_at", null: false
@@ -0,0 +1,21 @@
1
+  (5.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
2
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateUsers (20161020200126)
5
+  (0.2ms) BEGIN
6
+  (13.6ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
7
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161020200126"]]
8
+  (6.1ms) COMMIT
9
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
10
+  (2.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
11
+ FROM pg_constraint c
12
+ JOIN pg_class t1 ON c.conrelid = t1.oid
13
+ JOIN pg_class t2 ON c.confrelid = t2.oid
14
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
15
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
16
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
17
+ WHERE c.contype = 'f'
18
+ AND t1.relname = 'users'
19
+ AND t3.nspname = ANY (current_schemas(false))
20
+ ORDER BY c.conname
21
+ 
@@ -1,20 +1,78 @@
1
- ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
1
+ ActiveRecord::SchemaMigration Load (27.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
2
2
   (0.3ms) BEGIN
3
- ------------------------------
4
- HelpersTest: test_active_trail
5
- ------------------------------
3
+ -------------------------------
4
+ RecordsTest: test_nilify_blanks
5
+ -------------------------------
6
+  (0.2ms) SAVEPOINT active_record_1
7
+ SQL (24.5ms) INSERT INTO "shops" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-11-21 19:23:01.287577"], ["updated_at", "2016-11-21 19:23:01.287577"]]
8
+  (0.1ms) RELEASE SAVEPOINT active_record_1
9
+ Shop Load (0.3ms) SELECT "shops".* FROM "shops" WHERE "shops"."id" = $1 LIMIT 1 [["id", 13]]
10
+  (0.1ms) ROLLBACK
11
+  (0.1ms) BEGIN
12
+ --------------------------
13
+ RecordsTest: test_validate
14
+ --------------------------
15
+  (0.1ms) ROLLBACK
16
+  (0.1ms) BEGIN
17
+ -----------------------------
18
+ ValidationsTest: test_methods
19
+ -----------------------------
6
20
   (0.2ms) ROLLBACK
7
21
   (0.1ms) BEGIN
8
22
  --------------------------------
9
- HelpersTest: test_content_tag_if
23
+ ValidationsTest: test_complexity
10
24
  --------------------------------
25
+  (0.3ms) ROLLBACK
26
+  (0.1ms) BEGIN
27
+ ---------------------------
28
+ ValidationsTest: test_count
29
+ ---------------------------
11
30
   (0.2ms) ROLLBACK
12
31
   (0.1ms) BEGIN
32
+ --------------------------
33
+ ValidationsTest: test_time
34
+ --------------------------
35
+  (0.3ms) ROLLBACK
36
+  (0.1ms) BEGIN
13
37
  ---------------------------
14
38
  HelpersTest: test_extending
15
39
  ---------------------------
16
40
  Rendered layouts/application.html.erb (0.3ms)
17
41
  Rendered layouts/market.html.erb (7.7ms)
42
+  (0.3ms) ROLLBACK
43
+  (0.1ms) BEGIN
44
+ ------------------------------
45
+ HelpersTest: test_active_trail
46
+ ------------------------------
47
+  (0.1ms) ROLLBACK
48
+  (0.1ms) BEGIN
49
+ --------------------------------
50
+ HelpersTest: test_content_tag_if
51
+ --------------------------------
52
+  (0.1ms) ROLLBACK
53
+  (0.1ms) BEGIN
54
+ -------------------------------
55
+ ControllersTest: test_callbacks
56
+ -------------------------------
57
+  (0.1ms) ROLLBACK
58
+  (0.1ms) BEGIN
59
+ ----------------------------
60
+ ControllersTest: test_render
61
+ ----------------------------
62
+  (0.1ms) ROLLBACK
63
+  (0.1ms) BEGIN
64
+ -------------------------------
65
+ MailersTest: test_normalization
66
+ -------------------------------
67
+ Rendered user_mailer/invite.text.erb (0.2ms)
68
+
69
+ UserMailer#invite: processed outbound mail in 9.0ms
70
+  (0.3ms) ROLLBACK
71
+ ActiveRecord::SchemaMigration Load (6.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
72
+  (0.3ms) BEGIN
73
+ --------------------------------
74
+ ValidationsTest: test_complexity
75
+ --------------------------------
18
76
   (0.2ms) ROLLBACK
19
77
   (0.1ms) BEGIN
20
78
  -----------------------------
@@ -22,49 +80,359 @@ ValidationsTest: test_methods
22
80
  -----------------------------
23
81
   (0.2ms) ROLLBACK
24
82
   (0.1ms) BEGIN
83
+ ---------------------------
84
+ ValidationsTest: test_count
85
+ ---------------------------
86
+  (0.3ms) ROLLBACK
87
+  (0.1ms) BEGIN
25
88
  --------------------------
26
89
  ValidationsTest: test_time
27
90
  --------------------------
28
91
   (0.2ms) ROLLBACK
29
-  (0.2ms) BEGIN
92
+  (0.1ms) BEGIN
93
+ -------------------------------
94
+ RecordsTest: test_nilify_blanks
95
+ -------------------------------
96
+  (0.2ms) SAVEPOINT active_record_1
97
+ SQL (0.5ms) INSERT INTO "shops" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-11-21 21:26:58.983176"], ["updated_at", "2016-11-21 21:26:58.983176"]]
98
+  (0.1ms) RELEASE SAVEPOINT active_record_1
99
+ Shop Load (0.3ms) SELECT "shops".* FROM "shops" WHERE "shops"."id" = $1 LIMIT 1 [["id", 14]]
100
+  (0.2ms) ROLLBACK
101
+  (0.1ms) BEGIN
102
+ --------------------------
103
+ RecordsTest: test_validate
104
+ --------------------------
105
+  (0.1ms) ROLLBACK
106
+  (0.1ms) BEGIN
107
+ -------------------------------
108
+ MailersTest: test_normalization
109
+ -------------------------------
110
+ Rendered user_mailer/invite.text.erb (0.9ms)
111
+
112
+ UserMailer#invite: processed outbound mail in 14.3ms
113
+  (0.2ms) ROLLBACK
114
+  (0.1ms) BEGIN
115
+ ----------------------------
116
+ ControllersTest: test_render
117
+ ----------------------------
118
+  (0.2ms) ROLLBACK
119
+  (0.1ms) BEGIN
120
+ -------------------------------
121
+ ControllersTest: test_callbacks
122
+ -------------------------------
123
+  (0.1ms) ROLLBACK
124
+  (0.1ms) BEGIN
30
125
  --------------------------------
31
- ValidationsTest: test_complexity
126
+ HelpersTest: test_content_tag_if
32
127
  --------------------------------
128
+  (0.1ms) ROLLBACK
129
+  (0.1ms) BEGIN
130
+ ---------------------------
131
+ HelpersTest: test_extending
132
+ ---------------------------
133
+ Rendered layouts/application.html.erb (0.3ms)
134
+ Rendered layouts/market.html.erb (8.8ms)
33
135
   (0.2ms) ROLLBACK
34
-  (0.2ms) BEGIN
136
+  (0.1ms) BEGIN
137
+ ------------------------------
138
+ HelpersTest: test_active_trail
139
+ ------------------------------
140
+  (0.1ms) ROLLBACK
141
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
142
+  (0.3ms) BEGIN
143
+ --------------------------
144
+ RecordsTest: test_validate
145
+ --------------------------
146
+  (0.2ms) ROLLBACK
147
+  (0.1ms) BEGIN
148
+ -------------------------------
149
+ RecordsTest: test_nilify_blanks
150
+ -------------------------------
151
+  (0.1ms) SAVEPOINT active_record_1
152
+ SQL (0.4ms) INSERT INTO "shops" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-11-21 21:27:09.550135"], ["updated_at", "2016-11-21 21:27:09.550135"]]
153
+  (0.2ms) RELEASE SAVEPOINT active_record_1
154
+ Shop Load (0.3ms) SELECT "shops".* FROM "shops" WHERE "shops"."id" = $1 LIMIT 1 [["id", 15]]
155
+  (0.1ms) ROLLBACK
156
+  (0.1ms) BEGIN
157
+ --------------------------
158
+ ValidationsTest: test_time
159
+ --------------------------
160
+  (0.3ms) ROLLBACK
161
+  (0.1ms) BEGIN
162
+ -----------------------------
163
+ ValidationsTest: test_methods
164
+ -----------------------------
165
+  (0.2ms) ROLLBACK
166
+  (0.1ms) BEGIN
167
+ --------------------------------
168
+ ValidationsTest: test_complexity
169
+ --------------------------------
170
+  (0.3ms) ROLLBACK
171
+  (0.1ms) BEGIN
35
172
  ---------------------------
36
173
  ValidationsTest: test_count
37
174
  ---------------------------
38
-  (0.3ms) ROLLBACK
175
+  (0.2ms) ROLLBACK
176
+  (0.2ms) BEGIN
177
+ --------------------------------
178
+ HelpersTest: test_content_tag_if
179
+ --------------------------------
180
+  (0.2ms) ROLLBACK
39
181
   (0.1ms) BEGIN
182
+ ---------------------------
183
+ HelpersTest: test_extending
184
+ ---------------------------
185
+ Rendered layouts/application.html.erb (0.2ms)
186
+ Rendered layouts/market.html.erb (6.1ms)
187
+  (0.2ms) ROLLBACK
188
+  (0.2ms) BEGIN
189
+ ------------------------------
190
+ HelpersTest: test_active_trail
191
+ ------------------------------
192
+  (0.2ms) ROLLBACK
193
+  (0.2ms) BEGIN
40
194
  -------------------------------
41
195
  ControllersTest: test_callbacks
42
196
  -------------------------------
43
197
   (0.1ms) ROLLBACK
44
-  (0.2ms) BEGIN
198
+  (0.1ms) BEGIN
45
199
  ----------------------------
46
200
  ControllersTest: test_render
47
201
  ----------------------------
48
-  (0.2ms) ROLLBACK
202
+  (0.1ms) ROLLBACK
49
203
   (0.1ms) BEGIN
50
204
  -------------------------------
51
205
  MailersTest: test_normalization
52
206
  -------------------------------
53
207
  Rendered user_mailer/invite.text.erb (0.3ms)
54
208
 
55
- UserMailer#invite: processed outbound mail in 11.4ms
209
+ UserMailer#invite: processed outbound mail in 9.3ms
210
+  (0.2ms) ROLLBACK
211
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
212
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
213
+  (0.2ms) BEGIN
214
+ -------------------------------
215
+ MailersTest: test_normalization
216
+ -------------------------------
217
+ Rendered user_mailer/invite.text.erb (0.9ms)
218
+
219
+ UserMailer#invite: processed outbound mail in 17.3ms
56
220
   (0.2ms) ROLLBACK
221
+  (0.1ms) BEGIN
222
+ ----------------------------
223
+ ControllersTest: test_render
224
+ ----------------------------
225
+  (0.1ms) ROLLBACK
57
226
   (0.2ms) BEGIN
58
227
  -------------------------------
228
+ ControllersTest: test_callbacks
229
+ -------------------------------
230
+  (0.1ms) ROLLBACK
231
+  (0.1ms) BEGIN
232
+ ---------------------------
233
+ ValidationsTest: test_count
234
+ ---------------------------
235
+  (0.1ms) ROLLBACK
236
+  (0.1ms) BEGIN
237
+ --------------------------
238
+ ValidationsTest: test_time
239
+ --------------------------
240
+  (0.1ms) ROLLBACK
241
+  (0.1ms) BEGIN
242
+ --------------------------------
243
+ ValidationsTest: test_complexity
244
+ --------------------------------
245
+  (0.1ms) ROLLBACK
246
+  (0.1ms) BEGIN
247
+ -----------------------------
248
+ ValidationsTest: test_methods
249
+ -----------------------------
250
+  (0.1ms) ROLLBACK
251
+  (0.1ms) BEGIN
252
+ -------------------------------
253
+ RecordsTest: test_nilify_blanks
254
+ -------------------------------
255
+  (0.1ms) ROLLBACK
256
+  (0.1ms) BEGIN
257
+ --------------------------
258
+ RecordsTest: test_validate
259
+ --------------------------
260
+  (0.1ms) ROLLBACK
261
+  (0.1ms) BEGIN
262
+ --------------------------------
263
+ HelpersTest: test_content_tag_if
264
+ --------------------------------
265
+  (0.1ms) ROLLBACK
266
+  (0.1ms) BEGIN
267
+ ---------------------------
268
+ HelpersTest: test_extending
269
+ ---------------------------
270
+ Rendered layouts/application.html.erb (0.2ms)
271
+ Rendered layouts/market.html.erb (6.6ms)
272
+  (0.2ms) ROLLBACK
273
+  (0.1ms) BEGIN
274
+ ------------------------------
275
+ HelpersTest: test_active_trail
276
+ ------------------------------
277
+  (0.1ms) ROLLBACK
278
+  (2.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
279
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
280
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
281
+ Migrating to CreateUsers (20161020200126)
282
+  (0.2ms) BEGIN
283
+  (2.4ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
284
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161020200126"]]
285
+  (0.4ms) COMMIT
286
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
287
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
288
+ FROM pg_constraint c
289
+ JOIN pg_class t1 ON c.conrelid = t1.oid
290
+ JOIN pg_class t2 ON c.confrelid = t2.oid
291
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
292
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
293
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
294
+ WHERE c.contype = 'f'
295
+ AND t1.relname = 'users'
296
+ AND t3.nspname = ANY (current_schemas(false))
297
+ ORDER BY c.conname
298
+ 
299
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
300
+  (0.3ms) BEGIN
301
+ ------------------------------
302
+ HelpersTest: test_active_trail
303
+ ------------------------------
304
+  (0.2ms) ROLLBACK
305
+  (0.1ms) BEGIN
306
+ --------------------------------
307
+ HelpersTest: test_content_tag_if
308
+ --------------------------------
309
+  (0.2ms) ROLLBACK
310
+  (0.1ms) BEGIN
311
+ ---------------------------
312
+ HelpersTest: test_extending
313
+ ---------------------------
314
+ Rendered layouts/application.html.erb (0.3ms)
315
+ Rendered layouts/market.html.erb (8.5ms)
316
+  (0.2ms) ROLLBACK
317
+  (0.1ms) BEGIN
318
+ -----------------------------
319
+ ValidationsTest: test_methods
320
+ -----------------------------
321
+  (0.1ms) ROLLBACK
322
+  (0.1ms) BEGIN
323
+ --------------------------
324
+ ValidationsTest: test_time
325
+ --------------------------
326
+  (0.2ms) ROLLBACK
327
+  (0.1ms) BEGIN
328
+ ---------------------------
329
+ ValidationsTest: test_count
330
+ ---------------------------
331
+  (0.3ms) ROLLBACK
332
+  (0.2ms) BEGIN
333
+ --------------------------------
334
+ ValidationsTest: test_complexity
335
+ --------------------------------
336
+  (0.2ms) ROLLBACK
337
+  (0.1ms) BEGIN
338
+ -------------------------------
339
+ MailersTest: test_normalization
340
+ -------------------------------
341
+ Rendered user_mailer/invite.text.erb (0.2ms)
342
+
343
+ UserMailer#invite: processed outbound mail in 9.1ms
344
+  (0.2ms) ROLLBACK
345
+  (0.1ms) BEGIN
346
+ --------------------------
347
+ RecordsTest: test_validate
348
+ --------------------------
349
+  (0.1ms) ROLLBACK
350
+  (0.1ms) BEGIN
351
+ -------------------------------
59
352
  RecordsTest: test_nilify_blanks
60
353
  -------------------------------
61
354
   (0.1ms) SAVEPOINT active_record_1
62
- SQL (0.4ms) INSERT INTO "shops" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-10-22 15:50:31.994321"], ["updated_at", "2016-10-22 15:50:31.994321"]]
355
+ SQL (6.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-11-21 21:59:16.857031"], ["updated_at", "2016-11-21 21:59:16.857031"]]
356
+  (0.2ms) RELEASE SAVEPOINT active_record_1
357
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
358
+  (0.1ms) ROLLBACK
359
+  (0.1ms) BEGIN
360
+ -------------------------------
361
+ ControllersTest: test_callbacks
362
+ -------------------------------
363
+  (0.1ms) ROLLBACK
364
+  (0.1ms) BEGIN
365
+ ----------------------------
366
+ ControllersTest: test_render
367
+ ----------------------------
368
+  (0.1ms) ROLLBACK
369
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
370
+  (0.2ms) BEGIN
371
+ -------------------------------
372
+ RecordsTest: test_nilify_blanks
373
+ -------------------------------
374
+  (0.2ms) SAVEPOINT active_record_1
375
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-11-22 13:34:07.765333"], ["updated_at", "2016-11-22 13:34:07.765333"]]
63
376
   (0.1ms) RELEASE SAVEPOINT active_record_1
64
- Shop Load (0.3ms) SELECT "shops".* FROM "shops" WHERE "shops"."id" = $1 LIMIT 1 [["id", 11]]
377
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
65
378
   (0.2ms) ROLLBACK
66
-  (0.2ms) BEGIN
379
+  (0.1ms) BEGIN
67
380
  --------------------------
68
381
  RecordsTest: test_validate
69
382
  --------------------------
383
+  (0.2ms) ROLLBACK
384
+  (0.1ms) BEGIN
385
+ -------------------------------
386
+ MailersTest: test_normalization
387
+ -------------------------------
388
+ Rendered user_mailer/invite.text.erb (1.0ms)
389
+
390
+ UserMailer#invite: processed outbound mail in 19.2ms
391
+  (0.2ms) ROLLBACK
392
+  (0.1ms) BEGIN
393
+ -------------------------------
394
+ ControllersTest: test_callbacks
395
+ -------------------------------
396
+  (0.1ms) ROLLBACK
397
+  (0.1ms) BEGIN
398
+ ----------------------------
399
+ ControllersTest: test_render
400
+ ----------------------------
401
+  (0.1ms) ROLLBACK
402
+  (0.2ms) BEGIN
403
+ --------------------------------
404
+ HelpersTest: test_content_tag_if
405
+ --------------------------------
70
406
   (0.1ms) ROLLBACK
407
+  (0.1ms) BEGIN
408
+ ------------------------------
409
+ HelpersTest: test_active_trail
410
+ ------------------------------
411
+  (0.2ms) ROLLBACK
412
+  (0.1ms) BEGIN
413
+ ---------------------------
414
+ HelpersTest: test_extending
415
+ ---------------------------
416
+ Rendered layouts/application.html.erb (0.4ms)
417
+ Rendered layouts/market.html.erb (7.5ms)
418
+  (0.2ms) ROLLBACK
419
+  (0.2ms) BEGIN
420
+ --------------------------------
421
+ ValidationsTest: test_complexity
422
+ --------------------------------
423
+  (0.2ms) ROLLBACK
424
+  (0.1ms) BEGIN
425
+ -----------------------------
426
+ ValidationsTest: test_methods
427
+ -----------------------------
428
+  (0.1ms) ROLLBACK
429
+  (0.1ms) BEGIN
430
+ ---------------------------
431
+ ValidationsTest: test_count
432
+ ---------------------------
433
+  (0.2ms) ROLLBACK
434
+  (0.1ms) BEGIN
435
+ --------------------------
436
+ ValidationsTest: test_time
437
+ --------------------------
438
+  (0.2ms) ROLLBACK