subflag-openfeature-provider 0.1.0 → 0.2.1
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 +31 -0
- data/README.md +1 -1
- data/lib/subflag/provider.rb +7 -5
- data/lib/subflag/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b361461efcf91e2b1a54ab182e9759d4d12de61055e7dbf0f306be31e7db1475
|
|
4
|
+
data.tar.gz: 94b7c357cc3d2347ffcd9fa2b8c4a86a4119240b5aa35b985b5215a825a2c6c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf21e561a3c0f13aa6a79d865750bda1fb5e9bc8c226f04b4043867548cac5e152384cc747f2312ff5fd6ae6a6a344ccce71eb2871a77163c15530958fd11dc2
|
|
7
|
+
data.tar.gz: 173d736c26c1de6c1257ae2c7de8b9f94d3c9fe7eba3e3b1aa54fac4e38d6bab3bec85304ca6eb495005a7f739b53ae89ec5ad9df7f0d6fc144c20f2bb7f276b
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.2.1] - 2025-11-30
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed Gemfile.lock sync issue
|
|
10
|
+
|
|
11
|
+
## [0.2.0] - 2025-11-30
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Breaking**: Provider now returns `OpenFeature::SDK::Provider::ResolutionDetails` instead of plain Hash
|
|
16
|
+
- Added `require "open_feature/sdk"` for proper SDK integration
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Fixed compatibility with OpenFeature Ruby SDK 0.4.x
|
|
21
|
+
|
|
22
|
+
## [0.1.0] - 2025-11-30
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- Initial release
|
|
27
|
+
- OpenFeature provider implementation for Subflag
|
|
28
|
+
- Support for boolean, string, integer, float, and object flag types
|
|
29
|
+
- Evaluation context support with targeting key
|
|
30
|
+
- Error handling with proper OpenFeature error codes
|
|
31
|
+
- Direct client usage without OpenFeature SDK
|
data/README.md
CHANGED
data/lib/subflag/provider.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "open_feature/sdk"
|
|
4
|
+
|
|
3
5
|
module Subflag
|
|
4
6
|
# OpenFeature provider for Subflag feature flag management.
|
|
5
7
|
#
|
|
@@ -136,12 +138,12 @@ module Subflag
|
|
|
136
138
|
# Convert value if needed (e.g., number -> integer)
|
|
137
139
|
converted_value = convert_value(result.value, expected_type)
|
|
138
140
|
|
|
139
|
-
|
|
141
|
+
OpenFeature::SDK::Provider::ResolutionDetails.new(
|
|
140
142
|
value: converted_value,
|
|
141
143
|
reason: map_reason(result.reason),
|
|
142
144
|
variant: result.variant,
|
|
143
145
|
flag_metadata: { flag_key: result.flag_key }
|
|
144
|
-
|
|
146
|
+
)
|
|
145
147
|
rescue FlagNotFoundError => e
|
|
146
148
|
error_result(default_value, error_code: :flag_not_found, error_message: e.message)
|
|
147
149
|
rescue AuthenticationError => e
|
|
@@ -200,14 +202,14 @@ module Subflag
|
|
|
200
202
|
end
|
|
201
203
|
end
|
|
202
204
|
|
|
203
|
-
# Build error result
|
|
205
|
+
# Build error result
|
|
204
206
|
def error_result(default_value, error_code:, error_message:)
|
|
205
|
-
|
|
207
|
+
OpenFeature::SDK::Provider::ResolutionDetails.new(
|
|
206
208
|
value: default_value,
|
|
207
209
|
reason: :error,
|
|
208
210
|
error_code: error_code,
|
|
209
211
|
error_message: error_message
|
|
210
|
-
|
|
212
|
+
)
|
|
211
213
|
end
|
|
212
214
|
end
|
|
213
215
|
end
|
data/lib/subflag/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: subflag-openfeature-provider
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Subflag
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -132,6 +132,7 @@ files:
|
|
|
132
132
|
- ".rspec"
|
|
133
133
|
- ".rspec_status"
|
|
134
134
|
- ".rubocop.yml"
|
|
135
|
+
- CHANGELOG.md
|
|
135
136
|
- README.md
|
|
136
137
|
- Rakefile
|
|
137
138
|
- lib/subflag.rb
|