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: e15bb80dde590be56e09b63b345d321068356ed7
4
- data.tar.gz: cf898035f7e06327aca28ba7805440fcfb123a09
3
+ metadata.gz: 6cbf5465b03534a0ea73b226ffacf1bc01825eb9
4
+ data.tar.gz: f624a8d851aa5b59d69f5d5437f9409f7d987c3e
5
5
  SHA512:
6
- metadata.gz: 059266b27c515744c891db005dab8ac82485670a18749c3a857ee7996a2016287bba98a1ef9063a33495e937e967e3516dac505e51f5fe52f1cc499f17cb6d8d
7
- data.tar.gz: ebe1d54110e5f27989a0f4fab4d5ebfcfc8f4c427776e5efb5fe40ce3c5e9a7716765a2c4aa75cb65db4c2be4c5f50b78533676e14660318124e88f5e1eb6a3d
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
- if rule_id == Togls::Helpers.sha1(Togls::Rules::Boolean, true)
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 == Togls::Helpers.sha1(Togls::Rules::Boolean, false)
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' => Togls::Helpers.sha1(
26
- Togls::Rules::Boolean, true) }
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' => Togls::Helpers.sha1(
29
- Togls::Rules::Boolean, false) }
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
@@ -1,3 +1,3 @@
1
1
  module Togls
2
- VERSION = '3.0.0-rc.1'.freeze
2
+ VERSION = '3.0.0-rc.2'.freeze
3
3
  end
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.1
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-07 00:00:00.000000000 Z
13
+ date: 2016-06-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler