refinerycms-authentication-devise 1.0.0 → 1.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a35149fce27cd7559b550f9214b131fcc90eae89
|
4
|
+
data.tar.gz: 95c07715f5d7e267d163e05cf9e1c0cdc66140c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e4746903f6a37f0c57707ee5f27964f050012af49ae486744cb1631178f411f61df0e8790cf4ccfc7396e32ed3457f2b987ab9b174e278b7580e8fa299e3043
|
7
|
+
data.tar.gz: 22ec03873f1603bee9f44cf2ee781dfdc6b24e11ef54bf150f8520815835369041b61f59f0dd46acb0ee63d39b6fb1e6832d7bdab5e113f9026f5e65e66beb5c
|
data/Gemfile
CHANGED
@@ -94,12 +94,12 @@ module Refinery
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def add_role(title)
|
97
|
-
raise
|
97
|
+
raise ::ArgumentError, "Role should be the title of the role not a role object." if title.is_a?(::Refinery::Authentication::Devise::Role)
|
98
98
|
roles << ::Refinery::Authentication::Devise::Role[title] unless has_role?(title)
|
99
99
|
end
|
100
100
|
|
101
101
|
def has_role?(title)
|
102
|
-
raise
|
102
|
+
raise ::ArgumentError, "Role should be the title of the role not a role object." if title.is_a?(::Refinery::Authentication::Devise::Role)
|
103
103
|
roles.any?{ |r| r.title == title.to_s.camelize}
|
104
104
|
end
|
105
105
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = %q{refinerycms-authentication-devise}
|
5
|
-
s.version = %q{1.0.
|
5
|
+
s.version = %q{1.0.1}
|
6
6
|
s.summary = %q{Devise based authentication extension for Refinery CMS}
|
7
7
|
s.description = %q{A Devise authentication extension for Refinery CMS}
|
8
8
|
s.homepage = %q{http://refinerycms.com}
|
@@ -13,7 +13,7 @@ module Refinery
|
|
13
13
|
context "Roles" do
|
14
14
|
context "add_role" do
|
15
15
|
it "raises Exception when Role object is passed" do
|
16
|
-
expect {user.add_role(Refinery::Authentication::Devise::Role.new)}.to raise_exception
|
16
|
+
expect {user.add_role(Refinery::Authentication::Devise::Role.new)}.to raise_exception(::ArgumentError)
|
17
17
|
end
|
18
18
|
|
19
19
|
it "adds a Role to the User when role not yet assigned to User" do
|
@@ -33,7 +33,7 @@ module Refinery
|
|
33
33
|
|
34
34
|
context "has_role" do
|
35
35
|
it "raises Exception when Role object is passed" do
|
36
|
-
expect{ user.has_role?(Refinery::Authentication::Devise::Role.new)}.to raise_exception
|
36
|
+
expect{ user.has_role?(Refinery::Authentication::Devise::Role.new)}.to raise_exception(::ArgumentError)
|
37
37
|
end
|
38
38
|
|
39
39
|
it "returns the true if user has Role" do
|
@@ -264,7 +264,7 @@ module Refinery
|
|
264
264
|
|
265
265
|
it "adds registered plugins" do
|
266
266
|
expect(first_user.plugins.collect(&:name)).to eq(
|
267
|
-
%w(
|
267
|
+
%w(refinery_pages refinery_files refinery_images refinery_authentication_devise)
|
268
268
|
)
|
269
269
|
end
|
270
270
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-authentication-devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Arndt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: refinerycms-core
|