konfig-config 2.0.0 → 2.1.1

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: 1ad4223735db5a3060899308630e5381f8366e6540e5cd377fa9482d0ba72029
4
- data.tar.gz: 52f936cf81e41df19f076e0807c7a13f20bdc4b385efebee49645bcfef0869bf
3
+ metadata.gz: a22afc67d2963b64a215cd391ccaedfe7e06b8225380efd1e9d5617cc3ceaa19
4
+ data.tar.gz: 2d6e3591b8dd6b439b291d89d56fd220f3494481046e78932bf42a5e7c6d7ee9
5
5
  SHA512:
6
- metadata.gz: 86cb227104473211276c12e8e82f186260058d4eccb9c8ecf109417735ccb6018370667a7a1a9cf6143e4936318ea9321680c7b7582f861275c56376e438dd94
7
- data.tar.gz: 59cebceb30b34f4d9cd4d9ad5696a4da5559b6535619913f38f33d2ff8e9c10eb356ce8bd40b6c479dfc5d00e3955b631e60374bce0319f77c4b4eca7e416267
6
+ metadata.gz: aa032900f8624afa1c9f3ffb4af0ba386beccd75ec475fed0ce065d1042eba90aa28d37a8a15dd6ea703ae882be4decad31059244c6a80c761dbe023173d7451
7
+ data.tar.gz: e8c8319850a83410ea1bba2ba8b097049bad517c8fcaa25585e55b88ed6e3128e0bed03bde11a85a6e0cc80c48d3684258f7f18c3f850e80ea1c5a8bfb53c2fc
@@ -30,7 +30,7 @@ module Konfig
30
30
  @attributes.each_with_object({}) do |(name, attribute), hash|
31
31
  attribute_path = path + [name]
32
32
  if source.nil?
33
- hash[name] = attribute.cast(attribute.default)
33
+ hash[name] = attribute.default
34
34
  else
35
35
  begin
36
36
  source_value = source.get(attribute_path, attribute: attribute)
@@ -13,7 +13,8 @@ module Konfig
13
13
  @source = ::YAML.safe_load(source)
14
14
  end
15
15
 
16
- def get(path, _attribute: nil)
16
+ # rubocop:disable Lint/UnusedMethodArgument
17
+ def get(path, attribute: nil)
17
18
  source = @source
18
19
  path.each do |p|
19
20
  raise ValueNotPresentError unless source.key?(p.to_s)
@@ -22,6 +23,7 @@ module Konfig
22
23
  end
23
24
  source
24
25
  end
26
+ # rubocop:enable Lint/UnusedMethodArgument
25
27
 
26
28
  end
27
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konfig-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-20 00:00:00.000000000 Z
11
+ date: 2024-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -62,7 +62,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: '2.6'
65
+ version: '2.7'
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="