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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 871c3d6f5f3d0f85c5d1677cd6f72c41590c2d2cb03dd09a8bb97476831e9fb2
4
- data.tar.gz: f96b70b64a0385f08580ee9c676b31122e4be4336532c3e376bfa69135cb725c
3
+ metadata.gz: 809676c332224a3afa063feb423dc9e8af915ffe37f8b5315ab45d25102fb903
4
+ data.tar.gz: c621a941075cbe797eb6286f5bf26b9d8e7abe8a1efa189369ba8a4c6336c378
5
5
  SHA512:
6
- metadata.gz: c656b69d716010847867e54d1c5fb18a904051421b2214a532a77bc3a7a46bfff39d08c8cc21b281cc76950b4b7183ba4c68c12fd135067bb0b553a52740bdb5
7
- data.tar.gz: 0e81709647e1b7306d0e6049556f57b5e96f15af9419b7b5c0e502ead9ad82f7c04e2fc216a684d6801486c428c489cf28248b12b7e38788d9dae97b74fda2b8
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
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: 3.1.7
4
+ version: 3.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murray Catto