pundit-matchers 3.1.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ce1e0e0fa90468774d5a482fd4d715af3e40b6e4a4fc6360f19c009d21d04a8
4
- data.tar.gz: 463cb245dfd0a68f5c106e92248ff320fb7ef95d826cdf1a0111b3bddd0ba8bd
3
+ metadata.gz: 036d5ac0d690ecb8d0326ba5760d48479a66bc22ed1571463b9873c7fff08377
4
+ data.tar.gz: ed218146650c6603efbc5f63e58dd7b07a9aa57b0c2012597f1b17f194d4349e
5
5
  SHA512:
6
- metadata.gz: 7ebb5b5df0c13cb1bc0fa8a150c0f6a34cae3719bebd9ff11bdec03f30304678e1101e393c7e7b3a47a3efa83b0169732e96efe929c8c23d79682dd537f72c8d
7
- data.tar.gz: 25026769eeb8f12294babbbecd5efcff201d7a648b843d4b71b8a49d8da19b88c18f7cc0298e10e95f9dd0e36fc1209824a650aa338904704dcd4bcb121b24a7
6
+ metadata.gz: 2acfbcb28c1cca1b7a74bb83c440b9e35485371c42e56933b017eba4bfb373496ae282b55acbeaad12e47508efaf9cff420645bfc4fcd1499349460f63225342
7
+ data.tar.gz: bd8c0544919cfc0ffad981a35ada355cf5937de17e8f68bb8a280039d3bb9fd1c770abf834490a02122292c30de6a2b5df62604e12acf49c86bfb80f427309df
@@ -34,7 +34,7 @@ module Pundit
34
34
  #
35
35
  # @return [String] Failure message.
36
36
  def failure_message
37
- message = +"expected '#{policy_info}' to forbid all actions,"
37
+ message = "expected '#{policy_info}' to forbid all actions,"
38
38
  message << " but permitted #{policy_info.permitted_actions}"
39
39
  message << user_message
40
40
  end
@@ -38,7 +38,7 @@ module Pundit
38
38
  #
39
39
  # @return [String] A failure message when the expected actions and the forbidden actions do not match.
40
40
  def failure_message
41
- message = +"expected '#{policy_info}' to forbid only #{expected_actions},"
41
+ message = "expected '#{policy_info}' to forbid only #{expected_actions},"
42
42
  message << " but forbade #{actual_actions}" unless actual_actions.empty?
43
43
  message << extra_message unless extra_actions.empty?
44
44
  message << user_message
@@ -47,7 +47,7 @@ module Pundit
47
47
  #
48
48
  # @return [String] A failure message when the expected actions are not forbidden.
49
49
  def failure_message
50
- message = +"expected '#{policy_info}' to permit #{expected_actions},"
50
+ message = "expected '#{policy_info}' to permit #{expected_actions},"
51
51
  message << " but forbade #{actual_actions}"
52
52
  message << user_message
53
53
  end
@@ -56,7 +56,7 @@ module Pundit
56
56
  #
57
57
  # @return [String] A failure message when the expected actions are permitted.
58
58
  def failure_message_when_negated
59
- message = +"expected '#{policy_info}' to forbid #{expected_actions},"
59
+ message = "expected '#{policy_info}' to forbid #{expected_actions},"
60
60
  message << " but permitted #{actual_actions}"
61
61
  message << user_message
62
62
  end
@@ -34,7 +34,7 @@ module Pundit
34
34
  #
35
35
  # @return [String] A failure message when the policy does not permit all actions.
36
36
  def failure_message
37
- message = +"expected '#{policy_info}' to permit all actions,"
37
+ message = "expected '#{policy_info}' to permit all actions,"
38
38
  message << " but forbade #{policy_info.forbidden_actions}"
39
39
  message << user_message
40
40
  end
@@ -41,7 +41,7 @@ module Pundit
41
41
  #
42
42
  # @return [String] A failure message when the expected attributes are not permitted.
43
43
  def failure_message
44
- message = +"expected '#{policy_info}' to permit the mass assignment of #{expected_attributes}"
44
+ message = "expected '#{policy_info}' to permit the mass assignment of #{expected_attributes}"
45
45
  message << action_message if options.key?(:action)
46
46
  message << ", but forbade the mass assignment of #{actual_attributes}"
47
47
  message << user_message
@@ -51,7 +51,7 @@ module Pundit
51
51
  #
52
52
  # @return [String] A failure message when the expected attributes are forbidden.
53
53
  def failure_message_when_negated
54
- message = +"expected '#{policy_info}' to forbid the mass assignment of #{expected_attributes}"
54
+ message = "expected '#{policy_info}' to forbid the mass assignment of #{expected_attributes}"
55
55
  message << action_message if options.key?(:action)
56
56
  message << ", but permitted the mass assignment of #{actual_attributes}"
57
57
  message << user_message
@@ -38,7 +38,7 @@ module Pundit
38
38
  #
39
39
  # @return [String] A failure message when the expected actions and the permitted actions do not match.
40
40
  def failure_message
41
- message = +"expected '#{policy_info}' to permit only #{expected_actions},"
41
+ message = "expected '#{policy_info}' to permit only #{expected_actions},"
42
42
  message << " but permitted #{actual_actions}" unless actual_actions.empty?
43
43
  message << extra_message unless extra_actions.empty?
44
44
  message << user_message
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: 3.1.2
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Alley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-27 00:00:00.000000000 Z
11
+ date: 2024-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -83,7 +83,7 @@ files:
83
83
  - lib/pundit/matchers/permit_attributes_matcher.rb
84
84
  - lib/pundit/matchers/permit_only_actions_matcher.rb
85
85
  - lib/pundit/matchers/utils/policy_info.rb
86
- homepage: https://github.com/punditcommunity/pundit-matchers
86
+ homepage: https://github.com/pundit-community/pundit-matchers
87
87
  licenses:
88
88
  - MIT
89
89
  metadata:
@@ -96,14 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: '3.0'
99
+ version: '3.1'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.4.12
106
+ rubygems_version: 3.5.22
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: RSpec matchers for Pundit policies