eac_tools 0.102.1 → 0.103.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +46 -43
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +26 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/apache_host.rb +10 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/database.rb +27 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/files.rb +18 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +52 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/install.rb +43 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/nodejs.rb +19 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/web.rb +17 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +53 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +16 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +110 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/entity_base.rb +31 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/project.rb +21 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/root.rb +17 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/wiki_page.rb +50 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api.rb +10 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/docker.rb +15 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page/read.rb +25 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page/write.rb +68 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page.rb +26 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project.rb +22 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb +53 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb +32 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/core_update.rb +125 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/core_update.rb +61 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/docker.rb +16 -0
- data/sub/{avm-git/lib/avm/git → avm-eac_redmine_base0/lib/avm/eac_redmine_base0}/version.rb +2 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0.rb +16 -0
- data/sub/avm-eac_redmine_base0/locale/en.yml +6 -0
- data/sub/avm-eac_redmine_base0/locale/pt-BR.yml +6 -0
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec.rb +22 -0
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec_files/apache_host_spec_no_ssl_content.conf +11 -0
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec.rb +26 -0
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec_files/config.yml +10 -0
- data/sub/{avm-git → avm-eac_redmine_base0}/spec/spec_helper.rb +3 -2
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +45 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/secrets.yml +8 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template +37 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_host_dockerfile +8 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template +10 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template +16 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_path_dockerfile +5 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/start.sh.template +52 -0
- data/sub/eac_cli/Gemfile +8 -0
- data/sub/eac_cli/eac_cli.gemspec +23 -0
- data/sub/eac_cli/lib/eac_cli/config/entry/options.rb +55 -0
- data/sub/eac_cli/lib/eac_cli/config/entry/undefined.rb +26 -0
- data/sub/eac_cli/lib/eac_cli/config/entry.rb +55 -0
- data/sub/eac_cli/lib/eac_cli/config.rb +15 -0
- data/sub/eac_cli/lib/eac_cli/core_ext.rb +4 -0
- data/sub/eac_cli/lib/eac_cli/default_runner.rb +12 -0
- data/sub/eac_cli/lib/eac_cli/definition/alternative.rb +101 -0
- data/sub/eac_cli/lib/eac_cli/definition/argument_option.rb +19 -0
- data/sub/eac_cli/lib/eac_cli/definition/boolean_option.rb +25 -0
- data/sub/eac_cli/lib/eac_cli/definition/error.rb +8 -0
- data/sub/eac_cli/lib/eac_cli/definition/option/initialize_args_parser.rb +48 -0
- data/sub/eac_cli/lib/eac_cli/definition/option.rb +70 -0
- data/sub/eac_cli/lib/eac_cli/definition/option_or_positional.rb +41 -0
- data/sub/eac_cli/lib/eac_cli/definition/positional.rb +50 -0
- data/sub/eac_cli/lib/eac_cli/definition.rb +104 -0
- data/sub/eac_cli/lib/eac_cli/enum.rb +42 -0
- data/sub/eac_cli/lib/eac_cli/old_configs/entry_reader.rb +76 -0
- data/sub/eac_cli/lib/eac_cli/old_configs/password_entry_reader.rb +14 -0
- data/sub/eac_cli/lib/eac_cli/old_configs/read_entry_options.rb +42 -0
- data/sub/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb +23 -0
- data/sub/eac_cli/lib/eac_cli/old_configs.rb +31 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/any_options.rb +17 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/argv.rb +19 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/double_dash.rb +24 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/options.rb +29 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/positionals.rb +30 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +54 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative.rb +99 -0
- data/sub/eac_cli/lib/eac_cli/parser/collector.rb +52 -0
- data/sub/eac_cli/lib/eac_cli/parser/error.rb +13 -0
- data/sub/eac_cli/lib/eac_cli/parser.rb +32 -0
- data/sub/eac_cli/lib/eac_cli/patches/object/runner_with.rb +22 -0
- data/sub/eac_cli/lib/eac_cli/patches/object.rb +5 -0
- data/sub/{avm-git/lib/avm/git/issue.rb → eac_cli/lib/eac_cli/patches.rb} +0 -7
- data/sub/eac_cli/lib/eac_cli/rspec/setup.rb +41 -0
- data/sub/eac_cli/lib/eac_cli/rspec.rb +7 -0
- data/sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb +34 -0
- data/sub/eac_cli/lib/eac_cli/runner/class_runner.rb +32 -0
- data/sub/eac_cli/lib/eac_cli/runner/context.rb +57 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/base.rb +22 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/parent.rb +24 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/runner.rb +17 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/runner_missing_method.rb +29 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/set.rb +41 -0
- data/sub/{avm-git/lib/avm/git/launcher_stereotypes.rb → eac_cli/lib/eac_cli/runner/context_responders.rb} +3 -3
- data/sub/eac_cli/lib/eac_cli/runner/exit.rb +14 -0
- data/sub/eac_cli/lib/eac_cli/runner/for_context.rb +35 -0
- data/sub/eac_cli/lib/eac_cli/runner/instance_methods.rb +45 -0
- data/sub/eac_cli/lib/eac_cli/runner.rb +47 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/confirmation/input_result.rb +60 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/confirmation.rb +65 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/help/builder/alternative.rb +61 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/help/builder.rb +79 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/help/layout.rb +38 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/help.rb +51 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/input.rb +32 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output.rb +54 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_item/asciidoc_formatter.rb +70 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_item/base_formatter.rb +12 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_item/csv_formatter.rb +21 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_item/yaml_formatter.rb +16 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_item.rb +47 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_list/base_formatter.rb +44 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_list/csv_formatter.rb +24 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_list/tty_formatter.rb +34 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_list/yaml_formatter.rb +21 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/output_list.rb +39 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/subcommands/definition_concern.rb +10 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +124 -0
- data/sub/eac_cli/lib/eac_cli/runner_with.rb +7 -0
- data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +54 -0
- data/sub/eac_cli/lib/eac_cli/speaker/constants.rb +11 -0
- data/sub/eac_cli/lib/eac_cli/speaker/input_blocked.rb +14 -0
- data/sub/eac_cli/lib/eac_cli/speaker/input_requested.rb +8 -0
- data/sub/eac_cli/lib/eac_cli/speaker/list.rb +84 -0
- data/sub/eac_cli/lib/eac_cli/speaker/options.rb +42 -0
- data/sub/eac_cli/lib/eac_cli/speaker/request_from_list.rb +40 -0
- data/sub/eac_cli/lib/eac_cli/speaker.rb +114 -0
- data/sub/eac_cli/lib/eac_cli/version.rb +5 -0
- data/sub/eac_cli/lib/eac_cli.rb +14 -0
- data/sub/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +18 -0
- data/sub/eac_cli/spec/lib/eac_cli/old_configs_spec.rb +14 -0
- data/sub/eac_cli/spec/lib/eac_cli/parser/alternative/subcommands_spec.rb +58 -0
- data/sub/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +89 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner/for_context_spec.rb +79 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_spec.rb +129 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/confirmation/input_result_spec.rb +36 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/confirmation_spec.rb +42 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/help/layout_spec.rb +21 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb +51 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/output_list_spec.rb +57 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/output_spec.rb +81 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +99 -0
- data/sub/eac_cli/spec/lib/eac_cli/speaker_spec.rb +36 -0
- data/sub/eac_cli/spec/rubocop_spec.rb +3 -0
- data/sub/eac_cli/spec/spec_helper.rb +4 -0
- metadata +157 -130
- data/sub/avm-git/avm-git.gemspec +0 -25
- data/sub/avm-git/lib/avm/git/application_scms/base/assert_main_at.rb +0 -44
- data/sub/avm-git/lib/avm/git/application_scms/base.rb +0 -18
- data/sub/avm-git/lib/avm/git/application_scms.rb +0 -9
- data/sub/avm-git/lib/avm/git/commit/class_methods.rb +0 -29
- data/sub/avm-git/lib/avm/git/commit/diff_tree_line.rb +0 -32
- data/sub/avm-git/lib/avm/git/commit/file.rb +0 -42
- data/sub/avm-git/lib/avm/git/commit.rb +0 -57
- data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +0 -40
- data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +0 -20
- data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +0 -59
- data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +0 -37
- data/sub/avm-git/lib/avm/git/issue/complete/push.rb +0 -60
- data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +0 -33
- data/sub/avm-git/lib/avm/git/issue/complete/test.rb +0 -34
- data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +0 -21
- data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +0 -36
- data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +0 -54
- data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +0 -19
- data/sub/avm-git/lib/avm/git/issue/complete.rb +0 -66
- data/sub/avm-git/lib/avm/git/launcher/base/class_methods.rb +0 -28
- data/sub/avm-git/lib/avm/git/launcher/base/dirty_files.rb +0 -21
- data/sub/avm-git/lib/avm/git/launcher/base/remotes.rb +0 -37
- data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +0 -42
- data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +0 -54
- data/sub/avm-git/lib/avm/git/launcher/base.rb +0 -81
- data/sub/avm-git/lib/avm/git/launcher/error.rb +0 -13
- data/sub/avm-git/lib/avm/git/launcher/mirror_update.rb +0 -36
- data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +0 -127
- data/sub/avm-git/lib/avm/git/launcher/remote.rb +0 -53
- data/sub/avm-git/lib/avm/git/launcher/sub_warp_base.rb +0 -36
- data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +0 -63
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/local_project_mixin.rb +0 -16
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/publish.rb +0 -13
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/warp.rb +0 -25
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git.rb +0 -22
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +0 -29
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +0 -82
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +0 -32
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/publish.rb +0 -12
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/warp.rb +0 -29
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree.rb +0 -47
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +0 -17
- data/sub/avm-git/lib/avm/git/organize/reference_update.rb +0 -32
- data/sub/avm-git/lib/avm/git/organize/repository.rb +0 -74
- data/sub/avm-git/lib/avm/git/organize.rb +0 -9
- data/sub/avm-git/lib/avm/git/revision_test.rb +0 -102
- data/sub/avm-git/lib/avm/git/runners/base/commit.rb +0 -96
- data/sub/avm-git/lib/avm/git/runners/base/deploy.rb +0 -108
- data/sub/avm-git/lib/avm/git/runners/base/dirty_files.rb +0 -42
- data/sub/avm-git/lib/avm/git/runners/base/organize.rb +0 -72
- data/sub/avm-git/lib/avm/git/runners/base/revisions_test.rb +0 -63
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/check.rb +0 -45
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/clone.rb +0 -80
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/fix.rb +0 -69
- data/sub/avm-git/lib/avm/git/runners/base/subrepo.rb +0 -17
- data/sub/avm-git/lib/avm/git/runners/base.rb +0 -40
- data/sub/avm-git/lib/avm/git/runners.rb +0 -9
- data/sub/avm-git/lib/avm/git/scms/git/branch.rb +0 -28
- data/sub/avm-git/lib/avm/git/scms/git/branches.rb +0 -17
- data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +0 -34
- data/sub/avm-git/lib/avm/git/scms/git/changed_file.rb +0 -25
- data/sub/avm-git/lib/avm/git/scms/git/changed_files.rb +0 -21
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb +0 -37
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy_methods.rb +0 -24
- data/sub/avm-git/lib/avm/git/scms/git/commit.rb +0 -64
- data/sub/avm-git/lib/avm/git/scms/git/commit_dirty.rb +0 -32
- data/sub/avm-git/lib/avm/git/scms/git/commits.rb +0 -44
- data/sub/avm-git/lib/avm/git/scms/git/interval.rb +0 -28
- data/sub/avm-git/lib/avm/git/scms/git/milestones.rb +0 -18
- data/sub/avm-git/lib/avm/git/scms/git/remote.rb +0 -18
- data/sub/avm-git/lib/avm/git/scms/git/remotes.rb +0 -29
- data/sub/avm-git/lib/avm/git/scms/git/run_commit.rb +0 -54
- data/sub/avm-git/lib/avm/git/scms/git.rb +0 -46
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/changed_file.rb +0 -19
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/commit.rb +0 -23
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/interval.rb +0 -23
- data/sub/avm-git/lib/avm/git/scms/git_sub_base.rb +0 -30
- data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +0 -33
- data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +0 -29
- data/sub/avm-git/lib/avm/git/scms/provider.rb +0 -16
- data/sub/avm-git/lib/avm/git/scms.rb +0 -9
- data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +0 -48
- data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +0 -86
- data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +0 -30
- data/sub/avm-git/lib/avm/git/subrepo_check.rb +0 -36
- data/sub/avm-git/lib/avm/git/subrepo_checks.rb +0 -57
- data/sub/avm-git/lib/avm/git/vendor/github.rb +0 -20
- data/sub/avm-git/lib/avm/git/vendor.rb +0 -9
- data/sub/avm-git/lib/avm/git.rb +0 -16
- data/sub/avm-git/locale/en.yml +0 -6
- data/sub/avm-git/locale/pt-BR.yml +0 -6
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -13
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +0 -1
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +0 -7
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +0 -1
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +0 -7
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +0 -1
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +0 -7
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +0 -2
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +0 -13
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -2
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -13
- data/sub/avm-git/spec/lib/avm/git/commit_spec.rb +0 -56
- data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +0 -45
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec.rb +0 -83
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_files/config.yml +0 -5
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_settings.yml +0 -6
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec.rb +0 -53
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_files/config.yml +0 -3
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_settings.yml +0 -6
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec.rb +0 -126
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append1/stub3.txt.template +0 -1
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append2/stub4.txt +0 -1
- data/sub/avm-git/spec/lib/avm/git/scms/git/commit/deploy_spec.rb +0 -92
- data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +0 -8
- data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +0 -8
- data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +0 -23
- /data/sub/{avm-git → avm-eac_redmine_base0}/Gemfile +0 -0
- /data/sub/{avm-git → avm-eac_redmine_base0}/spec/rubocop_spec.rb +0 -0
@@ -1,82 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module LauncherStereotypes
|
6
|
-
class GitSubrepo
|
7
|
-
class Warp < ::Avm::Launcher::Paths::Real
|
8
|
-
include ::Avm::Git::Launcher::SubWarpBase
|
9
|
-
include ::EacRubyUtils::SimpleCache
|
10
|
-
|
11
|
-
attr_reader :instance
|
12
|
-
|
13
|
-
def initialize(instance)
|
14
|
-
@instance = instance
|
15
|
-
check_parent
|
16
|
-
init_aux
|
17
|
-
push_to_aux
|
18
|
-
reset
|
19
|
-
assert_target_remote
|
20
|
-
super(warped_git)
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def check_parent
|
26
|
-
return if parent_git_warped.rev_parse(subrepo_parent_hash) &&
|
27
|
-
parent_git_warped.descendant?('HEAD', subrepo_parent_hash)
|
28
|
-
|
29
|
-
raise Avm::Launcher::Errors::Base,
|
30
|
-
"Subrepo parent hash \"#{subrepo_parent_hash}\" " \
|
31
|
-
"not found in \"#{parent_git_warped}\""
|
32
|
-
end
|
33
|
-
|
34
|
-
def subrepo_parent_hash
|
35
|
-
data = parent_git_warped.subrepo_status(to_parent_git_path)
|
36
|
-
h = data['Pull Parent']
|
37
|
-
return h if h.present?
|
38
|
-
|
39
|
-
raise Avm::Launcher::Errors::Base, "Subrepo parent hash is blank: #{data}"
|
40
|
-
end
|
41
|
-
|
42
|
-
def init_aux
|
43
|
-
::Avm::Git::Launcher::Base.new(aux_path).init_bare
|
44
|
-
end
|
45
|
-
|
46
|
-
def parent_git_warped_uncached
|
47
|
-
::Avm::Git::Launcher::Base.new(parent_instance.warped)
|
48
|
-
end
|
49
|
-
|
50
|
-
def aux_path
|
51
|
-
instance.cache_path('subrepo_aux_git_repository')
|
52
|
-
end
|
53
|
-
|
54
|
-
def warped_git_uncached
|
55
|
-
::Avm::Git::Launcher::Base.new(instance.cache_path('git_repository'))
|
56
|
-
end
|
57
|
-
|
58
|
-
def push_to_aux
|
59
|
-
parent_git_warped.execute!('subrepo', 'branch', to_parent_git_path, '-fF')
|
60
|
-
h = parent_git_warped.rev_parse("subrepo/#{to_parent_git_path}", true)
|
61
|
-
parent_git_warped.execute!('push', aux_path, "#{h}:refs/heads/master", '--force')
|
62
|
-
end
|
63
|
-
|
64
|
-
def reset
|
65
|
-
::Avm::Git::Launcher::MirrorUpdate.new(warped_git, aux_path, 'master')
|
66
|
-
end
|
67
|
-
|
68
|
-
def assert_target_remote
|
69
|
-
warped_git.assert_remote_url(::Avm::Git::Launcher::WarpBase::TARGET_REMOTE,
|
70
|
-
target_remote_url)
|
71
|
-
end
|
72
|
-
|
73
|
-
def target_remote_url
|
74
|
-
::Avm::Git::Vendor::Github.to_ssh_url(
|
75
|
-
parent_git_warped.subrepo_remote_url(to_parent_git_path)
|
76
|
-
)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module LauncherStereotypes
|
6
|
-
class GitSubrepo
|
7
|
-
require_sub __FILE__
|
8
|
-
include Avm::Launcher::Stereotype
|
9
|
-
|
10
|
-
CONFIG_SUBPATH = '.gitrepo'
|
11
|
-
|
12
|
-
class << self
|
13
|
-
def match?(path)
|
14
|
-
File.exist?(path.real.subpath(CONFIG_SUBPATH)) && subrepo_url(path.real) != 'none'
|
15
|
-
end
|
16
|
-
|
17
|
-
def color
|
18
|
-
:light_cyan
|
19
|
-
end
|
20
|
-
|
21
|
-
def subrepo_url(path)
|
22
|
-
File.read(path.subpath(CONFIG_SUBPATH)).each_line do |l|
|
23
|
-
m = /remote\s*=\s(.+)/.match(l)
|
24
|
-
return m[1] if m
|
25
|
-
end
|
26
|
-
raise ::Avm::Git::Launcher::Error.new(path, '"remote = ... " not found')
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module LauncherStereotypes
|
6
|
-
class GitSubtree
|
7
|
-
class Warp < ::Avm::Git::Launcher::WarpBase
|
8
|
-
include ::Avm::Git::Launcher::SubWarpBase
|
9
|
-
|
10
|
-
private
|
11
|
-
|
12
|
-
def current_ref
|
13
|
-
instance.cache_key("git_subtree.parent.#{cache_git.git.object('HEAD').sha}") do
|
14
|
-
cache_git.subtree_split(to_parent_git_path)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def source_instance
|
19
|
-
parent_instance
|
20
|
-
end
|
21
|
-
|
22
|
-
def source_remote_name
|
23
|
-
instance.project_name
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module LauncherStereotypes
|
6
|
-
class GitSubtree
|
7
|
-
require_sub __FILE__
|
8
|
-
include Avm::Launcher::Stereotype
|
9
|
-
|
10
|
-
class << self
|
11
|
-
def match?(path)
|
12
|
-
return false if other_git_stereotype?(path)
|
13
|
-
return false unless other_nogit_stereotype?(path)
|
14
|
-
|
15
|
-
parent = parent_git(path.parent_path)
|
16
|
-
return false unless parent
|
17
|
-
|
18
|
-
::Git.open(parent.real).remote(path.real.basename).url ? true : false
|
19
|
-
end
|
20
|
-
|
21
|
-
def color
|
22
|
-
:green
|
23
|
-
end
|
24
|
-
|
25
|
-
def parent_git(parent_path)
|
26
|
-
return nil unless parent_path
|
27
|
-
|
28
|
-
if ::Avm::Git::LauncherStereotypes::Git.match?(parent_path)
|
29
|
-
parent_path
|
30
|
-
else
|
31
|
-
parent_git(parent_path.parent_path)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def other_git_stereotype?(path)
|
36
|
-
::Avm::Git::LauncherStereotypes::Git.match?(path) ||
|
37
|
-
::Avm::Git::LauncherStereotypes::GitSubrepo.match?(path)
|
38
|
-
end
|
39
|
-
|
40
|
-
def other_nogit_stereotype?(path)
|
41
|
-
Avm::Launcher::Stereotype.nogit_stereotypes.any? { |s| s.match?(path) }
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module LauncherStereotypes
|
6
|
-
class Provider
|
7
|
-
STEREOTYPES = [::Avm::Git::LauncherStereotypes::Git,
|
8
|
-
::Avm::Git::LauncherStereotypes::GitSubrepo,
|
9
|
-
::Avm::Git::LauncherStereotypes::GitSubtree].freeze
|
10
|
-
|
11
|
-
def all
|
12
|
-
STEREOTYPES
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module Organize
|
6
|
-
class ReferenceUpdate
|
7
|
-
enable_listable
|
8
|
-
lists.add_symbol :operation, :remove
|
9
|
-
|
10
|
-
common_constructor :repository, :reference, :operation
|
11
|
-
|
12
|
-
def run_operation
|
13
|
-
send("run_operation_#{operation}")
|
14
|
-
end
|
15
|
-
|
16
|
-
def to_s
|
17
|
-
"#{reference} [#{operation}]"
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def reference_pathname
|
23
|
-
repository.refs_root.join(reference)
|
24
|
-
end
|
25
|
-
|
26
|
-
def run_operation_remove
|
27
|
-
reference_pathname.unlink
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module Organize
|
6
|
-
class Repository
|
7
|
-
enable_simple_cache
|
8
|
-
common_constructor :eac_git_local
|
9
|
-
|
10
|
-
def collected_references
|
11
|
-
@collected_references || []
|
12
|
-
end
|
13
|
-
|
14
|
-
def collect_subrepos
|
15
|
-
collect_references_with_pattern(
|
16
|
-
%r{\Asubrepo/},
|
17
|
-
::Avm::Git::Organize::ReferenceUpdate::OPERATION_REMOVE
|
18
|
-
)
|
19
|
-
collect_references_with_pattern(
|
20
|
-
%r{\Aheads/subrepo/},
|
21
|
-
::Avm::Git::Organize::ReferenceUpdate::OPERATION_REMOVE
|
22
|
-
)
|
23
|
-
end
|
24
|
-
|
25
|
-
def collect_originals
|
26
|
-
collect_references_with_pattern(
|
27
|
-
%r{\Aoriginal/},
|
28
|
-
::Avm::Git::Organize::ReferenceUpdate::OPERATION_REMOVE
|
29
|
-
)
|
30
|
-
end
|
31
|
-
|
32
|
-
def all_branches
|
33
|
-
eac_git_local.execute!
|
34
|
-
end
|
35
|
-
|
36
|
-
delegate :to_s, to: :eac_git_local
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
def all_references
|
41
|
-
::Pathname.glob("#{refs_root}/**/*").select(&:file?)
|
42
|
-
.map { |p| p.relative_path_from(refs_root).to_path }
|
43
|
-
end
|
44
|
-
|
45
|
-
def reference_update_by_ref(reference)
|
46
|
-
collected_references.find { |ru| ru.reference == reference }
|
47
|
-
end
|
48
|
-
|
49
|
-
def collect_reference(reference, operation)
|
50
|
-
new_ru = ::Avm::Git::Organize::ReferenceUpdate.new(self, reference, operation)
|
51
|
-
reference_update_by_ref(new_ru.reference).if_present do |ru_found|
|
52
|
-
raise "Reference #{new_ru} already added (#{ru_found})"
|
53
|
-
end
|
54
|
-
@collected_references ||= []
|
55
|
-
@collected_references << new_ru
|
56
|
-
end
|
57
|
-
|
58
|
-
def collect_references_with_pattern(pattern, operation)
|
59
|
-
references_with_pattern(pattern).each do |reference|
|
60
|
-
collect_reference(reference, operation)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def references_with_pattern(pattern)
|
65
|
-
all_references.select { |reference| pattern.if_match(reference, false) }
|
66
|
-
end
|
67
|
-
|
68
|
-
def refs_root_uncached
|
69
|
-
eac_git_local.root_path / '.git' / 'refs'
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
@@ -1,102 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
class RevisionTest
|
6
|
-
enable_simple_cache
|
7
|
-
enable_speaker
|
8
|
-
common_constructor :git, :sha1, :options
|
9
|
-
|
10
|
-
def banner
|
11
|
-
infov 'Revision to test', sha1
|
12
|
-
::EacRubyUtils::Speaker.context.on(::EacCli::Speaker.new(err_line_prefix: ' ')) do
|
13
|
-
revision_banner
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def successful_label
|
18
|
-
successful?.to_s.send((successful? ? :green : :red))
|
19
|
-
end
|
20
|
-
|
21
|
-
def to_s
|
22
|
-
sha1
|
23
|
-
end
|
24
|
-
|
25
|
-
def successful?
|
26
|
-
successful
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def checkout_revision
|
32
|
-
infom 'Checking out revision...'
|
33
|
-
git.execute!('checkout', sha1)
|
34
|
-
end
|
35
|
-
|
36
|
-
def commit_uncached
|
37
|
-
::Avm::Git::Commit.new(git, sha1)
|
38
|
-
end
|
39
|
-
|
40
|
-
def git_absolute_path
|
41
|
-
::File.expand_path(git.to_s)
|
42
|
-
end
|
43
|
-
|
44
|
-
def revision_banner
|
45
|
-
infov '* Subject', commit.subject
|
46
|
-
infov '* Success?', successful_label
|
47
|
-
infov '* STDOUT', stdout_cache.content_path
|
48
|
-
infov '* STDERR', stderr_cache.content_path
|
49
|
-
end
|
50
|
-
|
51
|
-
def root_cache
|
52
|
-
fs_cache.child(git_absolute_path.parameterize, sha1,
|
53
|
-
options.fetch(:test_command).to_s.parameterize)
|
54
|
-
end
|
55
|
-
|
56
|
-
def run_test
|
57
|
-
infom "Running test command \"#{::Shellwords.join(test_command_args)}\" " \
|
58
|
-
"on \"#{git_absolute_path}\"..."
|
59
|
-
result = ::EacRubyUtils::Ruby.on_clean_environment { test_command.execute }
|
60
|
-
infom 'Test done'
|
61
|
-
write_result_cache(result)
|
62
|
-
end
|
63
|
-
|
64
|
-
def stdout_cache
|
65
|
-
root_cache.child('stdout')
|
66
|
-
end
|
67
|
-
|
68
|
-
def stderr_cache
|
69
|
-
root_cache.child('stderr')
|
70
|
-
end
|
71
|
-
|
72
|
-
def successful_cache
|
73
|
-
root_cache.child('successful')
|
74
|
-
end
|
75
|
-
|
76
|
-
def successful_uncached # rubocop:disable Naming/PredicateMethod
|
77
|
-
if options.fetch(:no_cache) || !successful_cache.stored?
|
78
|
-
checkout_revision
|
79
|
-
run_test
|
80
|
-
end
|
81
|
-
successful_cache.read == 'true'
|
82
|
-
end
|
83
|
-
|
84
|
-
def test_command
|
85
|
-
::EacRubyUtils::Envs.local.command(*test_command_args).chdir(git.to_s)
|
86
|
-
end
|
87
|
-
|
88
|
-
def test_command_args
|
89
|
-
r = ::Shellwords.split(options.fetch(:test_command).to_s)
|
90
|
-
return r if r.any?
|
91
|
-
|
92
|
-
raise 'No command found'
|
93
|
-
end
|
94
|
-
|
95
|
-
def write_result_cache(result)
|
96
|
-
stdout_cache.write(result[:stdout])
|
97
|
-
stderr_cache.write(result[:stderr])
|
98
|
-
successful_cache.write(result[:exit_code].zero? ? 'true' : 'false')
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
@@ -1,96 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module Runners
|
6
|
-
class Base
|
7
|
-
class Commit
|
8
|
-
runner_with :help do
|
9
|
-
desc 'Mostra informações de um commit.'
|
10
|
-
bool_opt '-f', '--files', 'Mostra os arquivos.'
|
11
|
-
bool_opt '-s', '--size', 'Mostra o tamanho de arquivos.'
|
12
|
-
pos_arg :ref
|
13
|
-
end
|
14
|
-
|
15
|
-
def run
|
16
|
-
input_banner
|
17
|
-
validate
|
18
|
-
main_info_banner
|
19
|
-
files_banner
|
20
|
-
size_banner
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def input_banner
|
26
|
-
infov 'Repository', git
|
27
|
-
infov 'Reference', reference
|
28
|
-
end
|
29
|
-
|
30
|
-
def validate
|
31
|
-
return if reference_id.present?
|
32
|
-
|
33
|
-
fatal_error "Object ID not found for reference \"#{reference}\""
|
34
|
-
end
|
35
|
-
|
36
|
-
def main_info_banner
|
37
|
-
infov 'Reference ID', reference_id
|
38
|
-
infov 'Subject', commit.subject
|
39
|
-
infov 'Author', commit.author_all
|
40
|
-
infov 'Commiter', commit.commiter_all
|
41
|
-
infov 'Files', commit.files.count
|
42
|
-
end
|
43
|
-
|
44
|
-
def size_banner
|
45
|
-
return unless show_size?
|
46
|
-
|
47
|
-
infov 'Total files size', bytes_size(commit.files_size)
|
48
|
-
end
|
49
|
-
|
50
|
-
def files_banner
|
51
|
-
return unless parsed.files?
|
52
|
-
|
53
|
-
commit.files.each do |file|
|
54
|
-
infov " #{file.path}", file_value(file)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def file_value(file)
|
59
|
-
s = file.status
|
60
|
-
s += ", #{bytes_size(file.dst_size)}" if show_size?
|
61
|
-
s
|
62
|
-
end
|
63
|
-
|
64
|
-
def reference_id
|
65
|
-
git.rev_parse(reference)
|
66
|
-
end
|
67
|
-
|
68
|
-
def reference
|
69
|
-
parsed.ref
|
70
|
-
end
|
71
|
-
|
72
|
-
def git_uncached
|
73
|
-
::Avm::Git::Launcher::Base.new(runner_context.call(:repository_path))
|
74
|
-
end
|
75
|
-
|
76
|
-
def commit_uncached
|
77
|
-
::Avm::Git::Commit.new(git, reference_id)
|
78
|
-
end
|
79
|
-
|
80
|
-
def human_files_size
|
81
|
-
::Filesize.from("#{commit.files_size} B").pretty
|
82
|
-
end
|
83
|
-
|
84
|
-
def bytes_size(size)
|
85
|
-
b = "#{size} B"
|
86
|
-
"#{::Filesize.from(b).pretty} (#{b})"
|
87
|
-
end
|
88
|
-
|
89
|
-
def show_size?
|
90
|
-
parsed.size?
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
@@ -1,108 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module Runners
|
6
|
-
class Base
|
7
|
-
class Deploy
|
8
|
-
DEFAULT_REFERENCE = 'HEAD'
|
9
|
-
|
10
|
-
runner_with :help do
|
11
|
-
desc 'Deploy a Git revision to a location (Local or remote).'
|
12
|
-
arg_opt '-a', '--append-dirs', 'Append directories to deploy (List separated by ":").'
|
13
|
-
arg_opt '-i', '--instance', 'Read entries from instance with id=<instance-id>.'
|
14
|
-
arg_opt '-r', '--reference', "Reference (default: #{DEFAULT_REFERENCE})."
|
15
|
-
pos_arg :target_url, optional: true
|
16
|
-
end
|
17
|
-
|
18
|
-
def run
|
19
|
-
input_banner
|
20
|
-
validate
|
21
|
-
main_info_banner
|
22
|
-
deploy
|
23
|
-
success 'Done'
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def input_banner
|
29
|
-
infov 'Repository', git
|
30
|
-
infov 'Reference', reference
|
31
|
-
infov 'Instance ID', instance_id.if_present('- BLANK -')
|
32
|
-
infov 'Appended directories', appended_directories
|
33
|
-
infov 'Target URL', target_url
|
34
|
-
end
|
35
|
-
|
36
|
-
def validate
|
37
|
-
if reference_sha1.blank?
|
38
|
-
fatal_error "Object ID not found for reference \"#{reference}\""
|
39
|
-
end
|
40
|
-
fatal_error 'Nor <target-url> nor --instance was setted' if target_url.blank?
|
41
|
-
end
|
42
|
-
|
43
|
-
def main_info_banner
|
44
|
-
infov 'Reference SHA1', reference_sha1
|
45
|
-
end
|
46
|
-
|
47
|
-
def reference_sha1_uncached
|
48
|
-
git.git_repo.rev_parse(reference)
|
49
|
-
end
|
50
|
-
|
51
|
-
def reference
|
52
|
-
parsed.reference || DEFAULT_REFERENCE
|
53
|
-
end
|
54
|
-
|
55
|
-
def git_uncached
|
56
|
-
::Avm::Git::Scms::Git.new(git_repository_path)
|
57
|
-
end
|
58
|
-
|
59
|
-
def git_repository_path
|
60
|
-
if runner_context.call(:repository_path) || dev_instance_fs_path.blank?
|
61
|
-
return runner_context.call(:repository_path)
|
62
|
-
end
|
63
|
-
|
64
|
-
dev_instance_fs_path
|
65
|
-
end
|
66
|
-
|
67
|
-
def dev_instance_fs_path
|
68
|
-
instance.if_present do |v|
|
69
|
-
v.application.instance('dev').read_entry_optional(
|
70
|
-
::Avm::Instances::EntryKeys::INSTALL_PATH
|
71
|
-
)
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
def deploy
|
76
|
-
git.commit(reference_sha1)
|
77
|
-
.deploy_to_url(target_url)
|
78
|
-
.append_templatized_directories(appended_directories)
|
79
|
-
.variables_source_set(variables_source)
|
80
|
-
.run
|
81
|
-
end
|
82
|
-
|
83
|
-
def target_url
|
84
|
-
parsed.target_url.if_present { |v| return v }
|
85
|
-
instance.if_present { |v| return v.install_url }
|
86
|
-
nil
|
87
|
-
end
|
88
|
-
|
89
|
-
def variables_source
|
90
|
-
instance || ::EacConfig::Node.context.current
|
91
|
-
end
|
92
|
-
|
93
|
-
def instance_uncached
|
94
|
-
instance_id.if_present { |v| ::Avm::Instances::Base.by_id(v) }
|
95
|
-
end
|
96
|
-
|
97
|
-
def instance_id
|
98
|
-
parsed.instance
|
99
|
-
end
|
100
|
-
|
101
|
-
def appended_directories
|
102
|
-
parsed.append_dirs.to_s.split(':')
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Git
|
5
|
-
module Runners
|
6
|
-
class Base
|
7
|
-
class DirtyFiles
|
8
|
-
DEFAULT_FORMAT = '%p'
|
9
|
-
FIELDS = {
|
10
|
-
i: :index, w: :worktree, p: :path, a: :absolute_path
|
11
|
-
}.transform_keys { |k| "%#{k}" }
|
12
|
-
|
13
|
-
runner_with :help do
|
14
|
-
desc 'Lists dirty files in Git repository.'
|
15
|
-
arg_opt '-f', '--format',
|
16
|
-
"Format of each line (See \"Format fields\") [default: #{DEFAULT_FORMAT}]."
|
17
|
-
end
|
18
|
-
|
19
|
-
def help_extra_text
|
20
|
-
"Format fields:\n" + FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n") # rubocop:disable Style/StringConcatenation
|
21
|
-
end
|
22
|
-
|
23
|
-
def run
|
24
|
-
runner_context.call(:git).dirty_files.each do |file|
|
25
|
-
out("#{format_file(file)}\n")
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def format
|
32
|
-
parsed.format || DEFAULT_FORMAT
|
33
|
-
end
|
34
|
-
|
35
|
-
def format_file(file)
|
36
|
-
FIELDS.inject(format) { |a, e| a.gsub(e.first, file.send(e.last)) }
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|