legion-settings 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +26 -4
- data/.gitignore +0 -1
- data/.idea/legion-settings.iml +27 -27
- data/.rubocop.yml +1 -0
- data/Gemfile.lock +72 -0
- data/legion-settings.gemspec +1 -6
- data/lib/legion/settings.rb +1 -0
- data/lib/legion/settings/loader.rb +1 -6
- data/lib/legion/settings/version.rb +1 -1
- data/sonar-project.properties +12 -0
- metadata +9 -9
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c41823e19d32b23ed8ae0b32bf15075246e3e9ee302619a975005226d59b3847
|
4
|
+
data.tar.gz: bfd78c7bd67539fef37a48adaf0648362555b4fc27ce267c46f61055b3e0a62f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a39b162d3e71bf83a707b4195f0b144b63196dfcc2b5bdee87159021fa6f5010376f9f3bac556492e0b57df7bb2643b902c810fb0cb4ec1eee0247ea7e7ef745
|
7
|
+
data.tar.gz: e825405a4f794de6a4e26395190b944770e9d51db827b890632f8fea0f4c6c26b4fb9252b8f33272d13769dc782efef0b324922b3b6ebaf7144fe820876c81e6
|
data/.circleci/config.yml
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
version: 2.1
|
2
2
|
orbs:
|
3
3
|
ruby: circleci/ruby@0.2.1
|
4
|
+
sonarcloud: sonarsource/sonarcloud@1.0.1
|
4
5
|
|
5
6
|
jobs:
|
6
7
|
"rubocop":
|
7
8
|
docker:
|
8
|
-
- image: circleci/ruby:2.
|
9
|
+
- image: circleci/ruby:2.7-node
|
9
10
|
steps:
|
10
11
|
- checkout
|
11
12
|
- ruby/load-cache
|
@@ -17,20 +18,24 @@ jobs:
|
|
17
18
|
"ruby-two-five":
|
18
19
|
docker:
|
19
20
|
- image: circleci/ruby:2.5
|
20
|
-
- image: memcached:1.5-alpine
|
21
21
|
steps:
|
22
22
|
- checkout
|
23
23
|
- ruby/load-cache
|
24
|
+
- run:
|
25
|
+
name: update bundler
|
26
|
+
command: gem update bundler
|
24
27
|
- ruby/install-deps
|
25
28
|
- ruby/run-tests
|
26
29
|
- ruby/save-cache
|
27
30
|
"ruby-two-six":
|
28
31
|
docker:
|
29
32
|
- image: circleci/ruby:2.6
|
30
|
-
- image: memcached:1.5-alpine
|
31
33
|
steps:
|
32
34
|
- checkout
|
33
35
|
- ruby/load-cache
|
36
|
+
- run:
|
37
|
+
name: update bundler
|
38
|
+
command: gem update bundler
|
34
39
|
- ruby/install-deps
|
35
40
|
- ruby/run-tests
|
36
41
|
- ruby/save-cache
|
@@ -44,6 +49,19 @@ jobs:
|
|
44
49
|
- ruby/install-deps
|
45
50
|
- ruby/run-tests
|
46
51
|
- ruby/save-cache
|
52
|
+
"sonarcloud":
|
53
|
+
docker:
|
54
|
+
- image: circleci/ruby:2.7
|
55
|
+
steps:
|
56
|
+
- checkout
|
57
|
+
- ruby/load-cache
|
58
|
+
- ruby/install-deps
|
59
|
+
- ruby/run-tests
|
60
|
+
- run:
|
61
|
+
name: Run Rubocop
|
62
|
+
command: bundle exec rubocop --format=json --out=rubocop-result.json
|
63
|
+
- sonarcloud/scan
|
64
|
+
- ruby/save-cache
|
47
65
|
|
48
66
|
workflows:
|
49
67
|
version: 2
|
@@ -58,4 +76,8 @@ workflows:
|
|
58
76
|
- ruby-two-five
|
59
77
|
- ruby-two-seven:
|
60
78
|
requires:
|
61
|
-
- ruby-two-five
|
79
|
+
- ruby-two-five
|
80
|
+
- sonarcloud:
|
81
|
+
requires:
|
82
|
+
- ruby-two-seven
|
83
|
+
- ruby-two-six
|
data/.gitignore
CHANGED
data/.idea/legion-settings.iml
CHANGED
@@ -7,33 +7,33 @@
|
|
7
7
|
<content url="file://$MODULE_DIR$">
|
8
8
|
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
9
9
|
</content>
|
10
|
-
<orderEntry type="
|
10
|
+
<orderEntry type="jdk" jdkName="RVM: ruby-2.7.0" jdkType="RUBY_SDK" />
|
11
11
|
<orderEntry type="sourceFolder" forTests="false" />
|
12
|
-
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.
|
13
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, RVM: ruby-2.
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="json (
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="legion-
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.9.
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.10.1, RVM: ruby-2.
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.18.5, RVM: ruby-2.
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.12.2, RVM: ruby-2.
|
37
|
-
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, RVM: ruby-2.7.0) [gem]" level="application" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="chef (v16.1.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.4.4, RVM: ruby-2.7.0) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="docile (v1.3.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="legion-json (v1.1.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="legion-logging (v1.0.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.15.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.19.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="parser (v2.7.1.4, RVM: ruby-2.7.0) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.0.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v1.7.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.4, RVM: ruby-2.7.0) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.9.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.9.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.9.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.9.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.9.3, RVM: ruby-2.7.0) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec_junit_formatter (v0.4.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.88.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v0.2.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
34
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.10.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
35
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.18.5, RVM: ruby-2.7.0) [gem]" level="application" />
|
36
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.12.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.7.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
38
38
|
</component>
|
39
39
|
</module>
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
legion-settings (1.1.0)
|
5
|
+
legion-json
|
6
|
+
legion-logging
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ast (2.4.1)
|
12
|
+
diff-lcs (1.4.4)
|
13
|
+
docile (1.3.2)
|
14
|
+
legion-json (1.1.0)
|
15
|
+
multi_json
|
16
|
+
legion-logging (1.0.0)
|
17
|
+
rainbow (~> 3)
|
18
|
+
multi_json (1.15.0)
|
19
|
+
parallel (1.19.2)
|
20
|
+
parser (2.7.1.4)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
rainbow (3.0.0)
|
23
|
+
rake (13.0.1)
|
24
|
+
regexp_parser (1.7.1)
|
25
|
+
rexml (3.2.4)
|
26
|
+
rspec (3.9.0)
|
27
|
+
rspec-core (~> 3.9.0)
|
28
|
+
rspec-expectations (~> 3.9.0)
|
29
|
+
rspec-mocks (~> 3.9.0)
|
30
|
+
rspec-core (3.9.2)
|
31
|
+
rspec-support (~> 3.9.3)
|
32
|
+
rspec-expectations (3.9.2)
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
+
rspec-support (~> 3.9.0)
|
35
|
+
rspec-mocks (3.9.1)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.9.0)
|
38
|
+
rspec-support (3.9.3)
|
39
|
+
rspec_junit_formatter (0.4.1)
|
40
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
41
|
+
rubocop (0.88.0)
|
42
|
+
parallel (~> 1.10)
|
43
|
+
parser (>= 2.7.1.1)
|
44
|
+
rainbow (>= 2.2.2, < 4.0)
|
45
|
+
regexp_parser (>= 1.7)
|
46
|
+
rexml
|
47
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
48
|
+
ruby-progressbar (~> 1.7)
|
49
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
50
|
+
rubocop-ast (0.2.0)
|
51
|
+
parser (>= 2.7.0.1)
|
52
|
+
ruby-progressbar (1.10.1)
|
53
|
+
simplecov (0.18.5)
|
54
|
+
docile (~> 1.1)
|
55
|
+
simplecov-html (~> 0.11)
|
56
|
+
simplecov-html (0.12.2)
|
57
|
+
unicode-display_width (1.7.0)
|
58
|
+
|
59
|
+
PLATFORMS
|
60
|
+
ruby
|
61
|
+
|
62
|
+
DEPENDENCIES
|
63
|
+
bundler
|
64
|
+
legion-settings!
|
65
|
+
rake
|
66
|
+
rspec
|
67
|
+
rspec_junit_formatter
|
68
|
+
rubocop
|
69
|
+
simplecov
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
2.1.4
|
data/legion-settings.gemspec
CHANGED
@@ -16,7 +16,6 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
17
|
f.match(%r{^(test|spec|features)/})
|
18
18
|
end
|
19
|
-
spec.bindir = 'exe'
|
20
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
20
|
spec.require_paths = ['lib']
|
22
21
|
|
@@ -26,10 +25,6 @@ Gem::Specification.new do |spec|
|
|
26
25
|
spec.add_development_dependency 'rspec_junit_formatter'
|
27
26
|
spec.add_development_dependency 'rubocop'
|
28
27
|
spec.add_development_dependency 'simplecov'
|
29
|
-
|
30
|
-
spec.add_dependency 'legion-json-jruby'
|
31
|
-
else
|
32
|
-
spec.add_dependency 'legion-json'
|
33
|
-
end
|
28
|
+
spec.add_dependency 'legion-json'
|
34
29
|
spec.add_dependency 'legion-logging'
|
35
30
|
end
|
data/lib/legion/settings.rb
CHANGED
@@ -4,11 +4,7 @@ module Legion
|
|
4
4
|
module Settings
|
5
5
|
class Loader
|
6
6
|
class Error < RuntimeError; end
|
7
|
-
|
8
|
-
attr_reader :warnings
|
9
|
-
attr_reader :errors
|
10
|
-
attr_reader :loaded_files
|
11
|
-
attr_reader :settings
|
7
|
+
attr_reader :warnings, :errors, :loaded_files, :settings
|
12
8
|
|
13
9
|
def initialize
|
14
10
|
@warnings = []
|
@@ -124,7 +120,6 @@ module Legion
|
|
124
120
|
end
|
125
121
|
|
126
122
|
def load_directory(directory)
|
127
|
-
warning('loading config files from directory', directory: directory)
|
128
123
|
path = directory.gsub(/\\(?=\S)/, '/')
|
129
124
|
if File.readable?(path) && File.executable?(path)
|
130
125
|
Dir.glob(File.join(path, '**{,/*/**}/*.json')).uniq.each do |file|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
sonar.projectKey=legion-io_legion-settings
|
2
|
+
sonar.organization=legion-io
|
3
|
+
sonar.projectName=Legion::Settings
|
4
|
+
sonar.sources=.
|
5
|
+
sonar.exclusions=vendor/**
|
6
|
+
sonar.coverage.exclusions=spec/**
|
7
|
+
sonar.ruby.coverage.reportPath=coverage/.resultset.json
|
8
|
+
sonar.ruby.file.suffixes=rb,ruby
|
9
|
+
sonar.ruby.coverage.framework=RSpec
|
10
|
+
sonar.ruby.rubocopConfig=.rubocop.yml
|
11
|
+
sonar.ruby.rubocop.reportPath=rubocop-result.json
|
12
|
+
sonar.ruby.rubocop.filePath=.
|
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.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esity
|
8
|
-
autorequire:
|
9
|
-
bindir:
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -140,11 +140,10 @@ files:
|
|
140
140
|
- ".rubocop.yml"
|
141
141
|
- CHANGELOG.md
|
142
142
|
- Gemfile
|
143
|
+
- Gemfile.lock
|
143
144
|
- LICENSE.txt
|
144
145
|
- README.md
|
145
146
|
- Rakefile
|
146
|
-
- bin/console
|
147
|
-
- bin/setup
|
148
147
|
- bitbucket-pipelines.yml
|
149
148
|
- legion-settings.gemspec
|
150
149
|
- lib/legion/settings.rb
|
@@ -155,11 +154,12 @@ files:
|
|
155
154
|
- lib/legion/settings/validators.rb
|
156
155
|
- lib/legion/settings/validators/legion.rb
|
157
156
|
- lib/legion/settings/version.rb
|
157
|
+
- sonar-project.properties
|
158
158
|
homepage: https://bitbucket.org/whonodes/legion-settings
|
159
159
|
licenses:
|
160
160
|
- MIT
|
161
161
|
metadata: {}
|
162
|
-
post_install_message:
|
162
|
+
post_install_message:
|
163
163
|
rdoc_options: []
|
164
164
|
require_paths:
|
165
165
|
- lib
|
@@ -174,8 +174,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
- !ruby/object:Gem::Version
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
|
-
rubygems_version: 3.
|
178
|
-
signing_key:
|
177
|
+
rubygems_version: 3.1.2
|
178
|
+
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: Used to load the json settings files
|
181
181
|
test_files: []
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'legion/settings'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start(__FILE__)
|