openfeature-go-feature-flag-provider 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +14 -8
- data/lib/openfeature/go-feature-flag/go_feature_flag_provider.rb +1 -1
- data/lib/openfeature/go-feature-flag/goff_api.rb +11 -8
- data/lib/openfeature/go-feature-flag/version.rb +1 -1
- data/openfeature-go-feature-flag-provider.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06fbdcc3c614c61afbea2daf01673e32ec2e6a3ce6fb61cca3b38974fb8610e3
|
4
|
+
data.tar.gz: 8334fe12234af1b4d074f132a0b16cd96b418d33c94f35b3bf6c369a5864f9a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af3f930d2479b0d288034825d4bb69699b9c340136b69dd2186b79eb6a4c710a660e7b4ae2cf1a1b1f284a17f7ec1ae97c92f11c7690110342e33671a7136f57
|
7
|
+
data.tar.gz: 473b42bf836ac156e4f8f7204ad25c20c391dcb07a6e5c46b82d4c420f80a2962872831da456528ec73a7620d12c011392cce0efef331721b8ccbdc56815be43
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.4](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider/v0.1.3...openfeature-go-feature-flag-provider/v0.1.4) (2025-07-30)
|
4
|
+
|
5
|
+
|
6
|
+
### ✨ New Features
|
7
|
+
|
8
|
+
* connection persistance ([#59](https://github.com/open-feature/ruby-sdk-contrib/issues/59)) ([3a01a5e](https://github.com/open-feature/ruby-sdk-contrib/commit/3a01a5e4cc597aa0bc223e71f3e165f63c66f296))
|
9
|
+
|
3
10
|
## [0.1.3](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider/v0.1.2...openfeature-go-feature-flag-provider/v0.1.3) (2025-01-25)
|
4
11
|
|
5
12
|
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openfeature-go-feature-flag-provider (0.1.
|
5
|
-
faraday (~> 2.
|
4
|
+
openfeature-go-feature-flag-provider (0.1.4)
|
5
|
+
faraday-net_http_persistent (~> 2.3)
|
6
6
|
openfeature-sdk (~> 0.3.1)
|
7
7
|
|
8
8
|
GEM
|
@@ -12,24 +12,30 @@ GEM
|
|
12
12
|
public_suffix (>= 2.0.2, < 7.0)
|
13
13
|
ast (2.4.2)
|
14
14
|
bigdecimal (3.1.8)
|
15
|
+
connection_pool (2.5.3)
|
15
16
|
crack (1.0.0)
|
16
17
|
bigdecimal
|
17
18
|
rexml
|
18
19
|
diff-lcs (1.5.1)
|
19
20
|
docile (1.4.1)
|
20
|
-
faraday (2.
|
21
|
+
faraday (2.13.4)
|
21
22
|
faraday-net_http (>= 2.0, < 3.5)
|
22
23
|
json
|
23
24
|
logger
|
24
|
-
faraday-net_http (3.4.
|
25
|
+
faraday-net_http (3.4.1)
|
25
26
|
net-http (>= 0.5.0)
|
27
|
+
faraday-net_http_persistent (2.3.1)
|
28
|
+
faraday (~> 2.5)
|
29
|
+
net-http-persistent (>= 4.0.4, < 5)
|
26
30
|
hashdiff (1.1.1)
|
27
|
-
json (2.
|
31
|
+
json (2.13.2)
|
28
32
|
language_server-protocol (3.17.0.3)
|
29
33
|
lint_roller (1.1.0)
|
30
|
-
logger (1.
|
31
|
-
net-http (0.
|
34
|
+
logger (1.7.0)
|
35
|
+
net-http (0.6.0)
|
32
36
|
uri
|
37
|
+
net-http-persistent (4.0.6)
|
38
|
+
connection_pool (~> 2.2, >= 2.2.4)
|
33
39
|
openfeature-sdk (0.3.1)
|
34
40
|
parallel (1.24.0)
|
35
41
|
parser (3.3.0.5)
|
@@ -92,7 +98,7 @@ GEM
|
|
92
98
|
rubocop-performance (~> 1.20.2)
|
93
99
|
strscan (3.1.0)
|
94
100
|
unicode-display_width (2.5.0)
|
95
|
-
uri (1.0.
|
101
|
+
uri (1.0.3)
|
96
102
|
webmock (3.23.1)
|
97
103
|
addressable (>= 2.8.0)
|
98
104
|
crack (>= 0.3.2)
|
@@ -10,7 +10,7 @@ module OpenFeature
|
|
10
10
|
def initialize(options: Options.new)
|
11
11
|
@metadata = SDK::Provider::ProviderMetadata.new(name: PROVIDER_NAME)
|
12
12
|
@options = options
|
13
|
-
@goff_api = GoFeatureFlagApi.new(options: options)
|
13
|
+
@goff_api = GoFeatureFlagApi.new(endpoint: options.endpoint, custom_headers: options.custom_headers)
|
14
14
|
end
|
15
15
|
|
16
16
|
def fetch_boolean_value(flag_key:, default_value:, evaluation_context: nil)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require "open_feature/sdk"
|
4
4
|
require "net/http"
|
5
5
|
require "json"
|
6
|
-
require "faraday"
|
6
|
+
require "faraday/net_http_persistent"
|
7
7
|
require_relative "error/errors"
|
8
8
|
require_relative "model/ofrep_api_response"
|
9
9
|
|
@@ -11,13 +11,12 @@ module OpenFeature
|
|
11
11
|
module GoFeatureFlag
|
12
12
|
# This class is the entry point for the GoFeatureFlagProvider
|
13
13
|
class GoFeatureFlagApi
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
)
|
14
|
+
def initialize(endpoint: nil, custom_headers: nil)
|
15
|
+
@faraday_connection = Faraday.new(url: endpoint, headers: headers(custom_headers)) do |f|
|
16
|
+
f.adapter :net_http_persistent do |http|
|
17
|
+
http.idle_timeout = 30
|
18
|
+
end
|
19
|
+
end
|
21
20
|
end
|
22
21
|
|
23
22
|
def evaluate_ofrep_api(flag_key:, evaluation_context:)
|
@@ -57,6 +56,10 @@ module OpenFeature
|
|
57
56
|
|
58
57
|
private
|
59
58
|
|
59
|
+
def headers(custom_headers)
|
60
|
+
{"Content-Type" => "application/json"}.merge(custom_headers || {})
|
61
|
+
end
|
62
|
+
|
60
63
|
def parse_error_response(response)
|
61
64
|
required_keys = %w[key error_code]
|
62
65
|
parsed = JSON.parse(response.body)
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
32
|
spec.add_runtime_dependency "openfeature-sdk", "~> 0.3.1"
|
33
|
-
spec.add_runtime_dependency "faraday", "~> 2.
|
33
|
+
spec.add_runtime_dependency "faraday-net_http_persistent", "~> 2.3"
|
34
34
|
|
35
35
|
spec.add_development_dependency "rake", "~> 13.0"
|
36
36
|
spec.add_development_dependency "rspec", "~> 3.12.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openfeature-go-feature-flag-provider
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Poignant
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: openfeature-sdk
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: faraday
|
28
|
+
name: faraday-net_http_persistent
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|