ft_gem 2.0.7 → 2.0.8
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: 2fd37c6cabeff9ffd898517c66c0c339bd79cbc7ba49c52ecd59a542bcbd46f4
|
4
|
+
data.tar.gz: a6efca74046c8c107c0eab53fe9a280690c9d6b44ef3a7a97700b0185c06d7f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 637b8fa68b379fb9ffb3b49566bbc31be59d9f6573404dfe2fc3c774f6c278dcefe71a65f16269a9db8318fa909e0495b0bae43226e0887f3dcc970f3fad8a6e
|
7
|
+
data.tar.gz: 8dc08d04d081f3d7c28f887e39105862386246a5a04d25a3423593c06eb3da0c7efbc0a6fce0b8052f4452bb2962f9c03d31d84ee801cdece20425fe18100d8e
|
@@ -10,7 +10,7 @@ module FtGem
|
|
10
10
|
update_feature_toggles(toggles: toggles)
|
11
11
|
decoded_cookie = Base64.decode64(cookies[TOGGLE_COOKIE_NAME])
|
12
12
|
index = toggles.index { |toggle| toggle.include?("#{name}:") }
|
13
|
-
client_percentage = calc_client_percentage(decoded_cookie:decoded_cookie, toggle_name:name)
|
13
|
+
client_percentage = calc_client_percentage(decoded_cookie: decoded_cookie, toggle_name: name)
|
14
14
|
toggle_percentage = toggles[index]['percentage']
|
15
15
|
client_percentage.to_i <= toggle_percentage.to_i
|
16
16
|
rescue StandardError => e
|
@@ -26,7 +26,7 @@ module FtGem
|
|
26
26
|
client_percentage = calc_client_percentage(decoded_cookie: decoded_cookie, toggle_name: toggle['name'])
|
27
27
|
new_cookie.push("#{toggle['name']}:#{client_percentage}")
|
28
28
|
end
|
29
|
-
Base64.encode64(new_cookie.join(','))
|
29
|
+
cookies[TOGGLE_COOKIE_NAME] = Base64.encode64(new_cookie.join(','))
|
30
30
|
rescue StandardError => e
|
31
31
|
Rails.logger.error "FTApiGem::update_feature_toggles error #{e.backtrace}"
|
32
32
|
nil
|