ft_gem 3.1.6 → 3.1.7

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: 5ca0566dc7734cac585efc11741f71fdd293e4a924d207d0285d0555d4c63f34
4
- data.tar.gz: d88568950bac57aa06858fa31dc5b18f32179d938cf79c2f08045894984a3230
3
+ metadata.gz: 871c3d6f5f3d0f85c5d1677cd6f72c41590c2d2cb03dd09a8bb97476831e9fb2
4
+ data.tar.gz: f96b70b64a0385f08580ee9c676b31122e4be4336532c3e376bfa69135cb725c
5
5
  SHA512:
6
- metadata.gz: 530936aef0568a373e8b59aba62ff94bbb11593ea3b6c96ac7a860fa4351f0d578a4fe439df584ccf8c61bbce872aa42df0233eb3e7cb377542ceb6bcea9171b
7
- data.tar.gz: 21a2c60a25d65c333fda8ed4cfe7eb6ea616cfd8490e9ff5acd46893f31adb0b6efc4f26b49e3afa79c4f01fdfe57d3737b31965c327b8c57457c070d4c1135c
6
+ metadata.gz: c656b69d716010847867e54d1c5fb18a904051421b2214a532a77bc3a7a46bfff39d08c8cc21b281cc76950b4b7183ba4c68c12fd135067bb0b553a52740bdb5
7
+ data.tar.gz: 0e81709647e1b7306d0e6049556f57b5e96f15af9419b7b5c0e502ead9ad82f7c04e2fc216a684d6801486c428c489cf28248b12b7e38788d9dae97b74fda2b8
@@ -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)
17
+ if user_id_beta(user_id: user_id, toggles: toggles)
18
18
  return true && whitelisted
19
19
  else
20
20
  return client_percentage.to_i <= toggle_percentage.to_i && whitelisted
@@ -56,8 +56,8 @@ module FtGem
56
56
 
57
57
  private
58
58
 
59
- def user_id_beta(user_id: nil)
60
- user_id.present? && toggles[index.to_i]['attributes']['status'] == "amber" && toggles[index.to_i]['attributes']['beta-users'].split(",").include?(user_id.to_s)
59
+ def user_id_beta(user_id: nil, toggles: nil)
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
63
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ft_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.6
4
+ version: 3.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murray Catto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-17 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumsnet_jwt