ft_gem 2.0.8 → 2.0.9

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
  SHA256:
3
- metadata.gz: 2fd37c6cabeff9ffd898517c66c0c339bd79cbc7ba49c52ecd59a542bcbd46f4
4
- data.tar.gz: a6efca74046c8c107c0eab53fe9a280690c9d6b44ef3a7a97700b0185c06d7f7
3
+ metadata.gz: 867e840d4449c82b349aa87bd8c0f1699742cf7b3cdccf48ecb9660ca8a88aaa
4
+ data.tar.gz: bbed6c97923d79537cabc59d12848fdb8646a2315f39684bd0c09032a11d9ba4
5
5
  SHA512:
6
- metadata.gz: 637b8fa68b379fb9ffb3b49566bbc31be59d9f6573404dfe2fc3c774f6c278dcefe71a65f16269a9db8318fa909e0495b0bae43226e0887f3dcc970f3fad8a6e
7
- data.tar.gz: 8dc08d04d081f3d7c28f887e39105862386246a5a04d25a3423593c06eb3da0c7efbc0a6fce0b8052f4452bb2962f9c03d31d84ee801cdece20425fe18100d8e
6
+ metadata.gz: a04a27c974affd96bbcf1a3ecdd7e7e9ed0ab1d5d9a7a536ab09f6ac0f3a6f1e2a5aab8341e222e39b6a7fb90725d6f740b379f51863a61c85edd69a0cdeb431
7
+ data.tar.gz: dd6419cffa0966d7baa3c2bd47eb322dcaaff73287fb32a7a7614e85e285a33416a9702875bcf681d6bd03fc91c685d82b0202c202054fb1684ee36c0b17deee
@@ -9,9 +9,9 @@ module FtGem
9
9
  toggles = FtShared.all_toggles
10
10
  update_feature_toggles(toggles: toggles)
11
11
  decoded_cookie = Base64.decode64(cookies[TOGGLE_COOKIE_NAME])
12
- index = toggles.index { |toggle| toggle.include?("#{name}:") }
12
+ index = toggles.index { |toggle| toggle['name'] == name }
13
13
  client_percentage = calc_client_percentage(decoded_cookie: decoded_cookie, toggle_name: name)
14
- toggle_percentage = toggles[index]['percentage']
14
+ toggle_percentage = toggles[index.to_i]['percentage']
15
15
  client_percentage.to_i <= toggle_percentage.to_i
16
16
  rescue StandardError => e
17
17
  Rails.logger.error "FtGem::feature_toggle_status error #{e.backtrace}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ft_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murray Catto