openfeature-sdk-sorbet 0.2.0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -7
- data/Gemfile.lock +1 -1
- data/lib/open_feature/evaluation_context.rb +7 -5
- data/openfeature-sdk-sorbet.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5c2231f2741a4d89cde28735ddfd5c509bba978559bb732a98a1864bb65dd30
|
4
|
+
data.tar.gz: 54d011f1a7bc30a14647632914440ea2814eee934773996d4e70ce9119ec52bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11643994331234597fc371c44162f95445ba7e3c5b347a0af614206ebf82df2b884dae463727f68011268a9250bedd00c9c161f3428bcc1f48aeb3090d815236
|
7
|
+
data.tar.gz: ee4e892b17b5661ccbab5260a32fa8c460be9ee711f83d99ddc1451e29bdf6edb23e96ef1925aad0bc57c3f77f13b6c44154d24338e591b3a5d3b49987fbf571
|
data/CHANGELOG.md
CHANGED
@@ -6,18 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
## [0.2.
|
9
|
+
## [0.2.1] - 2023-07-27
|
10
10
|
|
11
11
|
### Fixed
|
12
12
|
|
13
13
|
- Fixed an issue where the `OpenFeature::MultipleSourceProvider` did not properly pass evaluation context to the internal providers.
|
14
14
|
|
15
|
-
## [0.2.0.1] - 2023-07-21
|
16
|
-
|
17
|
-
### Changed
|
18
|
-
|
19
|
-
* Loosened the type for the `EvaluationContext` underlying Hash to `T::Hash[T.untyped, T.untyped]`. This allows for more varied context to be past to flag evaluation. This is necessary since we don't fully support the Hooks specification and cannot handle all flag evaluation use cases. This behavior will be reverted once the Hooks spec is fully implemented.
|
20
|
-
|
21
15
|
## [0.2.0] - 2023-05-17
|
22
16
|
|
23
17
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -11,20 +11,22 @@ module OpenFeature
|
|
11
11
|
|
12
12
|
include T::Struct::ActsAsComparable
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
FieldValueType = T.type_alias { T.any(T::Boolean, String, Numeric, DateTime, Structure) }
|
15
|
+
|
16
|
+
const :targeting_key, T.nilable(String)
|
17
|
+
const :fields, T::Hash[String, FieldValueType], default: {}
|
16
18
|
|
17
19
|
sig { params(method_name: Symbol).returns(T::Boolean) }
|
18
20
|
def respond_to_missing?(method_name)
|
19
21
|
fields.key?(method_name.to_s)
|
20
22
|
end
|
21
23
|
|
22
|
-
sig { params(method_name: Symbol).returns(T.
|
24
|
+
sig { params(method_name: Symbol).returns(T.nilable(FieldValueType)) }
|
23
25
|
def method_missing(method_name)
|
24
26
|
fields.fetch(method_name.to_s, nil)
|
25
27
|
end
|
26
28
|
|
27
|
-
sig { params(key:
|
29
|
+
sig { params(key: String, value: FieldValueType).returns(EvaluationContext) }
|
28
30
|
def add_field(key, value)
|
29
31
|
EvaluationContext.new(
|
30
32
|
targeting_key: targeting_key,
|
@@ -32,7 +34,7 @@ module OpenFeature
|
|
32
34
|
)
|
33
35
|
end
|
34
36
|
|
35
|
-
sig { returns(T::Hash[
|
37
|
+
sig { returns(T::Hash[String, FieldValueType]) }
|
36
38
|
def to_h
|
37
39
|
targeting_key.nil? ? fields : fields.merge("targeting_key" => targeting_key)
|
38
40
|
end
|