togls 3.0.0.pre.rc.1 → 3.0.0.pre.rc.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cbf5465b03534a0ea73b226ffacf1bc01825eb9
|
4
|
+
data.tar.gz: f624a8d851aa5b59d69f5d5437f9409f7d987c3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d9a49ca3670eee9ef1c00644060a8ca1b505e516f1d451d363353a81404c3cfb48d18fd9169eb0eedc7db8ebe75d96128b5ed19853b6c69b1f1d60597e34b01
|
7
|
+
data.tar.gz: 699d108793a00c42c8228357ecb3eb4413e64f5b6dacec9ee9ed1704c9dc51dc8402b5647bd8c274b93c6c0befa4ed116a993e2274bddc36ee15f4f4d462b9a5
|
@@ -9,9 +9,11 @@ module Togls
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def get(rule_id)
|
12
|
-
|
12
|
+
boolean_false = Togls::Rules::Boolean.new(:boolean, false)
|
13
|
+
boolean_true = Togls::Rules::Boolean.new(:boolean, true)
|
14
|
+
if rule_id == boolean_true.id
|
13
15
|
return { 'type_id' => 'boolean', 'data' => true, 'target_type' => Togls::TargetTypes::NONE.to_s }
|
14
|
-
elsif rule_id ==
|
16
|
+
elsif rule_id == boolean_false.id
|
15
17
|
return { 'type_id' => 'boolean', 'data' => false, 'target_type' => Togls::TargetTypes::NONE.to_s }
|
16
18
|
else
|
17
19
|
nil
|
@@ -22,11 +22,11 @@ module Togls
|
|
22
22
|
def get(toggle_id)
|
23
23
|
return nil if ENV[toggle_env_key(toggle_id)].nil?
|
24
24
|
if ENV[toggle_env_key(toggle_id)] == 'true'
|
25
|
-
return { 'feature_id' => toggle_id, 'rule_id' =>
|
26
|
-
|
25
|
+
return { 'feature_id' => toggle_id, 'rule_id' =>
|
26
|
+
Togls::Rules::Boolean.new(:boolean, true).id }
|
27
27
|
elsif ENV[toggle_env_key(toggle_id)] == 'false'
|
28
|
-
return { 'feature_id' => toggle_id, 'rule_id' =>
|
29
|
-
|
28
|
+
return { 'feature_id' => toggle_id, 'rule_id' =>
|
29
|
+
Togls::Rules::Boolean.new(:boolean, false).id }
|
30
30
|
else
|
31
31
|
return nil
|
32
32
|
end
|
data/lib/togls/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: togls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.pre.rc.
|
4
|
+
version: 3.0.0.pre.rc.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Miller
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-06-
|
13
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|