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
@@ -3,9 +3,13 @@
3
3
  require 'eac_ruby_utils/options_consumer'
4
4
 
5
5
  RSpec.describe ::EacRubyUtils::OptionsConsumer do
6
- context 'instance created with some data' do
6
+ context 'with instance created with some data' do
7
7
  subject(:instance) { described_class.new(a: 'a_value', b: 'b_value', c: 'c_value') }
8
8
 
9
+ let(:consumed_a) { instance.consume(:a) }
10
+ let(:consumed_b) { instance.consume(:b) }
11
+ let(:consumed_c) { instance.consume(:c) }
12
+
9
13
  it 'left data should be Hash' do
10
14
  expect(instance.left_data).to be_a(::Hash)
11
15
  end
@@ -14,16 +18,48 @@ RSpec.describe ::EacRubyUtils::OptionsConsumer do
14
18
  expect { instance.validate }.to raise_error(::StandardError)
15
19
  end
16
20
 
17
- it 'parses args' do
18
- expect(instance.left_data).to eq({ a: 'a_value', b: 'b_value', c: 'c_value' }
21
+ context 'when no data is consumed' do
22
+ it do
23
+ expect(instance.left_data).to eq({ a: 'a_value', b: 'b_value', c: 'c_value' }
19
24
  .with_indifferent_access)
20
- expect(instance.consume(:a)).to eq('a_value')
21
- expect(instance.left_data).to eq({ b: 'b_value', c: 'c_value' }.with_indifferent_access)
22
- expect(instance.consume(:c)).to eq('c_value')
23
- expect(instance.left_data).to eq({ b: 'b_value' }.with_indifferent_access)
24
- expect(instance.consume(:b)).to eq('b_value')
25
- expect(instance.left_data).to eq({}.with_indifferent_access)
26
- instance.validate
25
+ end
26
+
27
+ it { expect(consumed_a).to eq('a_value') }
28
+ end
29
+
30
+ context 'when A value is consumed' do
31
+ before { consumed_a }
32
+
33
+ it do
34
+ expect(instance.left_data).to eq({ b: 'b_value', c: 'c_value' }.with_indifferent_access)
35
+ end
36
+
37
+ it { expect(instance.consume(:c)).to eq('c_value') }
38
+ end
39
+
40
+ context 'when A and C values are consumed' do
41
+ before do
42
+ consumed_a
43
+ consumed_c
44
+ end
45
+
46
+ it { expect(instance.left_data).to eq({ b: 'b_value' }.with_indifferent_access) }
47
+
48
+ it { expect(consumed_b).to eq('b_value') }
49
+ end
50
+
51
+ context 'when all values are consumed' do
52
+ before do
53
+ consumed_a
54
+ consumed_b
55
+ consumed_c
56
+ end
57
+
58
+ it { expect(instance.left_data).to eq({}.with_indifferent_access) }
59
+
60
+ it do
61
+ expect { instance.validate }.not_to raise_error
62
+ end
27
63
  end
28
64
 
29
65
  it 'raises if validate has left data' do
@@ -34,12 +70,11 @@ RSpec.describe ::EacRubyUtils::OptionsConsumer do
34
70
  describe '#consume_all' do
35
71
  subject(:instance) { described_class.new(a: 'a_value', b: 'b_value', c: 'c_value') }
36
72
 
37
- it 'return all options in arguments' do
38
- a, b, c, d = instance.consume_all(:a, :b, :c, :d)
39
- expect(a).to eq('a_value')
40
- expect(b).to eq('b_value')
41
- expect(c).to eq('c_value')
42
- expect(d).to eq(nil)
43
- end
73
+ let(:all_consumed) { instance.consume_all(:a, :b, :c, :d) }
74
+
75
+ it { expect(all_consumed[0]).to eq('a_value') }
76
+ it { expect(all_consumed[1]).to eq('b_value') }
77
+ it { expect(all_consumed[2]).to eq('c_value') }
78
+ it { expect(all_consumed[3]).to eq(nil) }
44
79
  end
45
80
  end
@@ -3,11 +3,13 @@
3
3
  require 'eac_ruby_utils/patches/module/listable'
4
4
 
5
5
  RSpec.describe ::Module do
6
- class StubClass
7
- enable_listable
6
+ let(:stub_class) do
7
+ ::Class.new do
8
+ enable_listable
9
+ end
8
10
  end
9
11
 
10
12
  describe '#enable_listable' do
11
- it { expect(StubClass.included_modules).to include(::EacRubyUtils::Listable) }
13
+ it { expect(stub_class.included_modules).to include(::EacRubyUtils::Listable) }
12
14
  end
13
15
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/method_class'
4
+ require 'eac_ruby_utils/patches/module/method_class'
5
+
6
+ RSpec.describe ::Class do
7
+ let(:stub_method_class) do
8
+ described_class.new do
9
+ def self.name
10
+ 'StubMethodClass'
11
+ end
12
+
13
+ enable_method_class
14
+ end
15
+ end
16
+
17
+ describe '#enable_simple_cache' do
18
+ it { expect(stub_method_class.included_modules).to include(::EacRubyUtils::MethodClass) }
19
+ end
20
+ end
@@ -3,11 +3,13 @@
3
3
  require 'eac_ruby_utils/patches/module/simple_cache'
4
4
 
5
5
  RSpec.describe ::Module do
6
- class StubClass
7
- enable_simple_cache
6
+ let(:stub_class) do
7
+ ::Class.new do
8
+ enable_simple_cache
9
+ end
8
10
  end
9
11
 
10
12
  describe '#enable_simple_cache' do
11
- it { expect(StubClass.included_modules).to include(::EacRubyUtils::SimpleCache) }
13
+ it { expect(stub_class.included_modules).to include(::EacRubyUtils::SimpleCache) }
12
14
  end
13
15
  end
@@ -2,10 +2,10 @@
2
2
 
3
3
  require 'eac_ruby_utils/require_sub'
4
4
 
5
- RSpec.describe ::EacRubyUtils::RequireSub do
6
- class RequireSubStubClass
7
- end
5
+ class RequireSubStubClass
6
+ end
8
7
 
8
+ RSpec.describe ::EacRubyUtils::RequireSub do
9
9
  let(:instance) { described_class.new(__FILE__, base: RequireSubStubClass, include_modules: true) }
10
10
 
11
11
  before do
@@ -3,26 +3,29 @@
3
3
  require 'eac_ruby_utils/settings_provider'
4
4
 
5
5
  RSpec.describe ::EacRubyUtils::SettingsProvider do
6
- class MyStubSettingsProvided
7
- include ::EacRubyUtils::SettingsProvider
8
-
9
- KEY_A = 'constant_a'
10
- KEY_D = 'constant_d'
11
-
12
- def key_a
13
- 'method_a'
14
- end
15
-
16
- def key_b
17
- 'method_b'
18
- end
19
-
20
- def settings
21
- { 'key_b' => 'setting_b', key_c: 'setting_c' }
22
- end
6
+ let(:stub_class) do
7
+ the_described_class = described_class
8
+ r = ::Class.new do
9
+ include the_described_class
10
+
11
+ def key_a
12
+ 'method_a'
13
+ end
14
+
15
+ def key_b
16
+ 'method_b'
17
+ end
18
+
19
+ def settings
20
+ { 'key_b' => 'setting_b', key_c: 'setting_c' }
21
+ end
22
+ end
23
+ r.const_set(:KEY_A, 'constant_a')
24
+ r.const_set(:KEY_D, 'constant_d')
25
+ r
23
26
  end
24
27
 
25
- let(:stub) { MyStubSettingsProvided.new }
28
+ let(:stub) { stub_class.new }
26
29
 
27
30
  describe '#setting_value' do
28
31
  {
@@ -12,6 +12,9 @@ pt-BR:
12
12
  c:
13
13
  label: Inteiro CCC
14
14
  description: Inteiro CCC Descr.
15
+ __blank:
16
+ label: Inteiro em branco
17
+ description: Inteiro em branco Descr.
15
18
  cadeia:
16
19
  a:
17
20
  label: Cadeia AAA
@@ -15,5 +15,5 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency 'eac_config', '~> 0.5'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.64'
17
17
 
18
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
18
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
19
19
  end
@@ -101,7 +101,7 @@ module EacTemplates
101
101
 
102
102
  def target_absolute
103
103
  ::File.expand_path(source_relative, target_root_directory)
104
- .gsub(/#{::Regexp.quote(TEMPLATE_EXTNAME)}\z/, '')
104
+ .gsub(/#{::Regexp.quote(TEMPLATE_EXTNAME)}\z/, '')
105
105
  end
106
106
  end
107
107
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTemplates
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  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.116.0
4
+ version: 0.117.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: 2022-04-08 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -30,28 +30,34 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.17'
33
+ version: '0.18'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.17'
40
+ version: '0.18'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: avm-eac_asciidoctor_base0
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.3'
45
48
  - - ">="
46
49
  - !ruby/object:Gem::Version
47
- version: '0'
50
+ version: 0.3.4
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '0.3'
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '0'
60
+ version: 0.3.4
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: avm-eac_rails_base0
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -73,6 +79,9 @@ dependencies:
73
79
  - - "~>"
74
80
  - !ruby/object:Gem::Version
75
81
  version: '0.5'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 0.5.1
76
85
  type: :runtime
77
86
  prerelease: false
78
87
  version_requirements: !ruby/object:Gem::Requirement
@@ -80,6 +89,9 @@ dependencies:
80
89
  - - "~>"
81
90
  - !ruby/object:Gem::Version
82
91
  version: '0.5'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 0.5.1
83
95
  - !ruby/object:Gem::Dependency
84
96
  name: avm-eac_ruby_base1
85
97
  requirement: !ruby/object:Gem::Requirement
@@ -250,14 +262,14 @@ dependencies:
250
262
  requirements:
251
263
  - - "~>"
252
264
  - !ruby/object:Gem::Version
253
- version: '0.2'
265
+ version: 0.5.1
254
266
  type: :development
255
267
  prerelease: false
256
268
  version_requirements: !ruby/object:Gem::Requirement
257
269
  requirements:
258
270
  - - "~>"
259
271
  - !ruby/object:Gem::Version
260
- version: '0.2'
272
+ version: 0.5.1
261
273
  description:
262
274
  email:
263
275
  executables:
@@ -342,12 +354,10 @@ files:
342
354
  - lib/avm/projects/stereotypes/git_subtree/warp.rb
343
355
  - lib/avm/projects/stereotypes/rails_application.rb
344
356
  - lib/avm/projects/stereotypes/rails_application/local_project_mixin.rb
345
- - lib/avm/projects/stereotypes/rails_application/update.rb
346
357
  - lib/avm/projects/stereotypes/redmine_plugin.rb
347
358
  - lib/avm/projects/stereotypes/ruby_gem.rb
348
359
  - lib/avm/projects/stereotypes/ruby_gem/local_project_mixin.rb
349
360
  - lib/avm/projects/stereotypes/ruby_gem/publish.rb
350
- - lib/avm/projects/stereotypes/ruby_gem/version_bump.rb
351
361
  - lib/avm/rails.rb
352
362
  - lib/avm/ruby.rb
353
363
  - lib/avm/ruby/bundler.rb
@@ -361,10 +371,6 @@ files:
361
371
  - lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb
362
372
  - lib/avm/ruby/gems.rb
363
373
  - lib/avm/ruby/gems/generator.rb
364
- - lib/avm/ruby/rubocop.rb
365
- - lib/avm/ruby/rubocop/_configured.rb
366
- - lib/avm/ruby/rubocop/_envvar.rb
367
- - lib/avm/ruby/rubocop/_gemfile.rb
368
374
  - lib/avm/stereotypes.rb
369
375
  - lib/avm/tools.rb
370
376
  - lib/avm/tools/app_src.rb
@@ -451,8 +457,11 @@ files:
451
457
  - sub/avm-eac_generic_base0/lib/avm/eac_generic_base0.rb
452
458
  - sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources.rb
453
459
  - sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base.rb
460
+ - sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base/version_bump.rb
454
461
  - sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/tester.rb
455
462
  - sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb
463
+ - sub/avm-eac_generic_base0/locale/en.yaml
464
+ - sub/avm-eac_generic_base0/locale/pt-BR.yaml
456
465
  - sub/avm-eac_generic_base0/spec/lib/avm/eac_generic_base0/sources/base_spec.rb
457
466
  - sub/avm-eac_generic_base0/spec/rubocop_spec.rb
458
467
  - sub/avm-eac_generic_base0/spec/spec_helper.rb
@@ -525,6 +534,7 @@ files:
525
534
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template
526
535
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/secrets.yml
527
536
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template
537
+ - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile_apache_setup
528
538
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template
529
539
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template
530
540
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/install_settings.sh.template
@@ -532,10 +542,13 @@ files:
532
542
  - sub/avm-eac_ruby_base1/Gemfile
533
543
  - sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec
534
544
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb
535
- - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches.rb
536
- - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb
545
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb
546
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb
547
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb
548
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb
537
549
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources.rb
538
550
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb
551
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb
539
552
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb
540
553
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
541
554
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb
@@ -749,11 +762,12 @@ files:
749
762
  - sub/avm/lib/avm/sources/base.rb
750
763
  - sub/avm/lib/avm/sources/base/configuration.rb
751
764
  - sub/avm/lib/avm/sources/base/instance.rb
765
+ - sub/avm/lib/avm/sources/base/parent.rb
752
766
  - sub/avm/lib/avm/sources/base/testing.rb
753
767
  - sub/avm/lib/avm/sources/configuration.rb
754
- - sub/avm/lib/avm/sources/configuration/_locale.rb
755
- - sub/avm/lib/avm/sources/configuration/_rubocop.rb
756
- - sub/avm/lib/avm/sources/configuration/_tests.rb
768
+ - sub/avm/lib/avm/sources/configuration/locale.rb
769
+ - sub/avm/lib/avm/sources/configuration/rubocop.rb
770
+ - sub/avm/lib/avm/sources/configuration/tests.rb
757
771
  - sub/avm/lib/avm/sources/tester.rb
758
772
  - sub/avm/lib/avm/sources/tests.rb
759
773
  - sub/avm/lib/avm/sources/tests/builder.rb
@@ -1268,6 +1282,11 @@ files:
1268
1282
  - sub/eac_ruby_utils/lib/eac_ruby_utils/listable/symbol_list.rb
1269
1283
  - sub/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb
1270
1284
  - sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb
1285
+ - sub/eac_ruby_utils/lib/eac_ruby_utils/locales.rb
1286
+ - sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_all_gems.rb
1287
+ - sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_gem.rb
1288
+ - sub/eac_ruby_utils/lib/eac_ruby_utils/locales/module_i18n_translate.rb
1289
+ - sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
1271
1290
  - sub/eac_ruby_utils/lib/eac_ruby_utils/options_consumer.rb
1272
1291
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patch.rb
1273
1292
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches.rb
@@ -1295,6 +1314,7 @@ files:
1295
1314
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb
1296
1315
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/immutable.rb
1297
1316
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/listable.rb
1317
+ - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/method_class.rb
1298
1318
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/patch.rb
1299
1319
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/require_sub.rb
1300
1320
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/simple_cache.rb
@@ -1362,11 +1382,12 @@ files:
1362
1382
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/executable_spec.rb
1363
1383
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/ssh_env_spec.rb
1364
1384
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb
1365
- - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/temp_spec.rb
1385
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb
1366
1386
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb
1367
1387
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb
1368
1388
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb
1369
1389
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb
1390
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/method_class_spec.rb
1370
1391
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb
1371
1392
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb
1372
1393
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb
@@ -1377,6 +1398,7 @@ files:
1377
1398
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
1378
1399
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/compare_by_spec.rb
1379
1400
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb
1401
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/method_class_spec.rb
1380
1402
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb
1381
1403
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/speaker_spec.rb
1382
1404
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/projects/stereotypes/ruby_gem/update'
4
-
5
- module Avm
6
- module Projects
7
- module Stereotypes
8
- class RailsApplication
9
- class Update < ::Avm::Projects::Stereotypes::RubyGem::Update
10
- end
11
- end
12
- end
13
- end
14
- end
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/patches/i18n'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module Projects
8
- module Stereotypes
9
- class RubyGem
10
- class VersionBump
11
- enable_speaker
12
- common_constructor :instance, :target_version
13
-
14
- def run
15
- git_checkout
16
- change_version
17
- bundle_run
18
- git_commit
19
- end
20
-
21
- private
22
-
23
- def bundle_run
24
- infom 'Running "bundle install"...'
25
- instance.ruby_gem.bundle('install').execute!
26
- end
27
-
28
- def change_version
29
- infom 'Setting project version...'
30
- instance.version = target_version
31
- end
32
-
33
- def git_checkout
34
- return unless instance.respond_to?(:git_repo)
35
-
36
- infom "Checkouting #{changing_files.map(&:to_path).join(', ')}..."
37
- instance.git_repo.command('checkout', '--',
38
- *changing_files.map(&:to_path)).execute!
39
- end
40
-
41
- def git_commit
42
- return unless instance.respond_to?(:git_repo)
43
-
44
- infom "Commiting #{changing_files.map(&:to_path).join(', ')}..."
45
- instance.git_repo.command('commit', '-m', git_commit_message, '--',
46
- *changing_files.map(&:to_path)).execute!
47
- end
48
-
49
- def git_commit_message
50
- i18n_translate(__method__, version: target_version, __locale: instance.locale)
51
- end
52
-
53
- def changing_files
54
- [instance.ruby_gem.gemfile_lock_path, instance.ruby_gem.version_file_path]
55
- end
56
- end
57
- end
58
- end
59
- end
60
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/sources/configuration'
4
-
5
- module Avm
6
- module Ruby
7
- class Rubocop
8
- def configured_rubocop_command_uncached
9
- configured_rubocop_command_by_command || configured_rubocop_command_by_gemfile
10
- end
11
-
12
- def configured_rubocop_command_by_command
13
- configuration.if_present(&:rubocop_command)
14
- end
15
-
16
- def configured_rubocop_command_by_gemfile
17
- configuration.if_present(&:rubocop_gemfile).if_present do |v|
18
- rubocop_command_by_gemfile_path(v.parent)
19
- end
20
- end
21
-
22
- private
23
-
24
- def configuration_uncached
25
- ::Avm::Sources::Configuration.find_by_path(base_path)
26
- end
27
- end
28
- end
29
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Ruby
7
- class Rubocop
8
- RUBOCOP_COMMAND_ENVVAR_NAME = 'RUBOCOP_COMMAND'
9
-
10
- def env_rubocop_command
11
- ENV[RUBOCOP_COMMAND_ENVVAR_NAME].present? ? cmd(ENV[RUBOCOP_COMMAND_ENVVAR_NAME]) : nil
12
- end
13
- end
14
- end
15
- end
@@ -1,39 +0,0 @@
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 Ruby
8
- class Rubocop
9
- def gemfile_rubocop_command
10
- return nil unless rubocop_gemfile?
11
-
12
- rubocop_command_by_gemfile_path(mygem.root)
13
- end
14
-
15
- def rubocop_command_by_gemfile_path(path)
16
- ::EacRubyGemsUtils::Gem.new(path).bundle('exec', 'rubocop').chdir_root
17
- end
18
-
19
- def rubocop_gemfile?
20
- return false if mygem.blank?
21
-
22
- mygem.bundle('install').execute!
23
- mygem.gemfile_lock_gem_version('rubocop').present?
24
- end
25
-
26
- private
27
-
28
- def mygem_uncached
29
- find_gem(::Pathname.new(base_path).expand_path)
30
- end
31
-
32
- def find_gem(path)
33
- r = ::EacRubyGemsUtils::Gem.new(path)
34
- return r if r.gemfile_path.exist?
35
- return find_gem(path.dirname) unless path.root?
36
- end
37
- end
38
- end
39
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module Sources
5
- class Configuration < ::EacConfig::OldConfigs
6
- RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
7
- RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
8
-
9
- def rubocop_command
10
- read_command(RUBOCOP_COMMAND_KEY)
11
- end
12
-
13
- def rubocop_gemfile
14
- gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
15
- return nil if gemfile_path.blank?
16
-
17
- gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
18
- return gemfile_path if gemfile_path.file?
19
-
20
- raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
21
- end
22
- end
23
- end
24
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/patches/eac_ruby_gems_utils/gem'
4
-
5
- module Avm
6
- module Sources
7
- class Configuration < ::EacConfig::OldConfigs
8
- BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
9
- TEST_COMMAND_KEY = 'test.command'
10
-
11
- def any_test_command
12
- bundle_test_command || test_command
13
- end
14
-
15
- def test_command
16
- read_command(TEST_COMMAND_KEY)
17
- end
18
-
19
- def bundle_test_command
20
- read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
21
- args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
22
- ::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
23
- end
24
- end
25
- end
26
- end
27
- end