eac_tools 0.100.0 → 0.101.0
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 +29 -19
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +2 -2
- data/sub/avm/lib/avm/applications/base/local_instance.rb +0 -2
- data/sub/avm/lib/avm/applications/base/local_source.rb +0 -1
- data/sub/avm/lib/avm/applications/base/organization.rb +0 -2
- data/sub/avm/lib/avm/applications/base/publishing.rb +0 -2
- data/sub/avm/lib/avm/applications/base/scm.rb +0 -2
- data/sub/avm/lib/avm/applications/base/stereotype.rb +0 -2
- data/sub/avm/lib/avm/applications/base.rb +0 -2
- data/sub/avm/lib/avm/data/clearer.rb +0 -2
- data/sub/avm/lib/avm/data/dumper.rb +0 -3
- data/sub/avm/lib/avm/data/loader.rb +0 -3
- data/sub/avm/lib/avm/data/package/clear.rb +0 -2
- data/sub/avm/lib/avm/data/package/dump.rb +0 -3
- data/sub/avm/lib/avm/data/package/load.rb +0 -3
- data/sub/avm/lib/avm/data/package.rb +0 -2
- data/sub/avm/lib/avm/data/performer.rb +0 -2
- data/sub/avm/lib/avm/data/unit.rb +0 -2
- data/sub/avm/lib/avm/data/unit_with_commands.rb +0 -3
- data/sub/avm/lib/avm/docker/image.rb +0 -3
- data/sub/avm/lib/avm/entries/auto_values/uri_entry.rb +0 -2
- data/sub/avm/lib/avm/entries/base/inherited_entry_value.rb +0 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/default_value.rb +0 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb +0 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/url_entry_value.rb +0 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value.rb +0 -1
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/generic_component.rb +0 -3
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/path_component.rb +0 -2
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/url_component.rb +0 -3
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values.rb +0 -2
- data/sub/avm/lib/avm/entries/base.rb +0 -2
- data/sub/avm/lib/avm/entries/entry.rb +0 -1
- data/sub/avm/lib/avm/entries/jobs/base.rb +0 -2
- data/sub/avm/lib/avm/entries/jobs/with_variables_source.rb +0 -2
- data/sub/avm/lib/avm/file_formats/file_result.rb +0 -1
- data/sub/avm/lib/avm/file_formats/search_formatter.rb +0 -2
- data/sub/avm/lib/avm/file_formats/unknown.rb +0 -2
- data/sub/avm/lib/avm/files/appendable/file_content.rb +0 -1
- data/sub/avm/lib/avm/files/appendable/plain_directory.rb +0 -1
- data/sub/avm/lib/avm/files/appendable/tar_output_command.rb +0 -1
- data/sub/avm/lib/avm/files/appendable/templatized_directory.rb +1 -1
- data/sub/avm/lib/avm/files/appender.rb +0 -2
- data/sub/avm/lib/avm/files/deploy.rb +1 -1
- data/sub/avm/lib/avm/instances/base/auto_values/data.rb +0 -2
- data/sub/avm/lib/avm/instances/base/auto_values/database.rb +0 -2
- data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +0 -4
- data/sub/avm/lib/avm/instances/base/auto_values/source.rb +0 -2
- data/sub/avm/lib/avm/instances/base/dockerizable.rb +0 -2
- data/sub/avm/lib/avm/instances/base/entry_keys.rb +0 -2
- data/sub/avm/lib/avm/instances/base/install.rb +0 -3
- data/sub/avm/lib/avm/instances/base/production.rb +0 -1
- data/sub/avm/lib/avm/instances/base/web.rb +0 -1
- data/sub/avm/lib/avm/instances/base.rb +1 -8
- data/sub/avm/lib/avm/instances/data/files_unit.rb +0 -2
- data/sub/avm/lib/avm/instances/data/package.rb +0 -2
- data/sub/avm/lib/avm/instances/data/unit.rb +0 -3
- data/sub/avm/lib/avm/instances/docker_image.rb +0 -2
- data/sub/avm/lib/avm/instances/entry_keys.rb +0 -3
- data/sub/avm/lib/avm/instances/runner.rb +0 -1
- data/sub/avm/lib/avm/launcher/context/instance_discovery/root_instance_paths.rb +0 -1
- data/sub/avm/lib/avm/launcher/context/instance_discovery.rb +0 -1
- data/sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb +0 -2
- data/sub/avm/lib/avm/launcher/context/instance_manager/cached_instances.rb +0 -2
- data/sub/avm/lib/avm/launcher/context/instance_manager.rb +0 -1
- data/sub/avm/lib/avm/launcher/context/settings.rb +0 -2
- data/sub/avm/lib/avm/launcher/context.rb +1 -5
- data/sub/avm/lib/avm/launcher/errors/non_project.rb +0 -2
- data/sub/avm/lib/avm/launcher/instances/base.rb +0 -3
- data/sub/avm/lib/avm/launcher/instances/runner_helper.rb +0 -3
- data/sub/avm/lib/avm/launcher/paths/logical.rb +0 -3
- data/sub/avm/lib/avm/launcher/publish/base.rb +0 -2
- data/sub/avm/lib/avm/registry/application_scms.rb +0 -2
- data/sub/avm/lib/avm/registry/application_stereotypes/build_available.rb +0 -3
- data/sub/avm/lib/avm/registry/application_stereotypes/stereotype_builder.rb +0 -2
- data/sub/avm/lib/avm/registry/application_stereotypes.rb +0 -3
- data/sub/avm/lib/avm/registry/applications.rb +0 -2
- data/sub/avm/lib/avm/registry/file_formats.rb +0 -3
- data/sub/avm/lib/avm/registry/instances.rb +0 -3
- data/sub/avm/lib/avm/registry/launcher_stereotypes.rb +0 -2
- data/sub/avm/lib/avm/registry/runners.rb +0 -2
- data/sub/avm/lib/avm/registry/scms.rb +0 -2
- data/sub/avm/lib/avm/registry/source_generators.rb +0 -3
- data/sub/avm/lib/avm/registry/sources.rb +0 -2
- data/sub/avm/lib/avm/registry/with_path/cache.rb +0 -2
- data/sub/avm/lib/avm/registry/with_path.rb +0 -2
- data/sub/avm/lib/avm/rspec/launcher_controller.rb +0 -1
- data/sub/avm/lib/avm/rspec/setup/launcher.rb +0 -2
- data/sub/avm/lib/avm/rspec/setup.rb +0 -3
- data/sub/avm/lib/avm/rspec/shared_examples/avm_file_formats_with_fixtures.rb +0 -2
- data/sub/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb +0 -2
- data/sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +0 -2
- data/sub/avm/lib/avm/rspec/shared_examples/with_launcher.rb +0 -2
- data/sub/avm/lib/avm/runner_with/file_replacer.rb +0 -2
- data/sub/avm/lib/avm/scms/auto_commit/file_resource_name.rb +13 -3
- data/sub/avm/lib/avm/scms/auto_commit/for_file.rb +0 -2
- data/sub/avm/lib/avm/scms/auto_commit/rules/base.rb +0 -2
- data/sub/avm/lib/avm/scms/auto_commit/rules/last.rb +0 -2
- data/sub/avm/lib/avm/scms/auto_commit/rules/manual.rb +0 -2
- data/sub/avm/lib/avm/scms/auto_commit/rules/new.rb +1 -4
- data/sub/avm/lib/avm/scms/auto_commit/rules/nth.rb +0 -2
- data/sub/avm/lib/avm/scms/auto_commit/rules/unique.rb +0 -2
- data/sub/avm/lib/avm/scms/base.rb +0 -2
- data/sub/avm/lib/avm/scms/changed_file.rb +22 -0
- data/sub/avm/lib/avm/scms/null/commit.rb +0 -3
- data/sub/avm/lib/avm/scms/null.rb +0 -2
- data/sub/avm/lib/avm/self/docker_image.rb +0 -2
- data/sub/avm/lib/avm/self/instance.rb +0 -4
- data/sub/avm/lib/avm/source_generators/base.rb +0 -3
- data/sub/avm/lib/avm/source_generators/option_list.rb +0 -2
- data/sub/avm/lib/avm/source_generators/runner.rb +0 -1
- data/sub/avm/lib/avm/sources/base/application.rb +0 -1
- data/sub/avm/lib/avm/sources/base/instance.rb +0 -3
- data/sub/avm/lib/avm/sources/base/sub.rb +0 -2
- data/sub/avm/lib/avm/sources/base/subs.rb +0 -3
- data/sub/avm/lib/avm/sources/base/version_bump.rb +0 -2
- data/sub/avm/lib/avm/sources/base.rb +0 -5
- data/sub/avm/lib/avm/sources/tests/builder.rb +0 -3
- data/sub/avm/lib/avm/sources/tests/performer.rb +0 -2
- data/sub/avm/lib/avm/sources/tests/single.rb +0 -2
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/spec/lib/avm/scms/auto_commit/file_resource_name_spec.rb +2 -1
- data/sub/avm/spec/spec_helper.rb +3 -0
- data/sub/avm-git/Gemfile +8 -0
- data/sub/avm-git/avm-git.gemspec +25 -0
- data/sub/avm-git/lib/avm/git/application_scms/base/assert_main_at.rb +44 -0
- data/sub/avm-git/lib/avm/git/application_scms/base.rb +18 -0
- data/sub/avm-git/lib/avm/git/application_scms.rb +9 -0
- data/sub/avm-git/lib/avm/git/commit/class_methods.rb +29 -0
- data/sub/avm-git/lib/avm/git/commit/diff_tree_line.rb +32 -0
- data/sub/avm-git/lib/avm/git/commit/file.rb +42 -0
- data/sub/avm-git/lib/avm/git/commit.rb +57 -0
- data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +40 -0
- data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +20 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +59 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +37 -0
- data/sub/avm-git/lib/avm/git/issue/complete/push.rb +60 -0
- data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +33 -0
- data/sub/avm-git/lib/avm/git/issue/complete/test.rb +34 -0
- data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +21 -0
- data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +36 -0
- data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +49 -0
- data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +19 -0
- data/sub/avm-git/lib/avm/git/issue/complete.rb +66 -0
- data/sub/avm-git/lib/avm/git/issue.rb +10 -0
- data/sub/avm-git/lib/avm/git/launcher/base/class_methods.rb +28 -0
- data/sub/avm-git/lib/avm/git/launcher/base/dirty_files.rb +21 -0
- data/sub/avm-git/lib/avm/git/launcher/base/remotes.rb +37 -0
- data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +42 -0
- data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +54 -0
- data/sub/avm-git/lib/avm/git/launcher/base.rb +81 -0
- data/sub/avm-git/lib/avm/git/launcher/error.rb +13 -0
- data/sub/avm-git/lib/avm/git/launcher/mirror_update.rb +36 -0
- data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +127 -0
- data/sub/avm-git/lib/avm/git/launcher/remote.rb +53 -0
- data/sub/avm-git/lib/avm/git/launcher/sub_warp_base.rb +30 -0
- data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +63 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/local_project_mixin.rb +16 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/publish.rb +13 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/warp.rb +25 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git.rb +22 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +29 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +82 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +32 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/publish.rb +12 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/warp.rb +29 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree.rb +47 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +17 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes.rb +9 -0
- data/sub/avm-git/lib/avm/git/organize/reference_update.rb +32 -0
- data/sub/avm-git/lib/avm/git/organize/repository.rb +74 -0
- data/sub/avm-git/lib/avm/git/organize.rb +9 -0
- data/sub/avm-git/lib/avm/git/revision_test.rb +102 -0
- data/sub/avm-git/lib/avm/git/runners/base/commit.rb +96 -0
- data/sub/avm-git/lib/avm/git/runners/base/deploy.rb +108 -0
- data/sub/avm-git/lib/avm/git/runners/base/dirty_files.rb +42 -0
- data/sub/avm-git/lib/avm/git/runners/base/organize.rb +72 -0
- data/sub/avm-git/lib/avm/git/runners/base/revisions_test.rb +63 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/check.rb +45 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/clone.rb +80 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/fix.rb +69 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo.rb +17 -0
- data/sub/avm-git/lib/avm/git/runners/base.rb +40 -0
- data/sub/avm-git/lib/avm/git/runners.rb +9 -0
- data/sub/avm-git/lib/avm/git/scms/git/branch.rb +28 -0
- data/sub/avm-git/lib/avm/git/scms/git/branches.rb +17 -0
- data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +34 -0
- data/sub/avm-git/lib/avm/git/scms/git/changed_file.rb +25 -0
- data/sub/avm-git/lib/avm/git/scms/git/changed_files.rb +21 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb +37 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy_methods.rb +24 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit.rb +64 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit_dirty.rb +32 -0
- data/sub/avm-git/lib/avm/git/scms/git/commits.rb +44 -0
- data/sub/avm-git/lib/avm/git/scms/git/interval.rb +28 -0
- data/sub/avm-git/lib/avm/git/scms/git/milestones.rb +18 -0
- data/sub/avm-git/lib/avm/git/scms/git/remote.rb +18 -0
- data/sub/avm-git/lib/avm/git/scms/git/remotes.rb +29 -0
- data/sub/avm-git/lib/avm/git/scms/git/run_commit.rb +54 -0
- data/sub/avm-git/lib/avm/git/scms/git.rb +46 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/changed_file.rb +19 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/commit.rb +23 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/interval.rb +23 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base.rb +30 -0
- data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +33 -0
- data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +29 -0
- data/sub/avm-git/lib/avm/git/scms/provider.rb +16 -0
- data/sub/avm-git/lib/avm/git/scms.rb +9 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +48 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +86 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +30 -0
- data/sub/avm-git/lib/avm/git/subrepo_check.rb +36 -0
- data/sub/avm-git/lib/avm/git/subrepo_checks.rb +57 -0
- data/sub/avm-git/lib/avm/git/vendor/github.rb +20 -0
- data/sub/avm-git/lib/avm/git/vendor.rb +9 -0
- data/sub/avm-git/lib/avm/git/version.rb +7 -0
- data/sub/avm-git/lib/avm/git.rb +16 -0
- data/sub/avm-git/locale/en.yml +6 -0
- data/sub/avm-git/locale/pt-BR.yml +6 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec.rb +13 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +1 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +1 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +1 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +2 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
- data/sub/avm-git/spec/lib/avm/git/commit_spec.rb +56 -0
- data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +45 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec.rb +83 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_files/config.yml +5 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_settings.yml +6 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec.rb +53 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_files/config.yml +3 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_settings.yml +6 -0
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec.rb +126 -0
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append1/stub3.txt.template +1 -0
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append2/stub4.txt +1 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git/commit/deploy_spec.rb +92 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +8 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +8 -0
- data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +23 -0
- data/sub/avm-git/spec/rubocop_spec.rb +3 -0
- data/sub/avm-git/spec/spec_helper.rb +5 -0
- data/sub/avm-tools/avm-tools.gemspec +3 -3
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/avm-tools/spec/spec_helper.rb +2 -0
- data/sub/eac_git/Gemfile +8 -0
- data/sub/eac_git/eac_git.gemspec +20 -0
- data/sub/eac_git/lib/eac_git/executables.rb +45 -0
- data/sub/eac_git/lib/eac_git/local/branch.rb +45 -0
- data/sub/eac_git/lib/eac_git/local/changed_file.rb +47 -0
- data/sub/eac_git/lib/eac_git/local/commit/archive.rb +17 -0
- data/sub/eac_git/lib/eac_git/local/commit/changed_file.rb +43 -0
- data/sub/eac_git/lib/eac_git/local/commit/diff_tree_line.rb +32 -0
- data/sub/eac_git/lib/eac_git/local/commit.rb +71 -0
- data/sub/eac_git/lib/eac_git/local/dirty_files.rb +26 -0
- data/sub/eac_git/lib/eac_git/local/log.rb +14 -0
- data/sub/eac_git/lib/eac_git/local/remote/push.rb +33 -0
- data/sub/eac_git/lib/eac_git/local/remote.rb +47 -0
- data/sub/eac_git/lib/eac_git/local/remotes.rb +17 -0
- data/sub/eac_git/lib/eac_git/local/subrepo/config.rb +40 -0
- data/sub/eac_git/lib/eac_git/local/subrepo.rb +46 -0
- data/sub/eac_git/lib/eac_git/local.rb +124 -0
- data/sub/eac_git/lib/eac_git/remote.rb +20 -0
- data/sub/eac_git/lib/eac_git/remote_like/ls_result.rb +18 -0
- data/sub/eac_git/lib/eac_git/remote_like.rb +30 -0
- data/sub/eac_git/lib/eac_git/rspec/setup.rb +20 -0
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/directory.rb +35 -0
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/file.rb +21 -0
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/fs_object.rb +25 -0
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/repository.rb +30 -0
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +28 -0
- data/sub/eac_git/lib/eac_git/rspec.rb +7 -0
- data/sub/eac_git/lib/eac_git/version.rb +5 -0
- data/sub/eac_git/lib/eac_git.rb +9 -0
- data/sub/eac_git/spec/lib/eac_git/executables_spec.rb +11 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec.rb +11 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.source.out +1 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.source.out +1 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.source.out +1 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.source.out +2 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit_spec.rb +56 -0
- data/sub/eac_git/spec/lib/eac_git/local/dirty_files_spec.rb +18 -0
- data/sub/eac_git/spec/rubocop_spec.rb +3 -0
- data/sub/eac_git/spec/spec_helper.rb +5 -0
- data/sub/eac_git/vendor/git-subrepo/Changes +110 -0
- data/sub/eac_git/vendor/git-subrepo/Intro.pod +509 -0
- data/sub/eac_git/vendor/git-subrepo/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/Makefile +82 -0
- data/sub/eac_git/vendor/git-subrepo/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ReadMe.pod +698 -0
- data/sub/eac_git/vendor/git-subrepo/doc/comparison.swim +35 -0
- data/sub/eac_git/vendor/git-subrepo/doc/git-subrepo.swim +608 -0
- data/sub/eac_git/vendor/git-subrepo/doc/intro-to-subrepo.swim +387 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Makefile +45 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/ReadMe.pod +77 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/bin/bash+ +43 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +61 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +92 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/base.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/fcopy.t +22 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/bar.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/foo.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +18 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +23 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/test.bash +70 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/use.t +19 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Makefile +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Meta +30 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +115 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +89 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +45 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +77 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +43 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +61 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +92 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +22 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/bar.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/foo.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +18 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +23 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/test.bash +70 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +19 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +37 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +66 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +48 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +153 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +119 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +13 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/done.t +10 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/pass.t +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/plan.t +10 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/skip_all.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +13 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/bail.t +14 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail.t +7 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail_fast.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-init.t +8 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-plan.t +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +95 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +173 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/fail.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/more.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/pass.t +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/setup +8 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/skip_all.t +11 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/skip_all.t +10 -0
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo +1903 -0
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/bash+.bash +1 -0
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +339 -0
- data/sub/eac_git/vendor/git-subrepo/man/man1/git-subrepo.1 +743 -0
- data/sub/eac_git/vendor/git-subrepo/note/0.4.0 +12 -0
- data/sub/eac_git/vendor/git-subrepo/note/AllGitCmds +148 -0
- data/sub/eac_git/vendor/git-subrepo/note/Cases +32 -0
- data/sub/eac_git/vendor/git-subrepo/note/Commands +33 -0
- data/sub/eac_git/vendor/git-subrepo/note/Dags +199 -0
- data/sub/eac_git/vendor/git-subrepo/note/Gists +7 -0
- data/sub/eac_git/vendor/git-subrepo/note/Links +25 -0
- data/sub/eac_git/vendor/git-subrepo/note/Plugins +10 -0
- data/sub/eac_git/vendor/git-subrepo/note/Spec +39 -0
- data/sub/eac_git/vendor/git-subrepo/note/Story1 +57 -0
- data/sub/eac_git/vendor/git-subrepo/note/ToDo +55 -0
- data/sub/eac_git/vendor/git-subrepo/note/design.swim +137 -0
- data/sub/eac_git/vendor/git-subrepo/note/design2.swim +85 -0
- data/sub/eac_git/vendor/git-subrepo/note/init-test +38 -0
- data/sub/eac_git/vendor/git-subrepo/note/pull-dance.txt +18 -0
- data/sub/eac_git/vendor/git-subrepo/note/recreate-rebase-conflict.sh +56 -0
- data/sub/eac_git/vendor/git-subrepo/note/subtree-rebase-fail-example/test.bash +29 -0
- data/sub/eac_git/vendor/git-subrepo/note/test-subrepo-push.sh +69 -0
- data/sub/eac_git/vendor/git-subrepo/note/test.sh +58 -0
- data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-completion.pl +210 -0
- data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +89 -0
- data/sub/eac_git/vendor/git-subrepo/share/completion.bash +42 -0
- data/sub/eac_git/vendor/git-subrepo/share/enable-completion.sh +50 -0
- data/sub/eac_git/vendor/git-subrepo/share/git-completion.bash +2738 -0
- data/sub/eac_git/vendor/git-subrepo/share/zsh-completion/_git-subrepo +81 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch-all.t +41 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t +43 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list.t +47 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch.t +52 -0
- data/sub/eac_git/vendor/git-subrepo/test/clean.t +43 -0
- data/sub/eac_git/vendor/git-subrepo/test/clone-annotated-tag.t +45 -0
- data/sub/eac_git/vendor/git-subrepo/test/clone.t +107 -0
- data/sub/eac_git/vendor/git-subrepo/test/compile.t +19 -0
- data/sub/eac_git/vendor/git-subrepo/test/config.t +58 -0
- data/sub/eac_git/vendor/git-subrepo/test/encode.t +91 -0
- data/sub/eac_git/vendor/git-subrepo/test/error.t +171 -0
- data/sub/eac_git/vendor/git-subrepo/test/fetch.t +43 -0
- data/sub/eac_git/vendor/git-subrepo/test/gitignore.t +61 -0
- data/sub/eac_git/vendor/git-subrepo/test/init.t +64 -0
- data/sub/eac_git/vendor/git-subrepo/test/issue29.t +98 -0
- data/sub/eac_git/vendor/git-subrepo/test/issue95.t +98 -0
- data/sub/eac_git/vendor/git-subrepo/test/issue96.t +96 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-all.t +38 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-merge.t +113 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-message.t +88 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t +58 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-ours.t +90 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-theirs.t +82 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-twice.t +44 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-worktree.t +40 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull.t +99 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-after-init.t +51 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-force.t +56 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-new-branch.t +61 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-no-changes.t +29 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-squash.t +56 -0
- data/sub/eac_git/vendor/git-subrepo/test/push.t +176 -0
- data/sub/eac_git/vendor/git-subrepo/test/reclone.t +45 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/HEAD +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/config +4 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/1f/0c4b264caed0126814a0ede851a1e0b4e16ae6 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/87/46903fdb1b9c2101377880125917c2e05b4d69 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/94/c86ffc745232d89f78c6f895e11e71272518db +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/c6/76c57b6576743fa56278527aa60ebd2e202a7c +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/f6/2a8ff3feadf39b0a98f1a86ec6d1eb33858ee9 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/heads/master +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/tags/A +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/HEAD +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/config +4 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/a0/f4cdaaf533a936296cdebbed8206c3b9ededa8 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e2/1291a1ad392a9d4c51dd9586804f1467b28afd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/refs/heads/master +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/HEAD +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/config +5 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/11/523f5dcf03b4c89b592dc8a3d0308f68da2386 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/14/2addf8ec5f37334e837440122c62f2c68a29ad +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/32/5180321750a21cd7a4e7ecda319e557a4f6a09 +2 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3d/918c6901c02f43af5d31779dd5e1f9166aeb36 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3e/4cb596066dce63ba4d047abddb677389b65e19 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/4b/6e53022e7a04f07887697e4f3d7c377fd9822b +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/58/931fc1bd559b59c41ea738fc7ad04f9ad01bd3 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/5e/c0c28e1b806f25efdca18fcf7a74b49c3755bd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/75/fa6584e748f57eff06eebdc55e9ac21d4fcbf2 +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/80/2d5edbd5e1cb7fca82b5bd38e7c8a0a496fb20 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/94/7b3d714c38791e95ad6f928b48c98bb8708acd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/95/e1f2df3f4d5f3d7a60588c25a7ca8a913d3c2a +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/b1/5f4a7666baf40d949548ead946a3370e273479 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c3/ee8978c4c5d84c3b7d00ba8e5906933d027882 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c8/b0bffbc405ef3fad7354ff833fbec36d67ddfa +3 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/dd/8bdb934ec848137f011fe423b185505c343626 +2 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/e2/9be58c767cfeb27235c995d293a7d71aac0135 +2 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/ee/1224401fc6aac595145fa727dcf6706ac8aec1 +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/f1/cc1a657b2e805c400f5dcaaa76bd29c6178b1b +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/refs/heads/master +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/setup +205 -0
- data/sub/eac_git/vendor/git-subrepo/test/status.t +68 -0
- data/sub/eac_git/vendor/git-subrepo/test/submodule.t +45 -0
- metadata +364 -16
@@ -0,0 +1,96 @@
|
|
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
|
@@ -0,0 +1,108 @@
|
|
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
|
@@ -0,0 +1,42 @@
|
|
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
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Organize
|
8
|
+
runner_with :help do
|
9
|
+
desc 'Organize branches.'
|
10
|
+
bool_opt '-a', '--all', 'Run all organizations.'
|
11
|
+
bool_opt '-n', '--no', 'Do not run operations.'
|
12
|
+
bool_opt '-o', '--originals', 'Remove refs/original branches.'
|
13
|
+
bool_opt '-s', '--subrepos', 'Remove git-subrepo branches.'
|
14
|
+
bool_opt '-y', '--yes', 'Run operations without confirmation.'
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
start_banner
|
19
|
+
collect_references
|
20
|
+
after_collect_banner
|
21
|
+
run_operations
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def after_collect_banner
|
27
|
+
infov 'Collected references', repository.collected_references.count
|
28
|
+
repository.collected_references.each do |ru|
|
29
|
+
infov " * #{ru.reference}", ru.operation
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def collect?(type)
|
34
|
+
parsed.fetch(type) || parsed.all?
|
35
|
+
end
|
36
|
+
|
37
|
+
def collect_references
|
38
|
+
%w[subrepos originals].each do |type|
|
39
|
+
repository.send("collect_#{type}") if collect?(type)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def run_operations
|
44
|
+
return warn('No operations to run (Run with --help to see options)') if
|
45
|
+
repository.collected_references.empty?
|
46
|
+
return unless run_operations?
|
47
|
+
|
48
|
+
repository.collected_references.each do |ru|
|
49
|
+
info "Doing operation #{ru}..."
|
50
|
+
ru.run_operation
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def run_operations?
|
55
|
+
return true if parsed.yes?
|
56
|
+
return false if parsed.no?
|
57
|
+
|
58
|
+
input('Confirm operations?', bool: true)
|
59
|
+
end
|
60
|
+
|
61
|
+
def repository_uncached
|
62
|
+
::Avm::Git::Organize::Repository.new(runner_context.call(:git).eac_git)
|
63
|
+
end
|
64
|
+
|
65
|
+
def start_banner
|
66
|
+
infov 'Repository', repository
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class RevisionsTest
|
8
|
+
runner_with :help do
|
9
|
+
desc 'Test multiple revisions until a error is found.'
|
10
|
+
arg_opt '-c', '--command', 'Command to test instance.'
|
11
|
+
bool_opt '-n', '--no-cache', 'Does not use cache.'
|
12
|
+
end
|
13
|
+
|
14
|
+
def run
|
15
|
+
fatal_error('Repository is dirty') if runner_context.call(:git).dirty?
|
16
|
+
|
17
|
+
return_to_branch_on_end do
|
18
|
+
infov 'Revisions found', revisions.count
|
19
|
+
if revision_with_error
|
20
|
+
warn("First revision with error: #{revision_with_error}")
|
21
|
+
else
|
22
|
+
success('No error found in revisions')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def return_to_branch_on_end
|
30
|
+
current_branch = runner_context.call(:git).current_branch
|
31
|
+
yield
|
32
|
+
ensure
|
33
|
+
infom "Returning to original branch \"#{current_branch}\""
|
34
|
+
runner_context.call(:git).execute!('checkout', current_branch)
|
35
|
+
end
|
36
|
+
|
37
|
+
def revision_with_error_uncached
|
38
|
+
revision_with_error = nil
|
39
|
+
revisions.each do |revision|
|
40
|
+
revision.banner
|
41
|
+
unless revision.successful?
|
42
|
+
revision_with_error = revision
|
43
|
+
break
|
44
|
+
end
|
45
|
+
end
|
46
|
+
revision_with_error
|
47
|
+
end
|
48
|
+
|
49
|
+
def revisions_uncached
|
50
|
+
runner_context.call(:git).execute!('log', '--pretty=format:%H', 'origin/master..HEAD')
|
51
|
+
.each_line.map(&:strip).reverse.map do |sha1|
|
52
|
+
::Avm::Git::RevisionTest.new(runner_context.call(:git), sha1, test_revision_options)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_revision_options
|
57
|
+
{ test_command: parsed.command, no_cache: parsed.no_cache? }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
class Check
|
9
|
+
runner_with :help do
|
10
|
+
desc 'Check status of subrepos.'
|
11
|
+
bool_opt '-a', '--all', 'Select all subrepos.'
|
12
|
+
bool_opt '-f', '--fix-parent', 'Fix parent SHA1.'
|
13
|
+
bool_opt '-n', '--no-error', 'Do not exit with error if check fails.'
|
14
|
+
bool_opt '-r', '--remote', 'Check subrepos remote.'
|
15
|
+
pos_arg :subrepos, repeat: true, optional: true
|
16
|
+
end
|
17
|
+
|
18
|
+
def run
|
19
|
+
subrepo_checks.show_result
|
20
|
+
return if parsed.no_error?
|
21
|
+
return unless subrepo_checks.result.error?
|
22
|
+
|
23
|
+
fatal_error 'Failed'
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def subrepo_checks_uncached
|
29
|
+
r = ::Avm::Git::SubrepoChecks.new(local_repos)
|
30
|
+
r.check_remote = parsed.remote?
|
31
|
+
r.fix_parent = parsed.fix_parent?
|
32
|
+
r.add_all_subrepos if parsed.all?
|
33
|
+
r.add_subrepos(*parsed.subrepos)
|
34
|
+
r
|
35
|
+
end
|
36
|
+
|
37
|
+
def local_repos_uncached
|
38
|
+
::EacGit::Local.new(runner_context.call(:git))
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
class Clone
|
9
|
+
runner_with :help do
|
10
|
+
desc 'Clone git-subrepo repositories.'
|
11
|
+
arg_opt '-b', '--branch', 'Branch.'
|
12
|
+
arg_opt '-d', '--parent-dir', 'Target path\'s parent directory.'
|
13
|
+
pos_arg :url
|
14
|
+
pos_arg :target_path, optional: true
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
start_banner
|
19
|
+
clean
|
20
|
+
clone
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def start_banner
|
26
|
+
infov 'URL', url
|
27
|
+
infov 'Subpath', target_path
|
28
|
+
infov 'Branch', branch
|
29
|
+
end
|
30
|
+
|
31
|
+
def clean
|
32
|
+
infom 'Cleaning...'
|
33
|
+
git.command('subrepo', 'clean', '--all', '--force').system!
|
34
|
+
end
|
35
|
+
|
36
|
+
def clone
|
37
|
+
infom 'Cloning...'
|
38
|
+
infov 'Clone arguments', clone_args
|
39
|
+
git.command(*clone_args).system!
|
40
|
+
end
|
41
|
+
|
42
|
+
delegate :branch, :url, to: :parsed
|
43
|
+
|
44
|
+
def git_uncached
|
45
|
+
::EacGit::Local.new('.')
|
46
|
+
end
|
47
|
+
|
48
|
+
def clone_args
|
49
|
+
['subrepo'] + branch.if_present([]) { |v| ['--branch', v] } +
|
50
|
+
if ::File.exist?(target_path)
|
51
|
+
['init', target_path, '--remote', url]
|
52
|
+
else
|
53
|
+
['clone', url, target_path, '--message', clone_message, '--force']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def clone_message
|
58
|
+
"Subrepo \"#{target_path}\" (#{url})."
|
59
|
+
end
|
60
|
+
|
61
|
+
def repos_name_from_url
|
62
|
+
%r{/([^/]+)\z}.if_match(url, false) { |m| m[1].gsub(/\.git\z/, '') }
|
63
|
+
end
|
64
|
+
|
65
|
+
def target_path
|
66
|
+
parsed.target_path || target_path_from_parent_dir ||
|
67
|
+
fatal_error('No target path specified')
|
68
|
+
end
|
69
|
+
|
70
|
+
def target_path_from_parent_dir
|
71
|
+
return nil unless parsed.parent_dir && repos_name_from_url
|
72
|
+
|
73
|
+
::File.join(parsed.parent_dir, repos_name_from_url)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
class Fix
|
9
|
+
runner_with :help do
|
10
|
+
desc 'Fix git-subrepos\' parent property.'
|
11
|
+
end
|
12
|
+
|
13
|
+
def run
|
14
|
+
loop do
|
15
|
+
break if fix
|
16
|
+
|
17
|
+
amend_each
|
18
|
+
rebase_fixup
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def amend_each
|
25
|
+
infov 'Dirty files', local_repos.dirty_files.count
|
26
|
+
local_repos.dirty_files.each do |file|
|
27
|
+
infov ' * Ammending', file.path
|
28
|
+
::Avm::Scms::AutoCommit::ForFile.new(
|
29
|
+
git_scm, file.path,
|
30
|
+
[::Avm::Scms::AutoCommit::Rules::Unique.new]
|
31
|
+
).run
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def fix
|
36
|
+
infom 'Checking/fixing...'
|
37
|
+
c = new_check(true)
|
38
|
+
c.show_result
|
39
|
+
!c.result.error?
|
40
|
+
end
|
41
|
+
|
42
|
+
# @return [Avm::Git::Scms::Git]
|
43
|
+
def git_scm_uncached
|
44
|
+
::Avm::Git::Scms::Git.new(runner_context.call(:git).root_path)
|
45
|
+
end
|
46
|
+
|
47
|
+
def new_check(fix_parent = false) # rubocop:disable Style/OptionalBooleanParameter
|
48
|
+
r = ::Avm::Git::SubrepoChecks.new(local_repos).add_all_subrepos
|
49
|
+
r.fix_parent = fix_parent
|
50
|
+
r
|
51
|
+
end
|
52
|
+
|
53
|
+
def local_repos_uncached
|
54
|
+
::EacGit::Local.new(runner_context.call(:git))
|
55
|
+
end
|
56
|
+
|
57
|
+
def rebase_fixup
|
58
|
+
local_repos.command('rebase', '-i', 'origin/master', '--autosquash').envvar(
|
59
|
+
'GIT_SEQUENCE_EDITOR', 'true'
|
60
|
+
).or(
|
61
|
+
local_repos.command('rebase', '--continue').envvar('GIT_SEQUENCE_EDITOR', 'true')
|
62
|
+
).system!
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
require_sub __FILE__
|
9
|
+
runner_with :help, :subcommands do
|
10
|
+
desc 'Git-subrepo (https://github.com/ingydotnet/git-subrepo) utilities.'
|
11
|
+
subcommands
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
require_sub __FILE__
|
8
|
+
runner_with :help, :subcommands do
|
9
|
+
desc 'Git utilities for AVM.'
|
10
|
+
arg_opt '-C', '--path', 'Path to Git repository.'
|
11
|
+
subcommands
|
12
|
+
end
|
13
|
+
|
14
|
+
COMMAND_ARGUMENT = 'git'
|
15
|
+
|
16
|
+
# @return [String]
|
17
|
+
def self.command_argument
|
18
|
+
COMMAND_ARGUMENT
|
19
|
+
end
|
20
|
+
|
21
|
+
def repository_path
|
22
|
+
repository_path? ? parsed.path : '.'
|
23
|
+
end
|
24
|
+
|
25
|
+
def repository_path?
|
26
|
+
parsed.path.present?
|
27
|
+
end
|
28
|
+
|
29
|
+
def git
|
30
|
+
@git ||= ::Avm::Git::Launcher::Base.by_root(repository_path)
|
31
|
+
end
|
32
|
+
|
33
|
+
# @return [[EacGit::Local]]
|
34
|
+
def git_repo
|
35
|
+
git.eac_git
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Scms
|
6
|
+
class Git < ::Avm::Scms::Base
|
7
|
+
class Branch < ::Avm::Scms::Branch
|
8
|
+
common_constructor :scm, :eac_git_branch
|
9
|
+
|
10
|
+
# @return [Avm::Git::Scms::Git::Commit]
|
11
|
+
def head_commit
|
12
|
+
::Avm::Git::Scms::Git::Commit.new(scm, eac_git_branch.head_commit)
|
13
|
+
end
|
14
|
+
|
15
|
+
# @return [String]
|
16
|
+
def id
|
17
|
+
eac_git_branch.name
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param remote [Avm::Git::Scms::Git::Remote]
|
21
|
+
def push(remote)
|
22
|
+
eac_git_branch.push(remote.eac_git_remote, force: true)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Scms
|
6
|
+
class Git < ::Avm::Scms::Base
|
7
|
+
module Branches
|
8
|
+
# @return [Avm::Git::Scms::Git::Branch]
|
9
|
+
def head_branch
|
10
|
+
::Avm::Git::Scms::Git::Branch.new(self,
|
11
|
+
git_repo.current_branch)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|