simple_can 1.0.2 → 1.0.3

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 +6 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89860df88e70747400564a2d29b658bfde6f592e
4
- data.tar.gz: b538368c77160276d660da2ab7aad9ef375761f1
3
+ metadata.gz: 1b7534d9b3542c020a5bcacbecb69e2f4489ce26
4
+ data.tar.gz: 8ef7ec73a65deb3494c2a8259dd9e50a8a52f5e2
5
5
  SHA512:
6
- metadata.gz: 75fc840b64b84c67e8b7622614daaf94d1e1951ad9ad0a94cad63aa66acd969fbffa9a27a19612179ca91a0106e2b43e315470153d8c92c72de55bff5f234fe8
7
- data.tar.gz: d5bb46ccb02df98b3118a4fd5e34dbd20ceee1777463e92985e4f379f78b0e96acb9586a02ca409c135410a8af35601759c634a4d3a30d9c69e9743c2c83431a
6
+ metadata.gz: 40a21c98de3e818ac5a3c9d0643229b3f29612611a025f26a05fb027b4a5d74e91d8d95192f1426bfa24d3ba1c0c1230b579f6f82a454b5989aaf08f46aee2ee
7
+ data.tar.gz: 9661d6aced1eddcbfeffc258f2ab7b47f5555cf9f3f3d8e0131c2137a128b49d5f1542ea782bf231be90121e5e0073c4029ac1851362af4e5c4a5ae44a996dd6
@@ -8,8 +8,7 @@ module SimpleCan
8
8
  class Unauthorized < StandardError; end
9
9
 
10
10
  def self.included(mod)
11
- mod.strategy_set!
12
-
11
+ strategy_set!
13
12
  meta = class << mod; self; end
14
13
  meta.send(:alias_method, :orig_method_added, :method_added)
15
14
  meta.send(:alias_method, :orig_singleton_method_added,
@@ -31,9 +30,13 @@ module SimpleCan
31
30
  end
32
31
  end
33
32
 
33
+ def self.strategy_set!
34
+ raise "strategy missing" if SimpleCan.strategy.nil?
35
+ end
36
+
34
37
  module ClassMethods
35
38
  def strategy_set!
36
- raise "strategy missing" if SimpleCan.strategy.nil?
39
+ SimpleCan.strategy_set!
37
40
  end
38
41
 
39
42
  def method_added(method)
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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Geier