knock 2.1 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/knock/authenticable.rb +4 -2
- data/lib/knock/version.rb +1 -1
- data/test/dummy/app/controllers/guest_protected_controller.rb +7 -0
- data/test/dummy/app/models/guest.rb +7 -0
- data/test/dummy/config/routes.rb +3 -4
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +283 -273
- data/test/dummy/test/controllers/guest_protected_controller_test.rb +22 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87269abf24c04590c0cfffd1739a46d65e6c1b64
|
4
|
+
data.tar.gz: 311bbb8d16129abe1c1a7bc3f38ea203caed5513
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b6f661d6d8d56c3f324edf2d0a408502903191693cb4348fa3db3c2a9f469910b5cca705d8dd77947faea9503d2ff9fc9c3e81c6bdce62c7ed6eec7a63eb83a
|
7
|
+
data.tar.gz: 5c18461c6303d19111b9ac0b88be2ec50d85a74b091b97a6890809ef06b6c03f202a612ef604d97af64ab3b15bc10e072ce7c32db735eab95d0b873f1e527131
|
data/lib/knock/authenticable.rb
CHANGED
@@ -24,8 +24,10 @@ module Knock::Authenticable
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def authenticate_entity(entity_name)
|
27
|
-
|
28
|
-
|
27
|
+
if token
|
28
|
+
entity_class = entity_name.camelize.constantize
|
29
|
+
send(:authenticate_for, entity_class)
|
30
|
+
end
|
29
31
|
end
|
30
32
|
|
31
33
|
def unauthorized_entity(entity_name)
|
data/lib/knock/version.rb
CHANGED
data/test/dummy/config/routes.rb
CHANGED
@@ -2,13 +2,12 @@ Rails.application.routes.draw do
|
|
2
2
|
post 'admin_token' => 'admin_token#create'
|
3
3
|
post 'vendor_token' => 'vendor_token#create'
|
4
4
|
|
5
|
-
resources :protected_resources
|
6
5
|
resource :current_user
|
7
6
|
|
8
7
|
resources :admin_protected
|
9
8
|
resources :composite_name_entity_protected
|
10
|
-
resources :vendor_protected
|
11
9
|
resources :custom_unauthorized_entity
|
12
|
-
|
13
|
-
|
10
|
+
resources :guest_protected
|
11
|
+
resources :protected_resources
|
12
|
+
resources :vendor_protected
|
14
13
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -1,68 +1,106 @@
|
|
1
|
-
[1m[35m (
|
2
|
-
[1m[35m (
|
3
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.
|
1
|
+
[1m[35m (6.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
2
|
+
[1m[35m (7.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
4
|
Migrating to CreateUsers (20150713101607)
|
5
|
-
[1m[35m (0.
|
6
|
-
[1m[35m (0.
|
7
|
-
[1m[35mSQL (0.
|
8
|
-
[1m[35m (
|
5
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
6
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar NOT NULL, "password_digest" varchar NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
7
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150713101607"]]
|
8
|
+
[1m[35m (1.9ms)[0m [1m[36mcommit transaction[0m
|
9
9
|
Migrating to CreateAdmins (20160519075733)
|
10
|
-
[1m[35m (0.
|
11
|
-
[1m[35m (0.
|
10
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
11
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "admins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
12
12
|
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160519075733"]]
|
13
|
-
[1m[35m (
|
13
|
+
[1m[35m (2.5ms)[0m [1m[36mcommit transaction[0m
|
14
14
|
Migrating to CreateVendors (20160522051816)
|
15
15
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
16
|
-
[1m[35m (0.
|
16
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "vendors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
17
17
|
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160522051816"]]
|
18
|
-
[1m[35m (
|
18
|
+
[1m[35m (2.0ms)[0m [1m[36mcommit transaction[0m
|
19
19
|
Migrating to CreateCompositeNameEntities (20160522181712)
|
20
|
-
[1m[35m (0.
|
21
|
-
[1m[35m (0.
|
22
|
-
[1m[35mSQL (0.
|
23
|
-
[1m[35m (2.
|
20
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
21
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "composite_name_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
22
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160522181712"]]
|
23
|
+
[1m[35m (2.7ms)[0m [1m[36mcommit transaction[0m
|
24
24
|
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", :environment], ["LIMIT", 1]]
|
25
25
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
26
|
-
[1m[35mSQL (0.
|
27
|
-
[1m[35m (
|
28
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.
|
26
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", 2017-02-11 01:43:35 UTC], ["updated_at", 2017-02-11 01:43:35 UTC]]
|
27
|
+
[1m[35m (3.5ms)[0m [1m[36mcommit transaction[0m
|
28
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
29
29
|
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30
30
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
31
31
|
[1m[36mFixture Delete (0.2ms)[0m [1m[31mDELETE FROM "admins"[0m
|
32
|
-
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('admin.one@example.net', '$2a$04$
|
32
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('admin.one@example.net', '$2a$04$Nor8ivXEVNclpP5BNzprY.cyr/.soQk41N.9EX1z7nxTw4IqCK4aS', '2017-02-11 01:43:38.576086', '2017-02-11 01:43:38.576086', 980190962)[0m
|
33
33
|
[1m[36mFixture Delete (0.1ms)[0m [1m[31mDELETE FROM "composite_name_entities"[0m
|
34
|
-
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "composite_name_entities" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('composite_name_entity.one@example.net', '$2a$04$
|
34
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "composite_name_entities" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('composite_name_entity.one@example.net', '$2a$04$bKDuvz4vfQV08qZvnaFZzeoWpjq8gbI0gTlInF.wgZkQMTg7NHqpm', '2017-02-11 01:43:38.580323', '2017-02-11 01:43:38.580323', 980190962)[0m
|
35
35
|
[1m[36mFixture Delete (0.1ms)[0m [1m[31mDELETE FROM "users"[0m
|
36
|
-
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('one@example.net', '$2a$04$
|
37
|
-
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('two@example.net', '$2a$04$
|
36
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('one@example.net', '$2a$04$mlvt9hqVLvETsjjb8x3cPOww72bh9MPvsvS.ST3BNdqxTzIxz8QE.', '2017-02-11 01:43:38.582199', '2017-02-11 01:43:38.582199', 980190962)[0m
|
37
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('two@example.net', '$2a$04$WqkWvVjZgddSv.hUWVZoo.6W1zKPoA0iAS3kACxjReu1OVIx4rkfq', '2017-02-11 01:43:38.582199', '2017-02-11 01:43:38.582199', 298486374)[0m
|
38
38
|
[1m[36mFixture Delete (0.1ms)[0m [1m[31mDELETE FROM "vendors"[0m
|
39
|
-
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "vendors" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('vendor.one@example.net', '$2a$04$
|
40
|
-
[1m[35m (
|
39
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "vendors" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('vendor.one@example.net', '$2a$04$y51Z3Dfd60qGMg5YQyTPmOGhYcP5aBFtyO2lsPnXh5AJrbXqS7PuK', '2017-02-11 01:43:38.584398', '2017-02-11 01:43:38.584398', 980190962)[0m
|
40
|
+
[1m[35m (2.3ms)[0m [1m[36mcommit transaction[0m
|
41
41
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
[1m[36mVendor Load (0.
|
46
|
-
Processing by
|
47
|
-
|
48
|
-
|
42
|
+
------------------------------------------------------------------------
|
43
|
+
VendorTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
44
|
+
------------------------------------------------------------------------
|
45
|
+
[1m[36mVendor Load (0.4ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
46
|
+
Processing by VendorTokenController#create as HTML
|
47
|
+
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
48
|
+
[1m[36mVendor Load (0.3ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "wrong@example.net"], ["LIMIT", 1]]
|
49
|
+
Completed 404 Not Found in 4ms (ActiveRecord: 0.3ms)
|
49
50
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
50
51
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
51
|
-
|
52
|
-
|
53
|
-
|
52
|
+
-------------------------------------------------
|
53
|
+
VendorTokenControllerTest: test_responds_with_201
|
54
|
+
-------------------------------------------------
|
54
55
|
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
55
|
-
Processing by
|
56
|
+
Processing by VendorTokenController#create as HTML
|
57
|
+
Parameters: {"auth"=>{"email"=>"vendor.one@example.net", "password"=>"[FILTERED]"}}
|
58
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "vendor.one@example.net"], ["LIMIT", 1]]
|
59
|
+
Completed 201 Created in 6ms (Views: 0.4ms | ActiveRecord: 0.1ms)
|
60
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
61
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
62
|
+
------------------------------------------------------------------------
|
63
|
+
VendorTokenControllerTest: test_responds_with_404_if_password_is_invalid
|
64
|
+
------------------------------------------------------------------------
|
56
65
|
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
57
|
-
|
66
|
+
Processing by VendorTokenController#create as HTML
|
67
|
+
Parameters: {"auth"=>{"email"=>"vendor.one@example.net", "password"=>"[FILTERED]"}}
|
68
|
+
[1m[36mVendor Load (0.2ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "vendor.one@example.net"], ["LIMIT", 1]]
|
69
|
+
Completed 404 Not Found in 3ms (ActiveRecord: 0.2ms)
|
58
70
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
59
71
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
Processing by
|
64
|
-
Filter chain halted as :
|
65
|
-
Completed
|
72
|
+
--------------------------------------------------------------------
|
73
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found
|
74
|
+
--------------------------------------------------------------------
|
75
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
76
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
77
|
+
Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)
|
78
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
79
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
80
|
+
-------------------------------------------------------------------------------------
|
81
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found_to_invalid_token
|
82
|
+
-------------------------------------------------------------------------------------
|
83
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
84
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
85
|
+
Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)
|
86
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
87
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
88
|
+
--------------------------------------------------------------------------------------
|
89
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found_to_invalid_entity
|
90
|
+
--------------------------------------------------------------------------------------
|
91
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
92
|
+
[1m[36mUser Load (0.3ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
93
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
94
|
+
Completed 404 Not Found in 3ms (ActiveRecord: 0.3ms)
|
95
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
96
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
97
|
+
-----------------------------------------------------------------------------------
|
98
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_success_if_authenticated
|
99
|
+
-----------------------------------------------------------------------------------
|
100
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
101
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
102
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
103
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
66
104
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
67
105
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
68
106
|
-----------------------------------------------------------------------------
|
@@ -70,7 +108,7 @@ VendorProtectedControllerTest: test_raises_method_missing_error_appropriately
|
|
70
108
|
-----------------------------------------------------------------------------
|
71
109
|
Processing by VendorProtectedController#show as HTML
|
72
110
|
Parameters: {"id"=>"1"}
|
73
|
-
Completed 500 Internal Server Error in
|
111
|
+
Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.0ms)
|
74
112
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
75
113
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
76
114
|
--------------------------------------------------------------------------------
|
@@ -79,77 +117,105 @@ VendorProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
|
79
117
|
Processing by VendorProtectedController#index as HTML
|
80
118
|
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
81
119
|
Filter chain halted as :authenticate_vendor rendered or redirected
|
82
|
-
Completed 401 Unauthorized in
|
120
|
+
Completed 401 Unauthorized in 8ms (ActiveRecord: 0.1ms)
|
121
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
122
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
123
|
+
-------------------------------------------------------------------------------
|
124
|
+
VendorProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
125
|
+
-------------------------------------------------------------------------------
|
126
|
+
Processing by VendorProtectedController#index as HTML
|
127
|
+
Filter chain halted as :authenticate_vendor rendered or redirected
|
128
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
129
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
130
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
131
|
+
-----------------------------------------------------------------------------
|
132
|
+
VendorProtectedControllerTest: test_has_a_current_vendor_after_authentication
|
133
|
+
-----------------------------------------------------------------------------
|
134
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
135
|
+
Processing by VendorProtectedController#index as HTML
|
136
|
+
[1m[36mVendor Load (0.0ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
137
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
138
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
139
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
140
|
+
--------------------------------------------------------------------------
|
141
|
+
VendorProtectedControllerTest: test_responds_with_success_if_authenticated
|
142
|
+
--------------------------------------------------------------------------
|
143
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
144
|
+
Processing by VendorProtectedController#index as HTML
|
145
|
+
[1m[36mVendor Load (0.0ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
146
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
83
147
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
84
148
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
85
149
|
--------------------------------------------------------------
|
86
150
|
VendorProtectedControllerTest: test_responds_with_unauthorized
|
87
151
|
--------------------------------------------------------------
|
88
152
|
Processing by VendorProtectedController#index as HTML
|
89
|
-
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
90
153
|
Filter chain halted as :authenticate_vendor rendered or redirected
|
91
|
-
Completed 401 Unauthorized in
|
154
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
92
155
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
93
156
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
Processing by
|
98
|
-
|
99
|
-
|
100
|
-
Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms)
|
157
|
+
-------------------------------------------------------------
|
158
|
+
AdminProtectedControllerTest: test_responds_with_unauthorized
|
159
|
+
-------------------------------------------------------------
|
160
|
+
Processing by AdminProtectedController#index as HTML
|
161
|
+
Filter chain halted as :authenticate_admin rendered or redirected
|
162
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
101
163
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
102
|
-
[1m[35m (0.
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
Completed
|
164
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
165
|
+
-------------------------------------------------------------------------------
|
166
|
+
AdminProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
167
|
+
-------------------------------------------------------------------------------
|
168
|
+
Processing by AdminProtectedController#index as HTML
|
169
|
+
[1m[36mAdmin Load (0.2ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
170
|
+
Filter chain halted as :authenticate_admin rendered or redirected
|
171
|
+
Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms)
|
110
172
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
111
|
-
[1m[35m (0.
|
173
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
174
|
+
------------------------------------------------------------------------------
|
175
|
+
AdminProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
176
|
+
------------------------------------------------------------------------------
|
177
|
+
Processing by AdminProtectedController#index as HTML
|
178
|
+
Filter chain halted as :authenticate_admin rendered or redirected
|
179
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
180
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
181
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
112
182
|
---------------------------------------------------------------------------
|
113
|
-
|
183
|
+
AdminProtectedControllerTest: test_has_a_current_admin_after_authentication
|
114
184
|
---------------------------------------------------------------------------
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
Completed
|
119
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
120
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
121
|
-
--------------------------------------------------------------------------------------------
|
122
|
-
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
123
|
-
--------------------------------------------------------------------------------------------
|
124
|
-
Processing by CompositeNameEntityProtectedController#index as HTML
|
125
|
-
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
126
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
185
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
186
|
+
Processing by AdminProtectedController#index as HTML
|
187
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
188
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
127
189
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
128
190
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
[1m[
|
133
|
-
Processing by
|
134
|
-
[1m[
|
191
|
+
-------------------------------------------------------------------------
|
192
|
+
AdminProtectedControllerTest: test_responds_with_success_if_authenticated
|
193
|
+
-------------------------------------------------------------------------
|
194
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
195
|
+
Processing by AdminProtectedController#index as HTML
|
196
|
+
[1m[36mAdmin Load (0.0ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
135
197
|
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
136
198
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
137
199
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
138
|
-
------------------------------------------------------------------------
|
139
|
-
TokenControllerGeneratorTest: test_assert_all_files_are_properly_created
|
140
|
-
------------------------------------------------------------------------
|
141
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
142
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
143
200
|
------------------------------------------------------------------------------
|
144
201
|
ProtectedResourcesControllerTest: test_responds_with_success_with_token_in_url
|
145
202
|
------------------------------------------------------------------------------
|
146
|
-
[1m[36mUser Load (0.
|
203
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
147
204
|
Processing by ProtectedResourcesController#index as HTML
|
148
|
-
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
|
205
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0ODY4NjM4MTgsInN1YiI6OTgwMTkwOTYyfQ.fD4eDhHzI9v5ED7-7ASNDYGEZ4XXKTKS7IxKwf1SyV4"}
|
206
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
207
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
208
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
209
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
210
|
+
------------------------------------------------------------------------------
|
211
|
+
ProtectedResourcesControllerTest: test_has_a_current_user_after_authentication
|
212
|
+
------------------------------------------------------------------------------
|
149
213
|
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
150
|
-
|
214
|
+
Processing by ProtectedResourcesController#index as HTML
|
215
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
216
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
151
217
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
152
|
-
[1m[35m (0.
|
218
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
153
219
|
---------------------------------------------------------------------------------------
|
154
220
|
ProtectedResourcesControllerTest: test_responds_with_success_with_valid_token_in_header
|
155
221
|
---------------------------------------------------------------------------------------
|
@@ -157,42 +223,31 @@ ProtectedResourcesControllerTest: test_responds_with_success_with_valid_token_in
|
|
157
223
|
Processing by ProtectedResourcesController#index as HTML
|
158
224
|
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
159
225
|
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
160
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
161
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
162
|
-
-----------------------------------------------------------------
|
163
|
-
ProtectedResourcesControllerTest: test_responds_with_unauthorized
|
164
|
-
-----------------------------------------------------------------
|
165
|
-
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
166
|
-
Processing by ProtectedResourcesController#index as HTML
|
167
|
-
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
168
|
-
Filter chain halted as :authenticate_user rendered or redirected
|
169
|
-
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms)
|
170
226
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
171
227
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
172
228
|
-------------------------------------------------------------------------------------
|
173
229
|
ProtectedResourcesControllerTest: test_accepts_any_prefix_in_the_authorization_header
|
174
230
|
-------------------------------------------------------------------------------------
|
175
231
|
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
176
|
-
Processing by ProtectedResourcesController#index as HTML
|
177
|
-
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
178
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
179
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
180
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
181
|
-
------------------------------------------------------------------------------
|
182
|
-
ProtectedResourcesControllerTest: test_has_a_current_user_after_authentication
|
183
|
-
------------------------------------------------------------------------------
|
184
|
-
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
185
232
|
Processing by ProtectedResourcesController#index as HTML
|
186
233
|
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
187
234
|
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
188
235
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
189
236
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
190
|
-
|
191
|
-
ProtectedResourcesControllerTest:
|
192
|
-
|
237
|
+
-----------------------------------------------------------------
|
238
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized
|
239
|
+
-----------------------------------------------------------------
|
240
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
241
|
+
Processing by ProtectedResourcesController#index as HTML
|
242
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
243
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
244
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
245
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
246
|
+
----------------------------------------------------------------------------------------------
|
247
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized_with_invalid_token_in_header
|
248
|
+
----------------------------------------------------------------------------------------------
|
193
249
|
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
194
250
|
Processing by ProtectedResourcesController#index as HTML
|
195
|
-
Parameters: {"token"=>"invalid"}
|
196
251
|
Filter chain halted as :authenticate_user rendered or redirected
|
197
252
|
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
198
253
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
@@ -206,43 +261,19 @@ Processing by ProtectedResourcesController#index as HTML
|
|
206
261
|
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
207
262
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
208
263
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
209
|
-
|
210
|
-
ProtectedResourcesControllerTest:
|
211
|
-
|
264
|
+
-------------------------------------------------------------------------------------------
|
265
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized_with_invalid_token_in_url
|
266
|
+
-------------------------------------------------------------------------------------------
|
212
267
|
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
213
268
|
Processing by ProtectedResourcesController#index as HTML
|
269
|
+
Parameters: {"token"=>"invalid"}
|
214
270
|
Filter chain halted as :authenticate_user rendered or redirected
|
215
271
|
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
216
272
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
217
273
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
218
|
-
-------------------------------------------------
|
219
|
-
VendorTokenControllerTest: test_responds_with_201
|
220
|
-
-------------------------------------------------
|
221
|
-
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
222
|
-
Processing by VendorTokenController#create as HTML
|
223
|
-
Parameters: {"auth"=>{"email"=>"vendor.one@example.net", "password"=>"[FILTERED]"}}
|
224
|
-
[1m[36mVendor Load (0.2ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "vendor.one@example.net"], ["LIMIT", 1]]
|
225
|
-
Completed 201 Created in 4ms (Views: 0.3ms | ActiveRecord: 0.2ms)
|
226
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
227
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
228
274
|
------------------------------------------------------------------------
|
229
|
-
|
230
|
-
------------------------------------------------------------------------
|
231
|
-
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
232
|
-
Processing by VendorTokenController#create as HTML
|
233
|
-
Parameters: {"auth"=>{"email"=>"vendor.one@example.net", "password"=>"[FILTERED]"}}
|
234
|
-
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "vendor.one@example.net"], ["LIMIT", 1]]
|
235
|
-
Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)
|
236
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
237
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
238
|
-
------------------------------------------------------------------------
|
239
|
-
VendorTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
275
|
+
TokenControllerGeneratorTest: test_assert_all_files_are_properly_created
|
240
276
|
------------------------------------------------------------------------
|
241
|
-
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
242
|
-
Processing by VendorTokenController#create as HTML
|
243
|
-
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
244
|
-
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "wrong@example.net"], ["LIMIT", 1]]
|
245
|
-
Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
|
246
277
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
247
278
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
248
279
|
------------------------------------------------
|
@@ -251,10 +282,10 @@ AdminTokenControllerTest: test_responds_with_201
|
|
251
282
|
[1m[36mAdmin Load (0.2ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
252
283
|
Processing by AdminTokenController#create as HTML
|
253
284
|
Parameters: {"auth"=>{"email"=>"admin.one@example.net", "password"=>"[FILTERED]"}}
|
254
|
-
[1m[36mAdmin Load (0.
|
255
|
-
Completed 201 Created in 3ms (Views: 0.
|
285
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."email" = ? LIMIT ?[0m [["email", "admin.one@example.net"], ["LIMIT", 1]]
|
286
|
+
Completed 201 Created in 3ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
256
287
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
257
|
-
[1m[35m (0.
|
288
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
258
289
|
-----------------------------------------------------------------------
|
259
290
|
AdminTokenControllerTest: test_responds_with_404_if_password_is_invalid
|
260
291
|
-----------------------------------------------------------------------
|
@@ -264,146 +295,83 @@ Processing by AdminTokenController#create as HTML
|
|
264
295
|
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."email" = ? LIMIT ?[0m [["email", "admin.one@example.net"], ["LIMIT", 1]]
|
265
296
|
Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)
|
266
297
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
267
|
-
[1m[35m (0.
|
298
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
268
299
|
-----------------------------------------------------------------------
|
269
300
|
AdminTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
270
301
|
-----------------------------------------------------------------------
|
271
302
|
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
272
303
|
Processing by AdminTokenController#create as HTML
|
273
304
|
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
274
|
-
[1m[36mAdmin Load (0.
|
275
|
-
Completed 404 Not Found in 0ms (ActiveRecord: 0.
|
305
|
+
[1m[36mAdmin Load (0.0ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."email" = ? LIMIT ?[0m [["email", "wrong@example.net"], ["LIMIT", 1]]
|
306
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
276
307
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
277
308
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
[1m[
|
282
|
-
Processing by
|
283
|
-
[1m[
|
309
|
+
---------------------------------------------------------------------------------------
|
310
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_success_if_authenticated
|
311
|
+
---------------------------------------------------------------------------------------
|
312
|
+
[1m[36mCompositeNameEntity Load (0.2ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
313
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
314
|
+
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
284
315
|
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
285
316
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
286
317
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
Completed
|
294
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
295
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
296
|
-
---------------------------------------------------------------------------
|
297
|
-
CurrentUsersControllerTest: test_responds_with_404_if_user_is_not_logged_in
|
298
|
-
---------------------------------------------------------------------------
|
299
|
-
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
300
|
-
Processing by CurrentUsersController#show as HTML
|
301
|
-
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
302
|
-
Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)
|
303
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
304
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
305
|
-
----------------------------------------------------------------
|
306
|
-
InstallGeneratorTest: test_Assert_all_files_are_properly_created
|
307
|
-
----------------------------------------------------------------
|
308
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
309
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
310
|
-
--------------------------------------------------------------------
|
311
|
-
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found
|
312
|
-
--------------------------------------------------------------------
|
313
|
-
Processing by CustomUnauthorizedEntityController#index as HTML
|
314
|
-
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
315
|
-
Filter chain halted as :authenticate_user rendered or redirected
|
316
|
-
Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
|
317
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
318
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
319
|
-
--------------------------------------------------------------------------------------
|
320
|
-
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found_to_invalid_entity
|
321
|
-
--------------------------------------------------------------------------------------
|
322
|
-
Processing by CustomUnauthorizedEntityController#index as HTML
|
323
|
-
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
324
|
-
Filter chain halted as :authenticate_user rendered or redirected
|
325
|
-
Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
|
318
|
+
---------------------------------------------------------------------------------------------
|
319
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
320
|
+
---------------------------------------------------------------------------------------------
|
321
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
322
|
+
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
323
|
+
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
324
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
326
325
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
327
326
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
Processing by
|
332
|
-
Filter chain halted as :
|
333
|
-
Completed
|
334
|
-
[1m[35m (0.
|
327
|
+
--------------------------------------------------------------------------------------------
|
328
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
329
|
+
--------------------------------------------------------------------------------------------
|
330
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
331
|
+
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
332
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
333
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
335
334
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
[1m[
|
340
|
-
Processing by
|
341
|
-
[1m[
|
335
|
+
---------------------------------------------------------------------------------------------------------
|
336
|
+
CompositeNameEntityProtectedControllerTest: test_has_a_current_composite_name_entity_after_authentication
|
337
|
+
---------------------------------------------------------------------------------------------------------
|
338
|
+
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
339
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
340
|
+
[1m[36mCompositeNameEntity Load (0.0ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
342
341
|
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
343
342
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
344
|
-
[1m[35m (0.
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
Processing by
|
349
|
-
Filter chain halted as :
|
350
|
-
Completed 401 Unauthorized in
|
343
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
344
|
+
---------------------------------------------------------------------------
|
345
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized
|
346
|
+
---------------------------------------------------------------------------
|
347
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
348
|
+
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
349
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
351
350
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
352
351
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
357
|
-
Processing by AdminProtectedController#index as HTML
|
358
|
-
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
359
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
352
|
+
----------------------------------------------------
|
353
|
+
Knock::AuthTokenTest: test_decode_RSA_encoded_tokens
|
354
|
+
----------------------------------------------------
|
360
355
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
361
356
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
Processing by AdminProtectedController#index as HTML
|
366
|
-
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
367
|
-
Filter chain halted as :authenticate_admin rendered or redirected
|
368
|
-
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
369
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
370
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
371
|
-
-------------------------------------------------------------------------------
|
372
|
-
AdminProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
373
|
-
-------------------------------------------------------------------------------
|
374
|
-
Processing by AdminProtectedController#index as HTML
|
375
|
-
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
376
|
-
Filter chain halted as :authenticate_admin rendered or redirected
|
377
|
-
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
378
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
379
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
380
|
-
---------------------------------------------------------------------------
|
381
|
-
AdminProtectedControllerTest: test_has_a_current_admin_after_authentication
|
382
|
-
---------------------------------------------------------------------------
|
383
|
-
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
384
|
-
Processing by AdminProtectedController#index as HTML
|
385
|
-
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
386
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
357
|
+
------------------------------------------------------------------------------------------
|
358
|
+
Knock::AuthTokenTest: test_does_not_validate_aud_when_verify_options[:verify_aud]_is_false
|
359
|
+
------------------------------------------------------------------------------------------
|
387
360
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
388
361
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
389
|
-
|
390
|
-
Knock::AuthTokenTest:
|
391
|
-
|
362
|
+
---------------------------------------------------------------
|
363
|
+
Knock::AuthTokenTest: test_validate_expiration_claim_by_default
|
364
|
+
---------------------------------------------------------------
|
392
365
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
393
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
394
|
-
-------------------------------------------------------------------------
|
395
|
-
Knock::AuthTokenTest: test_verify_audience_when_token_audience_is_present
|
396
|
-
-------------------------------------------------------------------------
|
397
|
-
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
398
366
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
399
367
|
--------------------------------------------------------------------------------------------------------
|
400
368
|
Knock::AuthTokenTest: test_does_not_validate_expiration_when_verify_options[:verify_expiration]_is_false
|
401
369
|
--------------------------------------------------------------------------------------------------------
|
402
370
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
403
|
-
[1m[35m (0.
|
404
|
-
|
405
|
-
Knock::AuthTokenTest:
|
406
|
-
|
371
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
372
|
+
--------------------------------------------------------------------------------
|
373
|
+
Knock::AuthTokenTest: test_validate_aud_when_verify_options[:verify_aud]_is_true
|
374
|
+
--------------------------------------------------------------------------------
|
407
375
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
408
376
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
409
377
|
----------------------------------------------------------------------------------------------
|
@@ -411,26 +379,26 @@ Knock::AuthTokenTest: test_validate_expiration_when_verify_options[:verify_expir
|
|
411
379
|
----------------------------------------------------------------------------------------------
|
412
380
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
413
381
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
414
|
-
------------------------------------------------------------
|
415
|
-
Knock::AuthTokenTest: test_Knock::AuthToken_has_all_payloads
|
416
|
-
------------------------------------------------------------
|
417
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
418
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
419
|
-
------------------------------------------------------------------------------------------
|
420
|
-
Knock::AuthTokenTest: test_does_not_validate_aud_when_verify_options[:verify_aud]_is_false
|
421
|
-
------------------------------------------------------------------------------------------
|
422
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
423
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
424
382
|
-------------------------------------------
|
425
383
|
Knock::AuthTokenTest: test_verify_algorithm
|
426
384
|
-------------------------------------------
|
427
385
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
428
386
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
387
|
+
-------------------------------------------------------------------------
|
388
|
+
Knock::AuthTokenTest: test_verify_audience_when_token_audience_is_present
|
389
|
+
-------------------------------------------------------------------------
|
390
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
391
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
429
392
|
---------------------------------------------------------------------------------------
|
430
393
|
Knock::AuthTokenTest: test_does_not_validate_expiration_claim_with_a_nil_token_lifetime
|
431
394
|
---------------------------------------------------------------------------------------
|
432
395
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
433
396
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
397
|
+
------------------------------------------------------------
|
398
|
+
Knock::AuthTokenTest: test_Knock::AuthToken_has_all_payloads
|
399
|
+
------------------------------------------------------------
|
400
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
401
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
434
402
|
-------------------------------------------------
|
435
403
|
Knock::AuthTokenTest: test_encode_tokens_with_RSA
|
436
404
|
-------------------------------------------------
|
@@ -441,12 +409,54 @@ Knock::AuthTokenTest: test_is_serializable
|
|
441
409
|
------------------------------------------
|
442
410
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
443
411
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
444
|
-
---------------------------------------------------------------
|
445
|
-
Knock::AuthTokenTest: test_validate_expiration_claim_by_default
|
446
|
-
---------------------------------------------------------------
|
447
|
-
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
448
|
-
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
449
412
|
---------------------------------------
|
450
413
|
KnockTest: test_setup_block_yields_self
|
451
414
|
---------------------------------------
|
415
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
416
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
417
|
+
-----------------------------------------------------
|
418
|
+
CurrentUsersControllerTest: test_responds_with_200_#2
|
419
|
+
-----------------------------------------------------
|
420
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
421
|
+
Processing by CurrentUsersController#show as HTML
|
422
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
423
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
424
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
425
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
426
|
+
---------------------------------------------------------------------------
|
427
|
+
CurrentUsersControllerTest: test_responds_with_404_if_user_is_not_logged_in
|
428
|
+
---------------------------------------------------------------------------
|
429
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
430
|
+
Processing by CurrentUsersController#show as HTML
|
431
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
432
|
+
Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
|
433
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
434
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
435
|
+
--------------------------------------------------
|
436
|
+
CurrentUsersControllerTest: test_responds_with_200
|
437
|
+
--------------------------------------------------
|
438
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
439
|
+
Processing by CurrentUsersController#show as HTML
|
440
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
441
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
442
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
443
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
444
|
+
----------------------------------------------------------------
|
445
|
+
InstallGeneratorTest: test_Assert_all_files_are_properly_created
|
446
|
+
----------------------------------------------------------------
|
447
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
448
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
449
|
+
---------------------------------------------------------------------------------------
|
450
|
+
GuestProtectedControllerTest: test_responds_with_unauthorized_when_no_token_is_provided
|
451
|
+
---------------------------------------------------------------------------------------
|
452
|
+
Processing by GuestProtectedController#index as HTML
|
453
|
+
Filter chain halted as :authenticate_guest rendered or redirected
|
454
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
455
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
456
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
457
|
+
-----------------------------------------------------------------------------------------
|
458
|
+
GuestProtectedControllerTest: test_responds_with_success_with_a_valid_token_in_the_header
|
459
|
+
-----------------------------------------------------------------------------------------
|
460
|
+
Processing by GuestProtectedController#index as HTML
|
461
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
452
462
|
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class GuestProtectedControllerTest < ActionController::TestCase
|
4
|
+
def setup
|
5
|
+
@token = Knock::AuthToken.new(payload: { sub: "1" }).token
|
6
|
+
end
|
7
|
+
|
8
|
+
def authenticate token: @token
|
9
|
+
@request.env['HTTP_AUTHORIZATION'] = "Bearer #{token}"
|
10
|
+
end
|
11
|
+
|
12
|
+
test "responds with unauthorized when no token is provided" do
|
13
|
+
get :index
|
14
|
+
assert_response :unauthorized
|
15
|
+
end
|
16
|
+
|
17
|
+
test "responds with success with a valid token in the header" do
|
18
|
+
authenticate
|
19
|
+
get :index
|
20
|
+
assert_response :success
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud MESUREUR
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-02-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -113,12 +113,14 @@ files:
|
|
113
113
|
- test/dummy/app/controllers/composite_name_entity_protected_controller.rb
|
114
114
|
- test/dummy/app/controllers/current_users_controller.rb
|
115
115
|
- test/dummy/app/controllers/custom_unauthorized_entity_controller.rb
|
116
|
+
- test/dummy/app/controllers/guest_protected_controller.rb
|
116
117
|
- test/dummy/app/controllers/protected_resources_controller.rb
|
117
118
|
- test/dummy/app/controllers/vendor_protected_controller.rb
|
118
119
|
- test/dummy/app/controllers/vendor_token_controller.rb
|
119
120
|
- test/dummy/app/helpers/application_helper.rb
|
120
121
|
- test/dummy/app/models/admin.rb
|
121
122
|
- test/dummy/app/models/composite_name_entity.rb
|
123
|
+
- test/dummy/app/models/guest.rb
|
122
124
|
- test/dummy/app/models/user.rb
|
123
125
|
- test/dummy/app/models/vendor.rb
|
124
126
|
- test/dummy/app/views/layouts/application.html.erb
|
@@ -162,6 +164,7 @@ files:
|
|
162
164
|
- test/dummy/test/controllers/composite_name_entity_protected_controller_test.rb
|
163
165
|
- test/dummy/test/controllers/current_users_controller_test.rb
|
164
166
|
- test/dummy/test/controllers/custom_unauthorized_entity_controller_test.rb
|
167
|
+
- test/dummy/test/controllers/guest_protected_controller_test.rb
|
165
168
|
- test/dummy/test/controllers/protected_resources_controller_test.rb
|
166
169
|
- test/dummy/test/controllers/vendor_protected_controller_test.rb
|
167
170
|
- test/dummy/test/controllers/vendor_token_controller_test.rb
|
@@ -214,12 +217,14 @@ test_files:
|
|
214
217
|
- test/dummy/app/controllers/composite_name_entity_protected_controller.rb
|
215
218
|
- test/dummy/app/controllers/current_users_controller.rb
|
216
219
|
- test/dummy/app/controllers/custom_unauthorized_entity_controller.rb
|
220
|
+
- test/dummy/app/controllers/guest_protected_controller.rb
|
217
221
|
- test/dummy/app/controllers/protected_resources_controller.rb
|
218
222
|
- test/dummy/app/controllers/vendor_protected_controller.rb
|
219
223
|
- test/dummy/app/controllers/vendor_token_controller.rb
|
220
224
|
- test/dummy/app/helpers/application_helper.rb
|
221
225
|
- test/dummy/app/models/admin.rb
|
222
226
|
- test/dummy/app/models/composite_name_entity.rb
|
227
|
+
- test/dummy/app/models/guest.rb
|
223
228
|
- test/dummy/app/models/user.rb
|
224
229
|
- test/dummy/app/models/vendor.rb
|
225
230
|
- test/dummy/app/views/layouts/application.html.erb
|
@@ -263,6 +268,7 @@ test_files:
|
|
263
268
|
- test/dummy/test/controllers/composite_name_entity_protected_controller_test.rb
|
264
269
|
- test/dummy/test/controllers/current_users_controller_test.rb
|
265
270
|
- test/dummy/test/controllers/custom_unauthorized_entity_controller_test.rb
|
271
|
+
- test/dummy/test/controllers/guest_protected_controller_test.rb
|
266
272
|
- test/dummy/test/controllers/protected_resources_controller_test.rb
|
267
273
|
- test/dummy/test/controllers/vendor_protected_controller_test.rb
|
268
274
|
- test/dummy/test/controllers/vendor_token_controller_test.rb
|