eac_tools 0.19.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +30 -30
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/avm.gemspec +6 -6
  5. data/sub/avm/lib/avm/instances/runner.rb +4 -2
  6. data/sub/avm/lib/avm/version.rb +1 -1
  7. data/sub/avm/lib/avm/with/application_stereotype.rb +1 -3
  8. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
  9. data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/instances}/deploy/index.html.template +0 -0
  10. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +3 -3
  11. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/preferred_version_requirements.rb +43 -0
  12. data/sub/{avm-tools/lib/avm/tools/runner/ruby → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base}/rubocop.rb +4 -4
  13. data/sub/{avm-tools/lib/avm/tools/runner/ruby.rb → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base.rb} +5 -4
  14. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners.rb +11 -0
  15. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +6 -0
  16. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +1 -1
  17. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/bundle_update.rb +23 -0
  18. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/update_dependencies_requirements.rb +48 -0
  19. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb +2 -4
  20. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update_dependency_requirements.rb +58 -0
  21. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  22. data/sub/avm-eac_ruby_base1/locale/en.yml +2 -0
  23. data/sub/avm-eac_ruby_base1/locale/pt-BR.yml +2 -0
  24. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/preferred_version_requirements_spec.rb +23 -0
  25. data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base}/rubocop_spec.rb +6 -5
  26. data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base}/rubocop_spec_files/dir1/dir3/Gemfile +0 -0
  27. data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base}/rubocop_spec_files/dir2/empty.rb +0 -0
  28. data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base}/rubocop_spec_files/dir4/false_command.rb +0 -0
  29. data/sub/avm-tools/avm-tools.gemspec +10 -10
  30. data/sub/avm-tools/lib/avm/tools/runner/instance.rb +3 -1
  31. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  32. data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +5 -1
  33. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  34. metadata +37 -14
  35. data/sub/avm-tools/spec/lib/avm/tools/runner/ruby/rubocop_spec_files/dir1/dir3/Gemfile.lock +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f682e3e2b625d82f32da7855fb153e206693a1c0d4c934e0bb9b16216b2f7998
4
- data.tar.gz: 7cfa294cbdec42a2f1ad21199d2a744ccff5afc7e0c85714dd6685ee146781b4
3
+ metadata.gz: 04cbda8d8b53185b46e806e22d26098771f627a4574eb028e9836905e700a27d
4
+ data.tar.gz: 7862b02bf94a320aee41d7ef63052b2049484a5f1540392268b41402b4eb6ba4
5
5
  SHA512:
6
- metadata.gz: 1743063c5a1e76873664826ccfdf0fdb4c78ff668098a4ee1c8da4a8312f43b9e88694f37e0011d394045065572165376a486a9a4cdeef0538fae441f38e7df8
7
- data.tar.gz: 592727978f8b7902f25bc4b03252871dd80ef62611feb5fd0377ae822d6b379ea0c0ae2d050920a455b38ab40625fd67805f23d95209e674f060670e48b7c4fd
6
+ metadata.gz: d51e79b98e8a886236b82b1cafbbe7e3f817cf4dcc18bce329f19d4d5a176a2ae10c78ed5ca871d6de8e79b31244687bccfd0a4fdca71bf88e9e806aa6faab28
7
+ data.tar.gz: 42d8f5266e63f7dac0bf2f952bea10d9ad342fd223c1f41ea7984aeb3f37bce37dc5389bd00da9411607badf39bfed74f24b3fac04dd4bd6a3b3b4a2b55c4736
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.19.0)
5
- avm (~> 0.35)
4
+ eac_tools (0.22.0)
5
+ avm (~> 0.35, >= 0.35.1)
6
6
  avm-eac_asciidoctor_base0 (~> 0.4)
7
7
  avm-eac_generic_base0 (~> 0.5)
8
- avm-eac_latex_base0 (~> 0.1)
8
+ avm-eac_latex_base0 (~> 0.1, >= 0.1.1)
9
9
  avm-eac_rails_base0 (~> 0.6, >= 0.6.1)
10
10
  avm-eac_rails_base1 (~> 0.4, >= 0.4.2)
11
11
  avm-eac_redmine_base0 (~> 0.11)
12
12
  avm-eac_redmine_plugin_base0 (~> 0.3)
13
- avm-eac_ruby_base1 (~> 0.16)
13
+ avm-eac_ruby_base1 (~> 0.19)
14
14
  avm-eac_webapp_base0 (~> 0.3, >= 0.3.1)
15
15
  avm-eac_wordpress_base0 (~> 0.1, >= 0.1.1)
16
- avm-tools (~> 0.131)
16
+ avm-tools (~> 0.132, >= 0.132.1)
17
17
  eac_ruby_utils (~> 0.98)
18
18
 
19
19
  PATH
@@ -36,7 +36,7 @@ PATH
36
36
  PATH
37
37
  remote: sub/avm-eac_latex_base0
38
38
  specs:
39
- avm-eac_latex_base0 (0.1.0)
39
+ avm-eac_latex_base0 (0.1.1)
40
40
  avm (~> 0.34)
41
41
  avm-eac_webapp_base0 (~> 0.3, >= 0.3.1)
42
42
  eac_ruby_utils (~> 0.97)
@@ -80,10 +80,10 @@ PATH
80
80
  PATH
81
81
  remote: sub/avm-eac_ruby_base1
82
82
  specs:
83
- avm-eac_ruby_base1 (0.16.0)
84
- avm (~> 0.34)
85
- avm-eac_generic_base0 (~> 0.2)
86
- eac_ruby_utils (~> 0.95, >= 0.95.1)
83
+ avm-eac_ruby_base1 (0.19.0)
84
+ avm (~> 0.35, >= 0.35.1)
85
+ avm-eac_generic_base0 (~> 0.5)
86
+ eac_ruby_utils (~> 0.98)
87
87
 
88
88
  PATH
89
89
  remote: sub/avm-eac_webapp_base0
@@ -106,39 +106,39 @@ PATH
106
106
  PATH
107
107
  remote: sub/avm-tools
108
108
  specs:
109
- avm-tools (0.131.0)
110
- aranha-parsers (~> 0.4)
111
- avm (~> 0.34)
112
- avm-eac_ruby_base1 (~> 0.8)
109
+ avm-tools (0.132.1)
110
+ aranha-parsers (~> 0.14, >= 0.14.1)
111
+ avm (~> 0.35, >= 0.35.1)
112
+ avm-eac_ruby_base1 (~> 0.19)
113
113
  avm-eac_ubuntu_base0 (~> 0.3)
114
- avm-files (~> 0.1)
115
- avm-git (~> 0.3, >= 0.3.1)
116
- clipboard (~> 1.3, >= 1.3.3)
117
- curb (~> 0.9.10)
114
+ avm-files (~> 0.3, >= 0.3.2)
115
+ avm-git (~> 0.4)
116
+ clipboard (~> 1.3, >= 1.3.6)
117
+ curb (~> 0.9, >= 0.9.11)
118
118
  eac_git (~> 0.12, >= 0.12.1)
119
- eac_ruby_base0 (~> 0.16, >= 0.16.4)
119
+ eac_ruby_base0 (~> 0.16, >= 0.16.6)
120
120
  eac_templates (~> 0.3, >= 0.3.1)
121
- git (~> 1.7)
122
- ruby-progressbar (~> 1.10, >= 1.10.1)
121
+ git (~> 1.11)
122
+ ruby-progressbar (~> 1.11)
123
123
 
124
124
  PATH
125
125
  remote: sub/avm
126
126
  specs:
127
- avm (0.35.0)
128
- eac_cli (~> 0.27, >= 0.27.6)
127
+ avm (0.35.1)
128
+ eac_cli (~> 0.27, >= 0.27.8)
129
129
  eac_config (~> 0.10)
130
- eac_docker (~> 0.3)
131
- eac_git (~> 0.6)
132
- eac_ruby_utils (~> 0.97)
133
- eac_templates (~> 0.1, >= 0.1.1)
130
+ eac_docker (~> 0.4, >= 0.4.2)
131
+ eac_git (~> 0.12, >= 0.12.1)
132
+ eac_ruby_utils (~> 0.98)
133
+ eac_templates (~> 0.3, >= 0.3.1)
134
134
  filesize (~> 0.2)
135
- htmlbeautifier (~> 1.3, >= 1.3.1)
135
+ htmlbeautifier (~> 1.4, >= 1.4.2)
136
136
  minitar (~> 0.9)
137
137
 
138
138
  PATH
139
139
  remote: sub/eac_cli
140
140
  specs:
141
- eac_cli (0.27.7)
141
+ eac_cli (0.27.8)
142
142
  colorize (~> 0.8.1)
143
143
  eac_config (~> 0.8)
144
144
  eac_ruby_utils (~> 0.95)
@@ -290,7 +290,7 @@ GEM
290
290
  os (1.1.4)
291
291
  parallel (1.22.1)
292
292
  parseconfig (1.1.2)
293
- parser (3.1.2.0)
293
+ parser (3.1.2.1)
294
294
  ast (~> 2.4.1)
295
295
  parslet (2.0.0)
296
296
  public_suffix (4.0.7)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.19.0'
4
+ VERSION = '0.22.0'
5
5
  end
data/sub/avm/avm.gemspec CHANGED
@@ -12,14 +12,14 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'eac_cli', '~> 0.27', '>= 0.27.6'
15
+ s.add_dependency 'eac_cli', '~> 0.27', '>= 0.27.8'
16
16
  s.add_dependency 'eac_config', '~> 0.10'
17
- s.add_dependency 'eac_docker', '~> 0.3'
18
- s.add_dependency 'eac_git', '~> 0.6'
19
- s.add_dependency 'eac_ruby_utils', '~> 0.97'
20
- s.add_dependency 'eac_templates', '~> 0.1', '>= 0.1.1'
17
+ s.add_dependency 'eac_docker', '~> 0.4', '>= 0.4.2'
18
+ s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.1'
19
+ s.add_dependency 'eac_ruby_utils', '~> 0.98'
20
+ s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.1'
21
21
  s.add_dependency 'filesize', '~> 0.2'
22
- s.add_dependency 'htmlbeautifier', '~> 1.3', '>= 1.3.1'
22
+ s.add_dependency 'htmlbeautifier', '~> 1.4', '>= 1.4.2'
23
23
  s.add_dependency 'minitar', '~> 0.9'
24
24
 
25
25
  s.add_development_dependency 'aranha-parsers', '~> 0.14', '~> 0.14.1'
@@ -7,10 +7,12 @@ module Avm
7
7
  module Instances
8
8
  class Runner < ::Avm::Runners::Base
9
9
  class << self
10
- def instance_class
11
- ::Avm.const_get(stereotype_name).const_get('Instance')
10
+ def application_stereotype
11
+ ::Avm::Registry.application_stereotypes.detect(stereotype_name)
12
12
  end
13
13
 
14
+ delegate :instance_class, to: :application_stereotype
15
+
14
16
  def stereotype_module
15
17
  ::Avm.const_get(stereotype_name)
16
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.35.0'
4
+ VERSION = '0.35.1'
5
5
  end
@@ -5,9 +5,7 @@ require 'eac_ruby_utils/core_ext'
5
5
  module Avm
6
6
  module With
7
7
  module ApplicationStereotype
8
- common_concern do
9
- include ClassMethods
10
- end
8
+ common_concern
11
9
 
12
10
  module ClassMethods
13
11
  # @return [Avm::ApplicationStereotype::Base]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacLatexBase0
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.34'
16
- s.add_dependency 'avm-eac_generic_base0', '~> 0.2'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.95', '>= 0.95.1'
15
+ s.add_dependency 'avm', '~> 0.35', '>= 0.35.1'
16
+ s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.98'
18
18
 
19
19
  s.add_development_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
20
20
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/version_number'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRubyBase1
8
+ class PreferredVersionRequirements
9
+ enable_simple_cache
10
+ common_constructor :version do
11
+ self.version = ::Avm::VersionNumber.new(version)
12
+ end
13
+
14
+ # @return [Avm::VersionNumber]
15
+ def prefix_version
16
+ ::Avm::VersionNumber.new(
17
+ normalized_version.segments[0..normalized_version.segments.count - 2]
18
+ )
19
+ end
20
+
21
+ # @return [Gem::Requirement]
22
+ def to_requirement
23
+ r = ["~> #{prefix_version}"]
24
+ r << ">= #{normalized_version}" unless normalized_version.segments[-1].zero?
25
+ ::Gem::Requirement.new(r)
26
+ end
27
+
28
+ # @return [Array<String>]
29
+ def to_requirements_list
30
+ to_requirement.requirements.map { |r| "#{r[0]} #{r[1]}" }
31
+ end
32
+
33
+ private
34
+
35
+ # @return [Avm::VersionNumber]
36
+ def normalized_version_uncached
37
+ r = version
38
+ r = ::Avm::VersionNumber.new(r.segments + [0]) while r.segments.count < 3
39
+ r
40
+ end
41
+ end
42
+ end
43
+ end
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/tools/core_ext'
4
3
  require 'avm/eac_ruby_base1/rubocop'
4
+ require 'eac_cli/core_ext'
5
5
 
6
6
  module Avm
7
- module Tools
8
- class Runner
9
- class Ruby
7
+ module EacRubyBase1
8
+ module Runners
9
+ class Base
10
10
  class Rubocop
11
11
  runner_with :help do
12
12
  desc 'Runs Rubocop (https://rubygems.org/gems/rubocop).'
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_cli/core_ext'
3
+ require 'avm/runners/base'
4
4
 
5
5
  module Avm
6
- module Tools
7
- class Runner
8
- class Ruby
6
+ module EacRubyBase1
7
+ module Runners
8
+ class Base < ::Avm::Runners::Base
9
9
  require_sub __FILE__
10
+
10
11
  runner_with :help, :subcommands do
11
12
  desc 'Ruby utilities for AVM.'
12
13
  subcommands
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module Runners
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'avm/eac_generic_base0/sources/base'
4
4
  require 'avm/eac_ruby_base1/sources/base/bundle_command'
5
+ require 'avm/eac_ruby_base1/sources/bundle_update'
5
6
  require 'eac_ruby_utils/core_ext'
6
7
 
7
8
  module Avm
@@ -18,6 +19,11 @@ module Avm
18
19
  .envvar_gemfile
19
20
  end
20
21
 
22
+ # @return [Avm::EacRubyBase1::Sources::BundleUpdate]
23
+ def bundle_update
24
+ ::Avm::EacRubyBase1::Sources::BundleUpdate.new(self)
25
+ end
26
+
21
27
  # @return [String]
22
28
  def configured_gemfile_path
23
29
  configuration_entry(CONFIGURED_GEMFILE_PATH_ENTRY_KEY).value
@@ -2,8 +2,8 @@
2
2
 
3
3
  require 'avm/eac_generic_base0/sources/base'
4
4
  require 'avm/eac_ruby_base1/rubygems/version_file'
5
+ require 'avm/eac_ruby_base1/sources/runners'
5
6
  require 'avm/eac_ruby_base1/sources/update'
6
- require 'avm/eac_ruby_base1/sources/runners/bundler'
7
7
  require 'avm/version_number'
8
8
  require 'eac_ruby_utils/core_ext'
9
9
 
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module Sources
8
+ class BundleUpdate
9
+ common_constructor :source
10
+ delegate :bundle, to: :source
11
+
12
+ def execute!
13
+ bundle('update').execute! + bundle('install').execute!
14
+ end
15
+
16
+ def system!
17
+ bundle('update').system!
18
+ bundle('install').system!
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ruby_base1/rubygems/gemspec'
4
+ require 'avm/eac_ruby_base1/sources/update_dependency_requirements'
5
+ require 'eac_cli/core_ext'
6
+
7
+ module Avm
8
+ module EacRubyBase1
9
+ module Sources
10
+ module Runners
11
+ class UpdateDependenciesRequirements
12
+ runner_with :help do
13
+ bool_opt '-a', '--all'
14
+ pos_arg :gem_name, repeat: true, optional: true
15
+ end
16
+
17
+ def run
18
+ runner_context.call(:source_banner)
19
+ infov 'Gems to update', gem_names.count
20
+ gem_names.each do |gem_name|
21
+ infov 'Gem to update', gem_name
22
+ ::Avm::EacRubyBase1::Sources::UpdateDependencyRequirements
23
+ .new(runner_context.call(:source), gem_name).perform
24
+ end
25
+ end
26
+
27
+ def gemspec
28
+ ::Avm::EacRubyBase1::Rubygems::Gemspec.from_file(
29
+ runner_context.call(:source).gemspec_path
30
+ )
31
+ end
32
+
33
+ private
34
+
35
+ def gem_names_uncached
36
+ ::Set.new(parsed.gem_name + gem_names_from_all).sort
37
+ end
38
+
39
+ def gem_names_from_all
40
+ return [] unless parsed.all?
41
+
42
+ gemspec.dependencies.map(&:gem_name)
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -14,10 +14,8 @@ module Avm
14
14
  end
15
15
 
16
16
  def bundle_update
17
- infom 'Running "bundle update"...'
18
- source.bundle('update').execute!
19
- infom 'Running "bundle install"...'
20
- source.bundle('install').execute!
17
+ infom 'Running "bundle update && bundle install"...'
18
+ source.bundle_update.execute!
21
19
  end
22
20
 
23
21
  protected
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ruby_base1/preferred_version_requirements'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRubyBase1
8
+ module Sources
9
+ class UpdateDependencyRequirements
10
+ enable_simple_cache
11
+ common_constructor :source, :gem_name
12
+
13
+ def perform
14
+ source.scm.commit_if_change(commit_message) { update_code }
15
+ end
16
+
17
+ private
18
+
19
+ # @return [String]
20
+ def commit_message
21
+ i18n_translate(__method__,
22
+ name: gem_name,
23
+ requirements_list: requirements_list.join(', '),
24
+ __locale: source.locale)
25
+ end
26
+
27
+ # @return [Array<String>]
28
+ def requirements_list_uncached
29
+ ::Avm::EacRubyBase1::PreferredVersionRequirements.new(
30
+ source.gemfile_lock_gem_version(gem_name)
31
+ ).to_requirements_list
32
+ end
33
+
34
+ def gemspec_uncached
35
+ ::Avm::EacRubyBase1::Rubygems::Gemspec.from_file(source.gemspec_path)
36
+ end
37
+
38
+ def parent_bundle
39
+ return unless source.parent.if_present { |v| v.is_a?(::Avm::EacRubyBase1::Sources::Base) }
40
+
41
+ source.parent.bundle_update.execute!
42
+ end
43
+
44
+ def update_code
45
+ update_gemspec
46
+ source.bundle.system!
47
+ parent_bundle
48
+ end
49
+
50
+ def update_gemspec
51
+ gemspec.dependency(gem_name).version_specs = requirements_list
52
+ gemspec.write(source.gemspec_path)
53
+ source.bundle('exec', 'rubocop', source.gemspec_path).system!
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.16.0'
5
+ VERSION = '0.19.0'
6
6
  end
7
7
  end
@@ -6,3 +6,5 @@ en:
6
6
  no_scm_update_commit_message: "Gem \"%{name}\" (Local): update to '%{version}'."
7
7
  scm_update_commit_message: '**/.gitrepo: fix/update.'
8
8
  update_gemfile_lock_commit_message: 'All gems: update.'
9
+ update_dependency_requirements:
10
+ commit_message: "Gem \"%{name}\": update to '%{requirements_list}'."
@@ -6,3 +6,5 @@ pt-BR:
6
6
  no_scm_update_commit_message: "Gem \"%{name}\" (Local): atualiza para '%{version}'."
7
7
  scm_update_commit_message: '**/.gitrepo: conserta/atualiza.'
8
8
  update_gemfile_lock_commit_message: 'Todas as gems: atualiza.'
9
+ update_dependency_requirements:
10
+ commit_message: "Gem \"%{name}\": atualiza para to '%{requirements_list}'."
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ruby_base1/preferred_version_requirements'
4
+
5
+ ::RSpec.describe ::Avm::EacRubyBase1::PreferredVersionRequirements do
6
+ describe '#to_requirements_list' do
7
+ {
8
+ '0.1.0' => ['~> 0.1'],
9
+ '0.1.1' => ['~> 0.1', '>= 0.1.1'],
10
+ '0.5' => ['~> 0.5'],
11
+ '4.2.11.3' => ['~> 4.2.11', '>= 4.2.11.3'],
12
+ '1' => ['~> 1.0']
13
+ }.each do |source, expected|
14
+ context "when version is \"#{source}\"" do
15
+ subject(:instance) { described_class.new(source) }
16
+
17
+ it do
18
+ expect(instance.to_requirements_list).to eq(expected)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/eac_ruby_base1/runners/base/rubocop'
3
4
  require 'avm/eac_ruby_base1/sources/base'
4
- require 'avm/tools/runner'
5
5
 
6
- ::RSpec.describe ::Avm::Tools::Runner::Ruby::Rubocop do
6
+ ::RSpec.describe ::Avm::EacRubyBase1::Runners::Base::Rubocop do
7
7
  let(:fixtures_root) { ::Pathname.new(__dir__).expand_path.join('rubocop_spec_files') }
8
8
  let(:dir1) { fixtures_root.join('dir1') }
9
9
  let(:dir2) { fixtures_root.join('dir2') }
@@ -12,7 +12,8 @@ require 'avm/tools/runner'
12
12
 
13
13
  {
14
14
  dir1: '0.48.1',
15
- dir2: ::Avm::EacRubyBase1::Sources::Base.new(APP_ROOT).gemfile_lock_gem_version('rubocop').to_s,
15
+ dir2: ::Avm::EacRubyBase1::Sources::Base.new(::File.expand_path('../../../../../..', __dir__))
16
+ .gemfile_lock_gem_version('rubocop').to_s,
16
17
  dir3: '0.48.1',
17
18
  dir4: '33.33.33'
18
19
  }.each do |dir_name, rubocop_version|
@@ -25,8 +26,8 @@ require 'avm/tools/runner'
25
26
  end
26
27
 
27
28
  it "return #{rubocop_version} as Rubocop version" do
28
- argv = ['--quiet', 'ruby', 'rubocop', '-C', dir.to_s, '--', '--version']
29
- expect { ::Avm::Tools::Runner.run(argv: argv) }.to(
29
+ argv = ['-C', dir.to_s, '--', '--version']
30
+ expect { described_class.run(argv: argv) }.to(
30
31
  output("#{rubocop_version}\n").to_stdout_from_any_process
31
32
  )
32
33
  end
@@ -14,19 +14,19 @@ Gem::Specification.new do |s|
14
14
  s.bindir = 'exe'
15
15
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
16
16
 
17
- s.add_dependency 'aranha-parsers', '~> 0.4'
18
- s.add_dependency 'avm', '~> 0.34'
19
- s.add_dependency 'avm-eac_ruby_base1', '~> 0.8'
17
+ s.add_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
18
+ s.add_dependency 'avm', '~> 0.35', '>= 0.35.1'
19
+ s.add_dependency 'avm-eac_ruby_base1', '~> 0.19'
20
20
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
21
- s.add_dependency 'avm-files', '~> 0.1'
22
- s.add_dependency 'avm-git', '~> 0.3', '>= 0.3.1'
23
- s.add_dependency 'clipboard', '~> 1.3', '>= 1.3.3'
24
- s.add_dependency 'curb', '~> 0.9.10'
21
+ s.add_dependency 'avm-files', '~> 0.3', '>= 0.3.2'
22
+ s.add_dependency 'avm-git', '~> 0.4'
23
+ s.add_dependency 'clipboard', '~> 1.3', '>= 1.3.6'
24
+ s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
25
25
  s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.1'
26
- s.add_dependency 'eac_ruby_base0', '~> 0.16', '>= 0.16.4'
26
+ s.add_dependency 'eac_ruby_base0', '~> 0.16', '>= 0.16.6'
27
27
  s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.1'
28
- s.add_dependency 'git', '~> 1.7'
29
- s.add_dependency 'ruby-progressbar', '~> 1.10', '>= 1.10.1'
28
+ s.add_dependency 'git', '~> 1.11'
29
+ s.add_dependency 'ruby-progressbar', '~> 1.11'
30
30
 
31
31
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
32
32
  end
@@ -22,7 +22,9 @@ module Avm
22
22
  private
23
23
 
24
24
  def instance_uncached
25
- ::Avm::Registry.instances.detect(parsed.instance_id)
25
+ parsed.instance_id.if_present do |v|
26
+ ::Avm::Registry.instances.detect(v)
27
+ end
26
28
  end
27
29
  end
28
30
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.131.0'
5
+ VERSION = '0.132.1'
6
6
  end
7
7
  end
@@ -47,6 +47,10 @@ module EacCli
47
47
  end
48
48
  end
49
49
 
50
+ def available_subcommands_to_s
51
+ available_subcommands.keys.sort.join(', ')
52
+ end
53
+
50
54
  def help_extra_text
51
55
  (['Subcommands:'] + available_subcommands.keys.sort.map { |s| " #{s}" })
52
56
  .map { |v| "#{v}\n" }.join
@@ -101,7 +105,7 @@ module EacCli
101
105
  raise(::EacCli::Parser::Error.new(
102
106
  self.class.runner_definition, runner_context.argv,
103
107
  "Subcommand \"#{subcommand_name}\" not found " \
104
- "(Available: #{available_subcommands.keys})"
108
+ "(Available: #{available_subcommands_to_s})"
105
109
  ))
106
110
  end
107
111
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.27.7'
4
+ VERSION = '0.27.8'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-08 00:00:00.000000000 Z
11
+ date: 2022-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.35'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.35.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0.35'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.35.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: avm-eac_asciidoctor_base0
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -59,6 +65,9 @@ dependencies:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
67
  version: '0.1'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 0.1.1
62
71
  type: :runtime
63
72
  prerelease: false
64
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -66,6 +75,9 @@ dependencies:
66
75
  - - "~>"
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0.1'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 0.1.1
69
81
  - !ruby/object:Gem::Dependency
70
82
  name: avm-eac_rails_base0
71
83
  requirement: !ruby/object:Gem::Requirement
@@ -140,14 +152,14 @@ dependencies:
140
152
  requirements:
141
153
  - - "~>"
142
154
  - !ruby/object:Gem::Version
143
- version: '0.16'
155
+ version: '0.19'
144
156
  type: :runtime
145
157
  prerelease: false
146
158
  version_requirements: !ruby/object:Gem::Requirement
147
159
  requirements:
148
160
  - - "~>"
149
161
  - !ruby/object:Gem::Version
150
- version: '0.16'
162
+ version: '0.19'
151
163
  - !ruby/object:Gem::Dependency
152
164
  name: avm-eac_webapp_base0
153
165
  requirement: !ruby/object:Gem::Requirement
@@ -194,14 +206,20 @@ dependencies:
194
206
  requirements:
195
207
  - - "~>"
196
208
  - !ruby/object:Gem::Version
197
- version: '0.131'
209
+ version: '0.132'
210
+ - - ">="
211
+ - !ruby/object:Gem::Version
212
+ version: 0.132.1
198
213
  type: :runtime
199
214
  prerelease: false
200
215
  version_requirements: !ruby/object:Gem::Requirement
201
216
  requirements:
202
217
  - - "~>"
203
218
  - !ruby/object:Gem::Version
204
- version: '0.131'
219
+ version: '0.132'
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: 0.132.1
205
223
  - !ruby/object:Gem::Dependency
206
224
  name: eac_ruby_utils
207
225
  requirement: !ruby/object:Gem::Requirement
@@ -301,6 +319,7 @@ files:
301
319
  - sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb
302
320
  - sub/avm-eac_latex_base0/spec/rubocop_spec.rb
303
321
  - sub/avm-eac_latex_base0/spec/spec_helper.rb
322
+ - sub/avm-eac_latex_base0/template/avm/eac_latex_base0/instances/deploy/index.html.template
304
323
  - sub/avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build/commons/all.tex
305
324
  - sub/avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build/commons/ebook.tex
306
325
  - sub/avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build/commons/images.tex
@@ -436,6 +455,7 @@ files:
436
455
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_factory.rb
437
456
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base.rb
438
457
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/version_requirement.rb
458
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/preferred_version_requirements.rb
439
459
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb
440
460
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb
441
461
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb
@@ -445,6 +465,9 @@ files:
445
465
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/add_or_replace_gem_line.rb
446
466
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/dependency.rb
447
467
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/version_file.rb
468
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners.rb
469
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base.rb
470
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base/rubocop.rb
448
471
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators.rb
449
472
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base.rb
450
473
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources.rb
@@ -454,10 +477,12 @@ files:
454
477
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rake.rb
455
478
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubygems.rb
456
479
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb
480
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/bundle_update.rb
457
481
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners.rb
458
482
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler.rb
459
483
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb
460
484
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb
485
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/update_dependencies_requirements.rb
461
486
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests.rb
462
487
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/base.rb
463
488
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/minitest.rb
@@ -467,6 +492,7 @@ files:
467
492
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/rspec.rb
468
493
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
469
494
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb
495
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update_dependency_requirements.rb
470
496
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb
471
497
  - sub/avm-eac_ruby_base1/locale/en.yml
472
498
  - sub/avm-eac_ruby_base1/locale/pt-BR.yml
@@ -475,8 +501,13 @@ files:
475
501
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.target.yaml
476
502
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.source.out
477
503
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.target.yaml
504
+ - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/preferred_version_requirements_spec.rb
478
505
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec.rb
479
506
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec_files/a_version_file.rb
507
+ - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
508
+ - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile
509
+ - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir2/empty.rb
510
+ - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir4/false_command.rb
480
511
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec.rb
481
512
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile
482
513
  - sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/dashed-mygem.gemspec
@@ -657,8 +688,6 @@ files:
657
688
  - sub/avm-tools/lib/avm/tools/runner/launcher/instances.rb
658
689
  - sub/avm-tools/lib/avm/tools/runner/launcher/projects.rb
659
690
  - sub/avm-tools/lib/avm/tools/runner/launcher/publish.rb
660
- - sub/avm-tools/lib/avm/tools/runner/ruby.rb
661
- - sub/avm-tools/lib/avm/tools/runner/ruby/rubocop.rb
662
691
  - sub/avm-tools/lib/avm/tools/runner/self.rb
663
692
  - sub/avm-tools/lib/avm/tools/runner/self/docker.rb
664
693
  - sub/avm-tools/lib/avm/tools/runner/self/registry.rb
@@ -718,11 +747,6 @@ files:
718
747
  - sub/avm-tools/spec/lib/avm/tools/runner/git/deploy_spec.rb
719
748
  - sub/avm-tools/spec/lib/avm/tools/runner/git/deploy_spec_files/append1/stub3.txt.template
720
749
  - sub/avm-tools/spec/lib/avm/tools/runner/git/deploy_spec_files/append2/stub4.txt
721
- - sub/avm-tools/spec/lib/avm/tools/runner/ruby/rubocop_spec.rb
722
- - sub/avm-tools/spec/lib/avm/tools/runner/ruby/rubocop_spec_files/dir1/dir3/Gemfile
723
- - sub/avm-tools/spec/lib/avm/tools/runner/ruby/rubocop_spec_files/dir1/dir3/Gemfile.lock
724
- - sub/avm-tools/spec/lib/avm/tools/runner/ruby/rubocop_spec_files/dir2/empty.rb
725
- - sub/avm-tools/spec/lib/avm/tools/runner/ruby/rubocop_spec_files/dir4/false_command.rb
726
750
  - sub/avm-tools/spec/lib/avm/tools/runner_spec.rb
727
751
  - sub/avm-tools/spec/rubocop_spec.rb
728
752
  - sub/avm-tools/spec/spec_helper.rb
@@ -734,7 +758,6 @@ files:
734
758
  - sub/avm-tools/spec/spec_helper/stub_templates/stubbed_docker_server/id_rsa.pub
735
759
  - sub/avm-tools/spec/spec_helper/stubbed_docker_server.rb
736
760
  - sub/avm-tools/spec/spec_helper/templates.rb
737
- - sub/avm-tools/template/avm/eac_writings_base0/deploy/index.html.template
738
761
  - sub/avm-tools/template/avm/self/docker_image/Dockerfile
739
762
  - sub/avm-tools/template/avm/self/docker_image/entrypoint.sh
740
763
  - sub/avm/Gemfile
@@ -1,27 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- ast (2.4.0)
5
- parser (2.7.0.4)
6
- ast (~> 2.4.0)
7
- powerpack (0.1.2)
8
- rainbow (2.2.2)
9
- rake
10
- rake (13.0.1)
11
- rubocop (0.48.1)
12
- parser (>= 2.3.3.1, < 3.0)
13
- powerpack (~> 0.1)
14
- rainbow (>= 1.99.1, < 3.0)
15
- ruby-progressbar (~> 1.7)
16
- unicode-display_width (~> 1.0, >= 1.0.1)
17
- ruby-progressbar (1.10.1)
18
- unicode-display_width (1.7.0)
19
-
20
- PLATFORMS
21
- ruby
22
-
23
- DEPENDENCIES
24
- rubocop (= 0.48.1)
25
-
26
- BUNDLED WITH
27
- 2.3.17