launchdarkly-openfeature-server-sdk 0.3.1 → 0.4.0

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: c145b56d28fdf2ee78d4c5fd9f6a3a20b07d98acca04271779cc93830128268b
4
- data.tar.gz: 2cec255f58f88a19ec976d0781cdab96a92e8b6334090dea23feecb7158db8be
3
+ metadata.gz: 7a284ca0226f8e24674e9c42a6d21ee59a502dc30c8b70555dcb84b1ad3c8004
4
+ data.tar.gz: def9bcd36327042ca9b27e4100efe1eeda7797d40f56f2300c43461a4c6a9377
5
5
  SHA512:
6
- metadata.gz: 2cc77bd3bd4e6e8d48800bc9317f723a5888a1e0ab6c87ccb51ddff8ffa2fb0b4bd69bac71f3f2fab7587c7d740e47b26d72267f6d5a9eeefd2046c8814e4b57
7
- data.tar.gz: 2f5a065d91d91c6d4d876cccc30fcb178ba1b4459d050e7b67f0d6a8c5d8e85af5e16518804e3e118e0ea10eac5b0911bf5c63c4b8173f1bba137b23a804730e
6
+ metadata.gz: 12da758f3e11d4844e60d110a2712bbe80be7fe2f0a9fc87266c75dd796df25353aa86f7db9655eee0dc004b743a4cf750d1df35c5a9c4e3382b04888f14bcf8
7
+ data.tar.gz: d0b8757068807d68c6e49d9316db164825fee830c89ab9dc68359da2b0a3ab44708f0de632ce9ee9c519dbf2b51783b45da3d14ed263b2c25d3327d382c2618f
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.3.1"
2
+ ".": "0.4.0"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.0](https://github.com/launchdarkly/openfeature-ruby-server/compare/0.3.1...0.4.0) (2026-11-17)
4
+
5
+
6
+ ### Features
7
+
8
+ * add overrideAffected to flag metadata ([#45](https://github.com/launchdarkly/openfeature-ruby-server/issues/45)) ([8ae500c](https://github.com/launchdarkly/openfeature-ruby-server/commit/8ae500c2c11c46a8284368e19869679b91ec70ad))
9
+
3
10
  ## [0.3.1](https://github.com/launchdarkly/openfeature-ruby-server/compare/0.3.0...0.3.1) (2026-10-29)
4
11
 
5
12
 
data/PROVENANCE.md CHANGED
@@ -9,7 +9,7 @@ To verify build provenance attestations, we recommend using the [GitHub CLI `att
9
9
  <!-- x-release-please-start-version -->
10
10
  ```
11
11
  # Set the version of the SDK to verify
12
- SDK_VERSION=0.3.1
12
+ SDK_VERSION=0.4.0
13
13
  ```
14
14
  <!-- x-release-please-end -->
15
15
 
data/README.md CHANGED
@@ -36,14 +36,14 @@ This matrix mirrors the [feature matrix of the OpenFeature SDK for Ruby](https:/
36
36
  | ✅ | Targeting | The `EvaluationContext` is converted to a LaunchDarkly single or multi-context. See [OpenFeature Specific Considerations](#openfeature-specific-considerations). |
37
37
  | ✅ | Hooks | Hooks are registered on the OpenFeature API and client; the provider requires no additional support and its results are visible to hooks, including [flag metadata](#flag-metadata). |
38
38
  | ✅ | Logging | The provider logs through the logger of the `LaunchDarkly::Config` it is given. |
39
- | ✅ | Domains | Domains bind clients to providers in the OpenFeature SDK; a separate provider instance may be registered per domain. |
40
- | ✅ | Eventing | LaunchDarkly data source status changes are emitted as `PROVIDER_READY`, `PROVIDER_STALE`, and `PROVIDER_ERROR`. Flag changes are emitted as `PROVIDER_CONFIGURATION_CHANGED` with the changed flag key. |
41
- | ✅ | Initialization | `init` reports whether the LaunchDarkly client became ready within the configured wait time; a failure results in the `ERROR` state so that cached or fallback flag data is still evaluated. |
39
+ | ✅ | Domains | Domains bind clients to providers in the OpenFeature SDK; a separate provider instance may be registered per domain. The provider is not domain-scoped, so one instance may also be bound to several domains, which then share its LaunchDarkly client. |
40
+ | ⚠️ | Eventing | LaunchDarkly data source status changes are emitted as `PROVIDER_READY`, `PROVIDER_STALE`, and `PROVIDER_ERROR`. Flag changes are emitted as `PROVIDER_CONFIGURATION_CHANGED` with the changed flag key. Provider gaps: a data source update that does not change the provider status, such as a new error while interrupted, is emitted again ([#36](https://github.com/launchdarkly/openfeature-ruby-server/pull/36)); and the provider relies on the OpenFeature SDK to emit `PROVIDER_READY` or `PROVIDER_ERROR` when `init` completes, which OpenFeature Ruby SDK 0.7.0 deprecates in favor of provider-emitted lifecycle events ([#39](https://github.com/launchdarkly/openfeature-ruby-server/issues/39)). |
41
+ | ✅ | Initialization | `init` reports whether the LaunchDarkly client became ready within the configured wait time; a failure results in the `ERROR` state so that cached or fallback flag data is still evaluated. Since LaunchDarkly Ruby SDK 8.19.0 a rejected SDK key is retried rather than failing permanently, so the client constructor waits the full wait time before initialization fails. |
42
42
  | ✅ | Shutdown | `shutdown` closes the LaunchDarkly client. A closed client cannot be restarted, so a new provider instance is required afterward. |
43
43
  | ✅ | Tracking | `track` sends a LaunchDarkly custom event for the evaluation context, with the tracking event value and remaining details attached. |
44
44
  | ✅ | Transaction Context Propagation | Provided by the OpenFeature SDK, which merges the transaction context into the evaluation context before the provider is called; no provider support is required. |
45
45
  | ✅ | Extending | This provider is itself an extension of the OpenFeature SDK. The underlying LaunchDarkly client is available through `provider.client` for functionality with no OpenFeature equivalent. |
46
- | ✅ | Flag metadata | LaunchDarkly evaluation reason details are returned as OpenFeature flag metadata. See [Flag Metadata](#flag-metadata). |
46
+ | ✅ | Flag metadata | LaunchDarkly evaluation reason details, including `overrideAffected`, are returned as OpenFeature flag metadata. See [Flag Metadata](#flag-metadata). |
47
47
 
48
48
  <sub>Supported: ✅ | Partially supported: ⚠️ | Not supported: ❌</sub>
49
49
 
@@ -176,6 +176,7 @@ Evaluations include flag metadata for the LaunchDarkly specific parts of the eva
176
176
  |---------------------|---------|--------------------------------------------------------------------|
177
177
  | `variationIndex` | integer | The index of the returned variation. Absent for default values. |
178
178
  | `inExperiment` | boolean | Present, and `true`, when the evaluation was part of an experiment. |
179
+ | `overrideAffected` | boolean | Present, and `true`, when a flag override affected the evaluation. |
179
180
  | `ruleIndex` | integer | The index of the rule that matched. |
180
181
  | `ruleId` | string | The identifier of the rule that matched. |
181
182
  | `prerequisiteKey` | string | The key of the prerequisite flag that failed. |
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
- spec.add_runtime_dependency "launchdarkly-server-sdk", "~> 8.19"
31
+ spec.add_runtime_dependency "launchdarkly-server-sdk", "~> 8.20"
32
32
  spec.add_runtime_dependency "openfeature-sdk", ">= 0.6.1", "< 0.9"
33
33
 
34
34
  # For more information and examples about making a new gem, check out our
@@ -9,13 +9,14 @@ module LaunchDarkly
9
9
  class ResolutionDetailsConverter
10
10
  VARIATION_INDEX_KEY = 'variationIndex'
11
11
  IN_EXPERIMENT_KEY = 'inExperiment'
12
+ OVERRIDE_AFFECTED_KEY = 'overrideAffected'
12
13
  RULE_INDEX_KEY = 'ruleIndex'
13
14
  RULE_ID_KEY = 'ruleId'
14
15
  PREREQUISITE_KEY_KEY = 'prerequisiteKey'
15
16
  BIG_SEGMENTS_STATUS_KEY = 'bigSegmentsStatus'
16
17
 
17
- private_constant :VARIATION_INDEX_KEY, :IN_EXPERIMENT_KEY, :RULE_INDEX_KEY, :RULE_ID_KEY,
18
- :PREREQUISITE_KEY_KEY, :BIG_SEGMENTS_STATUS_KEY
18
+ private_constant :VARIATION_INDEX_KEY, :IN_EXPERIMENT_KEY, :OVERRIDE_AFFECTED_KEY, :RULE_INDEX_KEY,
19
+ :RULE_ID_KEY, :PREREQUISITE_KEY_KEY, :BIG_SEGMENTS_STATUS_KEY
19
20
 
20
21
  #
21
22
  # @param detail [LaunchDarkly::EvaluationDetail]
@@ -61,6 +62,7 @@ module LaunchDarkly
61
62
 
62
63
  metadata[VARIATION_INDEX_KEY] = variation_index unless variation_index.nil?
63
64
  metadata[IN_EXPERIMENT_KEY] = true if reason.in_experiment
65
+ metadata[OVERRIDE_AFFECTED_KEY] = true if reason.override_affected
64
66
  metadata[RULE_INDEX_KEY] = reason.rule_index unless reason.rule_index.nil?
65
67
  metadata[RULE_ID_KEY] = reason.rule_id unless reason.rule_id.nil?
66
68
  metadata[PREREQUISITE_KEY_KEY] = reason.prerequisite_key unless reason.prerequisite_key.nil?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module LaunchDarkly
4
4
  module OpenFeature
5
- VERSION = "0.3.1" # x-release-please-version
5
+ VERSION = "0.4.0" # x-release-please-version
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: launchdarkly-openfeature-server-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LaunchDarkly
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '8.19'
18
+ version: '8.20'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '8.19'
25
+ version: '8.20'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: openfeature-sdk
28
28
  requirement: !ruby/object:Gem::Requirement