eac_tools 0.109.0 → 0.110.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 +45 -30
- data/lib/eac_tools/version.rb +1 -1
- data/sub/{avm-git/avm-git.gemspec → avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec} +4 -9
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/assert.rb +75 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/commands.rb +70 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +63 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance.rb +46 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance_with.rb +22 -0
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +7 -0
- data/sub/{avm-git/lib/avm/git.rb → avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb} +3 -7
- data/sub/avm-eac_postgresql_base0/spec/spec_helper.rb +5 -0
- data/sub/avm-eac_rails_base0/Gemfile +8 -0
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +20 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/apache_host.rb +10 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/apache_path.rb +10 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb +21 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/deploy.rb +51 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/source_generators/base.rb +10 -0
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb +37 -0
- data/sub/{avm-git/lib/avm/git → avm-eac_rails_base0/lib/avm/eac_rails_base0}/version.rb +2 -2
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0.rb +11 -0
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_host_spec.rb +19 -0
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_host_spec_files/apache_host_spec_no_ssl_content.conf +11 -0
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_path_spec.rb +20 -0
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/instances/apache_path_spec_files/stub-app_0_apache_path.conf +12 -0
- data/sub/avm-eac_rails_base0/spec/meta/rubocop_spec.rb +3 -0
- data/sub/avm-eac_rails_base0/spec/spec_helper.rb +6 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/instances/deploy/config/database.yml.template +21 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/instances/deploy/config/envvars.d/email.yml.template +11 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/Gemfile +11 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/Rakefile +8 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/app/assets/config/manifest.js +3 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/app/assets/javascripts/application.js +1 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/app/assets/stylesheets/application.scss +1 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/app/controllers/application_controller.rb +4 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/app/controllers/welcome_controller.rb +5 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/app/views/welcome/index.html.erb +1 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/bin/bundle +5 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/bin/rails +11 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/bin/rake +11 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/bin/yarn +11 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/application.rb +11 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/boot.rb +5 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/cable.yml +8 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/credentials.yml.enc +1 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/environment.rb +7 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/puma.rb +39 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/routes.rb +5 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config/spring.rb +8 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/config.ru +7 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/db/schema.rb +1 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb +20 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/lib/ability_mapping.rb +10 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/public/favicon.ico +0 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/spec/code/rubocop_spec.rb +3 -0
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/source_generators/base/spec/spec_helper.rb +8 -0
- data/sub/avm-eac_rails_base1/Gemfile +8 -0
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +22 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_base.rb +14 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_host.rb +15 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_path.rb +17 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +42 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/deploy.rb +20 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/processes/daemon.rb +36 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/processes/tasks_scheduler.rb +24 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/bundle.rb +26 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/code_runner.rb +25 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/log.rb +43 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs/clear.rb +25 -0
- data/sub/{avm-git/lib/avm/git/runners/base/subrepo.rb → avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs.rb} +5 -5
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/rails_server.rb +31 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler/systemd_unit.rb +45 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler.rb +15 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/service.rb +70 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.rb +29 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit.rb +56 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/bundle.rb +23 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb +42 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb +40 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +7 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1.rb +12 -0
- data/sub/avm-eac_rails_base1/spec/meta/rubocop_spec.rb +3 -0
- data/sub/avm-eac_rails_base1/spec/spec_helper.rb +6 -0
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/instances/apache_path/extra_content.conf +5 -0
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler.service +12 -0
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.sh +6 -0
- data/sub/avm-eac_webapp_base0/Gemfile +8 -0
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +24 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/executables.rb +23 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css/file_apply.rb +44 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css.rb +17 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/html.rb +42 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/javascript.rb +19 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb +23 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/provider.rb +17 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/xml.rb +23 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_base.rb +28 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +72 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb +37 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/apache.rb +42 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/deploy.rb +28 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/deploy_info.rb +27 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/install.rb +19 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +37 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb +25 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb +45 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/info.rb +44 -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 +18 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +72 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy_info.rb +35 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/processes/web_server.rb +34 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_host.rb +34 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_path.rb +38 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb +57 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb +47 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy_info.rb +24 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources/base.rb +13 -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 +14 -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/meta/rubocop_spec.rb +3 -0
- data/sub/{avm-git → avm-eac_webapp_base0}/spec/spec_helper.rb +1 -1
- 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
- metadata +154 -130
- 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/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 -80
- 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 -128
- 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 -21
- 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 -31
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +0 -16
- 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/revision_test.rb +0 -102
- data/sub/avm-git/lib/avm/git/runners/base/commit.rb +0 -98
- 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.rb +0 -39
- 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 -38
- 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 -28
- 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/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/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 -11
- 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 -54
- data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +0 -43
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec.rb +0 -80
- 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 -51
- 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 -124
- 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 -89
- data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +0 -5
- data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +0 -5
- data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +0 -21
- /data/sub/{avm-git → avm-eac_postgresql_base0}/Gemfile +0 -0
- /data/sub/{avm-git → avm-eac_postgresql_base0}/spec/meta/rubocop_spec.rb +0 -0
|
@@ -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,98 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'filesize'
|
|
4
|
-
|
|
5
|
-
module Avm
|
|
6
|
-
module Git
|
|
7
|
-
module Runners
|
|
8
|
-
class Base
|
|
9
|
-
class Commit
|
|
10
|
-
runner_with :help do
|
|
11
|
-
desc 'Mostra informações de um commit.'
|
|
12
|
-
bool_opt '-f', '--files', 'Mostra os arquivos.'
|
|
13
|
-
bool_opt '-s', '--size', 'Mostra o tamanho de arquivos.'
|
|
14
|
-
pos_arg :ref
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def run
|
|
18
|
-
input_banner
|
|
19
|
-
validate
|
|
20
|
-
main_info_banner
|
|
21
|
-
files_banner
|
|
22
|
-
size_banner
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
def input_banner
|
|
28
|
-
infov 'Repository', git
|
|
29
|
-
infov 'Reference', reference
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def validate
|
|
33
|
-
return if reference_id.present?
|
|
34
|
-
|
|
35
|
-
fatal_error "Object ID not found for reference \"#{reference}\""
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def main_info_banner
|
|
39
|
-
infov 'Reference ID', reference_id
|
|
40
|
-
infov 'Subject', commit.subject
|
|
41
|
-
infov 'Author', commit.author_all
|
|
42
|
-
infov 'Commiter', commit.commiter_all
|
|
43
|
-
infov 'Files', commit.files.count
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def size_banner
|
|
47
|
-
return unless show_size?
|
|
48
|
-
|
|
49
|
-
infov 'Total files size', bytes_size(commit.files_size)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def files_banner
|
|
53
|
-
return unless parsed.files?
|
|
54
|
-
|
|
55
|
-
commit.files.each do |file|
|
|
56
|
-
infov " #{file.path}", file_value(file)
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def file_value(file)
|
|
61
|
-
s = file.status
|
|
62
|
-
s += ", #{bytes_size(file.dst_size)}" if show_size?
|
|
63
|
-
s
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def reference_id
|
|
67
|
-
git.rev_parse(reference)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def reference
|
|
71
|
-
parsed.ref
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def git_uncached
|
|
75
|
-
::Avm::Git::Launcher::Base.new(runner_context.call(:repository_path))
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def commit_uncached
|
|
79
|
-
::Avm::Git::Commit.new(git, reference_id)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
def human_files_size
|
|
83
|
-
::Filesize.from("#{commit.files_size} B").pretty
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
def bytes_size(size)
|
|
87
|
-
b = "#{size} B"
|
|
88
|
-
"#{::Filesize.from(b).pretty} (#{b})"
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def show_size?
|
|
92
|
-
parsed.size?
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
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
|
|
@@ -1,72 +0,0 @@
|
|
|
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
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
|
@@ -1,80 +0,0 @@
|
|
|
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
|