quonfig-openfeature 0.0.4 → 0.0.6

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: 6c1221d0ff74f947b7e5d54dfa126994f293cb2924411af33f23ecd5c821f864
4
- data.tar.gz: bd7ca301c3723978a72fd88cc04f662544fab16c8a2b69729d20098921438e6d
3
+ metadata.gz: b7dadf25b1ab1e6b89f51da4349c2d75b762f365a9a503c599d98e2e0a5f3e62
4
+ data.tar.gz: 87282d0419edc8fe129f47e8a3273afa8df0534e18cc5b7f20693c15b51ae81f
5
5
  SHA512:
6
- metadata.gz: 91fb7599243c068204364b9ae3b785146bbd61d0bed1ff40f9ec5c42001c1b18b1f981c5e05b5078dd73c2a16a60cc49434774fe678bc32116a6eda1ad079dc9
7
- data.tar.gz: a9393d16f9722633b5e6ddbda84a3768600440fbc681e1cd29d179716bb7ac84c430e8dff5ff2cfda7d8a476cac67b3a5596b3737e0b1bef7da1f1a9f6354979
6
+ metadata.gz: 7cc0a385157c241f508c2b9d769181c829321f04a309fd3d6a5eb27d528fc1acbf04c0b16575104c13bc486340ffe25c972a3c937c23820bafee43ca28f1dfa6
7
+ data.tar.gz: 453b860ba153b45b2eba50e8a99a5dc60aaa6903bfcc0cf50c14635f9aada3a21877969ec00a00b6159a6d94a17ac9ae34ced1973840ebf0196b3909e1b82d2e
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.0.6 - 2026-05-15
4
+
5
+ - **Chore: bump `quonfig` runtime floor to `>= 0.0.15` (qfg-ie49).** The 0.0.15 release of the native Ruby SDK fixes how `restart_total` (Layer 1 SSE) is counted under clean-FIN reconnects and hardens the reconnect-counting logger wrapper against worker-thread death. Provider code is unchanged — the fix is in the SDK's SSE delivery path. Tightening the floor signals this provider is tested against and requires the fixed SDK so downstream installs of the OpenFeature provider can't pull in an SSE-restart-buggy SDK.
6
+
7
+ ## 0.0.5 - 2026-05-07
8
+
9
+ - **Chore: bump `quonfig` runtime floor to `>= 0.0.13` (qfg-7jnb.11).** The 0.0.13 release of the native Ruby SDK adds support for the `IS_PRESENT` and `IS_NOT_PRESENT` targeting operators (qfg-7jnb.6). Tightening the floor signals that this provider is tested against and requires the new SDK; downstream Bundler resolutions already on `>= 0.0.12` would have picked up 0.0.13 automatically, but the explicit floor prevents a stale install from masking missing-operator behaviour.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.6
@@ -16,13 +16,9 @@ module Quonfig
16
16
  return ErrorCode::GENERAL if err.nil?
17
17
 
18
18
  # Class-based mapping is the most reliable signal.
19
- if defined?(::Quonfig::Errors::MissingDefaultError) && err.is_a?(::Quonfig::Errors::MissingDefaultError)
20
- return ErrorCode::FLAG_NOT_FOUND
21
- end
19
+ return ErrorCode::FLAG_NOT_FOUND if defined?(::Quonfig::Errors::MissingDefaultError) && err.is_a?(::Quonfig::Errors::MissingDefaultError)
22
20
 
23
- if defined?(::Quonfig::Errors::TypeMismatchError) && err.is_a?(::Quonfig::Errors::TypeMismatchError)
24
- return ErrorCode::TYPE_MISMATCH
25
- end
21
+ return ErrorCode::TYPE_MISMATCH if defined?(::Quonfig::Errors::TypeMismatchError) && err.is_a?(::Quonfig::Errors::TypeMismatchError)
26
22
 
27
23
  if (defined?(::Quonfig::Errors::UninitializedError) && err.is_a?(::Quonfig::Errors::UninitializedError)) ||
28
24
  (defined?(::Quonfig::Errors::InitializationTimeoutError) && err.is_a?(::Quonfig::Errors::InitializationTimeoutError))
@@ -35,7 +31,7 @@ module Quonfig
35
31
  msg.include?('no value found') ||
36
32
  msg.include?('value found for key')
37
33
  return ErrorCode::TYPE_MISMATCH if msg.include?('type mismatch') ||
38
- msg.include?('expected ') && msg.include?('got ')
34
+ (msg.include?('expected ') && msg.include?('got '))
39
35
  return ErrorCode::PROVIDER_NOT_READY if msg.include?('not initialized') ||
40
36
  msg.include?('provider not ready') ||
41
37
  msg.include?("couldn't initialize") ||
@@ -89,9 +89,7 @@ module Quonfig
89
89
  # Escape hatch: returns the underlying +Quonfig::Client+ for native-only
90
90
  # features (keys, raw config, durations, log levels). Returns +nil+ until
91
91
  # +init+ has run.
92
- def client
93
- @client
94
- end
92
+ attr_reader :client
95
93
 
96
94
  # ---- fetch_*_value -----------------------------------------------------
97
95
 
@@ -113,9 +111,7 @@ module Quonfig
113
111
  # int and double configs.
114
112
  evaluate(flag_key, default_value, evaluation_context) do |client, mapped_ctx|
115
113
  details = client.get_int_details(flag_key, context: mapped_ctx)
116
- if details.error_code == ::Quonfig::EvaluationDetails::ERROR_TYPE_MISMATCH
117
- details = client.get_float_details(flag_key, context: mapped_ctx)
118
- end
114
+ details = client.get_float_details(flag_key, context: mapped_ctx) if details.error_code == ::Quonfig::EvaluationDetails::ERROR_TYPE_MISMATCH
119
115
  to_resolution(details, default_value)
120
116
  end
121
117
  end
@@ -138,9 +134,7 @@ module Quonfig
138
134
  def fetch_object_value(flag_key:, default_value:, evaluation_context: nil)
139
135
  evaluate(flag_key, default_value, evaluation_context) do |client, mapped_ctx|
140
136
  details = client.get_string_list_details(flag_key, context: mapped_ctx)
141
- if details.error_code == ::Quonfig::EvaluationDetails::ERROR_TYPE_MISMATCH
142
- details = client.get_json_details(flag_key, context: mapped_ctx)
143
- end
137
+ details = client.get_json_details(flag_key, context: mapped_ctx) if details.error_code == ::Quonfig::EvaluationDetails::ERROR_TYPE_MISMATCH
144
138
  to_resolution(details, default_value)
145
139
  end
146
140
  end
@@ -151,21 +145,29 @@ module Quonfig
151
145
  # the SDK consumes. The Quonfig SDK's *_details methods don't raise, so
152
146
  # this is a pure mapping layer.
153
147
  def to_resolution(details, default_value)
148
+ variant = details.variant
149
+ flag_metadata = details.flag_metadata || {}
154
150
  case details.reason
155
151
  when ::Quonfig::EvaluationDetails::REASON_STATIC
156
- ResolutionDetails.new(value: details.value, reason: Reason::STATIC)
152
+ ResolutionDetails.new(value: details.value, reason: Reason::STATIC,
153
+ variant: variant, flag_metadata: flag_metadata)
157
154
  when ::Quonfig::EvaluationDetails::REASON_TARGETING_MATCH
158
- ResolutionDetails.new(value: details.value, reason: Reason::TARGETING_MATCH)
155
+ ResolutionDetails.new(value: details.value, reason: Reason::TARGETING_MATCH,
156
+ variant: variant, flag_metadata: flag_metadata)
159
157
  when ::Quonfig::EvaluationDetails::REASON_SPLIT
160
- ResolutionDetails.new(value: details.value, reason: Reason::SPLIT)
158
+ ResolutionDetails.new(value: details.value, reason: Reason::SPLIT,
159
+ variant: variant, flag_metadata: flag_metadata)
161
160
  when ::Quonfig::EvaluationDetails::REASON_DEFAULT
162
- ResolutionDetails.new(value: default_value, reason: Reason::DEFAULT)
161
+ ResolutionDetails.new(value: default_value, reason: Reason::DEFAULT,
162
+ variant: variant, flag_metadata: flag_metadata)
163
163
  when ::Quonfig::EvaluationDetails::REASON_ERROR
164
164
  ResolutionDetails.new(
165
165
  value: default_value,
166
166
  reason: Reason::ERROR,
167
167
  error_code: map_error_code(details.error_code),
168
- error_message: details.error_message
168
+ error_message: details.error_message,
169
+ variant: variant,
170
+ flag_metadata: flag_metadata
169
171
  )
170
172
  else
171
173
  # Defensive default: surface as ERROR so unknown reasons don't
@@ -174,7 +176,9 @@ module Quonfig
174
176
  value: default_value,
175
177
  reason: Reason::ERROR,
176
178
  error_code: ErrorCode::GENERAL,
177
- error_message: "unknown reason: #{details.reason.inspect}"
179
+ error_message: "unknown reason: #{details.reason.inspect}",
180
+ variant: variant,
181
+ flag_metadata: flag_metadata
178
182
  )
179
183
  end
180
184
  end
@@ -187,7 +191,7 @@ module Quonfig
187
191
  end
188
192
  end
189
193
 
190
- def evaluate(flag_key, default_value, evaluation_context)
194
+ def evaluate(_flag_key, default_value, evaluation_context)
191
195
  client = @client
192
196
  if client.nil?
193
197
  return ResolutionDetails.new(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quonfig-openfeature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dwyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-03 00:00:00.000000000 Z
11
+ date: 2026-05-15 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: 0.0.12
33
+ version: 0.0.15
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: 0.0.12
40
+ version: 0.0.15
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -88,6 +88,7 @@ executables: []
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
+ - CHANGELOG.md
91
92
  - LICENSE.txt
92
93
  - README.md
93
94
  - VERSION
@@ -99,7 +100,8 @@ files:
99
100
  homepage: https://github.com/quonfig/openfeature-ruby
100
101
  licenses:
101
102
  - MIT
102
- metadata: {}
103
+ metadata:
104
+ rubygems_mfa_required: 'true'
103
105
  post_install_message:
104
106
  rdoc_options: []
105
107
  require_paths: