ft_gem 3.0.1 → 3.0.2

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: 816a5c567d0c372bf9da4de797c9f3052ece2098abbbc2dbbad42f0056be4968
4
- data.tar.gz: ae8ce8e3ae282ac8ed8fb3e15ab8de46a3f5e0dbaea297a4a0ca0854e92f633e
3
+ metadata.gz: 4db912daaeeb0db5f4c4f53619d7069f67d9e8fbbed1af743626ec1c33f4f580
4
+ data.tar.gz: 90063c269dd4d8282f4c1e415d17a565a6270a318dd59db5f77edf317b4e2368
5
5
  SHA512:
6
- metadata.gz: e215fa09ea091d7aea42bf59ee9eb66a47f4099b99e20364285c243b9757ef2e9aa37471245641e844cb334780fc2b19f0ac21446614335753a5135e2643761a
7
- data.tar.gz: 0f8cc5c5bbd5af2310115a47368f14f3d00759f792be928dc85b18c1e1bb381d7786b8de5d5e277f7de8d7adfe1788bf83d522e7521cc6cab61a6a9cad6eb146
6
+ metadata.gz: c6a7bab0398bccc298e3e559bdad08626b43fde41d32d2dae6cd4b2391556193917af0c0ee4fcfa15f047fe7b0ec12ec46f48e7db9cb67aa6bc3ca8e9ac34ddb
7
+ data.tar.gz: 90e54c1ba7272e485d5adb3bd6a79017cbfc1331ce4d3b80f095c694206c1a771267251e81fe5be2836bd2812c471166ceec2797f61472d15f750da8354f471a
@@ -27,7 +27,7 @@ module FtGem
27
27
  client_percentage = calc_client_percentage(decoded_cookie: decoded_cookie, toggle_name: toggle['attributes']['name'])
28
28
  new_cookie.push("#{toggle['attributes']['name']}:#{client_percentage}")
29
29
  end
30
- cookies[TOGGLE_COOKIE_NAME] = { value: Base64.encode64(new_cookie.join(',')).to_s }
30
+ cookies[TOGGLE_COOKIE_NAME] = { value: Base64.encode64(new_cookie.join(',')).to_s, domain: ENV['COOKIE_DOMAIN'] }
31
31
  rescue StandardError => e
32
32
  Rails.logger.error "FTApiGem::update_feature_toggles error #{e.backtrace}"
33
33
  nil
@@ -2,7 +2,7 @@ module FtShared
2
2
  class <<self
3
3
  def fetch(name:)
4
4
  Rails.cache.fetch("feature-toggle-#{name}", expires_in: 1.minute) do
5
- JSON.parse(HTTP.headers(authentication_header).get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/status", params: { name: name }).body.to_s)['data']
5
+ JSON.parse(HTTP.timeout(1).headers(authentication_header).get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/status", params: { name: name }).body.to_s)['data']
6
6
  end
7
7
  rescue StandardError => e
8
8
  Rails.logger.error "FtHelper::fetch error #{e.backtrace}"
@@ -11,7 +11,7 @@ module FtShared
11
11
 
12
12
  def all_toggles
13
13
  Rails.cache.fetch('all-feature-toggles', expires_in: 1.minute) do
14
- JSON.parse(HTTP.headers(authentication_header).get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/"))['data']
14
+ JSON.parse(HTTP.timeout(1).headers(authentication_header).get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/"))['data']
15
15
  end
16
16
  rescue StandardError => e
17
17
  Rails.logger.error "FtHelper::all_toggles error #{e.backtrace}"
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.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murray Catto