pundit-matchers 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pundit/matchers.rb +28 -28
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 641ea95570e02c1afd85001023242ff59b363e78
|
4
|
+
data.tar.gz: dcbca06d54b69c95faaec2f9df13e266dd44375f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ad50adae39b364ac80520e59afdfda56165ff6d21410f2153d8362a856fedc1e2d32fe42e838210e80e3d59d9f3954d7f0176eb8a49c7f5cb731aa9501e6446
|
7
|
+
data.tar.gz: 685d0b7571579ab06b7e8e9ad70b014534a15d0ccac22813098090da96d76450fcddf1534a75da906b2a6635421bc598b6aad8886ce02be434a8be34243e9de5
|
data/lib/pundit/matchers.rb
CHANGED
@@ -12,12 +12,12 @@ module Pundit
|
|
12
12
|
end
|
13
13
|
|
14
14
|
failure_message do |policy|
|
15
|
-
"#{policy.class} does not forbid #{action}
|
15
|
+
"#{policy.class} does not forbid #{action} for " \
|
16
16
|
"#{policy.user.inspect}."
|
17
17
|
end
|
18
18
|
|
19
19
|
failure_message_when_negated do |policy|
|
20
|
-
"#{policy.class} does not permit #{action}
|
20
|
+
"#{policy.class} does not permit #{action} for " \
|
21
21
|
"#{policy.user.inspect}."
|
22
22
|
end
|
23
23
|
end
|
@@ -46,8 +46,8 @@ module Pundit
|
|
46
46
|
when 1
|
47
47
|
one_action_failure_message
|
48
48
|
else
|
49
|
-
"#{policy.class} does not forbid #{actions}
|
50
|
-
"
|
49
|
+
"#{policy.class} does not forbid #{actions} for " \
|
50
|
+
"#{policy.user.inspect}."
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
@@ -58,8 +58,8 @@ module Pundit
|
|
58
58
|
when 1
|
59
59
|
one_action_failure_message
|
60
60
|
else
|
61
|
-
"#{policy.class} does not permit #{actions}
|
62
|
-
"
|
61
|
+
"#{policy.class} does not permit #{actions} for " \
|
62
|
+
"#{policy.user.inspect}."
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
@@ -70,13 +70,13 @@ module Pundit
|
|
70
70
|
end
|
71
71
|
|
72
72
|
failure_message do |policy|
|
73
|
-
"#{policy.class} does not forbid the edit or update action
|
74
|
-
"#{policy.
|
73
|
+
"#{policy.class} does not forbid the edit or update action for " \
|
74
|
+
"#{policy.user.inspect}."
|
75
75
|
end
|
76
76
|
|
77
77
|
failure_message_when_negated do |policy|
|
78
|
-
"#{policy.class} does not permit the edit or update action
|
79
|
-
"#{policy.
|
78
|
+
"#{policy.class} does not permit the edit or update action for " \
|
79
|
+
"#{policy.user.inspect}."
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -122,13 +122,13 @@ module Pundit
|
|
122
122
|
end
|
123
123
|
|
124
124
|
failure_message do |policy|
|
125
|
-
"#{policy.class} does not forbid the new or create action
|
126
|
-
"#{policy.
|
125
|
+
"#{policy.class} does not forbid the new or create action for " \
|
126
|
+
"#{policy.user.inspect}."
|
127
127
|
end
|
128
128
|
|
129
129
|
failure_message_when_negated do |policy|
|
130
|
-
"#{policy.class} does not permit the new or create action
|
131
|
-
"#{policy.
|
130
|
+
"#{policy.class} does not permit the new or create action for " \
|
131
|
+
"#{policy.user.inspect}."
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
@@ -142,12 +142,12 @@ module Pundit
|
|
142
142
|
end
|
143
143
|
|
144
144
|
failure_message do |policy|
|
145
|
-
"#{policy.class} does not permit #{action}
|
145
|
+
"#{policy.class} does not permit #{action} for " \
|
146
146
|
"#{policy.user.inspect}."
|
147
147
|
end
|
148
148
|
|
149
149
|
failure_message_when_negated do |policy|
|
150
|
-
"#{policy.class} does not forbid #{action}
|
150
|
+
"#{policy.class} does not forbid #{action} for " \
|
151
151
|
"#{policy.user.inspect}."
|
152
152
|
end
|
153
153
|
end
|
@@ -175,8 +175,8 @@ module Pundit
|
|
175
175
|
when 1
|
176
176
|
one_action_failure_message
|
177
177
|
else
|
178
|
-
"#{policy.class} does not permit #{actions}
|
179
|
-
"
|
178
|
+
"#{policy.class} does not permit #{actions} for " \
|
179
|
+
"#{policy.user.inspect}."
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
@@ -187,8 +187,8 @@ module Pundit
|
|
187
187
|
when 1
|
188
188
|
one_action_failure_message
|
189
189
|
else
|
190
|
-
"#{policy.class} does not forbid #{actions}
|
191
|
-
"
|
190
|
+
"#{policy.class} does not forbid #{actions} for " \
|
191
|
+
"#{policy.user.inspect}."
|
192
192
|
end
|
193
193
|
end
|
194
194
|
end
|
@@ -199,13 +199,13 @@ module Pundit
|
|
199
199
|
end
|
200
200
|
|
201
201
|
failure_message do |policy|
|
202
|
-
"#{policy.class} does not permit the edit or update action
|
203
|
-
"#{policy.
|
202
|
+
"#{policy.class} does not permit the edit or update action for " \
|
203
|
+
"#{policy.user.inspect}."
|
204
204
|
end
|
205
205
|
|
206
206
|
failure_message_when_negated do |policy|
|
207
|
-
"#{policy.class} does not forbid the edit or update action
|
208
|
-
"#{policy.
|
207
|
+
"#{policy.class} does not forbid the edit or update action for " \
|
208
|
+
"#{policy.user.inspect}."
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
@@ -251,13 +251,13 @@ module Pundit
|
|
251
251
|
end
|
252
252
|
|
253
253
|
failure_message do |policy|
|
254
|
-
"#{policy.class} does not permit the new or create action
|
255
|
-
"#{policy.
|
254
|
+
"#{policy.class} does not permit the new or create action for " \
|
255
|
+
"#{policy.user.inspect}."
|
256
256
|
end
|
257
257
|
|
258
258
|
failure_message_when_negated do |policy|
|
259
|
-
"#{policy.class} does not forbid the new or create action
|
260
|
-
"#{policy.
|
259
|
+
"#{policy.class} does not forbid the new or create action for " \
|
260
|
+
"#{policy.user.inspect}."
|
261
261
|
end
|
262
262
|
end
|
263
263
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pundit-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Alley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pundit
|