pundit-matchers 1.9.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pundit/matchers.rb +6 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 836bd12c848b5a4d68608155884e87515ab4f73926d064e6da1881369e1abb27
4
- data.tar.gz: b8346711d3bbfdee77779c8607e0dde827f2dec9c34dc3e58491c4aaa659a9f8
3
+ metadata.gz: 0f3b354daf4a7619dc0fe63bc65984f0a8390b5fc9a3a2b1c7d2129cb5d12bf0
4
+ data.tar.gz: c4a47b2387ddcf8541c7fe8f7e7b98067263d312db6a9d3718621d5fb446b115
5
5
  SHA512:
6
- metadata.gz: 7069911c4cbd5886ca4ace96a2417b9c1a1afe45c410ac0f1a5bfbf24866478491b8f9c135e4f98b25e2f8eb6113dc72f7dc03abd63b25ebe98e38f3dff84859
7
- data.tar.gz: 9ad39f93ad83169107df878f85c71bc75bc4478ab3d6e59ced4338bfd05accbedb646476772f2c32868bbf5272edee0e833c9e30c4a29d2b9b740bc6b02ea936
6
+ metadata.gz: adac619cd1badd3d0f83ccb535a45f4633f199badb12c6daba7d4b9a2be5f79db321f6268645b6a66d6776f4b048fb2096cb3dd74c850be64a9caf56d3d9bce2
7
+ data.tar.gz: 25fb9deee8b3779156ea4d6ba26b71a5af47133bd2d4fdb594fe119e2803d85265027c7c8044a2c2ce364d04f5933330e752857617a4fd598c3596f1c2d8e2b2
@@ -26,12 +26,12 @@ module Pundit
26
26
  end
27
27
  end
28
28
 
29
- RSpec::Matchers.define :forbid_action do |action, *args|
29
+ RSpec::Matchers.define :forbid_action do |action, *args, **kwargs|
30
30
  match do |policy|
31
31
  if args.any?
32
- !policy.public_send("#{action}?", *args)
32
+ !policy.public_send("#{action}?", *args, **kwargs)
33
33
  else
34
- !policy.public_send("#{action}?")
34
+ !policy.public_send("#{action}?", **kwargs)
35
35
  end
36
36
  end
37
37
 
@@ -189,12 +189,12 @@ module Pundit
189
189
  end
190
190
  end
191
191
 
192
- RSpec::Matchers.define :permit_action do |action, *args|
192
+ RSpec::Matchers.define :permit_action do |action, *args, **kwargs|
193
193
  match do |policy|
194
194
  if args.any?
195
- policy.public_send("#{action}?", *args)
195
+ policy.public_send("#{action}?", *args, **kwargs)
196
196
  else
197
- policy.public_send("#{action}?")
197
+ policy.public_send("#{action}?", **kwargs)
198
198
  end
199
199
  end
200
200
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pundit-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Alley