tuning 1.0.0 → 4.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -14
- data/Rakefile +1 -17
- data/lib/tuning.rb +1 -0
- data/lib/tuning/railtie.rb +1 -1
- data/lib/tuning/version.rb +1 -1
- data/test/{controllers_test.rb → controller_test.rb} +1 -1
- data/test/dummy/app/models/session.rb +6 -0
- data/test/dummy/app/models/user.rb +5 -0
- data/test/dummy/bin/bundle +1 -0
- data/test/dummy/bin/rails +1 -0
- data/test/dummy/bin/rake +1 -0
- data/test/dummy/bin/setup +1 -0
- data/test/dummy/config/database.yml.travis +2 -11
- data/test/dummy/config/environments/development.rb +1 -1
- data/test/dummy/config/environments/production.rb +1 -1
- data/test/dummy/config/environments/test.rb +2 -2
- data/test/dummy/config/routes.rb +52 -1
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/db/migrate/20161020200126_create_users.rb +9 -0
- data/test/dummy/db/schema.rb +2 -7
- data/test/dummy/log/development.log +21 -0
- data/test/dummy/log/test.log +383 -15
- data/test/dummy/public/404.html +57 -63
- data/test/dummy/public/422.html +57 -63
- data/test/dummy/public/500.html +56 -62
- data/test/{helpers_test.rb → helper_test.rb} +17 -5
- data/test/mailer_test.rb +13 -0
- data/test/record_test.rb +16 -0
- data/test/test_helper.rb +5 -2
- data/test/validation_test.rb +172 -0
- metadata +21 -19
- data/test/dummy/app/models/shop.rb +0 -2
- data/test/dummy/db/migrate/20161020200126_create_shops.rb +0 -9
- data/test/dummy/db/migrate/20161022144717_create_records.rb +0 -6
- data/test/mailers_test.rb +0 -10
- data/test/records_test.rb +0 -16
- data/test/validations_test.rb +0 -192
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6bad467e42fd19ccb808852cfb011f729f11ba2
|
4
|
+
data.tar.gz: 0482a7ce6b4dfae1b211fc0e0622b51dd5426843
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
##
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
106
|
+
record.validate
|
98
107
|
```
|
99
108
|
|
100
|
-
|
109
|
+
### Validations
|
101
110
|
|
102
|
-
|
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
|
-
|
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
|
112
|
-
|
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
|
-
|
126
|
+
New count validator to express count messages using minimum, maximum, in o within:
|
117
127
|
```ruby
|
118
|
-
class
|
119
|
-
|
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
data/lib/tuning/railtie.rb
CHANGED
data/lib/tuning/version.rb
CHANGED
data/test/dummy/bin/bundle
CHANGED
data/test/dummy/bin/rails
CHANGED
data/test/dummy/bin/rake
CHANGED
data/test/dummy/bin/setup
CHANGED
@@ -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
|
-
|
12
|
-
database:
|
2
|
+
adapter: <%= 'jdbc' if RUBY_ENGINE == 'jruby' %>postgresql
|
3
|
+
database: travis
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
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
|
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.
|
data/test/dummy/config/routes.rb
CHANGED
@@ -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
|
-
|
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:
|
14
|
+
secret_key_base: 2c1c8d4cbaa726b21aa6483b7d556125f4897508e2b94f8b3ddaec675168382c9b3b6eb5a9359d2fade03f539c16ac1ef905891c2410f2fd00b83b76c1666feb
|
15
15
|
|
16
16
|
test:
|
17
|
-
secret_key_base:
|
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.
|
data/test/dummy/db/schema.rb
CHANGED
@@ -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:
|
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 "
|
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
|
+
[1m[36m (5.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
2
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
Migrating to CreateUsers (20161020200126)
|
5
|
+
[1m[35m (0.2ms)[0m BEGIN
|
6
|
+
[1m[36m (13.6ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
7
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161020200126"]]
|
8
|
+
[1m[36m (6.1ms)[0m [1mCOMMIT[0m
|
9
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
10
|
+
[1m[36m (2.1ms)[0m [1mSELECT 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
|
+
[0m
|
data/test/dummy/log/test.log
CHANGED
@@ -1,20 +1,78 @@
|
|
1
|
-
[1m[36mActiveRecord::SchemaMigration Load (
|
1
|
+
[1m[36mActiveRecord::SchemaMigration Load (27.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2
2
|
[1m[35m (0.3ms)[0m BEGIN
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
-------------------------------
|
4
|
+
RecordsTest: test_nilify_blanks
|
5
|
+
-------------------------------
|
6
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
7
|
+
[1m[35mSQL (24.5ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
9
|
+
[1m[35mShop Load (0.3ms)[0m SELECT "shops".* FROM "shops" WHERE "shops"."id" = $1 LIMIT 1 [["id", 13]]
|
10
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11
|
+
[1m[35m (0.1ms)[0m BEGIN
|
12
|
+
--------------------------
|
13
|
+
RecordsTest: test_validate
|
14
|
+
--------------------------
|
15
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
16
|
+
[1m[35m (0.1ms)[0m BEGIN
|
17
|
+
-----------------------------
|
18
|
+
ValidationsTest: test_methods
|
19
|
+
-----------------------------
|
6
20
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
7
21
|
[1m[35m (0.1ms)[0m BEGIN
|
8
22
|
--------------------------------
|
9
|
-
|
23
|
+
ValidationsTest: test_complexity
|
10
24
|
--------------------------------
|
25
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
26
|
+
[1m[35m (0.1ms)[0m BEGIN
|
27
|
+
---------------------------
|
28
|
+
ValidationsTest: test_count
|
29
|
+
---------------------------
|
11
30
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
12
31
|
[1m[35m (0.1ms)[0m BEGIN
|
32
|
+
--------------------------
|
33
|
+
ValidationsTest: test_time
|
34
|
+
--------------------------
|
35
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
36
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
43
|
+
[1m[35m (0.1ms)[0m BEGIN
|
44
|
+
------------------------------
|
45
|
+
HelpersTest: test_active_trail
|
46
|
+
------------------------------
|
47
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
48
|
+
[1m[35m (0.1ms)[0m BEGIN
|
49
|
+
--------------------------------
|
50
|
+
HelpersTest: test_content_tag_if
|
51
|
+
--------------------------------
|
52
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
53
|
+
[1m[35m (0.1ms)[0m BEGIN
|
54
|
+
-------------------------------
|
55
|
+
ControllersTest: test_callbacks
|
56
|
+
-------------------------------
|
57
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
58
|
+
[1m[35m (0.1ms)[0m BEGIN
|
59
|
+
----------------------------
|
60
|
+
ControllersTest: test_render
|
61
|
+
----------------------------
|
62
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
63
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
71
|
+
[1m[36mActiveRecord::SchemaMigration Load (6.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
72
|
+
[1m[35m (0.3ms)[0m BEGIN
|
73
|
+
--------------------------------
|
74
|
+
ValidationsTest: test_complexity
|
75
|
+
--------------------------------
|
18
76
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
19
77
|
[1m[35m (0.1ms)[0m BEGIN
|
20
78
|
-----------------------------
|
@@ -22,49 +80,359 @@ ValidationsTest: test_methods
|
|
22
80
|
-----------------------------
|
23
81
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
24
82
|
[1m[35m (0.1ms)[0m BEGIN
|
83
|
+
---------------------------
|
84
|
+
ValidationsTest: test_count
|
85
|
+
---------------------------
|
86
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
87
|
+
[1m[35m (0.1ms)[0m BEGIN
|
25
88
|
--------------------------
|
26
89
|
ValidationsTest: test_time
|
27
90
|
--------------------------
|
28
91
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
29
|
-
[1m[35m (0.
|
92
|
+
[1m[35m (0.1ms)[0m BEGIN
|
93
|
+
-------------------------------
|
94
|
+
RecordsTest: test_nilify_blanks
|
95
|
+
-------------------------------
|
96
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
97
|
+
[1m[35mSQL (0.5ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
99
|
+
[1m[35mShop Load (0.3ms)[0m SELECT "shops".* FROM "shops" WHERE "shops"."id" = $1 LIMIT 1 [["id", 14]]
|
100
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
101
|
+
[1m[35m (0.1ms)[0m BEGIN
|
102
|
+
--------------------------
|
103
|
+
RecordsTest: test_validate
|
104
|
+
--------------------------
|
105
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
106
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
114
|
+
[1m[35m (0.1ms)[0m BEGIN
|
115
|
+
----------------------------
|
116
|
+
ControllersTest: test_render
|
117
|
+
----------------------------
|
118
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
119
|
+
[1m[35m (0.1ms)[0m BEGIN
|
120
|
+
-------------------------------
|
121
|
+
ControllersTest: test_callbacks
|
122
|
+
-------------------------------
|
123
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
124
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30
125
|
--------------------------------
|
31
|
-
|
126
|
+
HelpersTest: test_content_tag_if
|
32
127
|
--------------------------------
|
128
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
129
|
+
[1m[35m (0.1ms)[0m 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
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
34
|
-
[1m[35m (0.
|
136
|
+
[1m[35m (0.1ms)[0m BEGIN
|
137
|
+
------------------------------
|
138
|
+
HelpersTest: test_active_trail
|
139
|
+
------------------------------
|
140
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
141
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
142
|
+
[1m[35m (0.3ms)[0m BEGIN
|
143
|
+
--------------------------
|
144
|
+
RecordsTest: test_validate
|
145
|
+
--------------------------
|
146
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
147
|
+
[1m[35m (0.1ms)[0m BEGIN
|
148
|
+
-------------------------------
|
149
|
+
RecordsTest: test_nilify_blanks
|
150
|
+
-------------------------------
|
151
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
152
|
+
[1m[35mSQL (0.4ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
154
|
+
[1m[35mShop Load (0.3ms)[0m SELECT "shops".* FROM "shops" WHERE "shops"."id" = $1 LIMIT 1 [["id", 15]]
|
155
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
156
|
+
[1m[35m (0.1ms)[0m BEGIN
|
157
|
+
--------------------------
|
158
|
+
ValidationsTest: test_time
|
159
|
+
--------------------------
|
160
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
161
|
+
[1m[35m (0.1ms)[0m BEGIN
|
162
|
+
-----------------------------
|
163
|
+
ValidationsTest: test_methods
|
164
|
+
-----------------------------
|
165
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
166
|
+
[1m[35m (0.1ms)[0m BEGIN
|
167
|
+
--------------------------------
|
168
|
+
ValidationsTest: test_complexity
|
169
|
+
--------------------------------
|
170
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
171
|
+
[1m[35m (0.1ms)[0m BEGIN
|
35
172
|
---------------------------
|
36
173
|
ValidationsTest: test_count
|
37
174
|
---------------------------
|
38
|
-
[1m[36m (0.
|
175
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
176
|
+
[1m[35m (0.2ms)[0m BEGIN
|
177
|
+
--------------------------------
|
178
|
+
HelpersTest: test_content_tag_if
|
179
|
+
--------------------------------
|
180
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
39
181
|
[1m[35m (0.1ms)[0m BEGIN
|
182
|
+
---------------------------
|
183
|
+
HelpersTest: test_extending
|
184
|
+
---------------------------
|
185
|
+
Rendered layouts/application.html.erb (0.2ms)
|
186
|
+
Rendered layouts/market.html.erb (6.1ms)
|
187
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
188
|
+
[1m[35m (0.2ms)[0m BEGIN
|
189
|
+
------------------------------
|
190
|
+
HelpersTest: test_active_trail
|
191
|
+
------------------------------
|
192
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
193
|
+
[1m[35m (0.2ms)[0m BEGIN
|
40
194
|
-------------------------------
|
41
195
|
ControllersTest: test_callbacks
|
42
196
|
-------------------------------
|
43
197
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
44
|
-
[1m[35m (0.
|
198
|
+
[1m[35m (0.1ms)[0m BEGIN
|
45
199
|
----------------------------
|
46
200
|
ControllersTest: test_render
|
47
201
|
----------------------------
|
48
|
-
[1m[36m (0.
|
202
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
49
203
|
[1m[35m (0.1ms)[0m 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
|
209
|
+
UserMailer#invite: processed outbound mail in 9.3ms
|
210
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
211
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
212
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
213
|
+
[1m[35m (0.2ms)[0m 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
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
221
|
+
[1m[35m (0.1ms)[0m BEGIN
|
222
|
+
----------------------------
|
223
|
+
ControllersTest: test_render
|
224
|
+
----------------------------
|
225
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
57
226
|
[1m[35m (0.2ms)[0m BEGIN
|
58
227
|
-------------------------------
|
228
|
+
ControllersTest: test_callbacks
|
229
|
+
-------------------------------
|
230
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
231
|
+
[1m[35m (0.1ms)[0m BEGIN
|
232
|
+
---------------------------
|
233
|
+
ValidationsTest: test_count
|
234
|
+
---------------------------
|
235
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
236
|
+
[1m[35m (0.1ms)[0m BEGIN
|
237
|
+
--------------------------
|
238
|
+
ValidationsTest: test_time
|
239
|
+
--------------------------
|
240
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
241
|
+
[1m[35m (0.1ms)[0m BEGIN
|
242
|
+
--------------------------------
|
243
|
+
ValidationsTest: test_complexity
|
244
|
+
--------------------------------
|
245
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
246
|
+
[1m[35m (0.1ms)[0m BEGIN
|
247
|
+
-----------------------------
|
248
|
+
ValidationsTest: test_methods
|
249
|
+
-----------------------------
|
250
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
251
|
+
[1m[35m (0.1ms)[0m BEGIN
|
252
|
+
-------------------------------
|
253
|
+
RecordsTest: test_nilify_blanks
|
254
|
+
-------------------------------
|
255
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
256
|
+
[1m[35m (0.1ms)[0m BEGIN
|
257
|
+
--------------------------
|
258
|
+
RecordsTest: test_validate
|
259
|
+
--------------------------
|
260
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
261
|
+
[1m[35m (0.1ms)[0m BEGIN
|
262
|
+
--------------------------------
|
263
|
+
HelpersTest: test_content_tag_if
|
264
|
+
--------------------------------
|
265
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
266
|
+
[1m[35m (0.1ms)[0m BEGIN
|
267
|
+
---------------------------
|
268
|
+
HelpersTest: test_extending
|
269
|
+
---------------------------
|
270
|
+
Rendered layouts/application.html.erb (0.2ms)
|
271
|
+
Rendered layouts/market.html.erb (6.6ms)
|
272
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
273
|
+
[1m[35m (0.1ms)[0m BEGIN
|
274
|
+
------------------------------
|
275
|
+
HelpersTest: test_active_trail
|
276
|
+
------------------------------
|
277
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
278
|
+
[1m[36m (2.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
279
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
280
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
281
|
+
Migrating to CreateUsers (20161020200126)
|
282
|
+
[1m[35m (0.2ms)[0m BEGIN
|
283
|
+
[1m[36m (2.4ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
284
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161020200126"]]
|
285
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
286
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
287
|
+
[1m[36m (1.8ms)[0m [1mSELECT 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
|
+
[0m
|
299
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
300
|
+
[1m[35m (0.3ms)[0m BEGIN
|
301
|
+
------------------------------
|
302
|
+
HelpersTest: test_active_trail
|
303
|
+
------------------------------
|
304
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
305
|
+
[1m[35m (0.1ms)[0m BEGIN
|
306
|
+
--------------------------------
|
307
|
+
HelpersTest: test_content_tag_if
|
308
|
+
--------------------------------
|
309
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
310
|
+
[1m[35m (0.1ms)[0m BEGIN
|
311
|
+
---------------------------
|
312
|
+
HelpersTest: test_extending
|
313
|
+
---------------------------
|
314
|
+
Rendered layouts/application.html.erb (0.3ms)
|
315
|
+
Rendered layouts/market.html.erb (8.5ms)
|
316
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
317
|
+
[1m[35m (0.1ms)[0m BEGIN
|
318
|
+
-----------------------------
|
319
|
+
ValidationsTest: test_methods
|
320
|
+
-----------------------------
|
321
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
322
|
+
[1m[35m (0.1ms)[0m BEGIN
|
323
|
+
--------------------------
|
324
|
+
ValidationsTest: test_time
|
325
|
+
--------------------------
|
326
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
327
|
+
[1m[35m (0.1ms)[0m BEGIN
|
328
|
+
---------------------------
|
329
|
+
ValidationsTest: test_count
|
330
|
+
---------------------------
|
331
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
332
|
+
[1m[35m (0.2ms)[0m BEGIN
|
333
|
+
--------------------------------
|
334
|
+
ValidationsTest: test_complexity
|
335
|
+
--------------------------------
|
336
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
337
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
345
|
+
[1m[35m (0.1ms)[0m BEGIN
|
346
|
+
--------------------------
|
347
|
+
RecordsTest: test_validate
|
348
|
+
--------------------------
|
349
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
350
|
+
[1m[35m (0.1ms)[0m BEGIN
|
351
|
+
-------------------------------
|
59
352
|
RecordsTest: test_nilify_blanks
|
60
353
|
-------------------------------
|
61
354
|
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
62
|
-
[1m[35mSQL (
|
355
|
+
[1m[35mSQL (6.4ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
357
|
+
[1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
|
358
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
359
|
+
[1m[35m (0.1ms)[0m BEGIN
|
360
|
+
-------------------------------
|
361
|
+
ControllersTest: test_callbacks
|
362
|
+
-------------------------------
|
363
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
364
|
+
[1m[35m (0.1ms)[0m BEGIN
|
365
|
+
----------------------------
|
366
|
+
ControllersTest: test_render
|
367
|
+
----------------------------
|
368
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
369
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
370
|
+
[1m[35m (0.2ms)[0m BEGIN
|
371
|
+
-------------------------------
|
372
|
+
RecordsTest: test_nilify_blanks
|
373
|
+
-------------------------------
|
374
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
375
|
+
[1m[35mSQL (0.5ms)[0m 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
|
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
64
|
-
[1m[
|
377
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
|
65
378
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
66
|
-
[1m[35m (0.
|
379
|
+
[1m[35m (0.1ms)[0m BEGIN
|
67
380
|
--------------------------
|
68
381
|
RecordsTest: test_validate
|
69
382
|
--------------------------
|
383
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
384
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
392
|
+
[1m[35m (0.1ms)[0m BEGIN
|
393
|
+
-------------------------------
|
394
|
+
ControllersTest: test_callbacks
|
395
|
+
-------------------------------
|
396
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
397
|
+
[1m[35m (0.1ms)[0m BEGIN
|
398
|
+
----------------------------
|
399
|
+
ControllersTest: test_render
|
400
|
+
----------------------------
|
401
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
402
|
+
[1m[35m (0.2ms)[0m BEGIN
|
403
|
+
--------------------------------
|
404
|
+
HelpersTest: test_content_tag_if
|
405
|
+
--------------------------------
|
70
406
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
407
|
+
[1m[35m (0.1ms)[0m BEGIN
|
408
|
+
------------------------------
|
409
|
+
HelpersTest: test_active_trail
|
410
|
+
------------------------------
|
411
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
412
|
+
[1m[35m (0.1ms)[0m BEGIN
|
413
|
+
---------------------------
|
414
|
+
HelpersTest: test_extending
|
415
|
+
---------------------------
|
416
|
+
Rendered layouts/application.html.erb (0.4ms)
|
417
|
+
Rendered layouts/market.html.erb (7.5ms)
|
418
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
419
|
+
[1m[35m (0.2ms)[0m BEGIN
|
420
|
+
--------------------------------
|
421
|
+
ValidationsTest: test_complexity
|
422
|
+
--------------------------------
|
423
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
424
|
+
[1m[35m (0.1ms)[0m BEGIN
|
425
|
+
-----------------------------
|
426
|
+
ValidationsTest: test_methods
|
427
|
+
-----------------------------
|
428
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
429
|
+
[1m[35m (0.1ms)[0m BEGIN
|
430
|
+
---------------------------
|
431
|
+
ValidationsTest: test_count
|
432
|
+
---------------------------
|
433
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
434
|
+
[1m[35m (0.1ms)[0m BEGIN
|
435
|
+
--------------------------
|
436
|
+
ValidationsTest: test_time
|
437
|
+
--------------------------
|
438
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|