petergate 1.6.2 → 1.6.3

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
  SHA1:
3
- metadata.gz: acdb2ef4dd4f034a5a8ba195ed98db7de09b682b
4
- data.tar.gz: 87e581e14a57eea73f588ddfd8a60c72c04b3212
3
+ metadata.gz: 30e995586fe10f4742d811609f6bec4984f94477
4
+ data.tar.gz: f347ac8670aea77661d0c2f47ef363fcaada59d6
5
5
  SHA512:
6
- metadata.gz: 6edb852867594b047ff7a629fc45e27f76e51cb43113260afec72372f7026faffbe62e73b63acdebcd0222f7ef11a5bffb0597445468a156d5466752f8d15cbd
7
- data.tar.gz: f22f4efcdccea3c1c932262ad2365d84cd6f43774d68dc724400a5b8876249141d232ed5945f510d4c60fc315b12974f3a6bacf6c8f72cdf1578d40ffa9c0383
6
+ metadata.gz: 51f517cd8074d4172d3bc886370fdeeeee817356aa2aa8c1c022954d02c9ef89ada2e95f2a713fa61ae4b8c94ba72ac7fcba8aaa268e302fe229b1c0269a5976
7
+ data.tar.gz: 178d3848800c5284298cb8dfebdd035ae917df5074ea695ae7730744e8897d7b7cb4ba6f1ed2353f0c34cc39dec852fdb10c00620839cbf00ec90bc6dbfa4a8f
@@ -99,7 +99,7 @@ module Petergate
99
99
  end
100
100
 
101
101
  def logged_in?(*roles)
102
- current_user && (roles & current_user.roles).any?
102
+ current_user && current_user.has_roles?(*roles)
103
103
  end
104
104
 
105
105
  def custom_message
@@ -67,6 +67,12 @@ module Petergate
67
67
  def role
68
68
  roles.first
69
69
  end
70
+
71
+ def has_roles?(*roles)
72
+ (roles & self.roles).any?
73
+ end
74
+
75
+ alias_method :has_role?, :has_roles?
70
76
  end
71
77
  end
72
78
  end
@@ -1,3 +1,3 @@
1
1
  module Petergate
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petergate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Sloan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-04 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler