CanCanCanSee 0.1.3 → 0.1.5
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 +4 -4
- data/README.md +2 -1
- data/lib/CanCanCanSee/version.rb +1 -1
- data/lib/CanCanCanSee.rb +3 -3
- 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: e220cd57c7dc83512abac602b890c74047e239a5
|
4
|
+
data.tar.gz: 7b112a45260ee474c6f3096bf460edecaac7bf26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2ccc0e843987d8b7aaa26236a2dbc4d8fd4ac3519b2d979213edee2fb9d79926bce4259d1e2ae2703cd6175640fc8e5396726a5871fb64be04bbe104a5519d5
|
7
|
+
data.tar.gz: 01e2e6a91b35f9d7cc8d6f54267a1bb7d53fe692a5ac6d4aadf012392bb0189c130ad9e21ba46c6b8964bf24112983bfadab5b7855f68cbb0148635baaff653f
|
data/README.md
CHANGED
@@ -52,11 +52,12 @@ CanCanCanSee.all_abilities[my_slug]
|
|
52
52
|
## TODO Before 1.0
|
53
53
|
|
54
54
|
* Cleanup needed for single
|
55
|
-
* Pretty Print CLI or something like rake abilities for cli!
|
55
|
+
* Pretty Print CLI or something like rake abilities for cli!
|
56
56
|
* Confirm support for single and multiple Ability.rb files
|
57
57
|
* Capture blocks passed to abilities as well and store and render them instead of just signifying 'with block'
|
58
58
|
* Create docs to show style guidelines to have gem work
|
59
59
|
* Create post to show layout for slug-based auth
|
60
|
+
* Rake support for `cancancansee:abilities`
|
60
61
|
|
61
62
|
## Contributing
|
62
63
|
|
data/lib/CanCanCanSee/version.rb
CHANGED
data/lib/CanCanCanSee.rb
CHANGED
@@ -2,7 +2,7 @@ require "CanCanCanSee/version"
|
|
2
2
|
|
3
3
|
module CanCanCanSee
|
4
4
|
require 'CanCanCanSee/railtie' if defined?(Rails)
|
5
|
-
|
5
|
+
|
6
6
|
MY_GLOBAL_HOLDER_OF_ABILITY = Hash.new
|
7
7
|
|
8
8
|
def self.initiate_gem
|
@@ -67,7 +67,7 @@ module CanCanCanSee
|
|
67
67
|
while counter < role_count
|
68
68
|
chunk_start = chunk_end + 1
|
69
69
|
#broke here
|
70
|
-
chunk_end = /when/ =~ @current_file[(chunk_start + 1)..-1]
|
70
|
+
chunk_end = ((/when/ =~ @current_file[(chunk_start + 1)..-1]) + chunk_start)
|
71
71
|
all_text[roles[counter]] = @current_file[chunk_start..chunk_end]
|
72
72
|
|
73
73
|
counter += 1
|
@@ -101,7 +101,7 @@ module CanCanCanSee
|
|
101
101
|
array_of_cannot = []
|
102
102
|
|
103
103
|
#establish cannot
|
104
|
-
cannot_abilities = all_text[roles[new_counter]].scan(/cannot(.*)\n/)
|
104
|
+
cannot_abilities = all_text[roles[new_counter]].scan(/cannot (.*)\n/)
|
105
105
|
|
106
106
|
cannot_abilities.each do |cannot_ability|
|
107
107
|
cannot_ability = cannot_ability[0]
|