rb-konfig 0.1.5 → 0.1.7

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: 8e6f3dd52871d34e92d8a03de6ec2fd4ea05d2393a168e25e3d0a8b7b1e8c05e
4
- data.tar.gz: b69d8737c181ae24c43c9a4aee502f6af68fb2a1c290d5c8e090c36ad2a2d769
3
+ metadata.gz: 8f4cba1810196911b7d728c19bfd5c357885c2bebd2ef27ca57bf3141e4c6873
4
+ data.tar.gz: e508f29b2667d2d4c037763c1f2136f25b840a6571b6b4fdfbf34cecb123a3ea
5
5
  SHA512:
6
- metadata.gz: 63e9948892cd048da2602d3d7f0f2434164a9681b91c3f94e321f09ea05d84a3ad1ef03a69214c5fc869c9bb72d9f055a2ed85336f34ba29b03352591745a440
7
- data.tar.gz: 80e7fd214685cd632f9ccb44eed8dd254c9ec07a1d607736d309cbb631dae00887cf4789497b67bde3ef9efa5293619ce6dec8472c1b3428a882ccc046d1a7e3
6
+ metadata.gz: 58583b6ab5d5f01a817f1f87cccbad219f1e44a866b11df3235e0be1f71b2c299d9d0a44cfc90a3ee0930fc0cc9be69fef729ad8467592c06d259e539791b84a
7
+ data.tar.gz: 10e8ffa640955bffce182e6e13e2e382f0af729caa9170eb477a0233f539ecc2c8d75366a19cf39a52438d8ad0b68db54201b00151cb78ef7e776a649572147a
data/.gitignore CHANGED
@@ -50,3 +50,4 @@ build-iPhoneSimulator/
50
50
  .rvmrc
51
51
  /.byebug_history
52
52
  /.idea
53
+ /.DS_Store
data/.ruby-version CHANGED
@@ -1,2 +1,2 @@
1
- ruby-2.5.5
1
+ 3.2.2
2
2
 
data/Gemfile.lock CHANGED
@@ -1,22 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rb-konfig (0.1.4)
4
+ rb-konfig (0.1.6)
5
5
  activesupport (>= 4)
6
6
  dry-schema (~> 1.3)
7
- thor (~> 0.20)
7
+ thor (~> 1.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (5.2.3)
12
+ activesupport (6.0.6.1)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
14
  i18n (>= 0.7, < 2)
15
15
  minitest (~> 5.1)
16
16
  tzinfo (~> 1.1)
17
+ zeitwerk (~> 2.2, >= 2.2.2)
17
18
  ast (2.4.0)
18
19
  byebug (11.0.1)
19
- concurrent-ruby (1.1.5)
20
+ concurrent-ruby (1.1.6)
20
21
  diff-lcs (1.3)
21
22
  dry-configurable (0.8.3)
22
23
  concurrent-ruby (~> 1.0)
@@ -50,15 +51,15 @@ GEM
50
51
  dry-logic (~> 1.0, >= 1.0.2)
51
52
  factory_bot (5.0.2)
52
53
  activesupport (>= 4.2.0)
53
- i18n (1.6.0)
54
+ i18n (1.8.2)
54
55
  concurrent-ruby (~> 1.0)
55
56
  jaro_winkler (1.5.3)
56
- minitest (5.11.3)
57
+ minitest (5.20.0)
57
58
  parallel (1.17.0)
58
59
  parser (2.6.3.0)
59
60
  ast (~> 2.4.0)
60
61
  rainbow (3.0.0)
61
- rake (10.5.0)
62
+ rake (13.0.1)
62
63
  rspec (3.8.0)
63
64
  rspec-core (~> 3.8.0)
64
65
  rspec-expectations (~> 3.8.0)
@@ -83,11 +84,12 @@ GEM
83
84
  rubocop (>= 0.71.0)
84
85
  ruby-progressbar (1.10.1)
85
86
  rufo (0.7.0)
86
- thor (0.20.3)
87
+ thor (1.3.0)
87
88
  thread_safe (0.3.6)
88
- tzinfo (1.2.5)
89
+ tzinfo (1.2.7)
89
90
  thread_safe (~> 0.1)
90
91
  unicode-display_width (1.6.0)
92
+ zeitwerk (2.3.0)
91
93
 
92
94
  PLATFORMS
93
95
  ruby
@@ -96,7 +98,7 @@ DEPENDENCIES
96
98
  bundler (~> 2.0)
97
99
  byebug (~> 11.0)
98
100
  factory_bot (~> 5.0)
99
- rake (~> 10.0)
101
+ rake (~> 13.0)
100
102
  rb-konfig!
101
103
  rspec (~> 3.8)
102
104
  rubocop (~> 0.69)
@@ -104,4 +106,4 @@ DEPENDENCIES
104
106
  rufo (~> 0.7)
105
107
 
106
108
  BUNDLED WITH
107
- 2.0.2
109
+ 2.4.19
data/konfig.gemspec CHANGED
@@ -26,10 +26,10 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency "activesupport", ">= 4"
28
28
  spec.add_dependency "dry-schema", "~> 1.3"
29
- spec.add_dependency "thor", "~> 0.20"
29
+ spec.add_dependency "thor", "~> 1.0"
30
30
 
31
31
  spec.add_development_dependency "bundler", "~> 2.0"
32
- spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "rake", "~> 13.0"
33
33
  spec.add_development_dependency "factory_bot", "~> 5.0"
34
34
  spec.add_development_dependency "rspec", "~> 3.8"
35
35
  spec.add_development_dependency "rubocop", "~> 0.69"
data/lib/konfig/option.rb CHANGED
@@ -94,8 +94,7 @@ module Konfig
94
94
  s = self.class.new
95
95
 
96
96
  h.each do |k, v|
97
- k = k.to_s if !k.respond_to?(:to_sym) && k.respond_to?(:to_s)
98
- s.new_ostruct_member(k)
97
+ k = k.to_s if !k.respond_to?(:to_sym) && k.respond_to?(:to_s)
99
98
 
100
99
  if v.is_a?(Hash)
101
100
  v = v["type"] == "hash" ? v["contents"] : __convert(v)
@@ -103,7 +102,7 @@ module Konfig
103
102
  v = v.collect { |e| e.instance_of?(Hash) ? __convert(e) : e }
104
103
  end
105
104
 
106
- s.send("#{k}=".to_sym, v)
105
+ s[k] = v
107
106
  end
108
107
  s
109
108
  end
@@ -1,3 +1,3 @@
1
1
  module Konfig
2
- VERSION ||= "0.1.5"
2
+ VERSION ||= "0.1.7"
3
3
  end
@@ -11,14 +11,14 @@ module Konfig
11
11
  def initialize(workdir:, filenames: Konfig.configuration.default_config_files)
12
12
  super(mode: :yaml, workdir: workdir)
13
13
  @files = filenames.map { |f| File.join(workdir, f) }
14
- raise FileNotFound, "none of the configuration files (#{@files}) found" if @files.all? { |f| !File.exists?(f) }
14
+ raise FileNotFound, "none of the configuration files (#{@files}) found" if @files.all? { |f| !File.exist?(f) }
15
15
  end
16
16
 
17
17
  def load(parse = true)
18
18
  content = {}
19
19
  @files.each do |f|
20
20
  # since we've looked for file existence before, we can skip any that's missing
21
- next if !File.exists?(f)
21
+ next if !File.exist?(f)
22
22
  Konfig.configuration.logger.info "Loading #{f}"
23
23
  file_content = IO.read(f)
24
24
  raise FileError, "file #{f} is empty" if file_content.blank?
data/lib/konfig.rb CHANGED
@@ -45,12 +45,13 @@ module Konfig
45
45
  end
46
46
 
47
47
  def logger
48
- @logger if @logger
48
+ return @logger if @logger
49
49
  if defined?(Rails) && Rails.logger
50
- Rails.logger
50
+ @logger = Rails.logger
51
51
  else
52
- Logger.new(STDOUT)
52
+ @logger = Logger.new(STDOUT)
53
53
  end
54
+ @logger
54
55
  end
55
56
 
56
57
  def schema=(value)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-konfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Khash Sajadi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-25 00:00:00.000000000 Z
11
+ date: 2023-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.20'
47
+ version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.20'
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '13.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '13.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: factory_bot
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '11.0'
167
- description:
167
+ description:
168
168
  email:
169
169
  - hello@cloud66.com
170
170
  executables:
@@ -204,7 +204,7 @@ licenses: []
204
204
  metadata:
205
205
  homepage_uri: https://github.com/cloud66-oss/konfig/
206
206
  source_code_uri: https://github.com/cloud66-oss/konfig/
207
- post_install_message:
207
+ post_install_message:
208
208
  rdoc_options: []
209
209
  require_paths:
210
210
  - lib
@@ -219,9 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubyforge_project:
223
- rubygems_version: 2.7.6.2
224
- signing_key:
222
+ rubygems_version: 3.4.19
223
+ signing_key:
225
224
  specification_version: 4
226
225
  summary: Konfig is a Kubernetes friendly Rails configuration gem
227
226
  test_files: []