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 +4 -4
- data/lib/ft_gem/controllers/helpers.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 871c3d6f5f3d0f85c5d1677cd6f72c41590c2d2cb03dd09a8bb97476831e9fb2
|
4
|
+
data.tar.gz: f96b70b64a0385f08580ee9c676b31122e4be4336532c3e376bfa69135cb725c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
11
|
+
date: 2020-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumsnet_jwt
|