legion-settings 1.1.1 → 1.1.2

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: bac4b40b52e35751f9b72eb5bb806c7a83702f887f0e817ca11505d72f32a008
4
- data.tar.gz: e9e01f6af6b63cfb2860c64d6f8a80d80c70a9647f94a7c6365091a716dadca9
3
+ metadata.gz: e6ef2af16df9264f460351d3252b5c825d999fe16396bda55777563eac1ac6f8
4
+ data.tar.gz: 63e355e73008164ba95d5a534d78d170adf870c272dee4931fff1671924dcf5c
5
5
  SHA512:
6
- metadata.gz: 5dbafcc1e2994fe5bc1f3a915765388b47f8cabf7575a63a92130c149be6aa0fe2d767f586e110878ac0595260ad77293720dc7eb8b1c906e90c37d482b1395d
7
- data.tar.gz: a3fc8d52a94daf8e430489299435eb2ba5c974d14fd99cd92ec8577561325ae8a1aa10322baa1c7d1e052fcbaad9386b784aa6c09ba5b758e2813a8bf95abadf
6
+ metadata.gz: c1166390d81f276d918cbcfe18df028f3b57c9474758b4aadcea2fc61f17cd04f2080c0cf16002be2eacdeb15f7f690627bc917f0830580c1f14d7ca8a3f0fad
7
+ data.tar.gz: 55e43c7d62f8bd9623de2bb0618b7a144330058814c13c7c05c507edbdf9d241f2c7ce55de1efd1d67133ad7ba4d0f3af2dd59c083f871022d39596a80da841e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- legion-settings (1.1.1)
4
+ legion-settings (1.1.2)
5
5
  legion-json
6
6
  legion-logging
7
7
 
@@ -11,23 +11,25 @@ GEM
11
11
  ast (2.4.1)
12
12
  diff-lcs (1.4.4)
13
13
  docile (1.3.2)
14
- legion-json (1.1.0)
14
+ json_pure (2.3.1)
15
+ legion-json (1.1.2)
16
+ json_pure
15
17
  multi_json
16
- legion-logging (1.1.0)
18
+ legion-logging (1.1.1)
17
19
  rainbow (~> 3)
18
20
  multi_json (1.15.0)
19
21
  parallel (1.19.2)
20
- parser (2.7.1.4)
22
+ parser (2.7.2.0)
21
23
  ast (~> 2.4.1)
22
24
  rainbow (3.0.0)
23
25
  rake (13.0.1)
24
- regexp_parser (1.7.1)
26
+ regexp_parser (1.8.2)
25
27
  rexml (3.2.4)
26
28
  rspec (3.9.0)
27
29
  rspec-core (~> 3.9.0)
28
30
  rspec-expectations (~> 3.9.0)
29
31
  rspec-mocks (~> 3.9.0)
30
- rspec-core (3.9.2)
32
+ rspec-core (3.9.3)
31
33
  rspec-support (~> 3.9.3)
32
34
  rspec-expectations (3.9.2)
33
35
  diff-lcs (>= 1.2.0, < 2.0)
@@ -38,22 +40,22 @@ GEM
38
40
  rspec-support (3.9.3)
39
41
  rspec_junit_formatter (0.4.1)
40
42
  rspec-core (>= 2, < 4, != 2.12.0)
41
- rubocop (0.88.0)
43
+ rubocop (0.93.1)
42
44
  parallel (~> 1.10)
43
- parser (>= 2.7.1.1)
45
+ parser (>= 2.7.1.5)
44
46
  rainbow (>= 2.2.2, < 4.0)
45
- regexp_parser (>= 1.7)
47
+ regexp_parser (>= 1.8)
46
48
  rexml
47
- rubocop-ast (>= 0.1.0, < 1.0)
49
+ rubocop-ast (>= 0.6.0)
48
50
  ruby-progressbar (~> 1.7)
49
51
  unicode-display_width (>= 1.4.0, < 2.0)
50
- rubocop-ast (0.2.0)
51
- parser (>= 2.7.0.1)
52
+ rubocop-ast (0.8.0)
53
+ parser (>= 2.7.1.5)
52
54
  ruby-progressbar (1.10.1)
53
- simplecov (0.18.5)
55
+ simplecov (0.19.0)
54
56
  docile (~> 1.1)
55
57
  simplecov-html (~> 0.11)
56
- simplecov-html (0.12.2)
58
+ simplecov-html (0.12.3)
57
59
  unicode-display_width (1.7.0)
58
60
 
59
61
  PLATFORMS
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Based on Sensu's implementation of settings"
13
13
  spec.homepage = 'https://bitbucket.org/whonodes/legion-settings'
14
14
  spec.license = 'MIT'
15
+ spec.required_ruby_version = '>= 2.5.0'
15
16
 
16
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
18
  f.match(%r{^(test|spec|features)/})
@@ -12,14 +12,13 @@ module Legion
12
12
  @settings = default_settings
13
13
  @indifferent_access = false
14
14
  @loaded_files = []
15
- self.class.create_category_methods
16
15
  end
17
16
 
18
17
  def client_defaults
19
18
  {
20
19
  hostname: system_hostname,
21
20
  address: system_address,
22
- name: "#{::Socket.gethostname.gsub('.', '_')}.#{::Process.pid}",
21
+ name: "#{::Socket.gethostname.tr('.', '_')}.#{::Process.pid}",
23
22
  ready: false
24
23
  }
25
24
  end
@@ -35,6 +34,7 @@ module Legion
35
34
  },
36
35
  cache: { enabled: true, connected: false, driver: 'dalli' },
37
36
  extensions: {},
37
+ auto_install_missing_lex: true,
38
38
  default_extension_settings: {
39
39
  logger: { level: 'info', trace: false, extended: false }
40
40
  },
@@ -49,18 +49,6 @@ module Legion
49
49
  }
50
50
  end
51
51
 
52
- def self.create_category_methods
53
- # CATEGORIES.each do |category|
54
- # define_method(category) do
55
- # setting_category(category)
56
- # end
57
- # method_name = category.to_s.chop + "_exists?"
58
- # define_method(method_name.to_sym) do |name|
59
- # definition_exists?(category, name)
60
- # end
61
- # end
62
- end
63
-
64
52
  def to_hash
65
53
  unless @indifferent_access
66
54
  indifferent_access!
@@ -103,7 +91,7 @@ module Legion
103
91
  @settings = merged
104
92
  end
105
93
 
106
- def load_file(file) # rubocop:disable Metrics/AbcSize
94
+ def load_file(file)
107
95
  Legion::Logging.debug("Trying to load file #{file}")
108
96
  if File.file?(file) && File.readable?(file)
109
97
  begin
@@ -42,7 +42,7 @@ module Legion
42
42
  def validate_categories(settings)
43
43
  CATEGORIES.each do |category|
44
44
  if is_a_hash?(settings[category])
45
- validate_method = ('validate_' + category.to_s.chop).to_sym
45
+ validate_method = "validate_#{category.to_s.chop}".to_sym
46
46
  settings[category].each do |name, details|
47
47
  send(validate_method, details.merge(name: name.to_s))
48
48
  end
@@ -1,5 +1,5 @@
1
1
  module Legion
2
2
  module Settings
3
- VERSION = '1.1.1'.freeze
3
+ VERSION = '1.1.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-21 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -161,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
- version: '0'
164
+ version: 2.5.0
165
165
  required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  requirements:
167
167
  - - ">="