precursor 0.8.1 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config_root.rb +7 -0
- data/lib/precursor.rb +1 -0
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1e8452a55b4591e95701068d5d50ca3e9d97cfa04fe73df8bda6d378b81791e
|
4
|
+
data.tar.gz: 4a3a53f199006ed571a796eae5f8a09f76cb25e8d611e7f94854163d7a959de7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d00844c3eaa43d227d4c31a83776a35eecdb1538aa2307c65b9fdc9c3eb8db8c094ff8f03978d283dfc419771d2b49574a2b9a40de64fc3d6f4cd0c562f3d9c
|
7
|
+
data.tar.gz: 3cbe8bfc3b0e3a5b17be0f29762597eb750571654f11d876df1cf17dbf363ea9e3016d5a8f63251b182a9be8e85002b835cdff387d97771ed2cc28e0cdabf14b
|
data/lib/config_root.rb
CHANGED
@@ -21,6 +21,13 @@ module Precursor
|
|
21
21
|
value.is_a?(String) ? resolve(value) : value
|
22
22
|
end
|
23
23
|
|
24
|
+
# Tests if config value exist for a given key
|
25
|
+
# @param key [Symbol] Config key
|
26
|
+
# return [Boolean] True if value exists; false otherwise
|
27
|
+
def key?(key)
|
28
|
+
@vaults.any? { |v| v.key? key }
|
29
|
+
end
|
30
|
+
|
24
31
|
def resolve(str)
|
25
32
|
res = str
|
26
33
|
until (m = res.match(VAR_PATTERN)).nil?
|
data/lib/precursor.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: precursor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Maraev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: optparse
|