roleup 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roleup/has_roles.rb +1 -1
- data/lib/roleup/list.rb +1 -1
- data/lib/roleup/version.rb +1 -1
- data/test/has_roles_test.rb +2 -2
- data/test/list_test.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63b885b52339e6ce02adf525f8aa38357c264e74
|
4
|
+
data.tar.gz: 942bf4261de0d5c678ba77f3b6c372154772d2a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3e23e86e3e8685bca7f3a70efa7c54aa7405f686df75ed46119baa81c880e03dcc2029c8435f1f7673772891adbaca3f6c70702611b35cca06bb37f33b1c962
|
7
|
+
data.tar.gz: 1b6c743b65b409c48e7ad2088d40e2d92e3b554cd0951b62d802fb9392af84b852f6220ba4bd5dc285e518ce1ffb8eba385764d73f659330e9d36a88ed7d26ea
|
data/lib/roleup/has_roles.rb
CHANGED
data/lib/roleup/list.rb
CHANGED
@@ -7,7 +7,7 @@ module Roleup
|
|
7
7
|
def_delegators :inner_list, :each, :length, :size
|
8
8
|
|
9
9
|
def initialize(*values)
|
10
|
-
@inner_list = values.map { |value| standardize(value) }.uniq.sort
|
10
|
+
@inner_list = values.flatten.map { |value| standardize(value) }.uniq.sort
|
11
11
|
end
|
12
12
|
|
13
13
|
def include?(value)
|
data/lib/roleup/version.rb
CHANGED
data/test/has_roles_test.rb
CHANGED
@@ -9,10 +9,10 @@ module Roleup
|
|
9
9
|
end
|
10
10
|
|
11
11
|
@obj_with_roles = class_with_roles.new
|
12
|
-
@obj_with_roles.
|
12
|
+
@obj_with_roles.roles = :admin, :editor
|
13
13
|
end
|
14
14
|
|
15
|
-
test "
|
15
|
+
test "assign roles" do
|
16
16
|
assert @obj_with_roles.roles.to_a == [:admin, :editor]
|
17
17
|
end
|
18
18
|
|
data/test/list_test.rb
CHANGED