avm-tools 0.116.0 → 0.117.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/launcher/instances/settings.rb +7 -3
  3. data/lib/avm/projects/stereotypes.rb +2 -2
  4. data/lib/avm/ruby/bundler/incompatible_parser/depends_on.rb +1 -1
  5. data/lib/avm/ruby/bundler/incompatible_parser/gem_conflict.rb +1 -1
  6. data/lib/avm/ruby/bundler/incompatible_parser/in_gemfile.rb +1 -1
  7. data/lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb +1 -1
  8. data/lib/avm/ruby/bundler/incompatible_parser.rb +1 -1
  9. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +1 -1
  10. data/lib/avm/tools/runner/app_src/test.rb +2 -2
  11. data/lib/avm/tools/runner/app_src/version_bump.rb +4 -9
  12. data/lib/avm/tools/runner/git/deploy.rb +5 -5
  13. data/lib/avm/tools/runner/git/dirty_files.rb +1 -1
  14. data/lib/avm/tools/runner/git/revisions_test.rb +1 -1
  15. data/lib/avm/tools/runner/ruby/rubocop.rb +2 -2
  16. data/lib/avm/tools/version.rb +1 -1
  17. data/sub/avm/avm.gemspec +3 -3
  18. data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +2 -2
  19. data/sub/avm/lib/avm/instances/entry_keys.rb +2 -0
  20. data/sub/avm/lib/avm/registry/base.rb +2 -2
  21. data/sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +1 -1
  22. data/sub/avm/lib/avm/scms/base.rb +13 -0
  23. data/sub/avm/lib/avm/sources/base/configuration.rb +2 -1
  24. data/sub/avm/lib/avm/sources/base/parent.rb +31 -0
  25. data/sub/avm/lib/avm/sources/base.rb +4 -6
  26. data/sub/avm/lib/avm/sources/configuration/{_locale.rb → locale.rb} +5 -3
  27. data/sub/avm/lib/avm/sources/configuration/rubocop.rb +26 -0
  28. data/sub/avm/lib/avm/sources/configuration/tests.rb +29 -0
  29. data/sub/avm/lib/avm/sources/configuration.rb +5 -1
  30. data/sub/avm/lib/avm/sources/tests/builder.rb +1 -1
  31. data/sub/avm/lib/avm/version.rb +1 -1
  32. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build/file.rb +1 -1
  33. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build.rb +2 -2
  34. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner/build.rb +1 -1
  35. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner.rb +2 -2
  36. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  37. data/sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec +1 -1
  38. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base/version_bump.rb +35 -0
  39. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base.rb +4 -1
  40. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +1 -1
  41. data/sub/avm-eac_generic_base0/locale/en.yaml +6 -0
  42. data/sub/avm-eac_generic_base0/locale/pt-BR.yaml +6 -0
  43. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +1 -1
  44. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  45. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh +1 -1
  46. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +1 -1
  47. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -3
  48. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +17 -2
  49. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  50. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template +2 -8
  51. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile_apache_setup +8 -0
  52. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/start.sh.template +1 -1
  53. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
  54. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb +31 -0
  55. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb +17 -0
  56. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +41 -0
  57. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/rubocop.rb +2 -2
  58. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb +23 -0
  59. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +11 -0
  60. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb +1 -1
  61. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +1 -1
  62. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb +0 -1
  63. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  64. data/sub/avm-files/avm-files.gemspec +1 -1
  65. data/sub/avm-files/lib/avm/files/appendable.rb +1 -1
  66. data/sub/avm-files/lib/avm/files/formatter/formats/ruby.rb +2 -2
  67. data/sub/avm-files/lib/avm/files/version.rb +1 -1
  68. data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +1 -3
  69. data/sub/avm-git/lib/avm/git/version.rb +1 -1
  70. data/sub/eac_cli/eac_cli.gemspec +1 -1
  71. data/sub/eac_cli/lib/eac_cli/old_configs/entry_reader.rb +1 -1
  72. data/sub/eac_cli/lib/eac_cli/old_configs/read_entry_options.rb +1 -1
  73. data/sub/eac_cli/lib/eac_cli/parser.rb +2 -2
  74. data/sub/eac_cli/lib/eac_cli/runner_with/help/builder.rb +1 -1
  75. data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +4 -4
  76. data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +2 -2
  77. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  78. data/sub/eac_config/eac_config.gemspec +1 -1
  79. data/sub/eac_config/lib/eac_config/entry.rb +1 -1
  80. data/sub/eac_config/lib/eac_config/envvars_node/entry.rb +1 -1
  81. data/sub/eac_config/lib/eac_config/paths_hash/node.rb +1 -1
  82. data/sub/eac_config/lib/eac_config/version.rb +1 -1
  83. data/sub/eac_fs/eac_fs.gemspec +1 -1
  84. data/sub/eac_fs/lib/eac_fs/version.rb +1 -1
  85. data/sub/eac_git/eac_git.gemspec +1 -1
  86. data/sub/eac_git/lib/eac_git/local/remote.rb +2 -2
  87. data/sub/eac_git/lib/eac_git/local.rb +1 -1
  88. data/sub/eac_git/lib/eac_git/version.rb +1 -1
  89. data/sub/eac_rest/eac_rest.gemspec +1 -1
  90. data/sub/eac_rest/lib/eac_rest/api.rb +14 -3
  91. data/sub/eac_rest/lib/eac_rest/request.rb +22 -1
  92. data/sub/eac_rest/lib/eac_rest/response.rb +41 -1
  93. data/sub/eac_rest/lib/eac_rest/version.rb +1 -1
  94. data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +1 -1
  95. data/sub/eac_ruby_base0/lib/eac_ruby_base0/application.rb +2 -2
  96. data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  97. data/sub/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +1 -1
  98. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +2 -2
  99. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  100. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  101. data/sub/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +1 -0
  102. data/sub/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +1 -1
  103. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +1 -1
  104. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +1 -1
  105. data/sub/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +1 -1
  106. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +16 -4
  107. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +12 -2
  108. data/sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +1 -1
  109. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_all_gems.rb +4 -0
  110. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_gem.rb +47 -0
  111. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/module_i18n_translate.rb +74 -0
  112. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales.rb +9 -0
  113. data/sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb +35 -0
  114. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb +2 -25
  115. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/method_class.rb +9 -0
  116. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +6 -0
  117. data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +86 -33
  118. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +1 -1
  119. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  120. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/{temp_spec.rb → directory_spec.rb} +0 -0
  121. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +4 -4
  122. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +169 -106
  123. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/method_class_spec.rb +46 -0
  124. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +52 -17
  125. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +5 -3
  126. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/method_class_spec.rb +20 -0
  127. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +5 -3
  128. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec.rb +3 -3
  129. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +21 -18
  130. data/sub/eac_ruby_utils/spec/locales/pt-BR.yml +3 -0
  131. data/sub/eac_templates/eac_templates.gemspec +1 -1
  132. data/sub/eac_templates/lib/eac_templates/directory.rb +1 -1
  133. data/sub/eac_templates/lib/eac_templates/version.rb +1 -1
  134. metadata +42 -20
  135. data/lib/avm/projects/stereotypes/rails_application/update.rb +0 -14
  136. data/lib/avm/projects/stereotypes/ruby_gem/version_bump.rb +0 -60
  137. data/lib/avm/ruby/rubocop/_configured.rb +0 -29
  138. data/lib/avm/ruby/rubocop/_envvar.rb +0 -15
  139. data/lib/avm/ruby/rubocop/_gemfile.rb +0 -39
  140. data/sub/avm/lib/avm/sources/configuration/_rubocop.rb +0 -24
  141. data/sub/avm/lib/avm/sources/configuration/_tests.rb +0 -27
  142. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb +0 -7
  143. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches.rb +0 -4
@@ -0,0 +1,6 @@
1
+ en:
2
+ avm:
3
+ eac_generic_base0:
4
+ sources:
5
+ base:
6
+ version_bump_commit_message: Bump to '%{version}'.
@@ -0,0 +1,6 @@
1
+ pt-BR:
2
+ avm:
3
+ eac_generic_base0:
4
+ sources:
5
+ base:
6
+ version_bump_commit_message: Versão para '%{version}'.
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '>= 0.9.9'
17
17
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
18
18
 
19
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
20
20
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -3,4 +3,4 @@
3
3
  set -e
4
4
 
5
5
  source "$HOME/.rvm/scripts/rvm"
6
- ( cd '%%fs_path%%'; bundle exec tasks_scheduler "$@" )
6
+ ( cd '%%fs_path%%'; RAILS_ENV=production bundle exec tasks_scheduler "$@" )
@@ -19,5 +19,5 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency 'eac_rest', '~> 0.4'
20
20
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
21
21
 
22
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
22
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
23
23
  end
@@ -76,7 +76,7 @@ module Avm
76
76
 
77
77
  def sync_content
78
78
  ::Avm::Sync.new(source_path, target_path)
79
- .add_exclude('/*').add_includes(*target_files_to_remove).move_mode(true).run
79
+ .add_exclude('/*').add_includes(*target_files_to_remove).move_mode(true).run
80
80
  end
81
81
 
82
82
  # @return [EacFs::CachedDownload]
@@ -99,8 +99,8 @@ module Avm
99
99
 
100
100
  def target_files_to_remove
101
101
  git_repo.command('ls-files').execute!
102
- .each_line.map { |v| "/#{v.strip}" }
103
- .without(*TARGET_KEEP)
102
+ .each_line.map { |v| "/#{v.strip}" }
103
+ .without(*TARGET_KEEP)
104
104
  end
105
105
 
106
106
  def target_path_uncached
@@ -12,7 +12,8 @@ module Avm
12
12
  enable_simple_cache
13
13
 
14
14
  BASE_IMAGE = 'ubuntu:20.04'
15
- INSTALLER_TARGET_TASK = 'redmine_as_apache_base'
15
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_BLANK = 'redmine_as_apache_base'
16
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT = 'redmine_as_apache_path'
16
17
  DATABASE_INTERNAL_HOSTNAME = 'localhost'
17
18
  REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source'
18
19
 
@@ -20,6 +21,12 @@ module Avm
20
21
  instance.id
21
22
  end
22
23
 
24
+ def apache_setup
25
+ return '' if web_path_present?
26
+
27
+ template.child('Dockerfile_apache_setup').apply(self)
28
+ end
29
+
23
30
  def base_image
24
31
  eac_ubuntu_base0_instance.docker_image.provide.id
25
32
  end
@@ -30,7 +37,11 @@ module Avm
30
37
  end
31
38
 
32
39
  def installer_target_task
33
- INSTALLER_TARGET_TASK
40
+ if web_path_present?
41
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT
42
+ else
43
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_BLANK
44
+ end
34
45
  end
35
46
 
36
47
  def redmine_user
@@ -53,6 +64,10 @@ module Avm
53
64
  '/start.sh'
54
65
  end
55
66
 
67
+ def web_path_present?
68
+ ::Addressable::URI.parse(instance.web_url).path.present?
69
+ end
70
+
56
71
  private
57
72
 
58
73
  def eac_ubuntu_base0_instance
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.5.0'
5
+ VERSION = '0.5.1'
6
6
  end
7
7
  end
@@ -22,19 +22,13 @@ RUN SKIP_DATABASE='%%skip_database%%' \
22
22
  '%%redmine_path%%/plugins/redmine_installer/installer/run.sh' '%%installer_target_task%%'
23
23
 
24
24
  # Apache / Configuração do virtualhost
25
- COPY apache_http_virtualhost.conf /etc/apache2/sites-available/redmine.conf
26
- COPY apache_https_virtualhost.conf /etc/apache2/sites-available/redmine_ssl.conf
27
- USER root
28
- RUN a2ensite redmine
29
- RUN a2ensite redmine_ssl
30
- RUN a2dissite 000-default
31
- RUN a2enmod ssl
32
- RUN service apache2 restart
25
+ %%apache_setup%%
33
26
 
34
27
  # Portas
35
28
  EXPOSE 80/tcp 443/tcp 22/tcp
36
29
 
37
30
  # Execução
31
+ USER root
38
32
  COPY start.sh '%%start_path%%'
39
33
  RUN /bin/chmod +x '%%start_path%%'
40
34
  RUN /bin/chown '%%redmine_user%%:%%redmine_user%%' '%%start_path%%'
@@ -0,0 +1,8 @@
1
+ COPY apache_http_virtualhost.conf /etc/apache2/sites-available/redmine.conf
2
+ COPY apache_https_virtualhost.conf /etc/apache2/sites-available/redmine_ssl.conf
3
+ USER root
4
+ RUN a2ensite redmine
5
+ RUN a2ensite redmine_ssl
6
+ RUN a2dissite 000-default
7
+ RUN a2enmod ssl
8
+ RUN service apache2 restart
@@ -34,7 +34,7 @@ function postgresql_start() {
34
34
 
35
35
  function request_http_interface() {
36
36
  title 'Requesting web interface...'
37
- wget 'http://localhost' &> /dev/null
37
+ wget 'http://localhost%%web.path%%' &> /dev/null
38
38
  }
39
39
 
40
40
  function redmine_log() {
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib,locale}/**/*']
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.9'
16
- s.add_dependency 'avm-eac_generic_base0', '~> 0.1'
16
+ s.add_dependency 'avm-eac_generic_base0', '~> 0.2'
17
17
  s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '>= 0.9.8'
18
18
  s.add_dependency 'eac_ruby_utils', '~> 0.80'
19
19
 
20
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
20
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
21
21
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/sources/configuration'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ class Rubocop
8
+ module Configured
9
+ def configured_rubocop_command_uncached
10
+ configured_rubocop_command_by_command || configured_rubocop_command_by_gemfile
11
+ end
12
+
13
+ def configured_rubocop_command_by_command
14
+ configuration.if_present(&:rubocop_command)
15
+ end
16
+
17
+ def configured_rubocop_command_by_gemfile
18
+ configuration.if_present(&:rubocop_gemfile).if_present do |v|
19
+ rubocop_command_by_gemfile_path(v.parent)
20
+ end
21
+ end
22
+
23
+ private
24
+
25
+ def configuration_uncached
26
+ ::Avm::Sources::Configuration.find_by_path(base_path)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ class Rubocop
8
+ module Envvar
9
+ RUBOCOP_COMMAND_ENVVAR_NAME = 'RUBOCOP_COMMAND'
10
+
11
+ def env_rubocop_command
12
+ ENV[RUBOCOP_COMMAND_ENVVAR_NAME].present? ? cmd(ENV[RUBOCOP_COMMAND_ENVVAR_NAME]) : nil
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/patches/eac_ruby_gems_utils/gem'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRubyBase1
8
+ class Rubocop
9
+ module Gemfile
10
+ def gemfile_rubocop_command
11
+ return nil unless rubocop_gemfile?
12
+
13
+ rubocop_command_by_gemfile_path(mygem.root)
14
+ end
15
+
16
+ def rubocop_command_by_gemfile_path(path)
17
+ ::EacRubyGemsUtils::Gem.new(path).bundle('exec', 'rubocop').chdir_root
18
+ end
19
+
20
+ def rubocop_gemfile?
21
+ return false if mygem.blank?
22
+
23
+ mygem.bundle('install').execute!
24
+ mygem.gemfile_lock_gem_version('rubocop').present?
25
+ end
26
+
27
+ private
28
+
29
+ def mygem_uncached
30
+ find_gem(::Pathname.new(base_path).expand_path)
31
+ end
32
+
33
+ def find_gem(path)
34
+ r = ::EacRubyGemsUtils::Gem.new(path)
35
+ return r if r.gemfile_path.exist?
36
+ return find_gem(path.dirname) unless path.root?
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -4,9 +4,9 @@ require 'eac_ruby_utils/core_ext'
4
4
  require 'eac_ruby_utils/ruby/on_clean_environment'
5
5
 
6
6
  module Avm
7
- module Ruby
7
+ module EacRubyBase1
8
8
  class Rubocop
9
- require_sub __FILE__
9
+ require_sub __FILE__, include_modules: true
10
10
  enable_speaker
11
11
  enable_simple_cache
12
12
  common_constructor :base_path, :rubocop_args
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_generic_base0/sources/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRubyBase1
8
+ module Sources
9
+ class Base < ::Avm::EacGenericBase0::Sources::Base
10
+ module VersionBump
11
+ def after_sub_version_bump_do_changes
12
+ the_gem.bundle('install').chdir_root.execute!
13
+ end
14
+
15
+ def version_bump_do_changes(target_version)
16
+ self.version = target_version
17
+ the_gem.bundle('install').chdir_root.execute!
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -3,6 +3,7 @@
3
3
  require 'avm/eac_generic_base0/sources/base'
4
4
  require 'avm/eac_ruby_base1/sources/update'
5
5
  require 'avm/eac_ruby_base1/sources/tester'
6
+ require 'avm/version_number'
6
7
  require 'eac_ruby_gems_utils/gem'
7
8
  require 'eac_ruby_utils/core_ext'
8
9
 
@@ -10,6 +11,7 @@ module Avm
10
11
  module EacRubyBase1
11
12
  module Sources
12
13
  class Base < ::Avm::EacGenericBase0::Sources::Base
14
+ require_sub __FILE__, include_modules: :prepend, require_dependency: true
13
15
  delegate :gemspec_path, to: :the_gem
14
16
 
15
17
  def gemfile_path
@@ -33,6 +35,15 @@ module Avm
33
35
  def update
34
36
  ::Avm::EacRubyBase1::Sources::Update.new(self)
35
37
  end
38
+
39
+ # @return [Avm::VersionNumber]
40
+ def version
41
+ the_gem.version.if_present { |v| ::Avm::VersionNumber.new(v) }
42
+ end
43
+
44
+ def version=(value)
45
+ the_gem.version_file.value = value
46
+ end
36
47
  end
37
48
  end
38
49
  end
@@ -19,7 +19,7 @@ module Avm
19
19
  # @return [EacRubyGemsUtils::Gem::Command, nil]
20
20
  def bundle_test_command
21
21
  source.read_configuration_as_shell_words(BUNDLE_TEST_COMMAND_CONFIGURATION_KEY)
22
- .if_present { |args| the_gem.bundle(*args).chdir_root }
22
+ .if_present { |args| the_gem.bundle(*args).chdir_root }
23
23
  end
24
24
 
25
25
  # @return [EacRubyGemsUtils::Gem::Command, nil]
@@ -18,7 +18,7 @@ module Avm
18
18
  if commit.no_scm_changed_files.any?
19
19
  commit = commit.reword(no_scm_update_commit_message)
20
20
  source.scm.commit_if_change { source_update.bundle_update }
21
- .if_present { |v| v.merge_with(commit) }
21
+ .if_present { |v| v.merge_with(commit) }
22
22
  else
23
23
  commit.reword(scm_update_commit_message)
24
24
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_ruby_base1/patches/i18n'
4
3
  require 'eac_ruby_utils/core_ext'
5
4
 
6
5
  module Avm
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.3.1'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
17
17
  s.add_dependency 'eac_ruby_utils', '~> 0.76'
18
18
  s.add_dependency 'eac_templates', '~> 0.2'
19
19
 
20
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
20
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
21
21
  end
@@ -35,7 +35,7 @@ module Avm
35
35
 
36
36
  def append_file_content(target_path, content)
37
37
  appended << ::Avm::Files::Appendable::FileContent
38
- .new(self, target_path, content)
38
+ .new(self, target_path, content)
39
39
  self
40
40
  end
41
41
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/files/formatter/formats/generic_plain'
4
- require 'avm/ruby/rubocop'
4
+ require 'avm/eac_ruby_base1/rubocop'
5
5
 
6
6
  module Avm
7
7
  module Files
@@ -12,7 +12,7 @@ module Avm
12
12
  VALID_TYPES = ['x-ruby'].freeze
13
13
 
14
14
  def internal_apply(files)
15
- ::Avm::Ruby::Rubocop.new('.', ['-a', '--ignore-parent-exclusion'] + files).run
15
+ ::Avm::EacRubyBase1::Rubocop.new('.', ['-a', '--ignore-parent-exclusion'] + files).run
16
16
  super(files)
17
17
  end
18
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Files
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.2'
6
6
  end
7
7
  end
@@ -8,9 +8,7 @@ module Avm
8
8
  module Git
9
9
  module Scms
10
10
  class GitSubrepo < ::Avm::Scms::Base
11
- def commit_if_change(_message)
12
- nyi
13
- end
11
+ delegate :commit_if_change, to: :parent_scm
14
12
 
15
13
  def update
16
14
  git_subrepo.command('clean').execute!
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Git
5
- VERSION = '0.3.2'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency 'eac_config', '~> 0.8'
17
17
  s.add_dependency 'eac_ruby_utils', '~> 0.83'
18
18
 
19
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
20
20
  end
@@ -17,7 +17,7 @@ module EacCli
17
17
  ::EacConfig::PathsHash.parse_entry_key(entry_key)
18
18
  end
19
19
  path.join('_').gsub(/[^a-z0-9_]/i, '').gsub(/\A_+/, '').gsub(/_+\z/, '')
20
- .gsub(/_{2,}/, '_').upcase
20
+ .gsub(/_{2,}/, '_').upcase
21
21
  end
22
22
  end
23
23
 
@@ -8,7 +8,7 @@ module EacCli
8
8
  enable_simple_cache
9
9
  common_constructor :options do
10
10
  self.options = options.to_h.symbolize_keys
11
- .assert_valid_keys(DEFAULT_VALUES.keys).freeze
11
+ .assert_valid_keys(DEFAULT_VALUES.keys).freeze
12
12
  end
13
13
 
14
14
  DEFAULT_VALUES = {
@@ -19,12 +19,12 @@ module EacCli
19
19
 
20
20
  def alternatives_parsed(error)
21
21
  alternatives.select { |a| error == a.error? }.map(&:parsed).reverse
22
- .inject(::EacRubyUtils::Struct.new) { |a, e| a.merge(e) }
22
+ .inject(::EacRubyUtils::Struct.new) { |a, e| a.merge(e) }
23
23
  end
24
24
 
25
25
  def alternatives_uncached
26
26
  definition.alternatives
27
- .map { |alternative| ::EacCli::Parser::Alternative.new(alternative, argv) }
27
+ .map { |alternative| ::EacCli::Parser::Alternative.new(alternative, argv) }
28
28
  end
29
29
 
30
30
  def first_error_uncached
@@ -54,7 +54,7 @@ module EacCli
54
54
  def options_section
55
55
  "Options:\n" +
56
56
  definition.alternatives.flat_map(&:options)
57
- .map { |option| IDENT + option_definition(option) + "\n" }.join
57
+ .map { |option| IDENT + option_definition(option) + "\n" }.join
58
58
  end
59
59
 
60
60
  def usage_section
@@ -17,7 +17,7 @@ module EacCli
17
17
  common_concern do
18
18
  include ::EacCli::Runner
19
19
  runner_definition.singleton_class
20
- .include(::EacCli::RunnerWith::Subcommands::DefinitionConcern)
20
+ .include(::EacCli::RunnerWith::Subcommands::DefinitionConcern)
21
21
  end
22
22
 
23
23
  EXTRA_AVAILABLE_SUBCOMMANDS_METHOD_NAME = :extra_available_subcommands
@@ -28,9 +28,9 @@ module EacCli
28
28
 
29
29
  def available_subcommands_auto
30
30
  self.class.constants
31
- .map { |name| [name.to_s.underscore.gsub('_', '-'), self.class.const_get(name)] }
32
- .select { |c| ::EacCli::RunnerWith::Subcommands.runner?(c[1]) }
33
- .to_h.with_indifferent_access
31
+ .map { |name| [name.to_s.underscore.gsub('_', '-'), self.class.const_get(name)] }
32
+ .select { |c| ::EacCli::RunnerWith::Subcommands.runner?(c[1]) }
33
+ .to_h.with_indifferent_access
34
34
  end
35
35
 
36
36
  def available_subcommands_extra
@@ -32,8 +32,8 @@ module EacCli
32
32
 
33
33
  def key_to_module(key)
34
34
  namespace_set.lazy
35
- .map { |namespace| key_to_module_in_namespace(namespace, key) }
36
- .find(&:present?) ||
35
+ .map { |namespace| key_to_module_in_namespace(namespace, key) }
36
+ .find(&:present?) ||
37
37
  raise("Not module found with key \"#{key}\" (Namespaces: #{namespace_set})")
38
38
  end
39
39
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.27.2'
4
+ VERSION = '0.27.3'
5
5
  end
@@ -15,5 +15,5 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency 'addressable'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.83'
17
17
 
18
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
18
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
19
19
  end
@@ -42,7 +42,7 @@ module EacConfig
42
42
 
43
43
  def node_entry_from_load_path_uncached
44
44
  root_node.recursive_loaded_nodes.lazy.map { |loaded_node| loaded_node.self_entry(path) }
45
- .find(&:found?)
45
+ .find(&:found?)
46
46
  end
47
47
 
48
48
  def node_entry_from_root_uncached
@@ -12,7 +12,7 @@ module EacConfig
12
12
  class << self
13
13
  def entry_path_to_envvar_name(path)
14
14
  ::EacConfig::EntryPath.assert(path).parts.join('_').gsub(/[^a-z0-9_]/i, '')
15
- .gsub(/\A_+/, '').gsub(/_+\z/, '').gsub(/_{2,}/, '_').upcase
15
+ .gsub(/\A_+/, '').gsub(/_+\z/, '').gsub(/_{2,}/, '_').upcase
16
16
  end
17
17
 
18
18
  def from_value(string)
@@ -34,7 +34,7 @@ module EacConfig
34
34
  end
35
35
 
36
36
  def to_h
37
- data.map { |k, v| [k, v.is_a?(Node) ? v.to_h : v] }.to_h
37
+ data.transform_values { |v| v.is_a?(Node) ? v.to_h : v }
38
38
  end
39
39
 
40
40
  def read_entry(path_search)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacConfig
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.70'
17
17
  s.add_dependency 'ruby-filemagic'
18
18
 
19
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
20
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacFs
4
- VERSION = '0.12.0'
4
+ VERSION = '0.12.1'
5
5
  end
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency 'parseconfig', '~> 1.0', '>= 1.0.8'
17
17
 
18
18
  s.add_development_dependency 'aranha-parsers', '~> 0.8', '>= 0.8.2'
19
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3', '>= 0.3.2'
19
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
20
20
  end
@@ -19,8 +19,8 @@ module EacGit
19
19
  # @return [String, nil]
20
20
  def url
21
21
  local.command('remote', 'get-url', name)
22
- .execute!(exit_outputs: { NO_SUCH_REMOTE_CODE => nil })
23
- .if_present(nil, &:strip)
22
+ .execute!(exit_outputs: { NO_SUCH_REMOTE_CODE => nil })
23
+ .if_present(nil, &:strip)
24
24
  end
25
25
  end
26
26
  end
@@ -110,7 +110,7 @@ module EacGit
110
110
  # @return [Array<EacGit::Local::Subrepo>]
111
111
  def subrepos
112
112
  command('subrepo', '-q', 'status').execute!.split("\n").map(&:strip).select(&:present?)
113
- .map { |subpath| subrepo(subpath) }
113
+ .map { |subpath| subrepo(subpath) }
114
114
  end
115
115
 
116
116
  def to_s
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.12.0'
4
+ VERSION = '0.12.1'
5
5
  end