precursor 0.8.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/config_root.rb +7 -0
  3. data/lib/version.rb +1 -1
  4. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48f13a803dc4ac992e753fd5e485f571ede358f43df220115c399d3ca47cd16a
4
- data.tar.gz: baf4366c4103808a37ba41b6b4254a8b34b2dd4470d349619eb6a8d05c5e5f15
3
+ metadata.gz: 16d2669b6af87bb868ba1296c4f1402a05887a8c77cca08110bdf587699e797b
4
+ data.tar.gz: 20f7518fd5c5fada131b10c158887a4372f19ff56424fc8e558aec67169f4e6d
5
5
  SHA512:
6
- metadata.gz: 61864af8a355988f1ad08eb36aabfc7856ae611f9c908d77ec69436a4b47edb1ab36db359b61e82394a36e58c1e31e3471c88ed14446ff51c5a3b2d2a3863d0c
7
- data.tar.gz: 12e40ed7f7ce453d5e8304d47ee0487e9f44e497683a479d2452144e179d75e93d9054e1a5e013d4861531a6fa5996032da19198d953fd46c830ac75102f4921
6
+ metadata.gz: d51e6ffc91a85b8a6d5eaf3a7e84797e3eabcae34457425d165acb01e61292e8bc2efec3ce77024acc5d58190d28a54903a933c85370ba119e2717627ef8da5f
7
+ data.tar.gz: 1480c97f25199ad93ded355df92c3fc77d3a82f668f46d9ebc315ca7d09e8c1ce3ae6701125307ac68dee0a0352092f962fa35ac31ab42392b973042975bf10c
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/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Precursor
4
- VERSION = '0.8.2'
4
+ VERSION = '0.9.0'
5
5
  end
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.2
4
+ version: 0.9.0
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-17 00:00:00.000000000 Z
11
+ date: 2023-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: optparse
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0
26
+ version: 0.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: code-scanning-rubocop
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 3.3.3
109
+ rubygems_version: 3.4.22
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Extensible config system