eac_config 0.11.1 → 0.12.0

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: 9e6140a533b8aa316c41e1cb868b617989b7b7487be5b01774101f867a6f0cb5
4
- data.tar.gz: 666d5d7684edc24f21c3484dfbeac299ec527d27c6d67e3abbbf8aa744b34b22
3
+ metadata.gz: 5039f8ba469fc8a37d89548e84cee3fcbcd20962dc71d0c64f0709168801d158
4
+ data.tar.gz: 5724d1a93450a3f7f7f3b71ca5f227febbd6cc23bf20279cb048f4df847d5389
5
5
  SHA512:
6
- metadata.gz: 928a16e378cfa9248eea42274a774af2c1bb72abe7ba323a8527c9273f1c2cf4b76072a5e611023d7b5fb123ac3868a99552bf6feedb96f9a0847102b7af3c71
7
- data.tar.gz: c29fad9722bf50aa8c562d54e49cacc0f1e08489f1a0e67b45400d34aa2cef41db1dfeb098c0b76c9014f264dad66cd9830ca2c558346c15fc04538da9bf17a8
6
+ metadata.gz: e753cb72711c058b4d2165e7383c3990b0ed80d2c00c07535a0753d7628bc2128c00bd37733dbb7175a0cb7752f3d0044ca32af3ab87e7ce5c329d6d24f02aad
7
+ data.tar.gz: 8410beb66cdd45f591f3d7054b9785e8de0e21c2e467c7bb79415f7c2713a8d95ac1755ed9c0e91f0e7b65fc13a98e805360fb948314e5d5be54474e1a89a611
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacConfig
6
+ class Entry
7
+ class NotFoundError < ::RuntimeError
8
+ def initialize(entry)
9
+ super("Entry #{entry} not found")
10
+ end
11
+ end
12
+ end
13
+ end
@@ -5,6 +5,7 @@ require 'eac_ruby_utils/core_ext'
5
5
 
6
6
  module EacConfig
7
7
  class Entry
8
+ require_sub __FILE__
8
9
  enable_simple_cache
9
10
  common_constructor :root_node, :path do
10
11
  self.path = ::EacConfig::EntryPath.assert(path)
@@ -30,6 +31,12 @@ module EacConfig
30
31
  node_entry.if_present(&:value)
31
32
  end
32
33
 
34
+ def value!
35
+ return value if found?
36
+
37
+ raise ::EacConfig::Entry::NotFoundError, self
38
+ end
39
+
33
40
  def value=(a_value)
34
41
  write_node.self_entry(path).value = a_value
35
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacConfig
4
- VERSION = '0.11.1'
4
+ VERSION = '0.12.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-18 00:00:00.000000000 Z
11
+ date: 2022-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.8.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,20 +27,23 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.8'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.8.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: eac_ruby_utils
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '0.102'
39
+ version: '0.107'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '0.102'
46
+ version: '0.107'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: eac_ruby_gem_support
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -60,6 +66,7 @@ extra_rdoc_files: []
60
66
  files:
61
67
  - lib/eac_config.rb
62
68
  - lib/eac_config/entry.rb
69
+ - lib/eac_config/entry/not_found_error.rb
63
70
  - lib/eac_config/entry_path.rb
64
71
  - lib/eac_config/envvars_node.rb
65
72
  - lib/eac_config/envvars_node/entry.rb