grabli 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e92851163c7bdfdc005eb3482c9885328ac15365d1a0fd023a6a8d00d12b255c
4
- data.tar.gz: bd5ec4baadac745a7969bc4a72cecd98c1f704688fd2f9d13b8f6d5165437142
3
+ metadata.gz: ce0457fbda50531f2fc5a6ccbf6d781a07ba702e0cc7b7cc14cf5b717db68161
4
+ data.tar.gz: 7d01af52d2e4e8a88964885f7ac39e5167966f42c7a6632ca716ec1a36d62e92
5
5
  SHA512:
6
- metadata.gz: 96c5344afd2760f47c596d810fc6e9c4a930db262ff93bc9c0dbb71fa4343c7f1d0237b6447274da3fc17cee567d50450cc5ea425c311d17f376218901db0e28
7
- data.tar.gz: bc6419b071928f1bc225462c59d9ea141e9ab1c30b28a0e2c9b35c71f8d10daf8e36a4bbd60ead44b725df94f67bede05f93c7fd75a3673acba4b203f252378f
6
+ metadata.gz: b42093a0298bc76277c5c1cfbe4efd126cd899daa34350bd5f2f26142abab5f792231df0f43e9e4609207491906a810ec8c46f2b5cf0f1809521e83a04eed493
7
+ data.tar.gz: 3d59a65ca1e51a0415708ce3d9ec338ce392a32fd7cac3f48d3e23ad0a167efbcfc54d6d073806cbe484da8b19bcc418fd4fc44d3c83e929a28eb8bfd3e4cf86
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grabli (0.1.0)
4
+ grabli (0.2.0)
5
5
  pundit (> 0)
6
6
 
7
7
  GEM
@@ -40,7 +40,7 @@ class Grabli
40
40
  isubject = subject.is_a?(Symbol) ? Intruder.new(false) : subject
41
41
  policy = policy_class(subject).new(user, isubject)
42
42
 
43
- collection << permission if allowed? policy, permission
43
+ collection << permission if allowed?(policy, permission)
44
44
  end
45
45
  end
46
46
 
@@ -58,7 +58,9 @@ class Grabli
58
58
  #
59
59
  def allowed?(policy, permission)
60
60
  result = policy.public_send(permission)
61
- return !policy.record.intruded if policy.record.is_a?(Intruder)
61
+
62
+ return false if policy.record.is_a?(Intruder) && policy.record.intruded
63
+
62
64
  result
63
65
  end
64
66
 
@@ -1,3 +1,3 @@
1
1
  class Grabli
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grabli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dikond
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pundit