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
data/lib/avm/app_src.rb
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/apps/sources/configuration'
|
4
|
-
require 'avm/launcher/paths/real'
|
5
|
-
require 'avm/projects/stereotype/job_comparator'
|
6
|
-
require 'eac_ruby_utils/core_ext'
|
7
|
-
require 'avm/projects/stereotypes'
|
8
|
-
require 'i18n'
|
9
|
-
|
10
|
-
module Avm
|
11
|
-
class AppSrc
|
12
|
-
enable_simple_cache
|
13
|
-
common_constructor :path do
|
14
|
-
self.path = path.to_pathname
|
15
|
-
source_stereotypes_mixins
|
16
|
-
end
|
17
|
-
|
18
|
-
delegate :to_s, to: :path
|
19
|
-
|
20
|
-
def locale
|
21
|
-
configuration.if_present(&:locale) || ::I18n.default_locale
|
22
|
-
end
|
23
|
-
|
24
|
-
# Backward compatibility with [Avm::Launcher::Paths::Logical].
|
25
|
-
# @return [Avm::Launcher::Paths::Real].
|
26
|
-
def real
|
27
|
-
::Avm::Launcher::Paths::Real.new(path.to_path)
|
28
|
-
end
|
29
|
-
|
30
|
-
def run_job(job, job_args = [])
|
31
|
-
stereotypes_jobs(job, job_args).each(&:run)
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
# @return [Avm::Apps::Sources::Configuration]
|
37
|
-
def configuration_uncached
|
38
|
-
::Avm::Apps::Sources::Configuration.find_in_path(path)
|
39
|
-
end
|
40
|
-
|
41
|
-
def stereotypes_jobs(job, job_args)
|
42
|
-
job_class_method = "#{job}_class"
|
43
|
-
r = []
|
44
|
-
stereotypes.each do |stereotype|
|
45
|
-
r << stereotype.send(job_class_method).new(self, *job_args) if
|
46
|
-
stereotype.send(job_class_method).present?
|
47
|
-
end
|
48
|
-
r.sort { |a, b| ::Avm::Projects::Stereotype::JobComparator.new(a, b).result }
|
49
|
-
end
|
50
|
-
|
51
|
-
def stereotypes_uncached
|
52
|
-
::Avm::Projects::Stereotypes.list.select { |s| s.match?(self) }
|
53
|
-
end
|
54
|
-
|
55
|
-
def source_stereotypes_mixins
|
56
|
-
stereotypes.each do |s|
|
57
|
-
s.local_project_mixin_module.if_present { |v| singleton_class.include(v) }
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
data/lib/avm/fs_cache.rb
DELETED
data/lib/avm/patches/i18n.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/self/root'
|
4
|
-
require 'i18n'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Patches
|
8
|
-
module I18n
|
9
|
-
class << self
|
10
|
-
def setup_i18n
|
11
|
-
::I18n.load_path += locale_files_paths.map(&:to_path)
|
12
|
-
end
|
13
|
-
|
14
|
-
def locale_files_paths
|
15
|
-
::Avm::Self.root.join('locale').glob('*.yml')
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
::Avm::Patches::I18n.setup_i18n
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/self'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
|
6
|
-
class Object
|
7
|
-
class << self
|
8
|
-
def avm_fs_cache
|
9
|
-
::Avm::Self.application.fs_cache.child(name.variableize)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def avm_fs_cache
|
14
|
-
self.class.avm_fs_cache.child(avm_fs_cache_object_id)
|
15
|
-
end
|
16
|
-
end
|
@@ -1,85 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/launcher/git/base'
|
4
|
-
require 'avm/git/commit'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Projects
|
8
|
-
module Stereotypes
|
9
|
-
class Git
|
10
|
-
class Update
|
11
|
-
class Subrepo
|
12
|
-
TRANSLATE_CLASS = self
|
13
|
-
|
14
|
-
require_sub __FILE__, include_modules: true
|
15
|
-
enable_simple_cache
|
16
|
-
enable_speaker
|
17
|
-
common_constructor :parent_update, :subpath do
|
18
|
-
self.subpath = subpath.to_pathname
|
19
|
-
end
|
20
|
-
|
21
|
-
delegate :git_repo, :instance, to: :parent_update
|
22
|
-
|
23
|
-
def run
|
24
|
-
run_banner
|
25
|
-
if base_commit.sha1 == pull_commit.sha1
|
26
|
-
infom 'No new commit (No changes)'
|
27
|
-
elsif fix_message.present?
|
28
|
-
on_fix_message_present
|
29
|
-
else
|
30
|
-
warn 'No fix message found'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
def base_commit_uncached
|
37
|
-
::Avm::Git::Commit.new(git_repo, git_repo.rev_parse('HEAD'))
|
38
|
-
end
|
39
|
-
|
40
|
-
def on_fix_message_present
|
41
|
-
infom 'Fixing message...'
|
42
|
-
infov 'Message', fix_message
|
43
|
-
git_repo.command('commit', '--amend', '-m', fix_message).execute!
|
44
|
-
end
|
45
|
-
|
46
|
-
def pull_commit_uncached
|
47
|
-
base_commit
|
48
|
-
infom 'Pulling subrepo...'
|
49
|
-
git_repo.command('subrepo', 'pull', '--force', subpath).execute!
|
50
|
-
::Avm::Git::Commit.new(
|
51
|
-
::Avm::Launcher::Git::Base.new(git_repo.root_path.to_path),
|
52
|
-
git_repo.rev_parse('HEAD')
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
|
-
def run_banner
|
57
|
-
infov 'Base SHA1', base_commit.sha1
|
58
|
-
infov 'Pull SHA1', pull_commit.sha1
|
59
|
-
end
|
60
|
-
|
61
|
-
def fix_message
|
62
|
-
TRANSLATE_CLASS.translate(
|
63
|
-
fix_message_translate_key, subpath: subpath, name: subpath.basename,
|
64
|
-
__locale: instance.locale
|
65
|
-
)
|
66
|
-
end
|
67
|
-
|
68
|
-
def fix_message_translate_key
|
69
|
-
if gitrepo_only_changed?
|
70
|
-
:gitrepo_only_changed_fix_message
|
71
|
-
else
|
72
|
-
:content_updated_fix_message
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
def gitrepo_only_changed?
|
77
|
-
pull_commit.files.count == 1 &&
|
78
|
-
::File.basename(pull_commit.files.first.path) == '.gitrepo'
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'avm/patches/class/i18n'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Projects
|
8
|
-
module Stereotypes
|
9
|
-
class Git
|
10
|
-
class Update
|
11
|
-
require_sub __FILE__
|
12
|
-
enable_simple_cache
|
13
|
-
enable_speaker
|
14
|
-
common_constructor :instance
|
15
|
-
|
16
|
-
delegate :git_repo, to: :instance
|
17
|
-
|
18
|
-
def run
|
19
|
-
clean_all
|
20
|
-
selected_subrepos.map do |f|
|
21
|
-
infov 'Subrepo', f
|
22
|
-
::EacRubyUtils::Speaker.context.on(::EacCli::Speaker.new(err_line_prefix: ' ')) do
|
23
|
-
::Avm::Projects::Stereotypes::Git::Update::Subrepo.new(self, f).run
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def selected_subrepos_uncached
|
29
|
-
git_repo.command('subrepo', '-q', 'status').execute!.split("\n").map(&:strip)
|
30
|
-
.select(&:present?).map(&:to_pathname)
|
31
|
-
end
|
32
|
-
|
33
|
-
def clean_all
|
34
|
-
infom 'Cleaning'
|
35
|
-
git_repo.command('subrepo', 'clean', '--all').execute!
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'avm/patches/class/i18n'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Projects
|
8
|
-
module Stereotypes
|
9
|
-
class RubyGem
|
10
|
-
class Update
|
11
|
-
TRANSLATE_CLASS = self
|
12
|
-
|
13
|
-
enable_speaker
|
14
|
-
common_constructor :instance
|
15
|
-
|
16
|
-
def run
|
17
|
-
gemfile_lock_checkout
|
18
|
-
bundle_update
|
19
|
-
gemfile_lock_commit
|
20
|
-
end
|
21
|
-
|
22
|
-
def run_before
|
23
|
-
[:git]
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def bundle_update
|
29
|
-
infom 'Running "bundle update"...'
|
30
|
-
instance.ruby_gem.bundle('update').execute!
|
31
|
-
infom 'Running "bundle install"...'
|
32
|
-
instance.ruby_gem.bundle('install').execute!
|
33
|
-
end
|
34
|
-
|
35
|
-
def gemfile_lock_checkout
|
36
|
-
return unless instance.respond_to?(:git_repo)
|
37
|
-
|
38
|
-
infom 'Checkouting Gemfile.lock...'
|
39
|
-
instance.git_repo.command('checkout', '--',
|
40
|
-
instance.ruby_gem.gemfile_lock_path.to_path).execute!
|
41
|
-
end
|
42
|
-
|
43
|
-
def gemfile_lock_commit
|
44
|
-
return unless instance.respond_to?(:git_repo)
|
45
|
-
|
46
|
-
if gemfile_lock_changed?
|
47
|
-
infom 'Commiting Gemfile.lock...'
|
48
|
-
instance.git_repo.command('commit', '-m', gemfile_lock_commit_message, '--',
|
49
|
-
instance.ruby_gem.gemfile_lock_path).execute!
|
50
|
-
else
|
51
|
-
infom 'Gemfile.lock did not change'
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def gemfile_lock_commit_message
|
56
|
-
TRANSLATE_CLASS.translate(__method__, __locale: instance.locale)
|
57
|
-
end
|
58
|
-
|
59
|
-
def gemfile_lock_changed?
|
60
|
-
instance.git_repo.dirty_file?(instance.ruby_gem.gemfile_lock_path)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/executables'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
require 'content-type'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module Files
|
9
|
-
class Info
|
10
|
-
enable_simple_cache
|
11
|
-
common_constructor :path
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def content_type_uncached
|
16
|
-
::ContentType.parse(
|
17
|
-
::Avm::Executables.file.command.append(['-ib', path]).execute!.strip
|
18
|
-
)
|
19
|
-
rescue Parslet::ParseFailed
|
20
|
-
::ContentType.parse('application/unknown')
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
-
|
5
|
-
require 'avm/apps/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = 'avm-apps'
|
9
|
-
s.version = Avm::Apps::VERSION
|
10
|
-
s.authors = ['Eduardo H. Bogoni']
|
11
|
-
s.summary = 'AVM components for applications.'
|
12
|
-
|
13
|
-
s.files = Dir['{lib}/**/*']
|
14
|
-
|
15
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.67'
|
16
|
-
|
17
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Apps
|
7
|
-
class Config
|
8
|
-
class << self
|
9
|
-
# @deprecated Use EacConfig::Node.context instead.
|
10
|
-
# @return [EacRubyUtils::Context<EacConfig::Node>]
|
11
|
-
def context
|
12
|
-
::EacConfig::Node.context
|
13
|
-
end
|
14
|
-
|
15
|
-
delegate :current, to: :context
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/apps/jobs/variables_source'
|
4
|
-
require 'eac_cli/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Apps
|
8
|
-
module Jobs
|
9
|
-
module Base
|
10
|
-
common_concern do
|
11
|
-
include ::ActiveSupport::Callbacks
|
12
|
-
|
13
|
-
enable_speaker
|
14
|
-
enable_simple_cache
|
15
|
-
enable_listable
|
16
|
-
common_constructor :instance, :options, default: [{}] do
|
17
|
-
if option_list.present?
|
18
|
-
self.options = option_list.hash_keys_validate!(options.symbolize_keys)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
define_callbacks(*jobs)
|
22
|
-
end
|
23
|
-
|
24
|
-
module ClassMethods
|
25
|
-
def jobs
|
26
|
-
const_get('JOBS').dup
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
module InstanceMethods
|
31
|
-
def option_list
|
32
|
-
nil
|
33
|
-
end
|
34
|
-
|
35
|
-
def run
|
36
|
-
start_banner if respond_to?(:start_banner)
|
37
|
-
run_jobs
|
38
|
-
::Avm::Result.success('Done!')
|
39
|
-
rescue ::Avm::Result::Error => e
|
40
|
-
e.to_result
|
41
|
-
end
|
42
|
-
|
43
|
-
def variables_source
|
44
|
-
::Avm::Apps::Jobs::VariablesSource.new(self, instance)
|
45
|
-
end
|
46
|
-
|
47
|
-
protected
|
48
|
-
|
49
|
-
def run_jobs
|
50
|
-
jobs.each do |job|
|
51
|
-
run_callbacks job do
|
52
|
-
send(job)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
def jobs
|
58
|
-
self.class.jobs
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Apps
|
7
|
-
module Jobs
|
8
|
-
class VariablesSource
|
9
|
-
common_constructor :job, :instance
|
10
|
-
|
11
|
-
def read_entry(path, options = {})
|
12
|
-
entry_from_job(path) || instance.read_entry(path, options)
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def entry_from_job(path)
|
18
|
-
method = path.gsub('.', '_').underscore
|
19
|
-
return job.send(method) if job.respond_to?(method, true)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/patches/eac_ruby_gems_utils/gem'
|
4
|
-
require 'i18n'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Apps
|
8
|
-
module Sources
|
9
|
-
class Configuration < ::EacConfig::OldConfigs
|
10
|
-
LOCALE_KEY = :locale
|
11
|
-
|
12
|
-
def locale
|
13
|
-
read_entry(LOCALE_KEY) || ::I18n.default_locale
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module Apps
|
5
|
-
module Sources
|
6
|
-
class Configuration < ::EacConfig::OldConfigs
|
7
|
-
RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
|
8
|
-
RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
|
9
|
-
|
10
|
-
def rubocop_command
|
11
|
-
read_command(RUBOCOP_COMMAND_KEY)
|
12
|
-
end
|
13
|
-
|
14
|
-
def rubocop_gemfile
|
15
|
-
gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
|
16
|
-
return nil if gemfile_path.blank?
|
17
|
-
|
18
|
-
gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
|
19
|
-
return gemfile_path if gemfile_path.file?
|
20
|
-
|
21
|
-
raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/patches/eac_ruby_gems_utils/gem'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Apps
|
7
|
-
module Sources
|
8
|
-
class Configuration < ::EacConfig::OldConfigs
|
9
|
-
BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
|
10
|
-
TEST_COMMAND_KEY = 'test.command'
|
11
|
-
|
12
|
-
def any_test_command
|
13
|
-
bundle_test_command || test_command
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_command
|
17
|
-
read_command(TEST_COMMAND_KEY)
|
18
|
-
end
|
19
|
-
|
20
|
-
def bundle_test_command
|
21
|
-
read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
|
22
|
-
args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
|
23
|
-
::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,57 +0,0 @@
|
|
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 Apps
|
9
|
-
module Sources
|
10
|
-
class Configuration < ::EacConfig::OldConfigs
|
11
|
-
require_sub __FILE__
|
12
|
-
|
13
|
-
FILENAMES = %w[.avm.yml .avm.yaml].freeze
|
14
|
-
|
15
|
-
class << self
|
16
|
-
def find_by_path(path)
|
17
|
-
path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname)
|
18
|
-
internal_find_path(path.expand_path)
|
19
|
-
end
|
20
|
-
|
21
|
-
def find_in_path(path)
|
22
|
-
absolute_pathname = path.to_pathname.expand_path
|
23
|
-
if absolute_pathname.directory?
|
24
|
-
FILENAMES.each do |filename|
|
25
|
-
file = absolute_pathname.join(filename)
|
26
|
-
return new(file) if file.exist?
|
27
|
-
end
|
28
|
-
end
|
29
|
-
nil
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def internal_find_path(absolute_pathname)
|
35
|
-
r = find_in_path(absolute_pathname)
|
36
|
-
return r if r.present?
|
37
|
-
|
38
|
-
internal_find_path(absolute_pathname.dirname) unless absolute_pathname.root?
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def initialize(path)
|
43
|
-
super(nil, storage_path: path)
|
44
|
-
end
|
45
|
-
|
46
|
-
# Utility to read a configuration as a [EacRubyUtils::Envs::Command].
|
47
|
-
# @return [EacRubyUtils::Envs::Command]
|
48
|
-
def read_command(key)
|
49
|
-
read_entry(key).if_present do |v|
|
50
|
-
args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
|
51
|
-
::EacRubyUtils::Envs.local.command(args).chdir(::File.dirname(storage_path))
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/filesystem_cache'
|
4
|
-
require 'tmpdir'
|
5
|
-
|
6
|
-
module EacRubyUtils
|
7
|
-
class << self
|
8
|
-
def fs_cache
|
9
|
-
@fs_cache ||= ::EacRubyUtils::FilesystemCache.new(::Dir.tmpdir, 'eac_ruby_utils', '.cache')
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|