avm-tools 0.159.1 → 0.160.0

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: a9edfdcd1258e425e119ae912a5f43b477ea1fb9c34398c0150aa3e3befa5a78
4
- data.tar.gz: 72d3b722fc6573c4ef4cd989eee94027aa479621612081d7c37e70db1eef12f1
3
+ metadata.gz: 6f56d35cbbe1ef7048b97450e7323b0fca1b50f44c09943175420bbd304c8eb4
4
+ data.tar.gz: cfd2e0446ca6e46ccd7502e4b6ba21cac6c3881b73e477d9b59b9b4e6adb46d1
5
5
  SHA512:
6
- metadata.gz: 58550ca398581ea2a88a69d32a98c734b810bf861e0fff1c8026a61ece3175f653bf32163bc8707c43a25a835e0d99730119b2548b0b77d6e3990d9eb6f1bd79
7
- data.tar.gz: 42d80e76b17d01f475a5a900f2881ae55065f9a57578680517cc6b33554dcbfafb1ed2d5303a77accfc226faf7734d0ece140078dfef3fe7dfff018040222467
6
+ metadata.gz: 7188687d4b90a907edcc657dd5f2eb92c205a1d8dc84385e9ea9eb3ca274af73248ab2f138de0f711f6df64c280334645a1c5145db0723227c0665e48dffdea4
7
+ data.tar.gz: 193586be2288ed7dcd1cfdc4347bd5464596d458a2af2a8eca131baee2c6982597ef8134a14f98a4b22e4eb50d55da61581c8f18f9a8786e568e8376988f967a
data/Gemfile CHANGED
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
- eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
7
+ local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if File.exist?(local_gemfile)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module Tools
5
+ module Rspec
6
+ module Helpers
7
+ module Runner
8
+ def avm_tools_runner_args_prefix
9
+ []
10
+ end
11
+
12
+ def avm_tools_runner_run(*argv)
13
+ require 'avm/tools/runner'
14
+ Avm::Tools::Runner.run(argv: avm_tools_runner_args_prefix + argv)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Tools
7
+ module Rspec
8
+ module Helpers
9
+ require_sub __FILE__
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/tools/rspec/helpers/runner'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Tools
8
+ module Rspec
9
+ module Setup
10
+ extend ::ActiveSupport::Concern
11
+
12
+ SETUPS = %w[helpers].freeze
13
+
14
+ def self.extended(setup_obj)
15
+ SETUPS.each { |s| setup_obj.send("setup_#{s}") }
16
+ end
17
+
18
+ def setup_helpers
19
+ rspec_config.include ::Avm::Tools::Rspec::Helpers::Runner
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Tools
7
+ module Rspec
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -19,7 +19,7 @@ module Avm
19
19
  end
20
20
 
21
21
  def help_extra_text
22
- "Format fields:\n" + FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n")
22
+ "Format fields:\n" + FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n") # rubocop:disable Style/StringConcatenation
23
23
  end
24
24
 
25
25
  def run
@@ -51,7 +51,7 @@ module Avm
51
51
  ::Avm::Git::Scms::Git.new(runner_context.call(:git).root_path)
52
52
  end
53
53
 
54
- def new_check(fix_parent = false)
54
+ def new_check(fix_parent = false) # rubocop:disable Style/OptionalBooleanParameter
55
55
  r = ::Avm::Git::SubrepoChecks.new(local_repos).add_all_subrepos
56
56
  r.fix_parent = fix_parent
57
57
  r
@@ -27,8 +27,8 @@ module Avm
27
27
  end
28
28
 
29
29
  def help_extra_text
30
- "Rules\n" + ::Avm::Scms::AutoCommit::Rules.all
31
- .map { |r| ' ' + r.keys.join(', ') + "\n" }.join
30
+ "Rules\n" + ::Avm::Scms::AutoCommit::Rules.all # rubocop:disable Style/StringConcatenation
31
+ .map { |r| " #{r.keys.join(', ')}\n" }.join
32
32
  end
33
33
 
34
34
  private
@@ -48,7 +48,7 @@ module Avm
48
48
  end
49
49
 
50
50
  def skip_validations
51
- parsed.skip_validations.to_s.split(',').map(&:strip).reject(&:blank?)
51
+ parsed.skip_validations.to_s.split(',').map(&:strip).compact_blank
52
52
  end
53
53
 
54
54
  def git_complete_issue_options
@@ -38,7 +38,7 @@ module Avm
38
38
  def sub_info_label(sub)
39
39
  return '' unless parsed.info?
40
40
 
41
- ' [' + {
41
+ ' [' + { # rubocop:disable Style/StringConcatenation
42
42
  'CLASS' => sub.class.name,
43
43
  'SCM' => sub.scm.class.name
44
44
  }.map { |k, v| "#{k}: #{v}" }.join(', ') + ']'
@@ -20,7 +20,7 @@ module Avm
20
20
  end
21
21
 
22
22
  def extra_available_subcommands
23
- ::Avm::Registry.runners.registered_modules.map { |k| [k.command_argument, k] }.to_h
23
+ ::Avm::Registry.runners.registered_modules.index_by(&:command_argument)
24
24
  end
25
25
  end
26
26
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.159.1'
5
+ VERSION = '0.160.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.159.1
4
+ version: 0.160.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-13 00:00:00.000000000 Z
11
+ date: 2024-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -254,6 +254,10 @@ files:
254
254
  - lib/avm.rb
255
255
  - lib/avm/tools.rb
256
256
  - lib/avm/tools/core_ext.rb
257
+ - lib/avm/tools/rspec.rb
258
+ - lib/avm/tools/rspec/helpers.rb
259
+ - lib/avm/tools/rspec/helpers/runner.rb
260
+ - lib/avm/tools/rspec/setup.rb
257
261
  - lib/avm/tools/runner.rb
258
262
  - lib/avm/tools/runner/application.rb
259
263
  - lib/avm/tools/runner/application/info.rb