openfeature-ruby-sdk-contrib 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2adc3ef477b7826d65812fed65732d1bd591226af99106fb96cb0c3fa14bd827
|
4
|
+
data.tar.gz: c98c2ff2f6930a7831041dd4a5b01de77c30d33e5dfbb510cce05bad1ab9a731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2903c569b112dd6c4484513bddea2356694f5572ceef0202065420d511af3c903bb980f9fbdf65ced5cc6c069c112ee41623a8dbacf84df2b64eba55f0a03edf
|
7
|
+
data.tar.gz: ed7d607c742ffefd5a0b4eca6c4c6fe5dc31aaa8841de3588b1e9bdcf000a6c4b3d12a86882ac7d40bfcb4987b0dda693dadeedde53d1392b038763faab6a9a3
|
data/Gemfile.lock
CHANGED
@@ -134,7 +134,7 @@ module OpenFeature
|
|
134
134
|
@last_cache = Time.now.to_i
|
135
135
|
end
|
136
136
|
|
137
|
-
deep_keys.empty? ? @flag_contents : @flag_contents.dig(*deep_keys)
|
137
|
+
(deep_keys.empty? ? @flag_contents : @flag_contents.dig(*deep_keys) || [])
|
138
138
|
end
|
139
139
|
|
140
140
|
private
|
@@ -154,8 +154,8 @@ module OpenFeature
|
|
154
154
|
def assert_type(value:, default_value:, return_types:)
|
155
155
|
actual_value = if value && value["enabled"]
|
156
156
|
value
|
157
|
-
elsif default_value
|
158
|
-
{ "value" => default_value }
|
157
|
+
elsif defined?(default_value)
|
158
|
+
{ "value" => default_value, "enabled" => true }
|
159
159
|
end
|
160
160
|
|
161
161
|
return ResolutionDetails.new(value: nil) if actual_value.nil?
|
@@ -27,7 +27,12 @@ module OpenFeature
|
|
27
27
|
NAME = "File Provider".freeze
|
28
28
|
|
29
29
|
def read_and_parse_flags
|
30
|
-
file_contents =
|
30
|
+
file_contents = begin
|
31
|
+
File.read(File.expand_path(source))
|
32
|
+
rescue Errno::ENOENT
|
33
|
+
@flag_contents = {}
|
34
|
+
return
|
35
|
+
end
|
31
36
|
|
32
37
|
return custom_parser.call(file_contents) if custom_parser
|
33
38
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openfeature-ruby-sdk-contrib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene Howe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|