ft_gem 3.1.7 → 3.1.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: 809676c332224a3afa063feb423dc9e8af915ffe37f8b5315ab45d25102fb903
|
4
|
+
data.tar.gz: c621a941075cbe797eb6286f5bf26b9d8e7abe8a1efa189369ba8a4c6336c378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ee30a4db3847c8ef0bab9ddde3b547e7f38a9724896bfcd26b05588ddd72a3d94f68e207fcf3e0f6d2e512b7bec0bd3609ed5e84b47342be8eedc0406b9dbb1
|
7
|
+
data.tar.gz: 62fc8f5afb70f7c1dd15ede41201d75031e2b6f61c8c18906a5a4ee9f1ac3c00080b6d0794ce5f43766aba7e9eda3d6347d11ae11ed262fdb7ed0c914842285a
|
@@ -14,7 +14,7 @@ module FtGem
|
|
14
14
|
client_percentage = calc_client_percentage(decoded_cookie: decoded_cookie, toggle_name: name)
|
15
15
|
toggle_percentage = toggles[index.to_i]['attributes']['percentage']
|
16
16
|
whitelisted = FtShared.new.whitelisted?(url: url, whitelist_urls: toggles[index.to_i]['attributes']['whitelist-urls'])
|
17
|
-
if user_id_beta(user_id: user_id, toggles: toggles)
|
17
|
+
if user_id_beta(user_id: user_id, toggles: toggles, index: index)
|
18
18
|
return true && whitelisted
|
19
19
|
else
|
20
20
|
return client_percentage.to_i <= toggle_percentage.to_i && whitelisted
|
@@ -56,7 +56,7 @@ module FtGem
|
|
56
56
|
|
57
57
|
private
|
58
58
|
|
59
|
-
def user_id_beta(user_id: nil, toggles: nil)
|
59
|
+
def user_id_beta(user_id: nil, toggles: nil, index: "")
|
60
60
|
user_id.present? && toggles.present? && toggles[index.to_i]['attributes']['status'] == "amber" && toggles[index.to_i]['attributes']['beta-users'].split(",").include?(user_id.to_s)
|
61
61
|
end
|
62
62
|
end
|