avm-tools 0.103.1 → 0.107.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/instances/entry.rb +3 -3
- data/lib/avm/launcher/context/instance_collector.rb +46 -0
- data/lib/avm/launcher/instances/runner_helper.rb +21 -15
- data/lib/avm/launcher/paths/logical.rb +5 -0
- data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +2 -2
- data/lib/avm/ruby/rubocop/_configured.rb +2 -2
- data/lib/avm/tools/app_src.rb +68 -0
- data/lib/avm/tools/runner/app_src/info.rb +16 -2
- data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +62 -0
- data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb +11 -41
- data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +2 -4
- data/lib/avm/tools/runner/app_src.rb +2 -2
- data/lib/avm/tools/runner/config/load_path.rb +2 -2
- data/lib/avm/tools/runner/git/deploy.rb +2 -2
- data/lib/avm/tools/runner/launcher/instances.rb +7 -5
- data/lib/avm/tools/runner/launcher/projects.rb +2 -4
- data/lib/avm/tools/runner/launcher/publish.rb +2 -6
- data/lib/avm/tools/runner.rb +1 -1
- data/lib/avm/tools/version.rb +1 -1
- data/vendor/avm/avm.gemspec +6 -0
- data/vendor/avm/lib/avm/app_src/base.rb +45 -0
- data/vendor/avm/lib/avm/app_src/configuration/_locale.rb +16 -0
- data/vendor/avm/lib/avm/app_src/configuration/_rubocop.rb +24 -0
- data/vendor/avm/lib/avm/app_src/configuration/_tests.rb +27 -0
- data/vendor/avm/lib/avm/app_src/configuration.rb +55 -0
- data/{lib/avm/eac_asciidoctor_base0.rb → vendor/avm/lib/avm/app_src.rb} +1 -1
- data/{lib → vendor/avm/lib}/avm/executables.rb +1 -1
- data/{lib → vendor/avm/lib}/avm/files/appendable/file_content.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/appendable/plain_directory.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/appendable/resource_base.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/appendable/tar_output_command.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/appendable/templatized_directory.rb +1 -0
- data/{lib → vendor/avm/lib}/avm/files/appendable.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/appender.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/deploy.rb +0 -1
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/base.rb +2 -2
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/generic_plain.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/html.rb +0 -0
- data/vendor/avm/lib/avm/files/formatter/formats/javascript.rb +24 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/json.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/php.rb +1 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/python.rb +1 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/ruby.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats/xml.rb +1 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/formats.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files/formatter/utf8_assert.rb +3 -1
- data/{lib → vendor/avm/lib}/avm/files/formatter.rb +1 -1
- data/{lib → vendor/avm/lib}/avm/files/rotate.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/files.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/commit_info.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/base.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/last.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/manual.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/new.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/nth.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules/unique.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit/rules.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit_path/ruby.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/auto_commit_path.rb +1 -1
- data/{lib → vendor/avm/lib}/avm/git/commit/class_methods.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/commit/deploy.rb +0 -1
- data/{lib → vendor/avm/lib}/avm/git/commit/deploy_methods.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/commit/diff_tree_line.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/commit/file.rb +2 -2
- data/{lib → vendor/avm/lib}/avm/git/commit.rb +3 -2
- data/{lib → vendor/avm/lib}/avm/git/file_auto_fixup.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/commits.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/git_subrepos.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/local_branch.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/local_tag.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/push.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/remote.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/test.rb +2 -2
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/tracker.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/validation.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/validations.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete/working_tree.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/complete.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue/deliver.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/issue.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/organize/reference_update.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/organize/repository.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/organize.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/revision_test.rb +2 -3
- data/{lib → vendor/avm/lib}/avm/git/subrepo_check/parent.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/subrepo_check/remote.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/git/subrepo_check/show_result.rb +0 -1
- data/{lib → vendor/avm/lib}/avm/git/subrepo_check.rb +0 -1
- data/{lib → vendor/avm/lib}/avm/git/subrepo_checks.rb +1 -1
- data/{lib → vendor/avm/lib}/avm/git.rb +0 -0
- data/vendor/avm/lib/avm/jobs/base.rb +62 -0
- data/vendor/avm/lib/avm/jobs/variables_source.rb +22 -0
- data/vendor/{avm-apps/lib/avm/apps → avm/lib/avm}/jobs.rb +2 -4
- data/{lib → vendor/avm/lib}/avm/result.rb +0 -0
- data/vendor/avm/lib/avm/version.rb +1 -1
- data/vendor/avm/spec/lib/avm/git/auto_commit_path_spec.rb +21 -0
- data/vendor/avm/spec/lib/avm/git/commit/deploy_spec.rb +93 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec.rb +13 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +1 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +1 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +1 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +2 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
- data/vendor/avm/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
- data/vendor/avm/spec/lib/avm/git/commit_spec.rb +56 -0
- data/vendor/avm/spec/rubocop_spec.rb +1 -1
- data/vendor/avm/spec/spec_helper.rb +2 -100
- data/vendor/avm-apps/avm-apps.gemspec +1 -1
- data/vendor/avm-apps/lib/avm/apps/version.rb +1 -1
- data/vendor/avm-apps/spec/rubocop_spec.rb +1 -1
- data/vendor/avm-apps/spec/spec_helper.rb +2 -101
- data/vendor/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -0
- data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/apache_host.rb +0 -0
- data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/apache_path.rb +0 -0
- data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/deploy.rb +0 -0
- data/{lib → vendor/avm-eac_asciidoctor_base0/lib}/avm/eac_asciidoctor_base0/instance.rb +0 -0
- data/vendor/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- data/vendor/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb +1 -1
- data/vendor/avm-eac_asciidoctor_base0/spec/spec_helper.rb +2 -100
- data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/vendor/avm-eac_rails_base1/spec/rubocop_spec.rb +1 -1
- data/vendor/avm-eac_rails_base1/spec/spec_helper.rb +2 -100
- data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -1
- data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -2
- data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/vendor/avm-eac_redmine_base0/spec/rubocop_spec.rb +1 -1
- data/vendor/avm-eac_redmine_base0/spec/spec_helper.rb +2 -100
- data/vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template +1 -0
- data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +2 -2
- data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +2 -2
- data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +2 -2
- data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/vendor/avm-eac_webapp_base0/spec/rubocop_spec.rb +1 -1
- data/vendor/avm-eac_webapp_base0/spec/spec_helper.rb +2 -100
- data/vendor/eac_cli/eac_cli.gemspec +3 -3
- data/vendor/eac_cli/lib/eac_cli/config/entry.rb +0 -2
- data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
- data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
- data/vendor/eac_cli/spec/rubocop_spec.rb +1 -1
- data/vendor/eac_cli/spec/spec_helper.rb +2 -101
- data/vendor/eac_config/eac_config.gemspec +2 -2
- data/vendor/eac_config/lib/eac_config/version.rb +1 -1
- data/vendor/eac_config/spec/rubocop_spec.rb +1 -1
- data/vendor/eac_config/spec/spec_helper.rb +2 -15
- data/vendor/eac_docker/eac_docker.gemspec +2 -2
- data/vendor/eac_docker/lib/eac_docker/container.rb +7 -3
- data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +4 -0
- data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
- data/vendor/eac_docker/lib/eac_docker/rspec.rb +2 -10
- data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
- data/vendor/eac_docker/spec/rubocop_spec.rb +1 -1
- data/vendor/eac_docker/spec/spec_helper.rb +2 -104
- data/vendor/eac_fs/Gemfile +5 -0
- data/vendor/eac_fs/eac_fs.gemspec +20 -0
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb → eac_fs/lib/eac_fs/cache.rb} +7 -2
- data/{lib/avm → vendor/eac_fs/lib/eac_fs}/cached_download.rb +4 -4
- data/vendor/eac_fs/lib/eac_fs/file_info.rb +29 -0
- data/vendor/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +10 -0
- data/vendor/eac_fs/lib/eac_fs/patches/module.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +10 -0
- data/vendor/eac_fs/lib/eac_fs/patches/object.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches/pathname/info.rb +12 -0
- data/vendor/eac_fs/lib/eac_fs/patches/pathname.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/version.rb +5 -0
- data/vendor/eac_fs/lib/eac_fs.rb +7 -0
- data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/filesystem_cache_spec.rb → eac_fs/spec/lib/eac_fs/cache_spec.rb} +2 -2
- data/vendor/eac_fs/spec/rubocop_spec.rb +3 -0
- data/vendor/eac_fs/spec/spec_helper.rb +4 -0
- data/vendor/eac_git/eac_git.gemspec +3 -3
- data/vendor/eac_git/lib/eac_git/local/commit/archive.rb +1 -1
- data/vendor/eac_git/lib/eac_git/local/commit.rb +3 -3
- data/vendor/eac_git/lib/eac_git/local.rb +13 -0
- data/vendor/eac_git/lib/eac_git/rspec/setup.rb +23 -0
- data/vendor/eac_git/lib/eac_git/rspec.rb +1 -14
- data/vendor/eac_git/lib/eac_git/version.rb +1 -1
- data/vendor/eac_git/spec/rubocop_spec.rb +1 -1
- data/vendor/eac_git/spec/spec_helper.rb +2 -104
- data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +5 -4
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +3 -3
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +1 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +16 -7
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -1
- data/vendor/eac_ruby_base0/spec/spec_helper.rb +2 -101
- data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +2 -2
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -5
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
- data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +1 -1
- data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +2 -101
- data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +15 -3
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +75 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
- data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -1
- data/vendor/eac_ruby_utils/spec/spec_helper.rb +6 -6
- data/vendor/eac_templates/lib/eac_templates/patches/module/erb_template.rb +9 -0
- data/vendor/eac_templates/lib/eac_templates/patches/module.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/patches/object/erb_template.rb +9 -0
- data/vendor/eac_templates/lib/eac_templates/patches/object.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/patches.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/version.rb +1 -1
- data/vendor/eac_templates/spec/rubocop_spec.rb +1 -1
- data/vendor/eac_templates/spec/spec_helper.rb +2 -100
- metadata +146 -250
- data/lib/avm/app_src.rb +0 -61
- data/lib/avm/files/info.rb +0 -24
- data/lib/avm/fs_cache.rb +0 -11
- data/vendor/avm-apps/lib/avm/apps/config.rb +0 -19
- data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +0 -64
- data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +0 -24
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +0 -18
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +0 -26
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +0 -29
- data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +0 -57
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +0 -12
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 982669127ef20f0cf64fa12fbe0d087c0479b0e8575d7bb2c6047abac2ec81d3
|
4
|
+
data.tar.gz: d4d659206696045d925dbba86c5d4fa69e184dbbdc58001e3453344ef68ef9ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 436eb2a8f5957c9ffcb130851bb2dee4ab070cfd610a25356e8030766b6190a2a096b7a25250ab33801036f01e79e5c50bfc8024c2b6172f721f1868811251ea
|
7
|
+
data.tar.gz: 57711beda558d8e28ba2f98fd9ccbe4be8372e32093e1e45591ad7b5bb89cc9014946720b5430eaf66ef5ce4e583d96e3b3e556be39ce2670df577ee11d681cb
|
data/lib/avm/instances/entry.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'eac_config/node'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
6
|
module Avm
|
@@ -31,7 +31,7 @@ module Avm
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def read(extra_options = {})
|
34
|
-
::
|
34
|
+
::EacConfig::Node.context.current.entry(full_path, options.merge(extra_options)).value
|
35
35
|
end
|
36
36
|
|
37
37
|
def suffix_as_array
|
@@ -47,7 +47,7 @@ module Avm
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def write(value)
|
50
|
-
::
|
50
|
+
::EacConfig::Node.context.current.entry(full_path).value = value
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Launcher
|
7
|
+
class Context
|
8
|
+
class InstanceCollector
|
9
|
+
common_constructor :context
|
10
|
+
|
11
|
+
def add_all
|
12
|
+
instances_set.merge(context.instances)
|
13
|
+
self
|
14
|
+
end
|
15
|
+
|
16
|
+
def add_path(path)
|
17
|
+
instances_set.merge(instances_on_path(path))
|
18
|
+
self
|
19
|
+
end
|
20
|
+
|
21
|
+
def add_pending
|
22
|
+
instances_set.merge(context.pending_instances)
|
23
|
+
self
|
24
|
+
end
|
25
|
+
|
26
|
+
def instances
|
27
|
+
instances_set.sort
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def instance_match?(instance, instance_name)
|
33
|
+
::File.fnmatch?(instance_name, instance.name)
|
34
|
+
end
|
35
|
+
|
36
|
+
def instances_on_path(path)
|
37
|
+
context.instances.select { |instance| instance_match?(instance, path) }
|
38
|
+
end
|
39
|
+
|
40
|
+
def instances_set
|
41
|
+
@instances_set ||= ::Set.new
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -1,31 +1,33 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/launcher/context'
|
3
4
|
require 'avm/tools/core_ext'
|
5
|
+
require 'avm/launcher/context/instance_collector'
|
4
6
|
|
5
7
|
module Avm
|
6
8
|
module Launcher
|
7
9
|
module Instances
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
module RunnerHelper
|
11
|
+
common_concern do
|
12
|
+
runner_definition do
|
13
|
+
bool_opt '--all', 'Select all instances.'
|
14
|
+
bool_opt '--pending', 'Select pending instances.'
|
15
|
+
bool_opt '--recache', 'Rewrite instances cache.'
|
16
|
+
end
|
12
17
|
|
13
|
-
|
14
|
-
context.instances.select { |instance| instance_match?(instance, instance_name) }
|
18
|
+
set_callback :run, :before, :setup_cache
|
15
19
|
end
|
16
20
|
|
17
|
-
def
|
18
|
-
::
|
21
|
+
def context
|
22
|
+
@context ||= ::Avm::Launcher::Context.current
|
19
23
|
end
|
20
24
|
|
21
25
|
def instances
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
parsed.instance_path.flat_map { |p| find_instances(p) }
|
28
|
-
end
|
26
|
+
collector = ::Avm::Launcher::Context::InstanceCollector.new(context)
|
27
|
+
collector.add_all if parsed.all?
|
28
|
+
collector.add_pending if parsed.pending?
|
29
|
+
parsed.instance_path.flat_map { |p| collector.add_path(p) }
|
30
|
+
collector.instances
|
29
31
|
end
|
30
32
|
|
31
33
|
def instance_stereotypes(instance)
|
@@ -35,6 +37,10 @@ module Avm
|
|
35
37
|
def instance_label(instance)
|
36
38
|
"#{instance.name} [#{instance_stereotypes(instance)}]"
|
37
39
|
end
|
40
|
+
|
41
|
+
def setup_cache
|
42
|
+
::Avm::Launcher::Context.current.recache = parsed.recache?
|
43
|
+
end
|
38
44
|
end
|
39
45
|
end
|
40
46
|
end
|
@@ -7,6 +7,7 @@ module Avm
|
|
7
7
|
module Launcher
|
8
8
|
module Paths
|
9
9
|
class Logical
|
10
|
+
include ::Comparable
|
10
11
|
include ::EacRubyUtils::SimpleCache
|
11
12
|
|
12
13
|
class << self
|
@@ -25,6 +26,10 @@ module Avm
|
|
25
26
|
@logical = logical
|
26
27
|
end
|
27
28
|
|
29
|
+
def <=>(other)
|
30
|
+
[logical, real] <=> [other.logical, other.real]
|
31
|
+
end
|
32
|
+
|
28
33
|
def to_s
|
29
34
|
logical
|
30
35
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/app_src/configuration'
|
4
4
|
require 'eac_ruby_gems_utils/gem'
|
5
5
|
require 'eac_ruby_utils/core_ext'
|
6
6
|
|
@@ -13,7 +13,7 @@ module Avm
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def configuration_uncached
|
16
|
-
::Avm::
|
16
|
+
::Avm::AppSrc::Configuration.find_in_path(root)
|
17
17
|
end
|
18
18
|
|
19
19
|
def gemfile_path_uncached
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/app_src/configuration'
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module Ruby
|
@@ -22,7 +22,7 @@ module Avm
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def configuration_uncached
|
25
|
-
::Avm::
|
25
|
+
::Avm::AppSrc::Configuration.find_by_path(base_path)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/app_src/base'
|
4
|
+
require 'avm/app_src/configuration'
|
5
|
+
require 'avm/launcher/paths/real'
|
6
|
+
require 'avm/projects/stereotype/job_comparator'
|
7
|
+
require 'eac_ruby_utils/core_ext'
|
8
|
+
require 'avm/projects/stereotypes'
|
9
|
+
require 'i18n'
|
10
|
+
|
11
|
+
module Avm
|
12
|
+
module Tools
|
13
|
+
class AppSrc
|
14
|
+
enable_simple_cache
|
15
|
+
common_constructor :path do
|
16
|
+
self.path = path.to_pathname
|
17
|
+
source_stereotypes_mixins
|
18
|
+
end
|
19
|
+
|
20
|
+
delegate :to_s, to: :path
|
21
|
+
|
22
|
+
def locale
|
23
|
+
configuration.if_present(&:locale) || ::I18n.default_locale
|
24
|
+
end
|
25
|
+
|
26
|
+
# Backward compatibility with [Avm::Launcher::Paths::Logical].
|
27
|
+
# @return [Avm::Launcher::Paths::Real].
|
28
|
+
def real
|
29
|
+
::Avm::Launcher::Paths::Real.new(path.to_path)
|
30
|
+
end
|
31
|
+
|
32
|
+
def run_job(job, job_args = [])
|
33
|
+
stereotypes_jobs(job, job_args).each(&:run)
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def avm_instance_uncached
|
39
|
+
::Avm::AppSrc::Base.new(path)
|
40
|
+
end
|
41
|
+
|
42
|
+
# @return [Avm::Apps::Sources::Configuration]
|
43
|
+
def configuration_uncached
|
44
|
+
::Avm::AppSrc::Configuration.find_in_path(path)
|
45
|
+
end
|
46
|
+
|
47
|
+
def stereotypes_jobs(job, job_args)
|
48
|
+
job_class_method = "#{job}_class"
|
49
|
+
r = []
|
50
|
+
stereotypes.each do |stereotype|
|
51
|
+
r << stereotype.send(job_class_method).new(self, *job_args) if
|
52
|
+
stereotype.send(job_class_method).present?
|
53
|
+
end
|
54
|
+
r.sort { |a, b| ::Avm::Projects::Stereotype::JobComparator.new(a, b).result }
|
55
|
+
end
|
56
|
+
|
57
|
+
def stereotypes_uncached
|
58
|
+
::Avm::Projects::Stereotypes.list.select { |s| s.match?(self) }
|
59
|
+
end
|
60
|
+
|
61
|
+
def source_stereotypes_mixins
|
62
|
+
stereotypes.each do |s|
|
63
|
+
s.local_project_mixin_module.if_present { |v| singleton_class.include(v) }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -12,8 +12,22 @@ module Avm
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def run
|
15
|
-
infov 'Path',
|
16
|
-
infov 'Stereotypes',
|
15
|
+
infov 'Path', instance.path
|
16
|
+
infov 'Stereotypes', instance.stereotypes.map(&:label).join(', ')
|
17
|
+
show_subs
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def show_subs
|
23
|
+
infov 'Sub applications', instance.avm_instance.subs.count
|
24
|
+
instance.avm_instance.subs.each do |subapp|
|
25
|
+
infov ' * ', subapp.relative_path
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def instance
|
30
|
+
runner_context.call(:instance)
|
17
31
|
end
|
18
32
|
end
|
19
33
|
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_base0/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Tools
|
7
|
+
class Runner
|
8
|
+
class AppSrc
|
9
|
+
class Ruby
|
10
|
+
class Bundler
|
11
|
+
class GemfileLock
|
12
|
+
module Git
|
13
|
+
private
|
14
|
+
|
15
|
+
def git_continue
|
16
|
+
return unless check_capability(__method__, :git_repo, :continue)
|
17
|
+
|
18
|
+
infom "Adding \"#{gemfile_lock}\"..."
|
19
|
+
instance.git_repo.command('add', gemfile_lock).execute!
|
20
|
+
if rebase_conflict?
|
21
|
+
git_continue_run('rebase')
|
22
|
+
elsif cherry_conflict?
|
23
|
+
git_continue_run('cherry-pick')
|
24
|
+
else
|
25
|
+
raise 'Unknown how to continue'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def git_continue_run(command)
|
30
|
+
infom "\"#{command}\" --continue..."
|
31
|
+
cmd = instance.git_repo.command(command, '--continue')
|
32
|
+
.envvar('GIT_EDITOR', 'true')
|
33
|
+
return unless !cmd.system && !conflict?
|
34
|
+
|
35
|
+
fatal_error "\"#{cmd}\" failed and there is no conflict"
|
36
|
+
end
|
37
|
+
|
38
|
+
def git_reset_checkout
|
39
|
+
return unless check_capability(__method__, :git_repo, nil)
|
40
|
+
|
41
|
+
git_reset_gemfile_lock
|
42
|
+
git_checkout_gemfile_lock
|
43
|
+
end
|
44
|
+
|
45
|
+
def git_checkout_gemfile_lock
|
46
|
+
infom 'Checkouting...'
|
47
|
+
instance.git_repo.command('checkout', '--', gemfile_lock).system!
|
48
|
+
end
|
49
|
+
|
50
|
+
def git_reset_gemfile_lock
|
51
|
+
infom 'Reseting...'
|
52
|
+
instance.git_repo.command('reset', gemfile_lock).system! if
|
53
|
+
::File.exist?(gemfile_lock)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -9,18 +9,21 @@ module Avm
|
|
9
9
|
class Ruby
|
10
10
|
class Bundler
|
11
11
|
class GemfileLock
|
12
|
+
require_sub __FILE__, include_modules: true
|
12
13
|
runner_with :help do
|
13
14
|
desc 'Manipulage a "Gemfile.lock" file.'
|
14
15
|
bool_opt '-c', '--continue', 'Continue Git rebase/cherry-pick.'
|
15
16
|
bool_opt '-i', '--install', 'Run "bundle install".'
|
16
17
|
bool_opt '-u', '--update', 'Run "bundle update".'
|
17
18
|
bool_opt '-r', '--recursive', 'Run until Git rebase/cherry-pick is finished.'
|
18
|
-
bool_opt '-a', '--all', 'Same as "-
|
19
|
+
bool_opt '-a', '--all', 'Same as "-cirud".'
|
20
|
+
bool_opt '-d', '--delete', 'Delete Gemfile.lock'
|
19
21
|
end
|
20
22
|
|
21
23
|
def run
|
22
24
|
loop do
|
23
25
|
git_reset_checkout
|
26
|
+
delete_gemfile_lock
|
24
27
|
bundle_update
|
25
28
|
bundle_install
|
26
29
|
git_continue
|
@@ -34,17 +37,14 @@ module Avm
|
|
34
37
|
!option_or_all?(:recursive) || !conflict?
|
35
38
|
end
|
36
39
|
|
37
|
-
def
|
38
|
-
|
39
|
-
end
|
40
|
+
def delete_gemfile_lock
|
41
|
+
return unless check_capability(__method__, nil, :delete)
|
40
42
|
|
41
|
-
|
42
|
-
|
43
|
+
::FileUtils.rm_f(gemfile_lock)
|
44
|
+
end
|
43
45
|
|
44
|
-
|
45
|
-
instance.git_repo.
|
46
|
-
infom 'Checkouting...'
|
47
|
-
instance.git_repo.command('checkout', '--', gemfile_lock).system!
|
46
|
+
def rebasing?
|
47
|
+
instance.git_repo.root_path.join('.git', 'rebase-merge').exist?
|
48
48
|
end
|
49
49
|
|
50
50
|
def bundle_install
|
@@ -61,44 +61,14 @@ module Avm
|
|
61
61
|
bundle_run('update')
|
62
62
|
end
|
63
63
|
|
64
|
-
def git_continue
|
65
|
-
return unless check_capability(__method__, :git_repo, :continue)
|
66
|
-
|
67
|
-
infom "Adding \"#{gemfile_lock}\"..."
|
68
|
-
instance.git_repo.command('add', gemfile_lock).execute!
|
69
|
-
if rebase_conflict?
|
70
|
-
git_continue_run('rebase')
|
71
|
-
elsif cherry_conflict?
|
72
|
-
git_continue_run('cherry-pick')
|
73
|
-
else
|
74
|
-
raise 'Unknown how to continue'
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def git_continue_run(command)
|
79
|
-
infom "\"#{command}\" --continue..."
|
80
|
-
cmd = instance.git_repo.command(command, '--continue').envvar('GIT_EDITOR', 'true')
|
81
|
-
return unless !cmd.system && !conflict?
|
82
|
-
|
83
|
-
fatal_error "\"#{cmd}\" failed and there is no conflict"
|
84
|
-
end
|
85
|
-
|
86
64
|
def gemfile_lock
|
87
65
|
'Gemfile.lock'
|
88
66
|
end
|
89
67
|
|
90
|
-
def git_uncached
|
91
|
-
::EacGit::Local.new(git_path)
|
92
|
-
end
|
93
|
-
|
94
68
|
def bundle_run(*args)
|
95
69
|
instance.ruby_gem.bundle(*args).system!
|
96
70
|
end
|
97
71
|
|
98
|
-
def git_path
|
99
|
-
'.'
|
100
|
-
end
|
101
|
-
|
102
72
|
def conflict?
|
103
73
|
rebase_conflict? || cherry_conflict?
|
104
74
|
end
|
@@ -121,7 +91,7 @@ module Avm
|
|
121
91
|
|
122
92
|
def check_capability(caller, capability, option)
|
123
93
|
return false unless option.blank? || option_or_all?(option)
|
124
|
-
return true if instance.respond_to?(
|
94
|
+
return true if capability.if_present(true) { |v| instance.respond_to?(v) }
|
125
95
|
|
126
96
|
warn "Cannot run #{caller}: instance has no capability \"#{capability}\""
|
127
97
|
false
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/fs_cache'
|
4
3
|
require 'avm/ruby/bundler/incompatible_parser'
|
5
4
|
require 'eac_ruby_base0/core_ext'
|
6
5
|
|
@@ -36,9 +35,8 @@ module Avm
|
|
36
35
|
fs_cache.content_path
|
37
36
|
end
|
38
37
|
|
39
|
-
def
|
40
|
-
|
41
|
-
.child(instance.path.to_s.variableize)
|
38
|
+
def fs_cache
|
39
|
+
super.child(instance.path.to_s.variableize)
|
42
40
|
end
|
43
41
|
|
44
42
|
def gem_title(gem_in_conflict)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/app_src'
|
3
|
+
require 'avm/tools/app_src'
|
4
4
|
require 'eac_cli/core_ext'
|
5
5
|
|
6
6
|
module Avm
|
@@ -22,7 +22,7 @@ module Avm
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def instance_uncached
|
25
|
-
::Avm::AppSrc.new(instance_path)
|
25
|
+
::Avm::Tools::AppSrc.new(instance_path)
|
26
26
|
end
|
27
27
|
|
28
28
|
def instance_path_uncached
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/apps/config'
|
4
3
|
require 'avm/self'
|
5
4
|
require 'avm/tools/core_ext'
|
5
|
+
require 'eac_config/node'
|
6
6
|
|
7
7
|
module Avm
|
8
8
|
module Tools
|
@@ -23,7 +23,7 @@ module Avm
|
|
23
23
|
|
24
24
|
# @return [[EacCli::Config]]
|
25
25
|
def config_node
|
26
|
-
::
|
26
|
+
::EacConfig::Node.context.current
|
27
27
|
end
|
28
28
|
|
29
29
|
def run_add
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/apps/config'
|
4
3
|
require 'avm/launcher/git/base'
|
5
4
|
require 'avm/git/commit'
|
5
|
+
require 'eac_config/node'
|
6
6
|
|
7
7
|
module Avm
|
8
8
|
module Tools
|
@@ -91,7 +91,7 @@ module Avm
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def variables_source
|
94
|
-
instance || ::
|
94
|
+
instance || ::EacConfig::Node.context.current
|
95
95
|
end
|
96
96
|
|
97
97
|
def instance_uncached
|
@@ -6,16 +6,14 @@ module Avm
|
|
6
6
|
module Tools
|
7
7
|
class Runner
|
8
8
|
class Launcher
|
9
|
-
class Instances
|
10
|
-
runner_with :help do
|
9
|
+
class Instances
|
10
|
+
runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
|
11
11
|
desc 'Mostra informações sobre instâncias.'
|
12
|
-
bool_opt '--
|
13
|
-
bool_opt '--all', 'Get all instances.'
|
12
|
+
bool_opt '-e', '--extra', 'Show instances\' extra data.'
|
14
13
|
pos_arg :instance_path, repeat: true, optional: true
|
15
14
|
end
|
16
15
|
|
17
16
|
def run
|
18
|
-
::Avm::Launcher::Context.current.recache = parsed.recache?
|
19
17
|
instances.each { |i| show_instance(i) }
|
20
18
|
end
|
21
19
|
|
@@ -23,6 +21,10 @@ module Avm
|
|
23
21
|
|
24
22
|
def show_instance(instance)
|
25
23
|
puts instance_label(instance)
|
24
|
+
show_instance_extra(instance) if parsed.extra?
|
25
|
+
end
|
26
|
+
|
27
|
+
def show_instance_extra(instance)
|
26
28
|
infov(' * Parent', (instance.parent ? instance_label(instance.parent) : '-'))
|
27
29
|
infov(' * Git current revision', instance.options.git_current_revision)
|
28
30
|
infov(' * Git publish remote', instance.options.git_publish_remote)
|
@@ -7,15 +7,13 @@ module Avm
|
|
7
7
|
module Tools
|
8
8
|
class Runner
|
9
9
|
class Launcher
|
10
|
-
class Projects
|
11
|
-
runner_with :help do
|
10
|
+
class Projects
|
11
|
+
runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
|
12
12
|
desc 'Shows available projects.'
|
13
|
-
bool_opt '--recache', 'Rewrite instances cache.'
|
14
13
|
bool_opt '-i', '--instances', 'Show instances.'
|
15
14
|
end
|
16
15
|
|
17
16
|
def run
|
18
|
-
::Avm::Launcher::Context.current.recache = parsed.recache?
|
19
17
|
::Avm::Launcher::Context.current.projects.each do |p|
|
20
18
|
show_project(p)
|
21
19
|
end
|
@@ -6,21 +6,17 @@ module Avm
|
|
6
6
|
module Tools
|
7
7
|
class Runner
|
8
8
|
class Launcher
|
9
|
-
class Publish
|
10
|
-
runner_with :help do
|
9
|
+
class Publish
|
10
|
+
runner_with :help, ::Avm::Launcher::Instances::RunnerHelper do
|
11
11
|
desc 'Publica projetos ou instâncias.'
|
12
|
-
bool_opt '--all', 'Get all instances.'
|
13
12
|
bool_opt '-d', '--dry-run', '"Dry run" publishing.'
|
14
13
|
bool_opt '--new', 'Publish projects not published before.'
|
15
|
-
bool_opt '--pending', 'Publish only pending.'
|
16
|
-
bool_opt '--recache', 'Rewrite instances cache.'
|
17
14
|
bool_opt '--run', 'Confirm publishing.'
|
18
15
|
arg_opt '-s', '--stereotype', 'Publish only for stereotype <stereotype>.'
|
19
16
|
pos_arg :instance_path, repeat: true, optional: true
|
20
17
|
end
|
21
18
|
|
22
19
|
def run
|
23
|
-
::Avm::Launcher::Context.current.recache = parsed.recache?
|
24
20
|
build_publish_options
|
25
21
|
instances.each do |i|
|
26
22
|
next unless i.options.publishable?
|
data/lib/avm/tools/runner.rb
CHANGED
data/lib/avm/tools/version.rb
CHANGED
data/vendor/avm/avm.gemspec
CHANGED
@@ -13,7 +13,13 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'eac_docker', '~> 0.3'
|
16
|
+
s.add_dependency 'eac_git', '~> 0.6'
|
16
17
|
s.add_dependency 'eac_ruby_utils', '~> 0.68'
|
18
|
+
s.add_dependency 'eac_templates', '~> 0.1', '>= 0.1.1'
|
19
|
+
s.add_dependency 'filesize', '~> 0.2'
|
20
|
+
s.add_dependency 'htmlbeautifier', '~> 1.3', '>= 1.3.1'
|
21
|
+
s.add_dependency 'minitar', '~> 0.9'
|
17
22
|
|
23
|
+
s.add_development_dependency 'aranha-parsers', '~> 0.7', '>= 0.7.2'
|
18
24
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
|
19
25
|
end
|