nxt_registry 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +4 -4
- data/lib/nxt_registry/registry.rb +21 -22
- data/lib/nxt_registry/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3263cdc8c48171dfc6ecfe2bbe2eedb97d72e0ab8d367945ed04ec2480b2caa0
|
4
|
+
data.tar.gz: a7f48fa6c75182d1489cdcb28f19127892bd63b3de655e3e0db40e1b81204031
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 672c5855be89793548452a157d5c196b7a79271269ff43d056b18a2711b2c6ce7fb7cccca11892e05161fcf682eed15b55d7194bc27968d0d99b1066ae8b5ecc
|
7
|
+
data.tar.gz: ae6e5c77734afc4d9f732e7179fa62ef1f4b96c5a1278632cb91ce79ea33b803bd22b83f4084711d674698b786f6749033349ed541b152c05b43532936d53df3
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nxt_registry (0.3.
|
4
|
+
nxt_registry (0.3.10)
|
5
5
|
activesupport
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (6.1.3)
|
10
|
+
activesupport (6.1.3.2)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
12
|
i18n (>= 1.6, < 2)
|
13
13
|
minitest (>= 5.1)
|
@@ -16,11 +16,11 @@ GEM
|
|
16
16
|
coderay (1.1.3)
|
17
17
|
concurrent-ruby (1.1.8)
|
18
18
|
diff-lcs (1.4.4)
|
19
|
-
i18n (1.8.
|
19
|
+
i18n (1.8.10)
|
20
20
|
concurrent-ruby (~> 1.0)
|
21
21
|
method_source (1.0.0)
|
22
22
|
minitest (5.14.4)
|
23
|
-
pry (0.14.
|
23
|
+
pry (0.14.1)
|
24
24
|
coderay (~> 1.1)
|
25
25
|
method_source (~> 1.0)
|
26
26
|
rake (12.3.3)
|
@@ -205,36 +205,35 @@ module NxtRegistry
|
|
205
205
|
end
|
206
206
|
|
207
207
|
def __resolve(key, raise_on_key_not_registered: true)
|
208
|
-
mutex.synchronize do
|
209
|
-
key = transformed_key(key)
|
210
208
|
|
211
|
-
|
212
|
-
resolved_key = key_resolver.call(key)
|
209
|
+
key = transformed_key(key)
|
213
210
|
|
214
|
-
|
215
|
-
|
216
|
-
elsif (pattern = matching_pattern(resolved_key))
|
217
|
-
store.fetch(pattern)
|
218
|
-
else
|
219
|
-
if is_a_blank?(default)
|
220
|
-
return unless raise_on_key_not_registered
|
211
|
+
value = if is_leaf?
|
212
|
+
resolved_key = key_resolver.call(key)
|
221
213
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
214
|
+
if store.key?(resolved_key)
|
215
|
+
store.fetch(resolved_key)
|
216
|
+
elsif (pattern = matching_pattern(resolved_key))
|
217
|
+
store.fetch(pattern)
|
218
|
+
else
|
219
|
+
if is_a_blank?(default)
|
220
|
+
return unless raise_on_key_not_registered
|
226
221
|
|
227
|
-
|
228
|
-
|
222
|
+
on_key_not_registered && on_key_not_registered.call(key)
|
223
|
+
else
|
224
|
+
value = resolve_default(key)
|
225
|
+
return value unless memoize
|
226
|
+
|
227
|
+
store[key] ||= value
|
229
228
|
end
|
230
|
-
else
|
231
|
-
store[key] ||= default.call
|
232
229
|
end
|
230
|
+
else
|
231
|
+
store[key] ||= default.call
|
232
|
+
end
|
233
233
|
|
234
|
-
|
234
|
+
value = call_or_value(value, key)
|
235
235
|
|
236
|
-
|
237
|
-
end
|
236
|
+
resolver.call(value)
|
238
237
|
end
|
239
238
|
|
240
239
|
def matching_key(key)
|
data/lib/nxt_registry/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nxt_registry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Robecke
|
8
8
|
- Nils Sommer
|
9
9
|
- Raphael Kallensee
|
10
10
|
- Lütfi Demirci
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-06-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
|
-
description:
|
86
|
+
description:
|
87
87
|
email:
|
88
88
|
- a.robecke@hellogetsafe.com
|
89
89
|
- andreas@robecke.de
|
@@ -121,7 +121,7 @@ metadata:
|
|
121
121
|
allowed_push_host: https://rubygems.org
|
122
122
|
homepage_uri: https://github.com/nxt-insurance
|
123
123
|
source_code_uri: https://github.com/nxt-insurance/nxt_registry
|
124
|
-
post_install_message:
|
124
|
+
post_install_message:
|
125
125
|
rdoc_options: []
|
126
126
|
require_paths:
|
127
127
|
- lib
|
@@ -136,8 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
140
|
-
signing_key:
|
139
|
+
rubygems_version: 3.2.15
|
140
|
+
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: nxt_registry is a simple implementation of the container pattern
|
143
143
|
test_files: []
|