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 +4 -4
- data/lib/ft_gem/controllers/helpers.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 867e840d4449c82b349aa87bd8c0f1699742cf7b3cdccf48ecb9660ca8a88aaa
|
4
|
+
data.tar.gz: bbed6c97923d79537cabc59d12848fdb8646a2315f39684bd0c09032a11d9ba4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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}"
|