simple_can 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/simple_can.rb +2 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb741e24a066e19c4ee7569a0f96805e1f33ca33
4
- data.tar.gz: 4dcfea1740ce7522aab66ef75e1c05b11924ceec
3
+ metadata.gz: 89860df88e70747400564a2d29b658bfde6f592e
4
+ data.tar.gz: b538368c77160276d660da2ab7aad9ef375761f1
5
5
  SHA512:
6
- metadata.gz: 37616cd17cbdbfd30b6e7c72fde3f51f50b56312b5131ed161219efaeb60c3bafb4a5e471f04bc728dc2c51c6357cba8c3ce0459937be24d7afd63ae8641e6d2
7
- data.tar.gz: a5c27fd7476a29664dc0446114744577f5c37db921c9623e74d97e20c94524ead1fcdb5f13112961866c09e000b2e4d87a8b6b739824fad563d0b7548b636dc6
6
+ metadata.gz: 75fc840b64b84c67e8b7622614daaf94d1e1951ad9ad0a94cad63aa66acd969fbffa9a27a19612179ca91a0106e2b43e315470153d8c92c72de55bff5f234fe8
7
+ data.tar.gz: d5bb46ccb02df98b3118a4fd5e34dbd20ceee1777463e92985e4f379f78b0e96acb9586a02ca409c135410a8af35601759c634a4d3a30d9c69e9743c2c83431a
data/lib/simple_can.rb CHANGED
@@ -8,13 +8,14 @@ module SimpleCan
8
8
  class Unauthorized < StandardError; end
9
9
 
10
10
  def self.included(mod)
11
+ mod.strategy_set!
12
+
11
13
  meta = class << mod; self; end
12
14
  meta.send(:alias_method, :orig_method_added, :method_added)
13
15
  meta.send(:alias_method, :orig_singleton_method_added,
14
16
  :singleton_method_added)
15
17
  mod.extend(ClassMethods)
16
18
 
17
- mod.strategy_set!
18
19
  strategy.roles.each do |role|
19
20
  [meta, mod].each do |scope|
20
21
  scope.send(:define_method, "#{role}?") do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_can
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Geier