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

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: '018d25337f3d0990a16a6cf08353de44d09e149a86ee51662849fd0ddffcf15f'
4
- data.tar.gz: 4676ffdfbd26b433536effd5ac1ee9fc7de7dcd8db684354014cccbe4ce44eed
3
+ metadata.gz: 5e163ade7d4e9104e049f26e16b2e7541b27f9f4b8b77db8032e7c173cd94cb5
4
+ data.tar.gz: aaf8349ce31028f7dce69b3830bde25822fb0a7f9d70b0b7de2707d68cf052b0
5
5
  SHA512:
6
- metadata.gz: 0ad10200eaf42b42c939c7b714148612932f18ff624274b9738256ae2ca0b021c66cbe6d895ce406da6d18cd1b6da0ae975ee77a28cefff43f5e4e904b4510d1
7
- data.tar.gz: d6689dbcb9d1f87201b83b261fc36ca4557977bd27005fe18b2953455717dc1b2bc5cd0f23858fad8d5e338aae417276778370abbe04af633c975ad938f79274
6
+ metadata.gz: 86c42eba61ea314922a0934fe5fbc6bda0939f05707c5d7d201e4c1bc4d3bfc703489d711fdc2ac3119e86077fae79bd79ac0d133b71ad35cd7fe09be0f2c559
7
+ data.tar.gz: 1df00ab301c7ad4dc3aa29155610c89c73e6c09f6dc501247a9906760f0d17609751c8d2ea86d9b7c8c252c995fb518e67bbda357a15e2ffd68ef1dca4ec7d5d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
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
+
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)
11
+
12
+
13
+ ### 🐛 Bug Fixes
14
+
15
+ * loosen faraday version requirements ([#43](https://github.com/open-feature/ruby-sdk-contrib/issues/43)) ([df65efc](https://github.com/open-feature/ruby-sdk-contrib/commit/df65efc5c3c55536e2aa964fc075d89da8c19108))
16
+
3
17
  ## [0.1.1](https://github.com/open-feature/ruby-sdk-contrib/compare/openfeature-go-feature-flag-provider-v0.1.0...openfeature-go-feature-flag-provider/v0.1.1) (2024-08-13)
4
18
 
5
19
 
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.1)
5
- faraday (~> 2.10.1)
4
+ openfeature-go-feature-flag-provider (0.1.3)
5
+ faraday (~> 2.10)
6
6
  openfeature-sdk (~> 0.3.1)
7
7
 
8
8
  GEM
@@ -17,17 +17,18 @@ GEM
17
17
  rexml
18
18
  diff-lcs (1.5.1)
19
19
  docile (1.4.1)
20
- faraday (2.10.1)
21
- faraday-net_http (>= 2.0, < 3.2)
20
+ faraday (2.12.1)
21
+ faraday-net_http (>= 2.0, < 3.5)
22
+ json
22
23
  logger
23
- faraday-net_http (3.1.1)
24
- net-http
24
+ faraday-net_http (3.4.0)
25
+ net-http (>= 0.5.0)
25
26
  hashdiff (1.1.1)
26
27
  json (2.7.2)
27
28
  language_server-protocol (3.17.0.3)
28
29
  lint_roller (1.1.0)
29
- logger (1.6.0)
30
- net-http (0.4.1)
30
+ logger (1.6.1)
31
+ net-http (0.5.0)
31
32
  uri
32
33
  openfeature-sdk (0.3.1)
33
34
  parallel (1.24.0)
@@ -91,7 +92,7 @@ GEM
91
92
  rubocop-performance (~> 1.20.2)
92
93
  strscan (3.1.0)
93
94
  unicode-display_width (2.5.0)
94
- uri (0.13.0)
95
+ uri (1.0.2)
95
96
  webmock (3.23.1)
96
97
  addressable (>= 2.8.0)
97
98
  crack (>= 0.3.2)
@@ -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.1"
3
+ GO_FEATURE_FLAG_PROVIDER_VERSION = "0.1.3"
4
4
  end
5
5
  end
@@ -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.10.1"
33
+ spec.add_runtime_dependency "faraday", "~> 2.10"
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.1
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-08-13 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
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.10.1
33
+ version: '2.10'
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.10.1
40
+ version: '2.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -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
@@ -167,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.5.11
171
- signing_key:
170
+ rubygems_version: 3.5.22
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: []