avm-tools 0.116.1 → 0.116.2
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/git/deploy.rb +4 -4
- 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 +2 -2
- data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +2 -2
- 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/sources/tests/builder.rb +1 -1
- data/sub/avm/lib/avm/version.rb +1 -1
- 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 +1 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb +1 -1
- 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/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/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/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/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/patches/object/debug.rb +6 -0
- 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/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/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 +16 -9
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ade74f1c59b191c0af317c03f8acb00fffc0e2bcac3120b56a604ab72a31ac1
|
4
|
+
data.tar.gz: 9d9967c47a11500142f7843b53ac7430f40fb191e441ce177ce583a58f46fffc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae95c3e50159a7cd7a9c77745a106d462c2d5c8445a43f92f35cadeb42545509d83b53f2085a339b9dac930610a6cc68cb4551a2dd35e0a2566a1d07f932ce1
|
7
|
+
data.tar.gz: 7dc23f20f7430e88fd0a75582a899df38a81eb6a102f948611c96d810d766032656c730395ef66f4a3f89a11ad4b84d429252dcbf8e58082777b632f5e2ad188
|
@@ -23,7 +23,7 @@ module Avm
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def publishable?
|
26
|
-
|
26
|
+
publishable_value ? true : false
|
27
27
|
end
|
28
28
|
|
29
29
|
def stereotype_publishable?(stereotype)
|
@@ -39,11 +39,15 @@ module Avm
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def parse_publishable_value(value, hash_to_true)
|
42
|
-
return value.with_indifferent_access if
|
42
|
+
return value.with_indifferent_access if parse_publishable_value_hash?(value, hash_to_true)
|
43
43
|
return true if value.nil? || value == true
|
44
44
|
return false if value == false
|
45
45
|
|
46
|
-
|
46
|
+
value ? true : false
|
47
|
+
end
|
48
|
+
|
49
|
+
def parse_publishable_value_hash?(value, hash_to_true)
|
50
|
+
!hash_to_true && value.is_a?(::Hash)
|
47
51
|
end
|
48
52
|
end
|
49
53
|
end
|
@@ -11,8 +11,8 @@ module Avm
|
|
11
11
|
class << self
|
12
12
|
def list
|
13
13
|
@list ||= constants.map { |c| const_get(c) }
|
14
|
-
|
15
|
-
|
14
|
+
.select { |c| c.included_modules.include?(Avm::Projects::Stereotype) }
|
15
|
+
.freeze
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
class IncompatibleParser
|
10
10
|
class DependsOn < ::Avm::Ruby::Bundler::IncompatibleParser::LineParserBase
|
11
11
|
LINE_PARSER = /(.+) was resolved to (.+), which depends on/
|
12
|
-
|
12
|
+
.to_parser { |m| new(m[1], m[2]) }
|
13
13
|
|
14
14
|
common_constructor :gem_name, :version do
|
15
15
|
self.version = ::Gem::Version.new(version)
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
class IncompatibleParser
|
10
10
|
class GemConflict < ::Avm::Ruby::Bundler::IncompatibleParser::LineParserBase
|
11
11
|
LINE_PARSER = /Bundler could not find compatible versions for gem "(.+)":/
|
12
|
-
|
12
|
+
.to_parser { |m| new(m[1]) }
|
13
13
|
|
14
14
|
enable_simple_cache
|
15
15
|
common_constructor :gem_name
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
class IncompatibleParser
|
10
10
|
class VersionRequirement < ::Avm::Ruby::Bundler::IncompatibleParser::LineParserBase
|
11
11
|
LINE_PARSER = /\A([a-z][a-z_0-9]*)(?: \((.+)\))?\z/
|
12
|
-
|
12
|
+
.to_parser { |m| new(m[1], m[2]) }
|
13
13
|
|
14
14
|
enable_simple_cache
|
15
15
|
attr_accessor :stack
|
@@ -29,7 +29,7 @@ module Avm
|
|
29
29
|
def git_continue_run(command)
|
30
30
|
infom "\"#{command}\" --continue..."
|
31
31
|
cmd = instance.git_repo.command(command, '--continue')
|
32
|
-
|
32
|
+
.envvar('GIT_EDITOR', 'true')
|
33
33
|
return unless !cmd.system && !conflict?
|
34
34
|
|
35
35
|
fatal_error "\"#{cmd}\" failed and there is no conflict"
|
@@ -71,8 +71,8 @@ module Avm
|
|
71
71
|
|
72
72
|
def test_builder
|
73
73
|
r = ::Avm::Sources::Tests::Builder.new(runner_context.call(:subject))
|
74
|
-
|
75
|
-
|
74
|
+
.include_main(include_main?)
|
75
|
+
.include_subs(include_subs?)
|
76
76
|
parsed.source_id.inject(r) { |a, e| a.include_id(e) }
|
77
77
|
end
|
78
78
|
|
@@ -78,10 +78,10 @@ module Avm
|
|
78
78
|
|
79
79
|
def deploy
|
80
80
|
::Avm::Git::Commit.new(git, reference_sha1)
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
81
|
+
.deploy_to_url(target_url)
|
82
|
+
.append_templatized_directories(appended_directories)
|
83
|
+
.variables_source_set(variables_source)
|
84
|
+
.run
|
85
85
|
end
|
86
86
|
|
87
87
|
def target_url
|
@@ -51,7 +51,7 @@ module Avm
|
|
51
51
|
|
52
52
|
def revisions_uncached
|
53
53
|
runner_context.call(:git).execute!('log', '--pretty=format:%H', 'origin/master..HEAD')
|
54
|
-
|
54
|
+
.each_line.map(&:strip).reverse.map do |sha1|
|
55
55
|
::Avm::Git::RevisionTest.new(runner_context.call(:git), sha1, test_revision_options)
|
56
56
|
end
|
57
57
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/tools/core_ext'
|
4
|
-
require 'avm/
|
4
|
+
require 'avm/eac_ruby_base1/rubocop'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
module Tools
|
@@ -15,7 +15,7 @@ module Avm
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def run
|
18
|
-
::Avm::
|
18
|
+
::Avm::EacRubyBase1::Rubocop.new(path, parsed.rubocop_args).run
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
data/lib/avm/tools/version.rb
CHANGED
data/sub/avm/avm.gemspec
CHANGED
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency 'htmlbeautifier', '~> 1.3', '>= 1.3.1'
|
22
22
|
s.add_dependency 'minitar', '~> 0.9'
|
23
23
|
|
24
|
-
s.add_development_dependency 'aranha-parsers', '~> 0.
|
25
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.
|
24
|
+
s.add_development_dependency 'aranha-parsers', '~> 0.14', '~> 0.14.1'
|
25
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
26
26
|
end
|
@@ -9,8 +9,8 @@ module Avm
|
|
9
9
|
module AutoValues
|
10
10
|
module Mailer
|
11
11
|
::Avm::Instances::EntryKeys.all.select { |c| c.to_s.start_with?('mailer.') }
|
12
|
-
|
13
|
-
|
12
|
+
.reject { |c| c == ::Avm::Instances::EntryKeys::MAILER_ID }
|
13
|
+
.each do |mailer_key|
|
14
14
|
define_method ::Avm::Instances::Entry.auto_value_method_name(mailer_key) do
|
15
15
|
mailer_auto_common(mailer_key)
|
16
16
|
end
|
@@ -17,7 +17,7 @@ module Avm
|
|
17
17
|
|
18
18
|
def detect_optional(*registered_initialize_args)
|
19
19
|
registered_modules.reverse.lazy.map { |klass| klass.new(*registered_initialize_args) }
|
20
|
-
|
20
|
+
.find(&:valid?)
|
21
21
|
end
|
22
22
|
|
23
23
|
def provider_module_suffix
|
@@ -40,7 +40,7 @@ module Avm
|
|
40
40
|
|
41
41
|
def registered_modules_uncached
|
42
42
|
registered_gems.flat_map { |registry| modules_from_registry(registry) }
|
43
|
-
|
43
|
+
.select { |v| valid_registered_module?(v) }.uniq
|
44
44
|
end
|
45
45
|
|
46
46
|
def modules_from_registry(registry)
|
@@ -4,7 +4,7 @@ require 'avm/registry'
|
|
4
4
|
|
5
5
|
::RSpec.shared_examples 'not_in_avm_registry' do |registry_method = nil|
|
6
6
|
registry_method.if_present(::Avm::Registry.registries) { |v| [::Avm::Registry.send(v)] }
|
7
|
-
|
7
|
+
.each do |registry|
|
8
8
|
context "when registry is #{registry}" do
|
9
9
|
it 'is not in the avm registry' do
|
10
10
|
expect(registry.registered_modules).not_to include(described_class)
|
@@ -33,7 +33,7 @@ module Avm
|
|
33
33
|
# @return [Array<Avm::Sources::Tests::Single>]
|
34
34
|
def available_units
|
35
35
|
@available_units ||= ([main_source] + main_source.subs)
|
36
|
-
|
36
|
+
.map { |a_source| create_unit(a_source) }
|
37
37
|
end
|
38
38
|
|
39
39
|
def available_units_from_main
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -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.
|
19
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
20
20
|
end
|
@@ -76,7 +76,7 @@ module Avm
|
|
76
76
|
|
77
77
|
def sync_content
|
78
78
|
::Avm::Sync.new(source_path, target_path)
|
79
|
-
|
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
|
-
|
103
|
-
|
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
|
-
|
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
|
-
|
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
|
@@ -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
|
-
|
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
|
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
|
|
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.
|
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
|
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
|
@@ -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
|
-
|
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
|
-
|
21
|
+
.if_present { |v| v.merge_with(commit) }
|
22
22
|
else
|
23
23
|
commit.reword(scm_update_commit_message)
|
24
24
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/files/formatter/formats/generic_plain'
|
4
|
-
require 'avm/
|
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::
|
15
|
+
::Avm::EacRubyBase1::Rubocop.new('.', ['-a', '--ignore-parent-exclusion'] + files).run
|
16
16
|
super(files)
|
17
17
|
end
|
18
18
|
end
|
data/sub/eac_cli/eac_cli.gemspec
CHANGED