CanCanCanSee 0.1.9 → 0.1.10
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 +5 -5
- data/lib/CanCanCanSee/version.rb +1 -1
- 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: f0c095d59043f6562f2b144e146d5bc611213634
|
4
|
+
data.tar.gz: f66e8c831b6463fea5c3d0763cbcb788261a7b79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e401bb233ab57e1894580e35da4c2d4db7ed138fa0ba7a8a917f76e13827aa232d5fca19f92a32eb8d177ec88e8dddfb6d60bc3d1be57d543e45d288640a71f
|
7
|
+
data.tar.gz: ddb6bf7688766e9e1ae33c3ca3a667e9bed9533875c98d0860f66c29269ab7a3e69a41b980625ae5587675e695751a1f29797c8cf0fba298ed916676345089fd
|
data/lib/CanCanCanSee.rb
CHANGED
@@ -46,10 +46,10 @@ module CanCanCanSee
|
|
46
46
|
@current_file = file
|
47
47
|
|
48
48
|
#capture in between text
|
49
|
-
chunk_start = /when/ =~ @current_file
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
# chunk_start = /when/ =~ @current_file
|
50
|
+
# #=> 119
|
51
|
+
# chunk_end = ((/when/ =~ @current_file[(chunk_start + 1)..-1]) + chunk_start)
|
52
|
+
# #=> 2554
|
53
53
|
role_text = @current_file[chunk_start..chunk_end]
|
54
54
|
|
55
55
|
#capture all roles
|
@@ -61,7 +61,7 @@ module CanCanCanSee
|
|
61
61
|
|
62
62
|
role_count = roles.length
|
63
63
|
chunk_start = /when/ =~ @current_file
|
64
|
-
chunk_end = /when/ =~ @current_file[(chunk_start + 1)..-1]
|
64
|
+
chunk_end = ((/when/ =~ @current_file[(chunk_start + 1)..-1]) + chunk_start)
|
65
65
|
all_text[roles[counter]] = @current_file[chunk_start..chunk_end]
|
66
66
|
counter += 1
|
67
67
|
while counter < role_count
|
data/lib/CanCanCanSee/version.rb
CHANGED