avm-tools 0.118.0 → 0.120.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/projects/stereotypes/ruby_gem/local_project_mixin.rb +3 -3
- data/lib/avm/tools/app_src.rb +1 -5
- data/lib/avm/tools/runner/app_src/ruby.rb +0 -1
- data/lib/avm/tools/runner/app_src.rb +2 -0
- data/lib/avm/tools/version.rb +1 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb +2 -2
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb +3 -3
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/{avm-eac_rails_base1 → avm-eac_redmine_plugin_base0}/Gemfile +0 -0
- data/sub/avm-eac_redmine_plugin_base0/avm-eac_redmine_plugin_base0.gemspec +19 -0
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base.rb +30 -0
- data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/version.rb +7 -0
- data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb → avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0.rb} +1 -1
- data/sub/{avm-eac_rails_base1 → avm-eac_redmine_plugin_base0}/spec/rubocop_spec.rb +0 -0
- data/sub/{avm-eac_rails_base1 → avm-eac_redmine_plugin_base0}/spec/spec_helper.rb +0 -0
- metadata +27 -223
- data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +0 -29
- data/lib/avm/patches/eac_ruby_gems_utils.rb +0 -4
- data/lib/avm/ruby/bundler/incompatible_parser/depends_on.rb +0 -25
- data/lib/avm/ruby/bundler/incompatible_parser/gem_conflict.rb +0 -39
- data/lib/avm/ruby/bundler/incompatible_parser/in_gemfile.rb +0 -17
- data/lib/avm/ruby/bundler/incompatible_parser/line_buffer.rb +0 -73
- data/lib/avm/ruby/bundler/incompatible_parser/line_factory.rb +0 -31
- data/lib/avm/ruby/bundler/incompatible_parser/line_parser_base.rb +0 -19
- data/lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb +0 -26
- data/lib/avm/ruby/bundler/incompatible_parser.rb +0 -25
- data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +0 -82
- data/sub/avm/Gemfile +0 -5
- data/sub/avm/avm.gemspec +0 -26
- data/sub/avm/lib/avm/data/instance/files_unit.rb +0 -40
- data/sub/avm/lib/avm/data/instance/package.rb +0 -18
- data/sub/avm/lib/avm/data/instance/unit.rb +0 -17
- data/sub/avm/lib/avm/data/instance.rb +0 -11
- data/sub/avm/lib/avm/data/package/dump.rb +0 -119
- data/sub/avm/lib/avm/data/package/load.rb +0 -48
- data/sub/avm/lib/avm/data/package.rb +0 -42
- data/sub/avm/lib/avm/data/rotate.rb +0 -107
- data/sub/avm/lib/avm/data/unit.rb +0 -94
- data/sub/avm/lib/avm/docker/container.rb +0 -50
- data/sub/avm/lib/avm/docker/image.rb +0 -71
- data/sub/avm/lib/avm/docker/runner.rb +0 -125
- data/sub/avm/lib/avm/docker.rb +0 -9
- data/sub/avm/lib/avm/executables.rb +0 -24
- data/sub/avm/lib/avm/instances/application.rb +0 -29
- data/sub/avm/lib/avm/instances/base/auto_values/access.rb +0 -40
- data/sub/avm/lib/avm/instances/base/auto_values/admin.rb +0 -19
- data/sub/avm/lib/avm/instances/base/auto_values/data.rb +0 -26
- data/sub/avm/lib/avm/instances/base/auto_values/database.rb +0 -76
- data/sub/avm/lib/avm/instances/base/auto_values/filesystem.rb +0 -43
- data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +0 -34
- data/sub/avm/lib/avm/instances/base/auto_values/ruby.rb +0 -15
- data/sub/avm/lib/avm/instances/base/auto_values/source.rb +0 -15
- data/sub/avm/lib/avm/instances/base/auto_values/system.rb +0 -23
- data/sub/avm/lib/avm/instances/base/auto_values/web.rb +0 -46
- data/sub/avm/lib/avm/instances/base/auto_values.rb +0 -21
- data/sub/avm/lib/avm/instances/base/dockerizable.rb +0 -45
- data/sub/avm/lib/avm/instances/base/entry_keys.rb +0 -22
- data/sub/avm/lib/avm/instances/base.rb +0 -64
- data/sub/avm/lib/avm/instances/docker_image.rb +0 -15
- data/sub/avm/lib/avm/instances/entries.rb +0 -43
- data/sub/avm/lib/avm/instances/entry.rb +0 -60
- data/sub/avm/lib/avm/instances/entry_keys.rb +0 -60
- data/sub/avm/lib/avm/instances/runner.rb +0 -39
- data/sub/avm/lib/avm/instances.rb +0 -8
- data/sub/avm/lib/avm/jobs/base.rb +0 -63
- data/sub/avm/lib/avm/jobs/variables_source.rb +0 -22
- data/sub/avm/lib/avm/jobs.rb +0 -9
- data/sub/avm/lib/avm/launcher/errors/base.rb +0 -10
- data/sub/avm/lib/avm/launcher/errors/non_project.rb +0 -15
- data/sub/avm/lib/avm/launcher/paths/real.rb +0 -44
- data/sub/avm/lib/avm/launcher/publish/check_result.rb +0 -67
- data/sub/avm/lib/avm/path_string.rb +0 -27
- data/sub/avm/lib/avm/registry/base.rb +0 -67
- data/sub/avm/lib/avm/registry.rb +0 -29
- data/sub/avm/lib/avm/result.rb +0 -86
- data/sub/avm/lib/avm/rspec/setup.rb +0 -22
- data/sub/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb +0 -11
- data/sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +0 -14
- data/sub/avm/lib/avm/rspec.rb +0 -9
- data/sub/avm/lib/avm/runners/base.rb +0 -27
- data/sub/avm/lib/avm/scms/base.rb +0 -46
- data/sub/avm/lib/avm/scms/commit.rb +0 -43
- data/sub/avm/lib/avm/scms/inflector.rb +0 -22
- data/sub/avm/lib/avm/self/docker_image.rb +0 -14
- data/sub/avm/lib/avm/self/instance/entry_keys.rb +0 -12
- data/sub/avm/lib/avm/self/instance.rb +0 -31
- data/sub/avm/lib/avm/sources/base/configuration.rb +0 -45
- data/sub/avm/lib/avm/sources/base/instance.rb +0 -28
- data/sub/avm/lib/avm/sources/base/parent.rb +0 -31
- data/sub/avm/lib/avm/sources/base/subs.rb +0 -55
- data/sub/avm/lib/avm/sources/base/subs_paths.rb +0 -32
- data/sub/avm/lib/avm/sources/base/testing.rb +0 -21
- data/sub/avm/lib/avm/sources/base.rb +0 -44
- data/sub/avm/lib/avm/sources/configuration/locale.rb +0 -18
- data/sub/avm/lib/avm/sources/configuration/rubocop.rb +0 -26
- data/sub/avm/lib/avm/sources/configuration/tests.rb +0 -29
- data/sub/avm/lib/avm/sources/configuration.rb +0 -59
- data/sub/avm/lib/avm/sources/tester.rb +0 -24
- data/sub/avm/lib/avm/sources/tests/builder.rb +0 -83
- data/sub/avm/lib/avm/sources/tests/performer.rb +0 -35
- data/sub/avm/lib/avm/sources/tests/result.rb +0 -15
- data/sub/avm/lib/avm/sources/tests/single.rb +0 -56
- data/sub/avm/lib/avm/sources/tests.rb +0 -11
- data/sub/avm/lib/avm/sources.rb +0 -9
- data/sub/avm/lib/avm/sync.rb +0 -94
- data/sub/avm/lib/avm/version.rb +0 -5
- data/sub/avm/lib/avm/version_number.rb +0 -45
- data/sub/avm/lib/avm.rb +0 -7
- data/sub/avm/spec/lib/avm/scms/base_spec.rb +0 -7
- data/sub/avm/spec/lib/avm/sources/base_spec.rb +0 -7
- data/sub/avm/spec/rubocop_spec.rb +0 -3
- data/sub/avm/spec/spec_helper.rb +0 -4
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +0 -21
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/apache_host.rb +0 -17
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instance.rb +0 -24
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb +0 -26
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb +0 -26
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb +0 -43
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb +0 -26
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +0 -18
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb +0 -32
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +0 -46
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb +0 -17
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner.rb +0 -12
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/bundle.rb +0 -27
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb +0 -47
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb +0 -27
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb +0 -70
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb +0 -29
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb +0 -57
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +0 -7
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1.rb +0 -9
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler.service +0 -12
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh +0 -6
- data/sub/avm-eac_ruby_base1/Gemfile +0 -5
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +0 -21
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/add_or_replace_gem_line.rb +0 -56
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/dependency.rb +0 -19
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile.rb +0 -34
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler.rb +0 -11
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb +0 -31
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb +0 -17
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +0 -41
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb +0 -55
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb +0 -23
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +0 -50
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb +0 -38
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +0 -56
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb +0 -52
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources.rb +0 -11
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +0 -7
- data/sub/avm-eac_ruby_base1/locale/en.yaml +0 -8
- data/sub/avm-eac_ruby_base1/locale/pt-BR.yaml +0 -8
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base_spec.rb +0 -7
- data/sub/avm-eac_ruby_base1/spec/rubocop_spec.rb +0 -3
- data/sub/avm-eac_ruby_base1/spec/spec_helper.rb +0 -4
- data/sub/eac_ruby_base0/Gemfile +0 -5
- data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +0 -21
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/application.rb +0 -87
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/application_xdg.rb +0 -34
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +0 -5
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb +0 -31
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb +0 -10
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb +0 -4
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb +0 -5
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb +0 -5
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/patches.rb +0 -4
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/rspec/setup.rb +0 -14
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/rspec.rb +0 -9
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +0 -92
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb +0 -42
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +0 -52
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/input.rb +0 -36
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/output.rb +0 -58
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb +0 -9
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +0 -5
- data/sub/eac_ruby_base0/lib/eac_ruby_base0.rb +0 -7
- data/sub/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/confirmation_spec.rb +0 -42
- data/sub/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/output_spec.rb +0 -81
- data/sub/eac_ruby_base0/spec/rubocop_spec.rb +0 -3
- data/sub/eac_ruby_base0/spec/spec_helper.rb +0 -4
- data/sub/eac_ruby_gems_utils/Gemfile +0 -5
- data/sub/eac_ruby_gems_utils/LICENCE +0 -16
- data/sub/eac_ruby_gems_utils/README.rdoc +0 -3
- data/sub/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +0 -31
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb +0 -33
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +0 -41
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem.rb +0 -97
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -57
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/minitest.rb +0 -25
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/decorated_gem.rb +0 -48
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/result.rb +0 -25
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple.rb +0 -84
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/rspec.rb +0 -21
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests.rb +0 -9
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +0 -5
- data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils.rb +0 -7
- data/sub/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +0 -3
- data/sub/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec.rb +0 -14
- data/sub/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec_files/a_version_file.rb +0 -7
- data/sub/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem_spec.rb +0 -20
- data/sub/eac_ruby_gems_utils/spec/spec_helper.rb +0 -4
- data/sub/eac_ruby_gems_utils/spec/support/mygem/Gemfile +0 -5
- data/sub/eac_ruby_gems_utils/spec/support/mygem/Gemfile.lock +0 -19
- data/sub/eac_ruby_gems_utils/spec/support/mygem/Rakefile +0 -14
- data/sub/eac_ruby_gems_utils/spec/support/mygem/exe/myrunner +0 -5
- data/sub/eac_ruby_gems_utils/spec/support/mygem/lib/mygem/version.rb +0 -5
- data/sub/eac_ruby_gems_utils/spec/support/mygem/lib/mygem.rb +0 -5
- data/sub/eac_ruby_gems_utils/spec/support/mygem/mygem.gemspec +0 -16
data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/add_or_replace_gem_line.rb
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module EacRubyBase1
|
7
|
-
module Bundler
|
8
|
-
class Gemfile
|
9
|
-
class AddOrReplaceGemLine
|
10
|
-
enable_method_class
|
11
|
-
common_constructor :sender, :gem_name, :gem_specs
|
12
|
-
delegate :lines, to: :sender
|
13
|
-
|
14
|
-
def existing_gem_line_index
|
15
|
-
lines.index { |line| line.start_with?(gem_line_prefix) }
|
16
|
-
end
|
17
|
-
|
18
|
-
def result
|
19
|
-
if existing_gem_line_index.present?
|
20
|
-
replace_line
|
21
|
-
else
|
22
|
-
add_line
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def add_line
|
27
|
-
lines.insert(add_line_index, new_gem_line)
|
28
|
-
end
|
29
|
-
|
30
|
-
def add_line_index
|
31
|
-
(gems_lines_start_index..(lines.count - 1)).each do |e|
|
32
|
-
return e if new_gem_line < lines[e]
|
33
|
-
end
|
34
|
-
lines.count
|
35
|
-
end
|
36
|
-
|
37
|
-
def gems_lines_start_index
|
38
|
-
lines.index { |line| line.start_with?('gem ') } || lines.count
|
39
|
-
end
|
40
|
-
|
41
|
-
def new_gem_line
|
42
|
-
([gem_line_prefix] + gem_specs).join(', ')
|
43
|
-
end
|
44
|
-
|
45
|
-
def gem_line_prefix
|
46
|
-
"gem '#{gem_name}'"
|
47
|
-
end
|
48
|
-
|
49
|
-
def replace_line
|
50
|
-
lines[existing_gem_line_index] = new_gem_line
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module EacRubyBase1
|
7
|
-
module Bundler
|
8
|
-
class Gemfile
|
9
|
-
class Dependency
|
10
|
-
common_constructor :gemfile, :gem_name
|
11
|
-
|
12
|
-
def version_specs=(version_specs)
|
13
|
-
gemfile.add_or_replace_gem_line(gem_name, version_specs)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module EacRubyBase1
|
7
|
-
module Bundler
|
8
|
-
class Gemfile
|
9
|
-
require_sub __FILE__, require_dependency: true
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def from_file(path)
|
13
|
-
new(path.read.each_line.map(&:rstrip))
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
common_constructor :lines
|
18
|
-
|
19
|
-
# @return [Avm::EacRubyBase1::Bundler::Gemfile::Dependency]
|
20
|
-
def dependency(gem_name)
|
21
|
-
::Avm::EacRubyBase1::Bundler::Gemfile::Dependency.new(self, gem_name)
|
22
|
-
end
|
23
|
-
|
24
|
-
def write(path)
|
25
|
-
path.to_pathname.write(to_text)
|
26
|
-
end
|
27
|
-
|
28
|
-
def to_text
|
29
|
-
lines.map { |line| "#{line}\n" }.join
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,31 +0,0 @@
|
|
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
|
@@ -1,17 +0,0 @@
|
|
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
|
@@ -1,41 +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 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
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'eac_ruby_utils/ruby/on_clean_environment'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module EacRubyBase1
|
8
|
-
class Rubocop
|
9
|
-
require_sub __FILE__, include_modules: true
|
10
|
-
enable_speaker
|
11
|
-
enable_simple_cache
|
12
|
-
common_constructor :base_path, :rubocop_args
|
13
|
-
set_callback :initialize, :after do
|
14
|
-
@base_path = ::Pathname.new(base_path.to_s) unless base_path.is_a?(::Pathname)
|
15
|
-
end
|
16
|
-
|
17
|
-
def run
|
18
|
-
start_banner
|
19
|
-
run_rubocop
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
def cmd(*args)
|
25
|
-
::EacRubyUtils::Envs.local.command(*args)
|
26
|
-
end
|
27
|
-
|
28
|
-
def rubocop_command_uncached
|
29
|
-
%w[env configured gemfile].each do |s|
|
30
|
-
cmd = send("#{s}_rubocop_command")
|
31
|
-
return cmd if cmd.present?
|
32
|
-
end
|
33
|
-
cmd('rubocop')
|
34
|
-
end
|
35
|
-
|
36
|
-
def rubocop_command_with_args
|
37
|
-
rubocop_command.append(rubocop_args)
|
38
|
-
end
|
39
|
-
|
40
|
-
def rubocop_version_uncached
|
41
|
-
::EacRubyUtils::Ruby.on_clean_environment do
|
42
|
-
rubocop_command.append(['--version']).execute!.strip
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def run_rubocop
|
47
|
-
::EacRubyUtils::Ruby.on_clean_environment { rubocop_command_with_args.system }
|
48
|
-
end
|
49
|
-
|
50
|
-
def start_banner
|
51
|
-
infov 'Rubocop version', rubocop_version
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,23 +0,0 @@
|
|
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
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_generic_base0/sources/base'
|
4
|
-
require 'avm/eac_ruby_base1/sources/update'
|
5
|
-
require 'avm/eac_ruby_base1/sources/tester'
|
6
|
-
require 'avm/version_number'
|
7
|
-
require 'eac_ruby_gems_utils/gem'
|
8
|
-
require 'eac_ruby_utils/core_ext'
|
9
|
-
|
10
|
-
module Avm
|
11
|
-
module EacRubyBase1
|
12
|
-
module Sources
|
13
|
-
class Base < ::Avm::EacGenericBase0::Sources::Base
|
14
|
-
require_sub __FILE__, include_modules: :prepend, require_dependency: true
|
15
|
-
delegate :gemspec_path, to: :the_gem
|
16
|
-
|
17
|
-
def gemfile_path
|
18
|
-
path.join('Gemfile')
|
19
|
-
end
|
20
|
-
|
21
|
-
def valid?
|
22
|
-
gemfile_path.exist? || gemspec_path.present?
|
23
|
-
end
|
24
|
-
|
25
|
-
# @return [Avm::EacRubyBase1::Sources::Tester]
|
26
|
-
def tester_class
|
27
|
-
Avm::EacRubyBase1::Sources::Tester
|
28
|
-
end
|
29
|
-
|
30
|
-
# @return [EacRubyGemsUtils::Gem]
|
31
|
-
def the_gem
|
32
|
-
@the_gem ||= ::EacRubyGemsUtils::Gem.new(path)
|
33
|
-
end
|
34
|
-
|
35
|
-
def update
|
36
|
-
::Avm::EacRubyBase1::Sources::Update.new(self)
|
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
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_generic_base0/sources/tester'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module EacRubyBase1
|
8
|
-
module Sources
|
9
|
-
class Tester < ::Avm::EacGenericBase0::Sources::Tester
|
10
|
-
BUNDLE_TEST_COMMAND_CONFIGURATION_KEY = :bundle_test_command
|
11
|
-
|
12
|
-
delegate :the_gem, to: :source
|
13
|
-
|
14
|
-
# @return [EacRubyUtils::Envs::Command, nil]
|
15
|
-
def test_command
|
16
|
-
bundle_test_command || super || default_test_command
|
17
|
-
end
|
18
|
-
|
19
|
-
# @return [EacRubyGemsUtils::Gem::Command, nil]
|
20
|
-
def bundle_test_command
|
21
|
-
source.read_configuration_as_shell_words(BUNDLE_TEST_COMMAND_CONFIGURATION_KEY)
|
22
|
-
.if_present { |args| the_gem.bundle(*args).chdir_root }
|
23
|
-
end
|
24
|
-
|
25
|
-
# @return [EacRubyGemsUtils::Gem::Command, nil]
|
26
|
-
def default_test_command
|
27
|
-
the_gem.bundle('exec', 'rspec', '--fail-fast').chdir_root
|
28
|
-
end
|
29
|
-
|
30
|
-
def run_test_command
|
31
|
-
execute_command_and_log(the_gem.bundle('install').chdir_root) ||
|
32
|
-
execute_command_and_log(the_gem.bundle('update').chdir_root)
|
33
|
-
super
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module EacRubyBase1
|
5
|
-
module Sources
|
6
|
-
class Update
|
7
|
-
class SubUpdate
|
8
|
-
enable_simple_cache
|
9
|
-
enable_speaker
|
10
|
-
common_constructor :source_update, :sub do
|
11
|
-
perform
|
12
|
-
end
|
13
|
-
delegate :source, to: :source_update
|
14
|
-
|
15
|
-
protected
|
16
|
-
|
17
|
-
def on_scm_updated(commit)
|
18
|
-
if commit.no_scm_changed_files.any?
|
19
|
-
commit = commit.reword(no_scm_update_commit_message)
|
20
|
-
source.scm.commit_if_change { source_update.bundle_update }
|
21
|
-
.if_present { |v| v.merge_with(commit) }
|
22
|
-
else
|
23
|
-
commit.reword(scm_update_commit_message)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def perform
|
28
|
-
update_scm.if_present { |commit| on_scm_updated(commit) }
|
29
|
-
end
|
30
|
-
|
31
|
-
def ruby_gem_uncached
|
32
|
-
::EacRubyGemsUtils::Gem.new(sub.path)
|
33
|
-
end
|
34
|
-
|
35
|
-
def no_scm_update_commit_message
|
36
|
-
source_update.i18n_translate(__method__, __locale: source.locale,
|
37
|
-
name: ruby_gem.name,
|
38
|
-
version: ruby_gem.version)
|
39
|
-
end
|
40
|
-
|
41
|
-
def scm_update_commit_message
|
42
|
-
source_update.i18n_translate(__method__, __locale: source.locale)
|
43
|
-
end
|
44
|
-
|
45
|
-
# @return [Avm::Scms::Commit]
|
46
|
-
def update_scm
|
47
|
-
infom "Updating \"#{sub}\"..."
|
48
|
-
source.scm.commit_if_change do
|
49
|
-
sub.scm.update
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module EacRubyBase1
|
7
|
-
module Sources
|
8
|
-
class Update
|
9
|
-
require_sub __FILE__
|
10
|
-
enable_simple_cache
|
11
|
-
enable_speaker
|
12
|
-
common_constructor :source do
|
13
|
-
perform
|
14
|
-
end
|
15
|
-
|
16
|
-
def bundle_update
|
17
|
-
infom 'Running "bundle update"...'
|
18
|
-
ruby_gem.bundle('update').execute!
|
19
|
-
infom 'Running "bundle install"...'
|
20
|
-
ruby_gem.bundle('install').execute!
|
21
|
-
end
|
22
|
-
|
23
|
-
protected
|
24
|
-
|
25
|
-
def perform
|
26
|
-
update_gemfile_lock
|
27
|
-
update_subs
|
28
|
-
end
|
29
|
-
|
30
|
-
def update_gemfile_lock
|
31
|
-
source.scm.commit_if_change(-> { update_gemfile_lock_commit_message }) do
|
32
|
-
bundle_update
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def update_gemfile_lock_commit_message
|
37
|
-
i18n_translate(__method__, __locale: source.locale)
|
38
|
-
end
|
39
|
-
|
40
|
-
def update_subs
|
41
|
-
source.subs.each do |sub|
|
42
|
-
::Avm::EacRubyBase1::Sources::Update::SubUpdate.new(self, sub)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def ruby_gem_uncached
|
47
|
-
::EacRubyGemsUtils::Gem.new(source.path)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
pt-BR:
|
2
|
-
avm:
|
3
|
-
eac_ruby_base1:
|
4
|
-
sources:
|
5
|
-
update:
|
6
|
-
no_scm_update_commit_message: "Gem \"%{name}\" (Local): atualiza para '%{version}'."
|
7
|
-
scm_update_commit_message: '**/.gitrepo: conserta/atualiza.'
|
8
|
-
update_gemfile_lock_commit_message: 'Todas as gems: atualiza.'
|
data/sub/eac_ruby_base0/Gemfile
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
-
|
5
|
-
require 'eac_ruby_base0/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = 'eac_ruby_base0'
|
9
|
-
s.version = EacRubyBase0::VERSION
|
10
|
-
s.authors = ['Put here the authors']
|
11
|
-
s.summary = 'Put here de description.'
|
12
|
-
|
13
|
-
s.files = Dir['{lib}/**/*']
|
14
|
-
|
15
|
-
s.add_dependency 'eac_cli', '~> 0.27', '>= 0.27.5'
|
16
|
-
s.add_dependency 'eac_fs', '~> 0.10'
|
17
|
-
s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '~> 0.9.6'
|
18
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.95', '>= 0.95.1'
|
19
|
-
|
20
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
21
|
-
end
|
@@ -1,87 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_cli/config'
|
4
|
-
require 'eac_config/envvars_node'
|
5
|
-
require 'eac_config/yaml_file_node'
|
6
|
-
require 'eac_fs/contexts'
|
7
|
-
require 'eac_fs/storage_tree'
|
8
|
-
require 'eac_ruby_base0/application_xdg'
|
9
|
-
require 'eac_ruby_gems_utils/gem'
|
10
|
-
require 'eac_ruby_utils/core_ext'
|
11
|
-
|
12
|
-
module EacRubyBase0
|
13
|
-
class Application
|
14
|
-
enable_simple_cache
|
15
|
-
enable_listable
|
16
|
-
lists.add_symbol :option, :name, :home_dir
|
17
|
-
|
18
|
-
common_constructor :gemspec_dir, :options, default: [{}] do
|
19
|
-
self.gemspec_dir = gemspec_dir.to_pathname
|
20
|
-
self.options = options.symbolize_keys.assert_valid_keys(self.class.lists.option.values).freeze
|
21
|
-
end
|
22
|
-
|
23
|
-
delegate :version, to: :self_gem
|
24
|
-
|
25
|
-
def all_gems
|
26
|
-
sub_gems + [self_gem]
|
27
|
-
end
|
28
|
-
|
29
|
-
# @return [EacCli::Config]
|
30
|
-
def build_config(path = nil)
|
31
|
-
envvar_node = ::EacConfig::EnvvarsNode.new
|
32
|
-
file_node = ::EacConfig::YamlFileNode.new(path || config_default_path)
|
33
|
-
envvar_node.load_path.push(file_node.url)
|
34
|
-
envvar_node.write_node = file_node
|
35
|
-
::EacCli::Config.new(envvar_node)
|
36
|
-
end
|
37
|
-
|
38
|
-
# @return [EacCli::Config]
|
39
|
-
def config_default_path
|
40
|
-
config_dir.join('eac_config.yaml')
|
41
|
-
end
|
42
|
-
|
43
|
-
::EacRubyBase0::ApplicationXdg::DIRECTORIES.each_key do |item|
|
44
|
-
delegate "#{item}_xdg_env", "#{item}_dir", to: :app_xdg
|
45
|
-
end
|
46
|
-
|
47
|
-
::EacFs::Contexts::TYPES.each do |type|
|
48
|
-
class_eval <<CODE, __FILE__, __LINE__ + 1
|
49
|
-
# @return [EacFs::StorageTree]
|
50
|
-
def self_fs_#{type}
|
51
|
-
@self_fs_#{type} ||= ::EacFs::StorageTree.new(#{type}_dir.join('eac_fs'))
|
52
|
-
end
|
53
|
-
CODE
|
54
|
-
end
|
55
|
-
|
56
|
-
def home_dir
|
57
|
-
app_xdg.user_home_dir
|
58
|
-
end
|
59
|
-
|
60
|
-
def name
|
61
|
-
options[OPTION_NAME] || self_gem.name
|
62
|
-
end
|
63
|
-
|
64
|
-
def vendor_dir
|
65
|
-
gemspec_dir.join('sub')
|
66
|
-
end
|
67
|
-
|
68
|
-
private
|
69
|
-
|
70
|
-
def app_xdg_uncached
|
71
|
-
::EacRubyBase0::ApplicationXdg.new(name, options[OPTION_HOME_DIR])
|
72
|
-
end
|
73
|
-
|
74
|
-
def self_gem_uncached
|
75
|
-
::EacRubyGemsUtils::Gem.new(gemspec_dir)
|
76
|
-
end
|
77
|
-
|
78
|
-
def sub_gems_uncached
|
79
|
-
r = []
|
80
|
-
vendor_dir.children.each do |c|
|
81
|
-
vgem = ::EacRubyGemsUtils::Gem.new(c)
|
82
|
-
r << vgem if vgem.gemfile_path.exist?
|
83
|
-
end
|
84
|
-
r
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|