CanCanCanSee 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/CanCanCanSee.rb +3 -2
- data/lib/CanCanCanSee/railtie.rb +12 -0
- data/lib/CanCanCanSee/version.rb +1 -1
- data/lib/tasks/custom_actions.rake +29 -24
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 514901faab1095209ba527e761db9cfd9698edb1
|
4
|
+
data.tar.gz: 7803f5c9d864e651a8107612b88dbf430003ae91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e5d69531d698449042d2bd2a11e1cea32cb41f34e0b8300e85e167b725c6f0a635f86f295a4ca5b59a98c8b955124cb3ec1dc15bfa7e8053713b834c84d06f5
|
7
|
+
data.tar.gz: e8ad253848158da6fee251f872077cdef09a78068223ceb289a7ce95db5f9c95dfbfb1e9caa7fbb07779111d1aabe08176acfac6b221b655516e5b62969dbe32
|
data/lib/CanCanCanSee.rb
CHANGED
data/lib/CanCanCanSee/version.rb
CHANGED
@@ -1,30 +1,15 @@
|
|
1
|
-
task abilities: :environment do
|
2
1
|
|
3
|
-
|
4
|
-
@current_slug_abilities = MY_GLOBAL_HOLDER_OF_ABILITY[Figaro.env.slug]
|
2
|
+
namespace :cancancansee do
|
5
3
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
print " #{can}\n"
|
11
|
-
can_value = can_value.sort
|
12
|
-
can_value.each do |can_value_element|
|
13
|
-
print " #{can_value_element}\n"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
task abilities_all_slugs: :environment do
|
20
|
-
@current_slug_abilities = MY_GLOBAL_HOLDER_OF_ABILITY
|
4
|
+
desc 'List current abilities established.'
|
5
|
+
task :abilities do
|
6
|
+
CanCanCanSee.establish_variable
|
7
|
+
@current_slug_abilities = MY_GLOBAL_HOLDER_OF_ABILITY[Figaro.env.slug]
|
21
8
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
print " Role: #{role_key}:\n\n"
|
27
|
-
role_value.each do |can, can_value|
|
9
|
+
@current_slug_abilities.each do |key, value|
|
10
|
+
print "\n\n"
|
11
|
+
print "Role: #{key}:\n"
|
12
|
+
value.each do |can, can_value|
|
28
13
|
print " #{can}\n"
|
29
14
|
can_value = can_value.sort
|
30
15
|
can_value.each do |can_value_element|
|
@@ -34,4 +19,24 @@ task abilities_all_slugs: :environment do
|
|
34
19
|
end
|
35
20
|
end
|
36
21
|
|
22
|
+
desc 'Lists current abilities for all slugs'
|
23
|
+
task :abilities_all_slugs do
|
24
|
+
@current_slug_abilities = MY_GLOBAL_HOLDER_OF_ABILITY
|
25
|
+
|
26
|
+
@current_slug_abilities.each do |key, value|
|
27
|
+
print "\n\n"
|
28
|
+
print "Slug: #{key}\n\n"
|
29
|
+
value.each do |role_key, role_value|
|
30
|
+
print " Role: #{role_key}:\n\n"
|
31
|
+
role_value.each do |can, can_value|
|
32
|
+
print " #{can}\n"
|
33
|
+
can_value = can_value.sort
|
34
|
+
can_value.each do |can_value_element|
|
35
|
+
print " #{can_value_element}\n"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
37
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CanCanCanSee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Schwaderer
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- bin/console
|
87
87
|
- bin/setup
|
88
88
|
- lib/CanCanCanSee.rb
|
89
|
+
- lib/CanCanCanSee/railtie.rb
|
89
90
|
- lib/CanCanCanSee/version.rb
|
90
91
|
- lib/tasks/custom_actions.rake
|
91
92
|
homepage: https://github.com/schwad/cancancansee
|