openfeature-go-feature-flag-provider 0.1.2 → 0.1.3

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: 116cdf1f3d6b2f17ff01c42064fec29636c9921dfbd717d5e8d6293f2293f758
4
- data.tar.gz: c5ea59e6c8ea088c343e2381b1937356e59073af4e83487896e4e3505f644faa
3
+ metadata.gz: 5e163ade7d4e9104e049f26e16b2e7541b27f9f4b8b77db8032e7c173cd94cb5
4
+ data.tar.gz: aaf8349ce31028f7dce69b3830bde25822fb0a7f9d70b0b7de2707d68cf052b0
5
5
  SHA512:
6
- metadata.gz: df7549c061a20dd165473ae02eb7cb41dc1e8f5224b7c62ab45bb9dd6af0f38eb55b84959f4710d80b69a96b348a3be6f6ab98feb1799d2565ca3b649e648bc8
7
- data.tar.gz: 6387510e2e62c7542a40ce60eacb2d47f7a789836b2524ac48eb91ea37e01fa29674053bfb6b9e2402e9e980ace3385436799f174023035c0b63dc9875e19aaf
6
+ metadata.gz: 86c42eba61ea314922a0934fe5fbc6bda0939f05707c5d7d201e4c1bc4d3bfc703489d711fdc2ac3119e86077fae79bd79ac0d133b71ad35cd7fe09be0f2c559
7
+ data.tar.gz: 1df00ab301c7ad4dc3aa29155610c89c73e6c09f6dc501247a9906760f0d17609751c8d2ea86d9b7c8c252c995fb518e67bbda357a15e2ffd68ef1dca4ec7d5d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [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
+
5
+
6
+ ### ✨ New Features
7
+
8
+ * **go-feature-flag:** Support exporter metadata ([#45](https://github.com/open-feature/ruby-sdk-contrib/issues/45)) ([04754fd](https://github.com/open-feature/ruby-sdk-contrib/commit/04754fd24e33ce993a9da3ddcaf84c34f9cb2342))
9
+
3
10
  ## [0.1.2](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider/v0.1.1...openfeature-go-feature-flag-provider/v0.1.2) (2024-12-02)
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.2)
4
+ openfeature-go-feature-flag-provider (0.1.3)
5
5
  faraday (~> 2.10)
6
6
  openfeature-sdk (~> 0.3.1)
7
7
 
@@ -35,6 +35,10 @@ module OpenFeature
35
35
  evaluation_context = OpenFeature::SDK::EvaluationContext.new if evaluation_context.nil?
36
36
  validate_parameters(flag_key, evaluation_context)
37
37
 
38
+ # enrich the evaluation context with the exporter_metadata
39
+ @options.exporter_metadata.merge!("openfeature" => true, "provider" => "ruby")
40
+ evaluation_context.fields["gofeatureflag"] = {"exporterMetadata" => @options.exporter_metadata}
41
+
38
42
  # do a http call to the go feature flag server
39
43
  parsed_response = @goff_api.evaluate_ofrep_api(flag_key: flag_key, evaluation_context: evaluation_context)
40
44
  parsed_response = OfrepApiResponse unless parsed_response.is_a?(OfrepApiResponse)
@@ -6,12 +6,13 @@ 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
9
+ attr_accessor :endpoint, :custom_headers, :exporter_metadata
10
10
 
11
- def initialize(endpoint: nil, headers: {})
11
+ def initialize(endpoint: nil, headers: {}, exporter_metadata: {})
12
12
  validate_endpoint(endpoint: endpoint)
13
13
  @endpoint = endpoint
14
14
  @custom_headers = headers
15
+ @exporter_metadata = exporter_metadata
15
16
  end
16
17
 
17
18
  private
@@ -1,5 +1,5 @@
1
1
  module OpenFeature
2
2
  module GoFeatureFlag
3
- GO_FEATURE_FLAG_PROVIDER_VERSION = "0.1.2"
3
+ GO_FEATURE_FLAG_PROVIDER_VERSION = "0.1.3"
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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Poignant
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-02 00:00:00.000000000 Z
11
+ date: 2025-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openfeature-sdk
@@ -152,7 +152,7 @@ metadata:
152
152
  changelog_uri: https://github.com/open-feature/ruby-sdk-contrib/blob/main/providers/openfeature-go-feature-flag-provider/CHANGELOG.md
153
153
  bug_tracker_uri: https://github.com/thomaspoignant/go-feature-flag/issues/new/choose
154
154
  documentation_uri: https://gofeatureflag.org/docs
155
- post_install_message:
155
+ post_install_message:
156
156
  rdoc_options: []
157
157
  require_paths:
158
158
  - lib
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubygems_version: 3.5.22
171
- signing_key:
171
+ signing_key:
172
172
  specification_version: 4
173
173
  summary: The GO Feature Flag provider for the OpenFeature Ruby SDK
174
174
  test_files: []