a9n 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d55acac106514d5b049d0bf91f9b3410998357e58179fa7745764c5781cea7d4
4
- data.tar.gz: 18931553a99f0f49878dbcd675c6d38d665727d72ae009c10ac218ac002988ae
3
+ metadata.gz: 393819f7834f54def787d8aa094136300842604f1f30310e4b0fd0ae2fb9740d
4
+ data.tar.gz: 4577b0ef262d299c979df2e26015443d991d5c39ea15b7d55c610c35784f0216
5
5
  SHA512:
6
- metadata.gz: f4f895bb517bf3a74ab6aa1b2237306bb10efb7772fb44f77d833248aec39260641a0b73cb784353b9f9417314c5f37ad51c1ed19ec46944fe1ef9a43305d3ec
7
- data.tar.gz: fb9eb9e0f9affbba79ff7252b9945463586482d16f6f7a3d96f7c3ec533d7f4c7068b8f585ee68232e56c95b8a1343479b7800565611b5da580dc9ca47a4e5d2
6
+ metadata.gz: d04d4642b987bdb4c2707f0754d20941062ab8e333f43a9f6fef085e2cfeecb4a1347eac5e08ceee78a1effbf2874b88c7976dcbf15c971e1492941f52ac6c0c
7
+ data.tar.gz: 81418b9a67cbd97571a6b659306061bd67a96be7eddaec2f85701a725397776eb01b2c616e2f2061e020337bad2136612e1d1279196df9d2908b0caa0f44e301
@@ -11,18 +11,15 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ['2.6', '2.7', '3.0']
14
+ ruby-version: ['2.7', '3.0', '3.1']
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v2
18
18
  - name: Set up Ruby
19
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
20
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
21
- # uses: ruby/setup-ruby@v1
22
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
19
+ uses: ruby/setup-ruby@v1
23
20
  with:
24
21
  ruby-version: ${{ matrix.ruby-version }}
25
22
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
26
23
 
27
24
  - name: Run tests
28
- run: bundle exec rake
25
+ run: bundle exec rake ci
data/Gemfile.lock CHANGED
@@ -1,59 +1,59 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- a9n (1.2.3)
4
+ a9n (1.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
10
  coderay (1.1.3)
11
- diff-lcs (1.4.4)
11
+ diff-lcs (1.5.0)
12
12
  method_source (1.0.0)
13
- parallel (1.20.1)
14
- parser (3.0.2.0)
13
+ parallel (1.21.0)
14
+ parser (3.1.0.0)
15
15
  ast (~> 2.4.1)
16
16
  pry (0.14.1)
17
17
  coderay (~> 1.1)
18
18
  method_source (~> 1.0)
19
- rainbow (3.0.0)
19
+ rainbow (3.1.1)
20
20
  rake (13.0.6)
21
- regexp_parser (2.1.1)
21
+ regexp_parser (2.2.1)
22
22
  rexml (3.2.5)
23
- rspec (3.10.0)
24
- rspec-core (~> 3.10.0)
25
- rspec-expectations (~> 3.10.0)
26
- rspec-mocks (~> 3.10.0)
27
- rspec-core (3.10.1)
28
- rspec-support (~> 3.10.0)
29
- rspec-expectations (3.10.1)
23
+ rspec (3.11.0)
24
+ rspec-core (~> 3.11.0)
25
+ rspec-expectations (~> 3.11.0)
26
+ rspec-mocks (~> 3.11.0)
27
+ rspec-core (3.11.0)
28
+ rspec-support (~> 3.11.0)
29
+ rspec-expectations (3.11.0)
30
30
  diff-lcs (>= 1.2.0, < 2.0)
31
- rspec-support (~> 3.10.0)
32
- rspec-mocks (3.10.2)
31
+ rspec-support (~> 3.11.0)
32
+ rspec-mocks (3.11.0)
33
33
  diff-lcs (>= 1.2.0, < 2.0)
34
- rspec-support (~> 3.10.0)
35
- rspec-support (3.10.2)
36
- rubocop (1.18.3)
34
+ rspec-support (~> 3.11.0)
35
+ rspec-support (3.11.0)
36
+ rubocop (1.25.1)
37
37
  parallel (~> 1.10)
38
- parser (>= 3.0.0.0)
38
+ parser (>= 3.1.0.0)
39
39
  rainbow (>= 2.2.2, < 4.0)
40
40
  regexp_parser (>= 1.8, < 3.0)
41
41
  rexml
42
- rubocop-ast (>= 1.7.0, < 2.0)
42
+ rubocop-ast (>= 1.15.1, < 2.0)
43
43
  ruby-progressbar (~> 1.7)
44
44
  unicode-display_width (>= 1.4.0, < 3.0)
45
- rubocop-ast (1.7.0)
45
+ rubocop-ast (1.15.2)
46
46
  parser (>= 3.0.1.1)
47
47
  rubocop-rake (0.6.0)
48
48
  rubocop (~> 1.0)
49
- rubocop-rspec (2.4.0)
50
- rubocop (~> 1.0)
51
- rubocop-ast (>= 1.1.0)
49
+ rubocop-rspec (2.8.0)
50
+ rubocop (~> 1.19)
52
51
  ruby-progressbar (1.11.0)
53
- unicode-display_width (2.0.0)
52
+ unicode-display_width (2.1.0)
54
53
 
55
54
  PLATFORMS
56
55
  x86_64-darwin-20
56
+ x86_64-darwin-21
57
57
  x86_64-linux
58
58
 
59
59
  DEPENDENCIES
@@ -66,4 +66,4 @@ DEPENDENCIES
66
66
  rubocop-rspec
67
67
 
68
68
  BUNDLED WITH
69
- 2.2.22
69
+ 2.3.7
data/Rakefile CHANGED
@@ -5,4 +5,7 @@ require 'rubocop/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
  RuboCop::RakeTask.new
7
7
 
8
- task default: %i[rubocop spec]
8
+ desc 'Default task to run on ci'
9
+ task ci: %i[spec rubocop]
10
+
11
+ task default: %i[spec rubocop:auto_correct]
data/a9n.gemspec CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
12
12
 
13
13
  spec.metadata['homepage_uri'] = 'https://github.com/knapo/a9n'
14
14
  spec.metadata['source_code_uri'] = 'https://github.com/knapo/a9n'
15
+ spec.metadata['rubygems_mfa_required'] = 'true'
15
16
 
16
17
  spec.files = Dir.chdir(__dir__) do
17
18
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|test_app/|\.rub)}) }
@@ -20,7 +21,7 @@ Gem::Specification.new do |spec|
20
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
22
  spec.require_paths = ['lib']
22
23
 
23
- spec.required_ruby_version = '>= 2.6'
24
+ spec.required_ruby_version = '>= 2.7'
24
25
 
25
26
  spec.add_development_dependency 'pry'
26
27
  spec.add_development_dependency 'rake'
data/lib/a9n/loader.rb CHANGED
@@ -30,7 +30,7 @@ module A9n
30
30
  def load_yml(file_path, scope, env)
31
31
  return nil unless File.exist?(file_path)
32
32
 
33
- yml = YAML.load(ERB.new(File.read(file_path)).result)
33
+ yml = A9n::YamlLoader.load(file_path)
34
34
 
35
35
  if no_known_namespaces?(yml)
36
36
  prepare_hash(yml, scope).freeze
data/lib/a9n/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module A9n
2
- VERSION = '1.2.3'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
@@ -0,0 +1,8 @@
1
+ module A9n
2
+ class YamlLoader
3
+ def self.load(file_path)
4
+ kwargs = RUBY_VERSION >= '3.1.0' ? { aliases: true } : {}
5
+ YAML.load(ERB.new(File.read(file_path)).result, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/a9n.rb CHANGED
@@ -10,6 +10,7 @@ require 'a9n/struct'
10
10
  require 'a9n/scope'
11
11
  require 'a9n/ext/string_inquirer'
12
12
  require 'a9n/ext/hash'
13
+ require 'a9n/yaml_loader'
13
14
  require 'a9n/loader'
14
15
 
15
16
  module A9n
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a9n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2022-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -121,12 +121,14 @@ files:
121
121
  - lib/a9n/scope.rb
122
122
  - lib/a9n/struct.rb
123
123
  - lib/a9n/version.rb
124
+ - lib/a9n/yaml_loader.rb
124
125
  homepage: https://github.com/knapo/a9n
125
126
  licenses:
126
127
  - MIT
127
128
  metadata:
128
129
  homepage_uri: https://github.com/knapo/a9n
129
130
  source_code_uri: https://github.com/knapo/a9n
131
+ rubygems_mfa_required: 'true'
130
132
  post_install_message:
131
133
  rdoc_options: []
132
134
  require_paths:
@@ -135,14 +137,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
137
  requirements:
136
138
  - - ">="
137
139
  - !ruby/object:Gem::Version
138
- version: '2.6'
140
+ version: '2.7'
139
141
  required_rubygems_version: !ruby/object:Gem::Requirement
140
142
  requirements:
141
143
  - - ">="
142
144
  - !ruby/object:Gem::Version
143
145
  version: '0'
144
146
  requirements: []
145
- rubygems_version: 3.2.15
147
+ rubygems_version: 3.3.3
146
148
  signing_key:
147
149
  specification_version: 4
148
150
  summary: a9n - ruby/rails apps configuration manager