ft_gem 3.0.8 → 3.0.9
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/shared/ft_shared.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: 58fbec10bcb730b69f3f8f4289ec9eb5f21437f47cc545bd2050616c19e66d19
|
4
|
+
data.tar.gz: 27096da6d9084cdcfa3a6f86ef891d1d01684a37d513019a72f653ce526365ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 968d5f9103a0ef28d7e2bc7adeca1a88735de32726802eb27fd00d8fa97b3d386424a599dc6e9b64d8f6c621654e701a371f0564d3157eb4102473ff4e293a0b
|
7
|
+
data.tar.gz: 718da1efc3697fbc481792eb7bc2d5d3ca335db5bf2eab24a4f0ec9f27351cbc35df2b81ad1b8d5b6ae6d2aceb1c887b862cdba4d2b7e4b193e456037e188ff6
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class FtShared
|
2
2
|
def fetch(name:)
|
3
3
|
Rails.cache.fetch("feature-toggle-#{name}", expires_in: 1.minute) do
|
4
|
-
JSON.parse(HTTParty.get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/status", {query: { name: name },headers:authentication_header}).
|
4
|
+
JSON.parse(HTTParty.get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/status", {query: { name: name },headers:authentication_header}).to_json)['data']
|
5
5
|
end
|
6
6
|
rescue StandardError => e
|
7
7
|
Rails.logger.error "FtHelper::fetch error #{e.backtrace}"
|
@@ -10,7 +10,7 @@ class FtShared
|
|
10
10
|
|
11
11
|
def all_toggles
|
12
12
|
Rails.cache.fetch('all-feature-toggles', expires_in: 1.minute) do
|
13
|
-
JSON.parse(HTTParty.get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/",{headers:authentication_header}).
|
13
|
+
JSON.parse(HTTParty.get("#{ENV['SITE_URL']}/service/ft/api/v1/feature-toggles/",{headers:authentication_header}).to_json)['data']
|
14
14
|
end
|
15
15
|
rescue StandardError => e
|
16
16
|
Rails.logger.error "FtHelper::all_toggles error #{e.backtrace}"
|