eac_tools 0.92.0 → 0.94.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +68 -53
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +3 -3
- data/sub/avm/lib/avm/launcher/context.rb +0 -5
- data/sub/avm/lib/avm/rspec/launcher_controller.rb +96 -0
- data/sub/avm/lib/avm/rspec/setup.rb +1 -1
- data/sub/avm/lib/avm/rspec/shared_examples/with_launcher.rb +16 -0
- data/sub/avm/lib/avm/scms/base.rb +1 -1
- data/sub/avm/lib/avm/sources/base/sub.rb +1 -1
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/spec/lib/avm/launcher/context_spec.rb +2 -2
- data/sub/avm/spec/lib/avm/launcher/instances/base_spec.rb +2 -2
- data/sub/avm/template/avm/rspec/launcher_controller/settings.yml +1 -0
- data/sub/avm-eac_webapp_base0/Gemfile +8 -0
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +25 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/executables.rb +26 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css/file_apply.rb +48 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css.rb +22 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/html.rb +43 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/javascript.rb +22 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb +25 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/provider.rb +24 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/xml.rb +26 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats.rb +11 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_base.rb +33 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +78 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb +42 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/apache.rb +44 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/deploy_info.rb +30 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/install.rb +22 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +44 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb +27 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb +50 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/info.rb +47 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/scm.rb +88 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/setup_files_unit.rb +53 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/write_on_target.rb +20 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +76 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy_info.rb +37 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/processes/web_server.rb +37 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/processes.rb +13 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_host.rb +36 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_path.rb +40 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb +60 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb +57 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy_info.rb +28 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners.rb +13 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources/base.rb +15 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources.rb +11 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +7 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0.rb +9 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec.rb +7 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec_files/css1.source.css +11 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec_files/css1.target.css +11 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec.rb +7 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.erb.source +8 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.erb.target +8 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.source +5 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.target +5 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec.rb +7 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec_files/javascript_code1.js.source +29 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec_files/javascript_code1.js.target +21 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec.rb +7 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec_files/json_code.json.source +8 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec_files/json_code.json.target +7 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec.rb +7 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec_files/xml_code.xml.source +11 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec_files/xml_code.xml.target +9 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/instances/base_spec.rb +11 -0
- data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/sources/base_spec.rb +7 -0
- data/sub/avm-eac_webapp_base0/spec/rubocop_spec.rb +3 -0
- data/sub/avm-eac_webapp_base0/spec/spec_helper.rb +4 -0
- data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_host/no_ssl.conf +11 -0
- data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_path/default.conf +7 -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 +49 -0
- data/sub/avm-git/lib/avm/git/application_scms/base.rb +21 -0
- data/sub/avm-git/lib/avm/git/application_scms.rb +11 -0
- data/sub/avm-git/lib/avm/git/commit/class_methods.rb +31 -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 +46 -0
- data/sub/avm-git/lib/avm/git/commit.rb +59 -0
- data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +42 -0
- data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +23 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +61 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +39 -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 +40 -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 +39 -0
- data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +53 -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 +69 -0
- data/sub/avm-git/lib/avm/git/issue.rb +11 -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 +23 -0
- data/sub/avm-git/lib/avm/git/launcher/base/remotes.rb +40 -0
- data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +44 -0
- data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +59 -0
- data/sub/avm-git/lib/avm/git/launcher/base.rb +87 -0
- data/sub/avm-git/lib/avm/git/launcher/error.rb +15 -0
- data/sub/avm-git/lib/avm/git/launcher/mirror_update.rb +38 -0
- data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +131 -0
- data/sub/avm-git/lib/avm/git/launcher/remote.rb +55 -0
- data/sub/avm-git/lib/avm/git/launcher/sub_warp_base.rb +33 -0
- data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +68 -0
- data/sub/avm-git/lib/avm/git/launcher.rb +7 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/local_project_mixin.rb +19 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/publish.rb +15 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/warp.rb +27 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git.rb +25 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +31 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +88 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +36 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/publish.rb +14 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/warp.rb +32 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree.rb +51 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +22 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes.rb +11 -0
- data/sub/avm-git/lib/avm/git/organize/reference_update.rb +34 -0
- data/sub/avm-git/lib/avm/git/organize/repository.rb +77 -0
- data/sub/avm-git/lib/avm/git/organize.rb +11 -0
- data/sub/avm-git/lib/avm/git/revision_test.rb +105 -0
- data/sub/avm-git/lib/avm/git/runners/base/commit.rb +102 -0
- data/sub/avm-git/lib/avm/git/runners/base/deploy.rb +111 -0
- data/sub/avm-git/lib/avm/git/runners/base/dirty_files.rb +44 -0
- data/sub/avm-git/lib/avm/git/runners/base/organize.rb +75 -0
- data/sub/avm-git/lib/avm/git/runners/base/revisions_test.rb +66 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/check.rb +48 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/clone.rb +83 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/fix.rb +76 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo.rb +19 -0
- data/sub/avm-git/lib/avm/git/runners/base.rb +43 -0
- data/sub/avm-git/lib/avm/git/runners.rb +11 -0
- data/sub/avm-git/lib/avm/git/scms/git/branch.rb +31 -0
- data/sub/avm-git/lib/avm/git/scms/git/branches.rb +20 -0
- data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +36 -0
- data/sub/avm-git/lib/avm/git/scms/git/changed_file.rb +16 -0
- data/sub/avm-git/lib/avm/git/scms/git/changed_files.rb +24 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb +43 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy_methods.rb +30 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit.rb +67 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit_dirty.rb +36 -0
- data/sub/avm-git/lib/avm/git/scms/git/commits.rb +47 -0
- data/sub/avm-git/lib/avm/git/scms/git/interval.rb +31 -0
- data/sub/avm-git/lib/avm/git/scms/git/milestones.rb +21 -0
- data/sub/avm-git/lib/avm/git/scms/git/remote.rb +21 -0
- data/sub/avm-git/lib/avm/git/scms/git/remotes.rb +32 -0
- data/sub/avm-git/lib/avm/git/scms/git/run_commit.rb +57 -0
- data/sub/avm-git/lib/avm/git/scms/git.rb +51 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/changed_file.rb +21 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/commit.rb +27 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/interval.rb +28 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base.rb +33 -0
- data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +37 -0
- data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +34 -0
- data/sub/avm-git/lib/avm/git/scms/provider.rb +21 -0
- data/sub/avm-git/lib/avm/git/scms.rb +11 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +51 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +89 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +32 -0
- data/sub/avm-git/lib/avm/git/subrepo_check.rb +38 -0
- data/sub/avm-git/lib/avm/git/subrepo_checks.rb +60 -0
- data/sub/avm-git/lib/avm/git/vendor/github.rb +20 -0
- data/sub/avm-git/lib/avm/git/vendor.rb +11 -0
- data/sub/avm-git/lib/avm/git/version.rb +7 -0
- data/sub/avm-git/lib/avm/git.rb +9 -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 +4 -0
- data/sub/avm-tools/Gemfile +8 -0
- data/sub/avm-tools/README.textile +28 -0
- data/sub/avm-tools/avm-tools.gemspec +25 -0
- data/sub/avm-tools/exe/avm +6 -0
- data/sub/avm-tools/lib/avm/tools/core_ext.rb +3 -0
- data/sub/avm-tools/lib/avm/tools/rspec/helpers/runner.rb +20 -0
- data/sub/avm-tools/lib/avm/tools/rspec/helpers.rb +13 -0
- data/sub/avm-tools/lib/avm/tools/rspec/setup.rb +24 -0
- data/sub/avm-tools/lib/avm/tools/rspec.rb +11 -0
- data/sub/avm-tools/lib/avm/tools/runner/application/info.rb +36 -0
- data/sub/avm-tools/lib/avm/tools/runner/application.rb +26 -0
- data/sub/avm-tools/lib/avm/tools/runner/application_stereotypes/list.rb +31 -0
- data/sub/avm-tools/lib/avm/tools/runner/application_stereotypes.rb +16 -0
- data/sub/avm-tools/lib/avm/tools/runner/applications/list.rb +31 -0
- data/sub/avm-tools/lib/avm/tools/runner/applications.rb +16 -0
- data/sub/avm-tools/lib/avm/tools/runner/config/load_path.rb +52 -0
- data/sub/avm-tools/lib/avm/tools/runner/config.rb +17 -0
- data/sub/avm-tools/lib/avm/tools/runner/files/format.rb +50 -0
- data/sub/avm-tools/lib/avm/tools/runner/files/rotate.rb +31 -0
- data/sub/avm-tools/lib/avm/tools/runner/files.rb +17 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/clear.rb +18 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/dump.rb +20 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/load.rb +25 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/clear.rb +20 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/dump.rb +20 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/load.rb +25 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb +44 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/data.rb +27 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/entry.rb +43 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/info.rb +39 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance/system.rb +65 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance.rb +16 -0
- data/sub/avm-tools/lib/avm/tools/runner/launcher/instances.rb +36 -0
- data/sub/avm-tools/lib/avm/tools/runner/launcher/projects.rb +40 -0
- data/sub/avm-tools/lib/avm/tools/runner/launcher/publish.rb +53 -0
- data/sub/avm-tools/lib/avm/tools/runner/launcher.rb +17 -0
- data/sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes/list.rb +41 -0
- data/sub/avm-tools/lib/avm/tools/runner/launcher_stereotypes.rb +16 -0
- data/sub/avm-tools/lib/avm/tools/runner/self/docker.rb +14 -0
- data/sub/avm-tools/lib/avm/tools/runner/self/registry.rb +25 -0
- data/sub/avm-tools/lib/avm/tools/runner/self.rb +22 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/auto_commit.rb +72 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/info.rb +55 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/issue/complete.rb +86 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/issue/deliver.rb +35 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/issue.rb +19 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/sub/remove.rb +22 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/sub.rb +29 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/subs.rb +72 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/test.rb +93 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/update.rb +22 -0
- data/sub/avm-tools/lib/avm/tools/runner/source/version_bump.rb +81 -0
- data/sub/avm-tools/lib/avm/tools/runner/source.rb +18 -0
- data/sub/avm-tools/lib/avm/tools/runner/source_generate.rb +12 -0
- data/sub/avm-tools/lib/avm/tools/runner.rb +27 -0
- data/sub/avm-tools/lib/avm/tools/runner_with/include_exclude.rb +23 -0
- data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_clear.rb +23 -0
- data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_dump.rb +59 -0
- data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_load.rb +69 -0
- data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_performer.rb +40 -0
- data/sub/avm-tools/lib/avm/tools/runner_with.rb +11 -0
- data/sub/avm-tools/lib/avm/tools/self.rb +23 -0
- data/sub/avm-tools/lib/avm/tools/version.rb +7 -0
- data/sub/avm-tools/lib/avm/tools.rb +9 -0
- data/sub/avm-tools/lib/avm.rb +7 -0
- data/sub/avm-tools/spec/lib/avm/tools/runner/files/rotate_spec.rb +72 -0
- data/sub/avm-tools/spec/lib/avm/tools/runner/launcher_stereotypes/list_spec.rb +17 -0
- data/sub/avm-tools/spec/lib/avm/tools/runner/source/issue/complete_spec.rb +49 -0
- data/sub/avm-tools/spec/lib/avm/tools/runner_spec.rb +15 -0
- data/sub/avm-tools/spec/rubocop_spec.rb +3 -0
- data/sub/avm-tools/spec/spec_helper.rb +4 -0
- metadata +284 -25
- data/sub/avm/spec/spec_helper/launcher_context.rb +0 -75
- /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/avm-tools_stub/avm-tools.gemspec +0 -0
- /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/avm-tools_stub/lib/avm/tools/version.rb +0 -0
- /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/avm-tools_stub/lib/avm/tools.rb +0 -0
- /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/ruby_gem_stub/lib/ruby_gem_stub/version.rb +0 -0
- /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/ruby_gem_stub/lib/ruby_gem_stub.rb +0 -0
- /data/sub/avm/{spec → template/avm/rspec/launcher_controller}/dummy/ruby_gem_stub/ruby_gem_stub.gemspec +0 -0
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'avm/git/scms/git'
|
5
|
+
require 'avm/git/subrepo_checks'
|
6
|
+
require 'avm/scms/auto_commit/rules/unique'
|
7
|
+
require 'avm/scms/auto_commit/for_file'
|
8
|
+
require 'eac_git/local'
|
9
|
+
|
10
|
+
module Avm
|
11
|
+
module Git
|
12
|
+
module Runners
|
13
|
+
class Base
|
14
|
+
class Subrepo
|
15
|
+
class Fix
|
16
|
+
runner_with :help do
|
17
|
+
desc 'Fix git-subrepos\' parent property.'
|
18
|
+
end
|
19
|
+
|
20
|
+
def run
|
21
|
+
loop do
|
22
|
+
break if fix
|
23
|
+
|
24
|
+
amend_each
|
25
|
+
rebase_fixup
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def amend_each
|
32
|
+
infov 'Dirty files', local_repos.dirty_files.count
|
33
|
+
local_repos.dirty_files.each do |file|
|
34
|
+
infov ' * Ammending', file.path
|
35
|
+
::Avm::Scms::AutoCommit::ForFile.new(
|
36
|
+
git_scm, file.path,
|
37
|
+
[::Avm::Scms::AutoCommit::Rules::Unique.new]
|
38
|
+
).run
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def fix
|
43
|
+
infom 'Checking/fixing...'
|
44
|
+
c = new_check(true)
|
45
|
+
c.show_result
|
46
|
+
!c.result.error?
|
47
|
+
end
|
48
|
+
|
49
|
+
# @return [Avm::Git::Scms::Git]
|
50
|
+
def git_scm_uncached
|
51
|
+
::Avm::Git::Scms::Git.new(runner_context.call(:git).root_path)
|
52
|
+
end
|
53
|
+
|
54
|
+
def new_check(fix_parent = false) # rubocop:disable Style/OptionalBooleanParameter
|
55
|
+
r = ::Avm::Git::SubrepoChecks.new(local_repos).add_all_subrepos
|
56
|
+
r.fix_parent = fix_parent
|
57
|
+
r
|
58
|
+
end
|
59
|
+
|
60
|
+
def local_repos_uncached
|
61
|
+
::EacGit::Local.new(runner_context.call(:git))
|
62
|
+
end
|
63
|
+
|
64
|
+
def rebase_fixup
|
65
|
+
local_repos.command('rebase', '-i', 'origin/master', '--autosquash').envvar(
|
66
|
+
'GIT_SEQUENCE_EDITOR', 'true'
|
67
|
+
).or(
|
68
|
+
local_repos.command('rebase', '--continue').envvar('GIT_SEQUENCE_EDITOR', 'true')
|
69
|
+
).system!
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Git
|
7
|
+
module Runners
|
8
|
+
class Base
|
9
|
+
class Subrepo
|
10
|
+
require_sub __FILE__
|
11
|
+
runner_with :help, :subcommands do
|
12
|
+
desc 'Git-subrepo (https://github.com/ingydotnet/git-subrepo) utilities.'
|
13
|
+
subcommands
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'avm/git/launcher/base'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Runners
|
9
|
+
class Base
|
10
|
+
require_sub __FILE__
|
11
|
+
runner_with :help, :subcommands do
|
12
|
+
desc 'Git utilities for AVM.'
|
13
|
+
arg_opt '-C', '--path', 'Path to Git repository.'
|
14
|
+
subcommands
|
15
|
+
end
|
16
|
+
|
17
|
+
COMMAND_ARGUMENT = 'git'
|
18
|
+
|
19
|
+
# @return [String]
|
20
|
+
def self.command_argument
|
21
|
+
COMMAND_ARGUMENT
|
22
|
+
end
|
23
|
+
|
24
|
+
def repository_path
|
25
|
+
repository_path? ? parsed.path : '.'
|
26
|
+
end
|
27
|
+
|
28
|
+
def repository_path?
|
29
|
+
parsed.path.present?
|
30
|
+
end
|
31
|
+
|
32
|
+
def git
|
33
|
+
@git ||= ::Avm::Git::Launcher::Base.by_root(repository_path)
|
34
|
+
end
|
35
|
+
|
36
|
+
# @return [[EacGit::Local]]
|
37
|
+
def git_repo
|
38
|
+
git.eac_git
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/branch'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
class Branch < ::Avm::Scms::Branch
|
11
|
+
common_constructor :scm, :eac_git_branch
|
12
|
+
|
13
|
+
# @return [Avm::Git::Scms::Git::Commit]
|
14
|
+
def head_commit
|
15
|
+
::Avm::Git::Scms::Git::Commit.new(scm, eac_git_branch.head_commit)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [String]
|
19
|
+
def id
|
20
|
+
eac_git_branch.name
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param remote [Avm::Git::Scms::Git::Remote]
|
24
|
+
def push(remote)
|
25
|
+
eac_git_branch.push(remote.eac_git_remote, force: true)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/commit'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
module Branches
|
11
|
+
# @return [Avm::Git::Scms::Git::Branch]
|
12
|
+
def head_branch
|
13
|
+
::Avm::Git::Scms::Git::Branch.new(self,
|
14
|
+
git_repo.current_branch)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Git
|
7
|
+
module Scms
|
8
|
+
class Git < ::Avm::Scms::Base
|
9
|
+
class ChangeTracker
|
10
|
+
common_constructor :git_scm, :commit_info
|
11
|
+
attr_reader :starting_commit
|
12
|
+
|
13
|
+
delegate :git_repo, to: :git_scm
|
14
|
+
|
15
|
+
def start
|
16
|
+
raise 'Repository is dirty' if git_repo.dirty?
|
17
|
+
|
18
|
+
self.starting_commit = git_repo.head
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [Avm::Git::Scms::Git::Commit, nil]
|
22
|
+
def stop
|
23
|
+
git_scm.commit_dirty
|
24
|
+
return nil if starting_commit == git_repo.head
|
25
|
+
|
26
|
+
git_scm.reset_and_commit(starting_commit, commit_info)
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
attr_writer :starting_commit
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/changed_file'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
class ChangedFile < ::Avm::Scms::ChangedFile
|
11
|
+
common_constructor :scm, :path
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/git/scms/git/changed_file'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
class ChangedFiles
|
11
|
+
enable_method_class
|
12
|
+
common_constructor :scm
|
13
|
+
|
14
|
+
# @return [Avm::Git::Scms::Git::ChangedFile]
|
15
|
+
def result
|
16
|
+
scm.git_repo.dirty_files.map do |dirty_file|
|
17
|
+
::Avm::Git::Scms::Git::ChangedFile.new(scm, dirty_file.path)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/files/appendable'
|
4
|
+
require 'avm/files/deploy'
|
5
|
+
require 'avm/scms/base'
|
6
|
+
require 'avm/scms/commit'
|
7
|
+
require 'eac_ruby_utils/core_ext'
|
8
|
+
|
9
|
+
module Avm
|
10
|
+
module Git
|
11
|
+
module Scms
|
12
|
+
class Git < ::Avm::Scms::Base
|
13
|
+
class Commit < ::Avm::Scms::Commit
|
14
|
+
class Deploy
|
15
|
+
include ::Avm::Files::Appendable
|
16
|
+
enable_simple_cache
|
17
|
+
|
18
|
+
attr_reader :build_dir, :commit, :target_env, :target_path
|
19
|
+
|
20
|
+
def initialize(commit, target_env, target_path)
|
21
|
+
@commit = commit
|
22
|
+
@target_env = target_env
|
23
|
+
@target_path = target_path
|
24
|
+
end
|
25
|
+
|
26
|
+
def run
|
27
|
+
fd = ::Avm::Files::Deploy.new(target_env, target_path)
|
28
|
+
fd.append_tar_output_command(git_archive_command)
|
29
|
+
fd.appended.push(*appended)
|
30
|
+
fd.run
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def git_archive_command
|
36
|
+
commit.git_repo.command('archive', '--format=tar', commit.id)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/git/commit'
|
4
|
+
require 'avm/git/scms/git/commit/deploy'
|
5
|
+
require 'avm/scms/base'
|
6
|
+
require 'avm/scms/commit'
|
7
|
+
require 'eac_ruby_utils/core_ext'
|
8
|
+
|
9
|
+
module Avm
|
10
|
+
module Git
|
11
|
+
module Scms
|
12
|
+
class Git < ::Avm::Scms::Base
|
13
|
+
class Commit < ::Avm::Scms::Commit
|
14
|
+
module DeployMethods
|
15
|
+
def deploy_to_env_path(target_env, target_path)
|
16
|
+
::Avm::Git::Scms::Git::Commit::Deploy.new(self, target_env, target_path)
|
17
|
+
end
|
18
|
+
|
19
|
+
def deploy_to_url(target_url)
|
20
|
+
::Avm::Git::Scms::Git::Commit::Deploy.new(
|
21
|
+
self,
|
22
|
+
*::Avm::Git::Commit.target_url_to_env_path(target_url)
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/commit'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
class Commit < ::Avm::Scms::Commit
|
11
|
+
require_sub __FILE__, include_modules: true
|
12
|
+
common_constructor :git_scm, :git_commit do
|
13
|
+
git_commit.assert_argument(::EacGit::Local::Commit, 'git_commit')
|
14
|
+
end
|
15
|
+
delegate :git_repo, to: :git_scm
|
16
|
+
delegate :id, to: :git_commit
|
17
|
+
|
18
|
+
FIXUP_SUBJECT_PATTERN = /\Afixup!/.freeze
|
19
|
+
|
20
|
+
# @return [Array<Pathname>]
|
21
|
+
def changed_files
|
22
|
+
git_commit.changed_files.map { |cf| cf.path.to_pathname }
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [Boolean]
|
26
|
+
def fixup?
|
27
|
+
FIXUP_SUBJECT_PATTERN.match?(git_commit.subject)
|
28
|
+
end
|
29
|
+
|
30
|
+
# @param other [Avm::Git::Scms::Git::Commit]
|
31
|
+
# @return [Avm::Git::Scms::Git::Commit]
|
32
|
+
def merge_with(other)
|
33
|
+
validate_clean_and_head
|
34
|
+
raise 'Implemented for only if other is parent' unless
|
35
|
+
other.git_commit == git_commit.parent
|
36
|
+
|
37
|
+
git_scm.reset_and_commit(other.git_commit.parent, other.git_commit.raw_body)
|
38
|
+
end
|
39
|
+
|
40
|
+
def reword(new_message)
|
41
|
+
validate_clean_and_head
|
42
|
+
|
43
|
+
git_repo.command('commit', '--amend', '-m', new_message).execute!
|
44
|
+
self.class.new(git_scm, git_repo.head)
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param path [Pathname]
|
48
|
+
# @return [TrueClass,FalseClass]
|
49
|
+
def scm_file?(path)
|
50
|
+
%w[.gitrepo .gitmodules].any? { |file| file.include?(path.basename.to_path) }
|
51
|
+
end
|
52
|
+
|
53
|
+
# @return [String]
|
54
|
+
delegate :subject, to: :git_commit
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
def validate_clean_and_head
|
59
|
+
raise 'Implemented for only if repository is no dirty' if git_repo.dirty?
|
60
|
+
raise 'Implemented for only if self is HEAD' unless
|
61
|
+
git_commit == git_repo.head
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/commit_info'
|
4
|
+
require 'avm/git/scms/git/changed_file'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Git
|
9
|
+
module Scms
|
10
|
+
class Git < ::Avm::Scms::Base
|
11
|
+
class CommitDirty
|
12
|
+
enable_method_class
|
13
|
+
# @param commit_info [Avm::Scms::CommitInfo, nil]
|
14
|
+
common_constructor :scm, :commit_info, default: [nil]
|
15
|
+
delegate :git_repo, :head_commit, :run_commit, to: :scm
|
16
|
+
|
17
|
+
# @return [Avm::Git::Scms::Git::Commit,nil]
|
18
|
+
def result
|
19
|
+
return nil unless git_repo.dirty?
|
20
|
+
|
21
|
+
run_commit(asserted_commit_info)
|
22
|
+
head_commit
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def asserted_commit_info
|
28
|
+
r = ::Avm::Scms::CommitInfo.assert(commit_info)
|
29
|
+
r = r.message(COMMIT_DIRTY_DEFAULT_MESSAGE) if r.message.blank?
|
30
|
+
git_repo.dirty_files.inject(r) { |a, e| a.path(e.absolute_path) }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/commit'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
module Commits
|
11
|
+
# @return [Avm::Git::Scms::Git::Commit,nil]
|
12
|
+
def commit(source)
|
13
|
+
if source.is_a?(::Avm::Git::Scms::Git::Commit)
|
14
|
+
return source if source.git_repo == git_repo
|
15
|
+
|
16
|
+
raise 'Not same Git repository'
|
17
|
+
end
|
18
|
+
git_repo.commitize(source).if_present do |v|
|
19
|
+
::Avm::Git::Scms::Git::Commit.new(self, v)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param commit_info [Avm::Scms::CommitInfo]
|
24
|
+
# @return [Avm::Git::Scms::Git::Commit,nil]
|
25
|
+
def commit_if_change(commit_info = nil)
|
26
|
+
tracker = ::Avm::Git::Scms::Git::ChangeTracker.new(self, commit_info)
|
27
|
+
tracker.start
|
28
|
+
yield
|
29
|
+
tracker.stop
|
30
|
+
end
|
31
|
+
|
32
|
+
# @return [Avm::Git::Scms::Git::Commit]
|
33
|
+
def head_commit
|
34
|
+
commit(git_repo.head)
|
35
|
+
end
|
36
|
+
|
37
|
+
# @param commit_info [Avm::Scms::CommitInfo]
|
38
|
+
# @return [Avm::Git::Scms::Git::Commit]
|
39
|
+
def reset_and_commit(commit_to_reset, commit_info)
|
40
|
+
git_repo.command('reset', '--soft', commit(commit_to_reset).git_commit.id).execute!
|
41
|
+
commit_dirty(commit_info)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/interval'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
class Interval < ::Avm::Scms::Interval
|
11
|
+
def initialize(scm, from, to)
|
12
|
+
super
|
13
|
+
self.from = scm.commit(from)
|
14
|
+
self.to = scm.commit(to)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Array<Avm::Git::Scms::Git::Commit>]
|
18
|
+
def commits
|
19
|
+
scm.git_repo.command('log', '--pretty=format:%H', git_commit_interval).execute!
|
20
|
+
.each_line.map { |sha1| scm.commit(sha1.strip) }
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [String]
|
24
|
+
def git_commit_interval
|
25
|
+
[from.id, to.id].join('..')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/commit'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
module Milestones
|
11
|
+
BASE_COMMIT_REFERENCE = 'origin/master'
|
12
|
+
|
13
|
+
# @return [Avm::Git::Scms::Git::Commit]
|
14
|
+
def current_milestone_base_commit
|
15
|
+
commit(BASE_COMMIT_REFERENCE)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/remote'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
class Remote < ::Avm::Scms::Remote
|
11
|
+
common_constructor :scm, :eac_git_remote
|
12
|
+
|
13
|
+
# @return [String]
|
14
|
+
def id
|
15
|
+
nyi eac_git_remote
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/git/scms/git/remote'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
module Remotes
|
11
|
+
DEFAULT_REMOTE_ID = 'origin'
|
12
|
+
|
13
|
+
# @return [Avm::Git::Scms::Git::Remote]
|
14
|
+
def default_remote
|
15
|
+
remote(default_remote_id)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [String]
|
19
|
+
def default_remote_id
|
20
|
+
DEFAULT_REMOTE_ID
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param id [String]
|
24
|
+
# @return [Avm::Git::Scms::Git::Remote]
|
25
|
+
def remote(id)
|
26
|
+
::Avm::Git::Scms::Git::Remote.new(self, git_repo.remote(id))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/scms/commit'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Git
|
8
|
+
module Scms
|
9
|
+
class Git < ::Avm::Scms::Base
|
10
|
+
class RunCommit
|
11
|
+
enable_method_class
|
12
|
+
|
13
|
+
common_constructor :scm, :commit_info
|
14
|
+
|
15
|
+
# @return [Avm::Git::Scms::Git::Commit]
|
16
|
+
def result
|
17
|
+
reset
|
18
|
+
add_paths
|
19
|
+
commit
|
20
|
+
|
21
|
+
scm.head_commit
|
22
|
+
end
|
23
|
+
|
24
|
+
protected
|
25
|
+
|
26
|
+
def add_path(path)
|
27
|
+
scm.git_repo.command(
|
28
|
+
*(path.exist? ? ['add'] : ['rm', '-f']),
|
29
|
+
path.relative_path_from(scm.path)
|
30
|
+
).execute!
|
31
|
+
end
|
32
|
+
|
33
|
+
def add_paths
|
34
|
+
commit_info.paths.each { |path| add_path(path) }
|
35
|
+
end
|
36
|
+
|
37
|
+
def commit
|
38
|
+
scm.git_repo.command('commit', *commit_args).execute!
|
39
|
+
end
|
40
|
+
|
41
|
+
# @return [Array<String>]
|
42
|
+
def commit_args
|
43
|
+
r = commit_info.fixup.if_present([]) { |v| ['--fixup', v.id] }
|
44
|
+
r += commit_info.message.if_present([]) { |v| ['--message', v] }
|
45
|
+
return r if r.any?
|
46
|
+
|
47
|
+
raise 'Argument list is empty'
|
48
|
+
end
|
49
|
+
|
50
|
+
def reset
|
51
|
+
scm.git_repo.command('reset', 'HEAD').execute!
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|