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.
- checksums.yaml +4 -4
- data/lib/avm/launcher/instances/settings.rb +7 -3
- data/lib/avm/projects/stereotypes.rb +2 -2
- data/lib/avm/ruby/bundler/incompatible_parser/depends_on.rb +1 -1
- data/lib/avm/ruby/bundler/incompatible_parser/gem_conflict.rb +1 -1
- data/lib/avm/ruby/bundler/incompatible_parser/in_gemfile.rb +1 -1
- data/lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb +1 -1
- data/lib/avm/ruby/bundler/incompatible_parser.rb +1 -1
- data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +1 -1
- data/lib/avm/tools/runner/app_src/test.rb +2 -2
- data/lib/avm/tools/runner/app_src/version_bump.rb +4 -9
- data/lib/avm/tools/runner/git/deploy.rb +5 -5
- data/lib/avm/tools/runner/git/dirty_files.rb +1 -1
- data/lib/avm/tools/runner/git/revisions_test.rb +1 -1
- data/lib/avm/tools/runner/ruby/rubocop.rb +2 -2
- data/lib/avm/tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +3 -3
- data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +2 -2
- data/sub/avm/lib/avm/instances/entry_keys.rb +2 -0
- data/sub/avm/lib/avm/registry/base.rb +2 -2
- data/sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +1 -1
- data/sub/avm/lib/avm/scms/base.rb +13 -0
- data/sub/avm/lib/avm/sources/base/configuration.rb +2 -1
- data/sub/avm/lib/avm/sources/base/parent.rb +31 -0
- data/sub/avm/lib/avm/sources/base.rb +4 -6
- data/sub/avm/lib/avm/sources/configuration/{_locale.rb → locale.rb} +5 -3
- data/sub/avm/lib/avm/sources/configuration/rubocop.rb +26 -0
- data/sub/avm/lib/avm/sources/configuration/tests.rb +29 -0
- data/sub/avm/lib/avm/sources/configuration.rb +5 -1
- data/sub/avm/lib/avm/sources/tests/builder.rb +1 -1
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build/file.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build.rb +2 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner/build.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner.rb +2 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- data/sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec +1 -1
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base/version_bump.rb +35 -0
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base.rb +4 -1
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +1 -1
- data/sub/avm-eac_generic_base0/locale/en.yaml +6 -0
- data/sub/avm-eac_generic_base0/locale/pt-BR.yaml +6 -0
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +1 -1
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh +1 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -3
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +17 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template +2 -8
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile_apache_setup +8 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/start.sh.template +1 -1
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb +31 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb +17 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +41 -0
- data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/rubocop.rb +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb +23 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb +1 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +1 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb +0 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-files/avm-files.gemspec +1 -1
- data/sub/avm-files/lib/avm/files/appendable.rb +1 -1
- data/sub/avm-files/lib/avm/files/formatter/formats/ruby.rb +2 -2
- data/sub/avm-files/lib/avm/files/version.rb +1 -1
- data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +1 -3
- data/sub/avm-git/lib/avm/git/version.rb +1 -1
- data/sub/eac_cli/eac_cli.gemspec +1 -1
- data/sub/eac_cli/lib/eac_cli/old_configs/entry_reader.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/old_configs/read_entry_options.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/parser.rb +2 -2
- data/sub/eac_cli/lib/eac_cli/runner_with/help/builder.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +4 -4
- data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +2 -2
- data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
- data/sub/eac_config/eac_config.gemspec +1 -1
- data/sub/eac_config/lib/eac_config/entry.rb +1 -1
- data/sub/eac_config/lib/eac_config/envvars_node/entry.rb +1 -1
- data/sub/eac_config/lib/eac_config/paths_hash/node.rb +1 -1
- data/sub/eac_config/lib/eac_config/version.rb +1 -1
- data/sub/eac_fs/eac_fs.gemspec +1 -1
- data/sub/eac_fs/lib/eac_fs/version.rb +1 -1
- data/sub/eac_git/eac_git.gemspec +1 -1
- data/sub/eac_git/lib/eac_git/local/remote.rb +2 -2
- data/sub/eac_git/lib/eac_git/local.rb +1 -1
- data/sub/eac_git/lib/eac_git/version.rb +1 -1
- data/sub/eac_rest/eac_rest.gemspec +1 -1
- data/sub/eac_rest/lib/eac_rest/api.rb +14 -3
- data/sub/eac_rest/lib/eac_rest/request.rb +22 -1
- data/sub/eac_rest/lib/eac_rest/response.rb +41 -1
- data/sub/eac_rest/lib/eac_rest/version.rb +1 -1
- data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +1 -1
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/application.rb +2 -2
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/sub/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +1 -1
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +2 -2
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +1 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +16 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +12 -2
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_all_gems.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_gem.rb +47 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/module_i18n_translate.rb +74 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb +35 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb +2 -25
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/method_class.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +6 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +86 -33
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/{temp_spec.rb → directory_spec.rb} +0 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +4 -4
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +169 -106
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/method_class_spec.rb +46 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +52 -17
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +5 -3
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/method_class_spec.rb +20 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +5 -3
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec.rb +3 -3
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +21 -18
- data/sub/eac_ruby_utils/spec/locales/pt-BR.yml +3 -0
- data/sub/eac_templates/eac_templates.gemspec +1 -1
- data/sub/eac_templates/lib/eac_templates/directory.rb +1 -1
- data/sub/eac_templates/lib/eac_templates/version.rb +1 -1
- metadata +42 -20
- data/lib/avm/projects/stereotypes/rails_application/update.rb +0 -14
- data/lib/avm/projects/stereotypes/ruby_gem/version_bump.rb +0 -60
- data/lib/avm/ruby/rubocop/_configured.rb +0 -29
- data/lib/avm/ruby/rubocop/_envvar.rb +0 -15
- data/lib/avm/ruby/rubocop/_gemfile.rb +0 -39
- data/sub/avm/lib/avm/sources/configuration/_rubocop.rb +0 -24
- data/sub/avm/lib/avm/sources/configuration/_tests.rb +0 -27
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb +0 -7
- 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
|
-
|
18
|
-
|
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
|
-
|
21
|
-
|
22
|
-
expect(
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
-
|
7
|
-
|
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(
|
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
|
-
|
7
|
-
|
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(
|
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
|
-
|
6
|
-
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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) {
|
28
|
+
let(:stub) { stub_class.new }
|
26
29
|
|
27
30
|
describe '#setting_value' do
|
28
31
|
{
|
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.
|
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-
|
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.
|
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.
|
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:
|
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:
|
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:
|
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:
|
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/
|
536
|
-
- sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/
|
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/
|
755
|
-
- sub/avm/lib/avm/sources/configuration/
|
756
|
-
- sub/avm/lib/avm/sources/configuration/
|
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/
|
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
|