arturo 1.12.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -3
- data/lib/arturo.rb +1 -29
- metadata +10 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77b4548dd896e881b79c5c96df6f505be6f560fe
|
4
|
+
data.tar.gz: 1f343f026c5a46e4e87f3b4b865ca6cf74bf12b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 588702facaf0f38ef5024815931b0b8a2c88360029a22fe39b004ca0f47851417d89f97072278e997ddd567e4536f214e2705b54e14d8363cbcd5a6449864d0c
|
7
|
+
data.tar.gz: 9567da76eb5cb241893f2fbca5a65790ffe9f583b25309bf2fe438df155618b33ad77b15865d090c578491d40e8a21c6bc393b51726abbf1d1d142701817f175
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
##
|
1
|
+
## v2.0.0
|
2
2
|
|
3
|
-
Bug fix:
|
4
|
-
|
3
|
+
Bug fix: add missing require to initializer.
|
4
|
+
|
5
|
+
Improvement: Remove support for `[feature]_enabled_for?` methods.
|
6
|
+
|
7
|
+
Improvement: Use more specific gem versions for development dependencies.
|
5
8
|
|
6
9
|
## v1.11.0
|
7
10
|
|
data/lib/arturo.rb
CHANGED
@@ -6,8 +6,7 @@ module Arturo
|
|
6
6
|
require 'arturo/feature_caching'
|
7
7
|
require 'arturo/engine' if defined?(Rails) && Rails::VERSION::MAJOR >= 3
|
8
8
|
|
9
|
-
class <<self
|
10
|
-
|
9
|
+
class << self
|
11
10
|
# Quick check for whether a feature is enabled for a recipient.
|
12
11
|
# @param [String, Symbol] feature_name
|
13
12
|
# @param [#id] recipient
|
@@ -16,32 +15,5 @@ module Arturo
|
|
16
15
|
f = self::Feature.to_feature(feature_name)
|
17
16
|
f && f.enabled_for?(recipient)
|
18
17
|
end
|
19
|
-
|
20
|
-
ENABLED_FOR_METHOD_NAME = /^(\w+)_enabled_for\?$/
|
21
|
-
|
22
|
-
ENABLED_FOR_METHOD_NAME_WARNING = "Arturos FEATURE_enabled_for?(OBJECT) methods are going away, use feature_enabled_for?(FEATURE, OBJECT)"
|
23
|
-
|
24
|
-
def respond_to_missing?(symbol, include_all = false)
|
25
|
-
if symbol.to_s =~ ENABLED_FOR_METHOD_NAME
|
26
|
-
warn ENABLED_FOR_METHOD_NAME_WARNING
|
27
|
-
true
|
28
|
-
else
|
29
|
-
super
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def respond_to?(symbol, include_all = false)
|
34
|
-
respond_to_missing? symbol, include_all
|
35
|
-
end
|
36
|
-
|
37
|
-
def method_missing(symbol, *args, &block)
|
38
|
-
if (args.length == 1 && match = ENABLED_FOR_METHOD_NAME.match(symbol.to_s))
|
39
|
-
warn ENABLED_FOR_METHOD_NAME_WARNING
|
40
|
-
feature_enabled_for?(match[1], args[0])
|
41
|
-
else
|
42
|
-
super(symbol, *args, &block)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
18
|
end
|
47
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arturo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- gem-public_cert.pem
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -83,42 +83,30 @@ dependencies:
|
|
83
83
|
name: minitest
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
89
|
-
- - "<"
|
86
|
+
- - "~>"
|
90
87
|
- !ruby/object:Gem::Version
|
91
|
-
version: '
|
88
|
+
version: '5.1'
|
92
89
|
type: :development
|
93
90
|
prerelease: false
|
94
91
|
version_requirements: !ruby/object:Gem::Requirement
|
95
92
|
requirements:
|
96
|
-
- - "
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '0'
|
99
|
-
- - "<"
|
93
|
+
- - "~>"
|
100
94
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
95
|
+
version: '5.1'
|
102
96
|
- !ruby/object:Gem::Dependency
|
103
97
|
name: minitest-rg
|
104
98
|
requirement: !ruby/object:Gem::Requirement
|
105
99
|
requirements:
|
106
|
-
- - "
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '0'
|
109
|
-
- - "<"
|
100
|
+
- - "~>"
|
110
101
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
102
|
+
version: '5.1'
|
112
103
|
type: :development
|
113
104
|
prerelease: false
|
114
105
|
version_requirements: !ruby/object:Gem::Requirement
|
115
106
|
requirements:
|
116
|
-
- - "
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
- - "<"
|
107
|
+
- - "~>"
|
120
108
|
- !ruby/object:Gem::Version
|
121
|
-
version: '
|
109
|
+
version: '5.1'
|
122
110
|
- !ruby/object:Gem::Dependency
|
123
111
|
name: sqlite3
|
124
112
|
requirement: !ruby/object:Gem::Requirement
|