openfeature-go-feature-flag-provider 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddfe59a26f6cb77f15f337d09960c06d01f35465e388c39a3b06603f36c0f573
4
- data.tar.gz: 7598fabc63d82fa717b8dd388a1ccd4825db1a71e86aa5d92161eb704751616f
3
+ metadata.gz: '0838c9664ebeca1013f90b3cc70c4beb1c42e5c7725b59b4a097a6be19662560'
4
+ data.tar.gz: a18db33dd6dd0d7be19cc9dbba2e30953c68e4b6ebcdf3ebde1a5e4fa1e15052
5
5
  SHA512:
6
- metadata.gz: ab45b781c719f2f037677808d3fce03e49dbe683f9c33acdc52065e79ccc0b81a428f642bc55310ffef543f54dbea1e530665954f8a0b714df052f8ba6dbcdc2
7
- data.tar.gz: 1c831f1f4a7015fd811111fc91d6f1055a9feb032771be4b87c467edba901f3d4aff394c22d9dc9966ad3ec0cd18feeafc087d547534946e86fc424810128374
6
+ metadata.gz: 6316d172b0d13e9900f3b31e20068fb80407feb9df3949bbeccf4b9eac29efdba2feb67ac5f2f45483d323302cbb8ead84d753b4199f409a4b14c186329f78bf
7
+ data.tar.gz: 8b3cc0c468d82c86fb6121430085dafd9f49c0c511bee805d4c39114927f92aedea2b6e71385b4dd8a3d28665719985cbcc7c97785cff10d5c3dcae9f6364d3f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.9](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider/v0.1.8...openfeature-go-feature-flag-provider/v0.1.9) (2026-01-28)
4
+
5
+
6
+ ### ✨ New Features
7
+
8
+ * Timeout option for http client ([#76](https://github.com/open-feature/ruby-sdk-contrib/issues/76)) ([11e0de2](https://github.com/open-feature/ruby-sdk-contrib/commit/11e0de297527e90ee3dfcabf9d6bc35ff3149b9b))
9
+
3
10
  ## [0.1.8](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider/v0.1.7...openfeature-go-feature-flag-provider/v0.1.8) (2026-01-13)
4
11
 
5
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openfeature-go-feature-flag-provider (0.1.8)
4
+ openfeature-go-feature-flag-provider (0.1.9)
5
5
  faraday-net_http_persistent (~> 2.3)
6
6
  openfeature-sdk (~> 0.3.1)
7
7
 
data/README.md CHANGED
@@ -50,6 +50,7 @@ The `OpenFeature::GoFeatureFlag::Provider` needs some options to be created and
50
50
  | `endpoint` | **(mandatory)** The URL to access to the relay-proxy.<br />*(example: `https://relay.proxy.gofeatureflag.org/`)* |
51
51
  | `headers` | A `Hash` object containing the headers to send to the relay-proxy.<br/>*(example to send APIKey: `{"Authorization" => "Bearer my-api-key"}` |
52
52
  | `instrumentation` | [Faraday instrumentation](https://github.com/lostisland/faraday/blob/main/docs/middleware/included/instrumentation.md) hash |
53
+ | `timeout` | Request timeout in seconds ([Faraday request options](https://rubydoc.info/github/lostisland/faraday/Faraday/Connection)). |
53
54
  The only required option to create a `GoFeatureFlagProvider` is the URL _(`endpoint`)_ to your GO Feature Flag relay-proxy instance.
54
55
 
55
56
  ```ruby
@@ -7,9 +7,10 @@ module OpenFeature
7
7
  module GoFeatureFlag
8
8
  module Client
9
9
  class HttpApi < Common
10
- def initialize(endpoint: nil, custom_headers: nil, instrumentation: nil)
10
+ def initialize(endpoint: nil, custom_headers: nil, instrumentation: nil, timeout: nil)
11
11
  @custom_headers = custom_headers
12
- @faraday_connection = Faraday.new(url: endpoint, headers: headers) do |f|
12
+ request_options = {timeout: timeout}
13
+ @faraday_connection = Faraday.new(url: endpoint, headers: headers, request: request_options) do |f|
13
14
  f.request :instrumentation, instrumentation if instrumentation
14
15
  f.adapter :net_http_persistent do |http|
15
16
  http.idle_timeout = 30
@@ -103,7 +103,7 @@ module OpenFeature
103
103
  def build_client(options)
104
104
  case options.type
105
105
  when "http"
106
- Client::HttpApi.new(endpoint: options.endpoint, custom_headers: options.custom_headers, instrumentation: options.instrumentation)
106
+ Client::HttpApi.new(endpoint: options.endpoint, custom_headers: options.custom_headers, instrumentation: options.instrumentation, timeout: options.timeout)
107
107
  when "unix"
108
108
  Client::UnixApi.new(endpoint: options.endpoint, custom_headers: options.custom_headers)
109
109
  else
@@ -6,9 +6,9 @@ module OpenFeature
6
6
  module GoFeatureFlag
7
7
  # This class is the configuration class for the GoFeatureFlagProvider
8
8
  class Options
9
- attr_accessor :endpoint, :custom_headers, :exporter_metadata, :instrumentation, :type
9
+ attr_accessor :endpoint, :custom_headers, :exporter_metadata, :instrumentation, :type, :timeout
10
10
 
11
- def initialize(endpoint: nil, headers: {}, exporter_metadata: {}, instrumentation: nil, type: "http")
11
+ def initialize(endpoint: nil, headers: {}, exporter_metadata: {}, instrumentation: nil, type: "http", timeout: nil)
12
12
  validate_endpoint(endpoint, type)
13
13
  validate_instrumentation(instrumentation: instrumentation)
14
14
  @type = type
@@ -16,6 +16,7 @@ module OpenFeature
16
16
  @custom_headers = headers
17
17
  @exporter_metadata = exporter_metadata
18
18
  @instrumentation = instrumentation
19
+ @timeout = timeout
19
20
  end
20
21
 
21
22
  private
@@ -1,5 +1,5 @@
1
1
  module OpenFeature
2
2
  module GoFeatureFlag
3
- GO_FEATURE_FLAG_PROVIDER_VERSION = "0.1.8"
3
+ GO_FEATURE_FLAG_PROVIDER_VERSION = "0.1.9"
4
4
  end
5
5
  end
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.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Poignant
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-13 00:00:00.000000000 Z
11
+ date: 2026-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openfeature-sdk