quonfig-openfeature 0.0.4 → 0.0.5
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 +5 -0
- data/VERSION +1 -1
- data/lib/quonfig/openfeature/errors.rb +3 -7
- data/lib/quonfig/openfeature/provider.rb +4 -10
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fa87b5af665b9d6e902e11b4f5de5e24f906ecd5735dbbf358515234e721791d
|
|
4
|
+
data.tar.gz: 757082a137f3100fd5df2dc14d36decc643ff9cac1b99b4fffcc07f26564b5eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcbe4750fb066acd5c2a4814b9f7ce92d04f26fcbc4e93ba19d7ef2fc0d7f53d06d64c87d70517fc1ce4c4b3edd850af9a4ccc9a3999ea41f6fce9a681c1f1fd
|
|
7
|
+
data.tar.gz: 3bab2f045e9c4797bfb0acf2a5e7091352b7a92a860d4fa49dde09c51a9fe6b68f5ffef32ea45066f43dc09b1604d7808b1d9dbfbbf8a45903ac1c538eeef332
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.0.5 - 2026-05-07
|
|
4
|
+
|
|
5
|
+
- **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.
|
|
1
|
+
0.0.5
|
|
@@ -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
|
-
|
|
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
|
|
@@ -187,7 +181,7 @@ module Quonfig
|
|
|
187
181
|
end
|
|
188
182
|
end
|
|
189
183
|
|
|
190
|
-
def evaluate(
|
|
184
|
+
def evaluate(_flag_key, default_value, evaluation_context)
|
|
191
185
|
client = @client
|
|
192
186
|
if client.nil?
|
|
193
187
|
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
|
+
version: 0.0.5
|
|
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-
|
|
11
|
+
date: 2026-05-08 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.
|
|
33
|
+
version: 0.0.13
|
|
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.
|
|
40
|
+
version: 0.0.13
|
|
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:
|