pundit-matchers 3.0.0 → 3.0.1

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: 173bd01350678f5f224a05f59eb850422c8bdd722047fb734d5e78fb909a3a68
4
- data.tar.gz: 26526d635f6ce6bfeb1eb57bc9f6912d7122795024d252b342655bdc4b133775
3
+ metadata.gz: deb38560b2277878e0a13f7f7a6fb510e257c5f84b625a387424e08cb5e8708b
4
+ data.tar.gz: '084e0cb2b93b0e27f1bb710666b3d9c1aadd9fac71ffef0ca178b025a531cafe'
5
5
  SHA512:
6
- metadata.gz: 06125a73c0018ada58310e1676c7188d5a450775aaf2018d1a384e71482d640d17b74fca56b057183d0b80ff83049e3d8324c5dc22f179430334b9af84e51e39
7
- data.tar.gz: af7a4d988514fb990f9012a415eacd0fe947745b72c3ce97d2d155f8523a4631a07ef76e6ae13ee01690a7318fb573ba1130378b8b62a149900c681bd0c19026
6
+ metadata.gz: b219dfc3fbc0a1283f0c87627b5615947f97b449ce299d65be5106e0a46b06d9a0ed40f1f86a84830cc567a74d75da9b597136f1c563cebcce3752eb2a581d45
7
+ data.tar.gz: ce6b7c6a259a6a4e22f673985c3154e334f87acf2f856b9340f97dd62d5d56945cfc16191bfb503bbce24b12c002394e0994554a29376bbe82849a690926fb19
@@ -41,7 +41,8 @@ module Pundit
41
41
  attr_reader :expected_actions
42
42
 
43
43
  def check_actions!
44
- missing_actions = expected_actions - policy_info.actions
44
+ non_explicit_actions = (expected_actions - policy_info.actions)
45
+ missing_actions = non_explicit_actions.reject { |action| policy_info.policy.respond_to?(:"#{action}?") }
45
46
  return if missing_actions.empty?
46
47
 
47
48
  raise ArgumentError, format(
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.0.0
4
+ version: 3.0.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: 2023-06-14 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core