ft_gem 3.0.4 → 3.0.5
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: 68bdb58cfef614b3853118221d9825607a21b8c63a9b26b2e5040458ec960bf3
|
4
|
+
data.tar.gz: 17a71e2f5035a2d69a447f28c3cd202d0ab8f5259115f67333c1b3110e2bd040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 612aa07bb3a986bf68397a5c47418ef138df30aec281a33565fa1419bc964862811c23209a8aab3e14b21a8c60f9d7806ff72485aac50457e2a927c40a5fbe53
|
7
|
+
data.tar.gz: 7eaa9d57cc4f58b45e34747f177203f40fdb2426e3797e8fe88b76be069f4357edd2c3a6216c2cc97ea42f97a66052d76cbcb4fa19c92593da52ecb7c4ec1095
|
@@ -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.
|
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']
|
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.
|
14
|
+
JSON.parse(HTTP.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}"
|