avm-tools 0.105.0 → 0.109.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/instances/entry.rb +3 -3
- data/lib/avm/patches/eac_ruby_gems_utils/gem.rb +2 -2
- data/lib/avm/ruby/rubocop/_configured.rb +2 -2
- data/lib/avm/tools/app_src.rb +68 -0
- data/lib/avm/tools/runner/app_src/info.rb +26 -2
- data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +62 -0
- data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb +11 -41
- data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +2 -4
- data/lib/avm/tools/runner/app_src/update.rb +2 -2
- data/lib/avm/tools/runner/app_src.rb +6 -2
- data/lib/avm/tools/runner/config/load_path.rb +10 -5
- data/lib/avm/tools/runner/git/deploy.rb +2 -2
- data/lib/avm/tools/runner/self/registry.rb +25 -0
- data/lib/avm/tools/runner.rb +0 -4
- data/lib/avm/tools/version.rb +1 -1
- data/template/avm/ruby/gems/generator/static/spec/rubocop_spec.rb +1 -1
- data/template/avm/ruby/gems/generator/static/spec/spec_helper.rb +2 -100
- data/vendor/avm/avm.gemspec +4 -1
- data/{lib → vendor/avm/lib}/avm/data/instance/files_unit.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/data/instance/package.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/data/instance/unit.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/data/instance.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/data/package/dump.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/data/package/load.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/data/package.rb +0 -0
- data/{lib → vendor/avm/lib}/avm/data/unit.rb +0 -0
- data/vendor/avm/lib/avm/jobs/base.rb +62 -0
- data/vendor/avm/lib/avm/jobs/variables_source.rb +22 -0
- data/vendor/{avm-apps/lib/avm/apps.rb → avm/lib/avm/jobs.rb} +1 -1
- data/{lib → vendor/avm/lib}/avm/path_string.rb +0 -0
- data/vendor/avm/lib/avm/registry/base.rb +65 -0
- data/vendor/avm/lib/avm/registry.rb +29 -0
- data/vendor/avm/lib/avm/rspec/setup.rb +22 -0
- data/vendor/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb +11 -0
- data/vendor/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +14 -0
- data/vendor/avm/lib/avm/rspec.rb +9 -0
- data/vendor/avm/lib/avm/scms/base.rb +28 -0
- data/vendor/avm/lib/avm/scms/commit.rb +43 -0
- data/vendor/avm/lib/avm/source_stereotypes/base.rb +21 -0
- data/vendor/avm/lib/avm/sources/base.rb +67 -0
- data/vendor/avm/lib/avm/sources/configuration/_locale.rb +16 -0
- data/vendor/avm/lib/avm/sources/configuration/_rubocop.rb +24 -0
- data/vendor/avm/lib/avm/sources/configuration/_tests.rb +27 -0
- data/vendor/avm/lib/avm/sources/configuration.rb +55 -0
- data/vendor/avm/lib/avm/sources.rb +9 -0
- data/{lib → vendor/avm/lib}/avm/sync.rb +0 -0
- data/vendor/avm/lib/avm/version.rb +1 -1
- data/vendor/avm/spec/lib/avm/scms/base_spec.rb +7 -0
- data/vendor/avm/spec/lib/avm/source_stereotypes/base_spec.rb +7 -0
- data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -0
- data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -2
- data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/vendor/{avm-apps → avm-eac_ruby_base1}/Gemfile +0 -0
- data/vendor/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +19 -0
- data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb +7 -0
- data/{lib/avm/patches/class.rb → vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches.rb} +0 -0
- data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/base.rb +25 -0
- data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/update/sub_update.rb +56 -0
- data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes/update.rb +53 -0
- data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_stereotypes.rb +11 -0
- data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +7 -0
- data/vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb +9 -0
- data/vendor/avm-eac_ruby_base1/locale/en.yaml +8 -0
- data/vendor/avm-eac_ruby_base1/locale/pt-BR.yaml +8 -0
- data/vendor/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_stereotypes/base_spec.rb +7 -0
- data/vendor/{avm-apps → avm-eac_ruby_base1}/spec/rubocop_spec.rb +0 -0
- data/vendor/{avm-apps → avm-eac_ruby_base1}/spec/spec_helper.rb +0 -0
- data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +2 -2
- data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +2 -2
- data/vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +2 -2
- data/vendor/avm-files/Gemfile +5 -0
- data/vendor/avm-files/avm-files.gemspec +21 -0
- data/vendor/{avm → avm-files}/lib/avm/files/appendable/file_content.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/appendable/plain_directory.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/appendable/resource_base.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/appendable/tar_output_command.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/appendable/templatized_directory.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/appendable.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/appender.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/deploy.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/base.rb +2 -2
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/generic_plain.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/html.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/javascript.rb +1 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/json.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/php.rb +1 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/python.rb +1 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/ruby.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/xml.rb +1 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/utf8_assert.rb +3 -1
- data/vendor/{avm → avm-files}/lib/avm/files/formatter.rb +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/rotate.rb +0 -0
- data/vendor/avm-files/lib/avm/files/version.rb +7 -0
- data/vendor/avm-files/lib/avm/files.rb +9 -0
- data/vendor/avm-files/spec/rubocop_spec.rb +3 -0
- data/vendor/avm-files/spec/spec_helper.rb +4 -0
- data/vendor/avm-git/Gemfile +5 -0
- data/vendor/avm-git/avm-git.gemspec +21 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/commit_info.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/base.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/last.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/manual.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/new.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/nth.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules/unique.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit/rules.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit_path/ruby.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/auto_commit_path.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/commit/class_methods.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/commit/deploy.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/commit/deploy_methods.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/commit/diff_tree_line.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/commit/file.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/commit.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/file_auto_fixup.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/commits.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/git_subrepos.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/local_branch.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/local_tag.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/push.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/remote.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/test.rb +2 -2
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/tracker.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/validation.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/validations.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete/working_tree.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/complete.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue/deliver.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/issue.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/organize/reference_update.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/organize/repository.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/organize.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/revision_test.rb +2 -3
- data/vendor/avm-git/lib/avm/git/scms/git/change_tracker.rb +35 -0
- data/vendor/avm-git/lib/avm/git/scms/git/commit.rb +55 -0
- data/vendor/avm-git/lib/avm/git/scms/git.rb +65 -0
- data/vendor/avm-git/lib/avm/git/scms/git_subrepo.rb +41 -0
- data/vendor/avm-git/lib/avm/git/scms/provider.rb +19 -0
- data/vendor/{avm-apps/lib/avm/apps/jobs.rb → avm-git/lib/avm/git/scms.rb} +2 -2
- data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/parent.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/remote.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check/show_result.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/subrepo_check.rb +0 -0
- data/vendor/{avm → avm-git}/lib/avm/git/subrepo_checks.rb +0 -0
- data/vendor/{avm-apps/lib/avm/apps → avm-git/lib/avm/git}/version.rb +2 -2
- data/vendor/{avm → avm-git}/lib/avm/git.rb +3 -2
- data/vendor/{avm → avm-git}/spec/lib/avm/git/auto_commit_path_spec.rb +4 -3
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/deploy_spec.rb +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -0
- data/vendor/{avm → avm-git}/spec/lib/avm/git/commit_spec.rb +0 -0
- data/vendor/avm-git/spec/lib/avm/git/scms/git_spec.rb +8 -0
- data/vendor/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +8 -0
- data/vendor/avm-git/spec/rubocop_spec.rb +3 -0
- data/vendor/avm-git/spec/spec_helper.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/config.rb +6 -3
- data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
- data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
- data/vendor/eac_fs/Gemfile +5 -0
- data/vendor/eac_fs/eac_fs.gemspec +20 -0
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb → eac_fs/lib/eac_fs/cache.rb} +7 -2
- data/{lib/avm → vendor/eac_fs/lib/eac_fs}/cached_download.rb +4 -4
- data/vendor/eac_fs/lib/eac_fs/file_info.rb +29 -0
- data/vendor/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +10 -0
- data/vendor/eac_fs/lib/eac_fs/patches/module.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +15 -0
- data/vendor/eac_fs/lib/eac_fs/patches/object.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches/pathname/info.rb +12 -0
- data/vendor/eac_fs/lib/eac_fs/patches/pathname.rb +4 -0
- data/vendor/{avm/lib/avm/files.rb → eac_fs/lib/eac_fs/patches.rb} +0 -5
- data/vendor/eac_fs/lib/eac_fs/version.rb +5 -0
- data/vendor/eac_fs/lib/eac_fs.rb +7 -0
- data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/filesystem_cache_spec.rb → eac_fs/spec/lib/eac_fs/cache_spec.rb} +2 -2
- data/vendor/eac_fs/spec/rubocop_spec.rb +3 -0
- data/vendor/eac_fs/spec/spec_helper.rb +4 -0
- data/vendor/eac_git/lib/eac_git/local/commit/archive.rb +1 -1
- data/vendor/eac_git/lib/eac_git/local/commit.rb +24 -5
- data/vendor/eac_git/lib/eac_git/local/log.rb +17 -0
- data/vendor/eac_git/lib/eac_git/local.rb +39 -0
- data/vendor/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +11 -0
- data/vendor/eac_git/lib/eac_git/version.rb +1 -1
- data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +2 -1
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +4 -4
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +1 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +16 -7
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +0 -5
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +7 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +9 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +7 -0
- data/{lib/avm/patches/class/i18n.rb → vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb} +8 -7
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +11 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +13 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +10 -10
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +25 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +30 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +11 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
- data/vendor/eac_templates/lib/eac_templates/patches/module/erb_template.rb +9 -0
- data/vendor/eac_templates/lib/eac_templates/patches/module.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/patches/object/erb_template.rb +9 -0
- data/vendor/eac_templates/lib/eac_templates/patches/object.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/patches.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/version.rb +1 -1
- metadata +192 -279
- data/lib/avm/app_src.rb +0 -61
- data/lib/avm/fs_cache.rb +0 -11
- data/lib/avm/patches/i18n.rb +0 -22
- data/lib/avm/patches/object/fs_cache.rb +0 -16
- data/lib/avm/patches/object/i18n.rb +0 -9
- data/lib/avm/projects/stereotypes/git/update/subrepo.rb +0 -85
- data/lib/avm/projects/stereotypes/git/update.rb +0 -41
- data/lib/avm/projects/stereotypes/ruby_gem/update.rb +0 -66
- data/vendor/avm/lib/avm/files/info.rb +0 -24
- data/vendor/avm-apps/avm-apps.gemspec +0 -18
- data/vendor/avm-apps/lib/avm/apps/config.rb +0 -19
- data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +0 -64
- data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +0 -24
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +0 -18
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +0 -26
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +0 -29
- data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +0 -57
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +0 -12
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/jobs/variables_source'
|
4
|
+
require 'eac_cli/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Jobs
|
8
|
+
module Base
|
9
|
+
common_concern do
|
10
|
+
include ::ActiveSupport::Callbacks
|
11
|
+
|
12
|
+
enable_speaker
|
13
|
+
enable_simple_cache
|
14
|
+
enable_listable
|
15
|
+
common_constructor :instance, :options, default: [{}] do
|
16
|
+
if option_list.present?
|
17
|
+
self.options = option_list.hash_keys_validate!(options.symbolize_keys)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
define_callbacks(*jobs)
|
21
|
+
end
|
22
|
+
|
23
|
+
module ClassMethods
|
24
|
+
def jobs
|
25
|
+
const_get('JOBS').dup
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
module InstanceMethods
|
30
|
+
def option_list
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
def run
|
35
|
+
start_banner if respond_to?(:start_banner)
|
36
|
+
run_jobs
|
37
|
+
::Avm::Result.success('Done!')
|
38
|
+
rescue ::Avm::Result::Error => e
|
39
|
+
e.to_result
|
40
|
+
end
|
41
|
+
|
42
|
+
def variables_source
|
43
|
+
::Avm::Jobs::VariablesSource.new(self, instance)
|
44
|
+
end
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
48
|
+
def run_jobs
|
49
|
+
jobs.each do |job|
|
50
|
+
run_callbacks job do
|
51
|
+
send(job)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def jobs
|
57
|
+
self.class.jobs
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Jobs
|
7
|
+
class VariablesSource
|
8
|
+
common_constructor :job, :instance
|
9
|
+
|
10
|
+
def read_entry(path, options = {})
|
11
|
+
entry_from_job(path) || instance.read_entry(path, options)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def entry_from_job(path)
|
17
|
+
method = path.gsub('.', '_').underscore
|
18
|
+
return job.send(method) if job.respond_to?(method, true)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
File without changes
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_ruby_utils/gems_registry'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Registry
|
8
|
+
class Base
|
9
|
+
enable_simple_cache
|
10
|
+
common_constructor :module_suffix
|
11
|
+
|
12
|
+
def detect(*registered_initialize_args)
|
13
|
+
detect_optional(*registered_initialize_args) ||
|
14
|
+
raise("No registered module valid for #{registered_initialize_args}" \
|
15
|
+
" (Module suffix: #{module_suffix})")
|
16
|
+
end
|
17
|
+
|
18
|
+
def detect_optional(*registered_initialize_args)
|
19
|
+
registered_modules.lazy.map { |klass| klass.new(*registered_initialize_args) }
|
20
|
+
.find(&:valid?)
|
21
|
+
end
|
22
|
+
|
23
|
+
def provider_module_suffix
|
24
|
+
"#{module_suffix}::Provider"
|
25
|
+
end
|
26
|
+
|
27
|
+
def single_module_suffix
|
28
|
+
"#{module_suffix}::Base"
|
29
|
+
end
|
30
|
+
|
31
|
+
def to_s
|
32
|
+
"#{self.class}[#{module_suffix}]"
|
33
|
+
end
|
34
|
+
|
35
|
+
def valid_registered_module?(a_module)
|
36
|
+
a_module.is_a?(::Class) && !a_module.abstract?
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def registered_modules_uncached
|
42
|
+
(single_registered_modules + provider_registered_modules)
|
43
|
+
.select { |v| valid_registered_module?(v) }.uniq.sort_by { |s| [s.name] }
|
44
|
+
end
|
45
|
+
|
46
|
+
def single_registered_modules
|
47
|
+
single_instance_registry.registered.map(&:registered_module)
|
48
|
+
end
|
49
|
+
|
50
|
+
def provider_registered_modules
|
51
|
+
provider_registry.registered.map(&:registered_module).flat_map do |provider_class|
|
52
|
+
provider_class.new.all
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def single_instance_registry_uncached
|
57
|
+
::EacRubyUtils::GemsRegistry.new(single_module_suffix)
|
58
|
+
end
|
59
|
+
|
60
|
+
def provider_registry_uncached
|
61
|
+
::EacRubyUtils::GemsRegistry.new(provider_module_suffix)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_ruby_utils/gems_registry'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Registry
|
8
|
+
require_sub __FILE__
|
9
|
+
enable_listable
|
10
|
+
lists.add_symbol :category, :instance_stereotypes, :scms, :source_stereotypes
|
11
|
+
|
12
|
+
class << self
|
13
|
+
enable_simple_cache
|
14
|
+
|
15
|
+
# @return [Array<Avm::Registry::Base>]
|
16
|
+
def registries
|
17
|
+
lists.category.values.map { |c| send(c) }
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
::Avm::Registry.lists.category.each_value do |category|
|
23
|
+
define_method "#{category}_uncached" do
|
24
|
+
::Avm::Registry::Base.new(category.to_s.camelize)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Rspec
|
7
|
+
module Setup
|
8
|
+
def self.extended(obj)
|
9
|
+
obj.setup_in_avm_registry_example
|
10
|
+
obj.setup_not_in_avm_registry_example
|
11
|
+
end
|
12
|
+
|
13
|
+
def setup_in_avm_registry_example
|
14
|
+
require 'avm/rspec/shared_examples/in_avm_registry'
|
15
|
+
end
|
16
|
+
|
17
|
+
def setup_not_in_avm_registry_example
|
18
|
+
require 'avm/rspec/shared_examples/not_in_avm_registry'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
|
5
|
+
::RSpec.shared_examples 'in_avm_registry' do |registry_method|
|
6
|
+
let(:avm_registry) { ::Avm::Registry.send(registry_method) }
|
7
|
+
|
8
|
+
it 'is in the avm registry' do
|
9
|
+
expect(avm_registry.registered_modules).to include(described_class)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
|
5
|
+
::RSpec.shared_examples 'not_in_avm_registry' do |registry_method = nil|
|
6
|
+
registry_method.if_present(::Avm::Registry.registries) { |v| [::Avm::Registry.send(v)] }
|
7
|
+
.each do |registry|
|
8
|
+
context "when registry is #{registry}" do
|
9
|
+
it 'is not in the avm registry' do
|
10
|
+
expect(registry.registered_modules).not_to include(described_class)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Scms
|
7
|
+
class Base
|
8
|
+
enable_abstract_methods
|
9
|
+
abstract_methods :update, :valid?
|
10
|
+
common_constructor :path do
|
11
|
+
self.path = path.to_pathname
|
12
|
+
end
|
13
|
+
|
14
|
+
# @return [Avm::Scms::Commit,NilClass]
|
15
|
+
def commit_if_change(_message = nil)
|
16
|
+
raise_abstract_method __method__
|
17
|
+
end
|
18
|
+
|
19
|
+
def name
|
20
|
+
self.class.name.demodulize
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_s
|
24
|
+
name
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Scms
|
7
|
+
class Commit
|
8
|
+
enable_abstract_methods
|
9
|
+
|
10
|
+
# @return [Array<Pathname>]
|
11
|
+
def changed_files
|
12
|
+
raise_abstract_method __method__
|
13
|
+
end
|
14
|
+
|
15
|
+
# @param other [Avm::Scms::Commit]
|
16
|
+
# @return [Avm::Scms::Commit]
|
17
|
+
def merge_with(_other)
|
18
|
+
raise_abstract_method __method__
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [Array<Pathname>]
|
22
|
+
def no_scm_changed_files
|
23
|
+
changed_files.reject { |path| scm_file?(path) }
|
24
|
+
end
|
25
|
+
|
26
|
+
# @param new_message [String]
|
27
|
+
def reword(_new_message)
|
28
|
+
raise_abstract_method __method__
|
29
|
+
end
|
30
|
+
|
31
|
+
# @return [Array<Pathname>]
|
32
|
+
def scm_changed_files
|
33
|
+
changed_files.select { |path| scm_file?(path) }
|
34
|
+
end
|
35
|
+
|
36
|
+
# @param path [Pathname]
|
37
|
+
# @return [TrueClass,FalseClass]
|
38
|
+
def scm_file?(_path)
|
39
|
+
raise_abstract_method __method__
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module SourceStereotypes
|
7
|
+
class Base
|
8
|
+
enable_abstract_methods
|
9
|
+
abstract_methods :valid?
|
10
|
+
common_constructor :source
|
11
|
+
|
12
|
+
def name
|
13
|
+
self.class.name
|
14
|
+
end
|
15
|
+
|
16
|
+
def to_s
|
17
|
+
name
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
require 'eac_git'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Sources
|
9
|
+
class Base
|
10
|
+
require_sub __FILE__
|
11
|
+
enable_simple_cache
|
12
|
+
enable_listable
|
13
|
+
lists.add_symbol :option, :parent
|
14
|
+
common_constructor :path, :options, default: [{}] do
|
15
|
+
self.path = path.to_pathname
|
16
|
+
self.options = self.class.lists.option.hash_keys_validate!(options)
|
17
|
+
end
|
18
|
+
|
19
|
+
delegate :locale, to: :configuration
|
20
|
+
delegate :to_s, to: :path
|
21
|
+
|
22
|
+
# @return [Avm::Sources::Base]
|
23
|
+
def parent
|
24
|
+
options[OPTION_PARENT]
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [Pathname]
|
28
|
+
def relative_path
|
29
|
+
return path if parent.blank?
|
30
|
+
|
31
|
+
path.relative_path_from(parent.path)
|
32
|
+
end
|
33
|
+
|
34
|
+
# @return [Enumerable<Avm::Sources::Base>]
|
35
|
+
def subs
|
36
|
+
git_repo.subrepos
|
37
|
+
.map { |subrepo| self.class.new(subrepo.subpath.expand_path(path), parent: self) }
|
38
|
+
end
|
39
|
+
|
40
|
+
def update
|
41
|
+
stereotype.update_source(self)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
# @return [Avm::Sources::Configuration]
|
47
|
+
def configuration_uncached
|
48
|
+
::Avm::Sources::Configuration.find_in_path(path) || ::Avm::Sources::Configuration.new
|
49
|
+
end
|
50
|
+
|
51
|
+
# @return [EacGit::Local]
|
52
|
+
def git_repo_uncached
|
53
|
+
::EacGit::Local.new(path)
|
54
|
+
end
|
55
|
+
|
56
|
+
# @return [Avm::Scms::Base]
|
57
|
+
def scm_uncached
|
58
|
+
::Avm::Registry.scms.detect(path)
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Avm::SourceStereotypes::Base]
|
62
|
+
def stereotype_uncached
|
63
|
+
::Avm::Registry.source_stereotypes.detect(self)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/patches/eac_ruby_gems_utils/gem'
|
4
|
+
require 'i18n'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Sources
|
8
|
+
class Configuration < ::EacConfig::OldConfigs
|
9
|
+
LOCALE_KEY = :locale
|
10
|
+
|
11
|
+
def locale
|
12
|
+
read_entry(LOCALE_KEY) || ::I18n.default_locale
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Sources
|
5
|
+
class Configuration < ::EacConfig::OldConfigs
|
6
|
+
RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
|
7
|
+
RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
|
8
|
+
|
9
|
+
def rubocop_command
|
10
|
+
read_command(RUBOCOP_COMMAND_KEY)
|
11
|
+
end
|
12
|
+
|
13
|
+
def rubocop_gemfile
|
14
|
+
gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
|
15
|
+
return nil if gemfile_path.blank?
|
16
|
+
|
17
|
+
gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
|
18
|
+
return gemfile_path if gemfile_path.file?
|
19
|
+
|
20
|
+
raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/patches/eac_ruby_gems_utils/gem'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Sources
|
7
|
+
class Configuration < ::EacConfig::OldConfigs
|
8
|
+
BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
|
9
|
+
TEST_COMMAND_KEY = 'test.command'
|
10
|
+
|
11
|
+
def any_test_command
|
12
|
+
bundle_test_command || test_command
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_command
|
16
|
+
read_command(TEST_COMMAND_KEY)
|
17
|
+
end
|
18
|
+
|
19
|
+
def bundle_test_command
|
20
|
+
read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
|
21
|
+
args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
|
22
|
+
::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_config/old_configs'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
require 'yaml'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Sources
|
9
|
+
class Configuration < ::EacConfig::OldConfigs
|
10
|
+
require_sub __FILE__
|
11
|
+
|
12
|
+
FILENAMES = %w[.avm.yml .avm.yaml].freeze
|
13
|
+
|
14
|
+
class << self
|
15
|
+
def find_by_path(path)
|
16
|
+
path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname)
|
17
|
+
internal_find_path(path.expand_path)
|
18
|
+
end
|
19
|
+
|
20
|
+
def find_in_path(path)
|
21
|
+
absolute_pathname = path.to_pathname.expand_path
|
22
|
+
if absolute_pathname.directory?
|
23
|
+
FILENAMES.each do |filename|
|
24
|
+
file = absolute_pathname.join(filename)
|
25
|
+
return new(file) if file.exist?
|
26
|
+
end
|
27
|
+
end
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def internal_find_path(absolute_pathname)
|
34
|
+
r = find_in_path(absolute_pathname)
|
35
|
+
return r if r.present?
|
36
|
+
|
37
|
+
internal_find_path(absolute_pathname.dirname) unless absolute_pathname.root?
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def initialize(path)
|
42
|
+
super(nil, storage_path: path)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Utility to read a configuration as a [EacRubyUtils::Envs::Command].
|
46
|
+
# @return [EacRubyUtils::Envs::Command]
|
47
|
+
def read_command(key)
|
48
|
+
read_entry(key).if_present do |v|
|
49
|
+
args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
|
50
|
+
::EacRubyUtils::Envs.local.command(args).chdir(::File.dirname(storage_path))
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
File without changes
|
@@ -13,6 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'avm-eac_rails_base1', '~> 0.1'
|
16
|
+
s.add_dependency 'curb', '~> 0.9.10'
|
17
|
+
s.add_dependency 'eac_fs', '~> 0.4'
|
16
18
|
s.add_dependency 'eac_ruby_utils', '~> 0.68'
|
17
19
|
|
18
20
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/eac_redmine_base0/core_update'
|
4
|
-
require 'avm/cached_download'
|
5
4
|
require 'avm/sync'
|
5
|
+
require 'eac_fs/cached_download'
|
6
6
|
require 'eac_ruby_utils/core_ext'
|
7
7
|
|
8
8
|
module Avm
|
@@ -79,8 +79,9 @@ module Avm
|
|
79
79
|
.add_exclude('/*').add_includes(*target_files_to_remove).move_mode(true).run
|
80
80
|
end
|
81
81
|
|
82
|
+
# @return [EacFs::CachedDownload]
|
82
83
|
def source_package_uncached
|
83
|
-
::
|
84
|
+
::EacFs::CachedDownload.new(url, fs_cache)
|
84
85
|
end
|
85
86
|
|
86
87
|
def validate_empty_dir
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'avm/eac_ruby_base1/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'avm-eac_ruby_base1'
|
9
|
+
s.version = Avm::EacRubyBase1::VERSION
|
10
|
+
s.authors = ['Put here the authors']
|
11
|
+
s.summary = 'Put here de description.'
|
12
|
+
|
13
|
+
s.files = Dir['{lib}/**/*']
|
14
|
+
|
15
|
+
s.add_dependency 'avm', '~> 0.6'
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.76'
|
17
|
+
|
18
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
19
|
+
end
|
data/{lib/avm/patches/class.rb → vendor/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches.rb}
RENAMED
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/source_stereotypes/base'
|
4
|
+
require 'avm/eac_ruby_base1/source_stereotypes/update'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacRubyBase1
|
9
|
+
module SourceStereotypes
|
10
|
+
class Base < ::Avm::SourceStereotypes::Base
|
11
|
+
def gemfile_path
|
12
|
+
source.path.join('Gemfile')
|
13
|
+
end
|
14
|
+
|
15
|
+
def valid?
|
16
|
+
gemfile_path.exist? || gemspec_file.exist?
|
17
|
+
end
|
18
|
+
|
19
|
+
def update_source(source)
|
20
|
+
::Avm::EacRubyBase1::SourceStereotypes::Update.new(source)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|