CanCanCanSee 0.1.3 → 0.1.5

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: 514901faab1095209ba527e761db9cfd9698edb1
4
- data.tar.gz: 7803f5c9d864e651a8107612b88dbf430003ae91
3
+ metadata.gz: e220cd57c7dc83512abac602b890c74047e239a5
4
+ data.tar.gz: 7b112a45260ee474c6f3096bf460edecaac7bf26
5
5
  SHA512:
6
- metadata.gz: 8e5d69531d698449042d2bd2a11e1cea32cb41f34e0b8300e85e167b725c6f0a635f86f295a4ca5b59a98c8b955124cb3ec1dc15bfa7e8053713b834c84d06f5
7
- data.tar.gz: e8ad253848158da6fee251f872077cdef09a78068223ceb289a7ce95db5f9c95dfbfb1e9caa7fbb07779111d1aabe08176acfac6b221b655516e5b62969dbe32
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
 
@@ -1,3 +1,3 @@
1
1
  module CanCanCanSee
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
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]
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.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Schwaderer