avm-tools 0.106.0 → 0.109.1
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/projects/stereotypes/ruby_gem/version_bump.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/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 +63 -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 +2 -2
- 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 +0 -0
- 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/version.rb +1 -1
- 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 +17 -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/gems_registry/gem.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +1 -1
- 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/i18n_translate.rb +13 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +10 -10
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- 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_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 +211 -243
- data/lib/avm/app_src.rb +0 -61
- data/lib/avm/fs_cache.rb +0 -11
- 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
File without changes
|
File without changes
|
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out
RENAMED
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml
RENAMED
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out
RENAMED
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml
RENAMED
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out
RENAMED
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml
RENAMED
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out
RENAMED
File without changes
|
data/vendor/{avm → avm-git}/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -3,16 +3,19 @@
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
4
|
|
5
5
|
module EacCli
|
6
|
-
class Config
|
6
|
+
class Config < ::SimpleDelegator
|
7
7
|
require_sub __FILE__
|
8
|
-
attr_reader :sub
|
9
8
|
|
10
9
|
def initialize(sub_node)
|
11
|
-
|
10
|
+
super(sub_node)
|
12
11
|
end
|
13
12
|
|
14
13
|
def entry(path, options = {})
|
15
14
|
::EacCli::Config::Entry.new(self, path, options)
|
16
15
|
end
|
16
|
+
|
17
|
+
def sub
|
18
|
+
__getobj__
|
19
|
+
end
|
17
20
|
end
|
18
21
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'eac_fs/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'eac_fs'
|
9
|
+
s.version = EacFs::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 'content-type'
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.70'
|
17
|
+
s.add_dependency 'ruby-filemagic'
|
18
|
+
|
19
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
|
20
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'eac_ruby_utils/
|
3
|
+
require 'eac_fs/patches'
|
4
|
+
require 'eac_ruby_utils/fs/temp'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
class CachedDownload
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
|
10
10
|
def initialize(url, parent_fs_cache = nil)
|
11
11
|
@url = url
|
12
|
-
@fs_cache = (parent_fs_cache ||
|
12
|
+
@fs_cache = (parent_fs_cache || fs_cache).child(url.parameterize)
|
13
13
|
end
|
14
14
|
|
15
15
|
def assert
|
@@ -25,7 +25,7 @@ module Avm
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def path
|
28
|
-
|
28
|
+
fs_cache.content_path.to_pathname
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'content-type'
|
5
|
+
require 'filemagic'
|
6
|
+
|
7
|
+
module EacFs
|
8
|
+
class FileInfo
|
9
|
+
UNKNOWN_CONTENT_TYPE_STRING = 'application/octet-stream'
|
10
|
+
UNKNOWN_CONTENT_TYPE = ::ContentType.parse(UNKNOWN_CONTENT_TYPE_STRING)
|
11
|
+
|
12
|
+
enable_simple_cache
|
13
|
+
attr_reader :magic_string
|
14
|
+
|
15
|
+
def initialize(path)
|
16
|
+
@magic_string = ::FileMagic.new(FileMagic::MAGIC_MIME).file(path.to_pathname.to_path)
|
17
|
+
end
|
18
|
+
|
19
|
+
delegate :charset, :mime_type, :subtype, :type, to: :content_type
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def content_type_uncached
|
24
|
+
::ContentType.parse(magic_string)
|
25
|
+
rescue ::Parslet::ParseFailed
|
26
|
+
UNKNOWN_CONTENT_TYPE
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_fs/patches/module/fs_cache'
|
4
|
+
|
5
|
+
class Object
|
6
|
+
# @return [EacFs::Cache]
|
7
|
+
def fs_cache
|
8
|
+
oid = fs_cache_object_id
|
9
|
+
oid = [oid.to_s] unless oid.is_a?(::Enumerable)
|
10
|
+
oid.inject(self.class.fs_cache) { |a, e| a.child(e.to_s) }
|
11
|
+
end
|
12
|
+
|
13
|
+
# @return [String, Array<String>]
|
14
|
+
def fs_cache_object_id
|
15
|
+
raise 'Abstract method hit'
|
16
|
+
end
|
17
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'active_support/core_ext/object/blank'
|
4
|
-
require '
|
4
|
+
require 'eac_fs/cache'
|
5
5
|
|
6
|
-
RSpec.describe ::
|
6
|
+
RSpec.describe ::EacFs::Cache do
|
7
7
|
let(:tmpdir) { ::Dir.mktmpdir }
|
8
8
|
let(:instance) { described_class.new(tmpdir, 'instance') }
|
9
9
|
|
@@ -9,7 +9,7 @@ module EacGit
|
|
9
9
|
# @return [EacRubyUtils::Envs::Command]
|
10
10
|
def archive_to_dir(path)
|
11
11
|
path = path.to_pathname
|
12
|
-
repo.command('archive', '--format=tar',
|
12
|
+
repo.command('archive', '--format=tar', id).pipe(
|
13
13
|
::EacGit::Executables.tar.command('-xC', path)
|
14
14
|
)
|
15
15
|
end
|
@@ -7,19 +7,25 @@ module EacGit
|
|
7
7
|
class Commit
|
8
8
|
require_sub __FILE__, include_modules: true
|
9
9
|
enable_simple_cache
|
10
|
+
include ::Comparable
|
10
11
|
|
11
12
|
FIELDS = {
|
12
13
|
author_name: '%an', author_email: '%ae', author_date: '%ai',
|
13
14
|
subject: '%s',
|
14
15
|
author_all: '%an <%ae>, %ai',
|
15
16
|
commiter_name: '%cn', commiter_email: '%ce', commiter_date: '%ci',
|
16
|
-
commiter_all: '%cn <%ce>, %ci'
|
17
|
+
commiter_all: '%cn <%ce>, %ci',
|
18
|
+
raw_body: '%B'
|
17
19
|
}.freeze
|
18
20
|
|
19
|
-
common_constructor :repo, :
|
21
|
+
common_constructor :repo, :id
|
22
|
+
|
23
|
+
def <=>(other)
|
24
|
+
[repo, id] <=> [other.repo, other.id]
|
25
|
+
end
|
20
26
|
|
21
27
|
def format(format)
|
22
|
-
repo.command('--no-pager', 'log', '-1', "--pretty=format:#{format}",
|
28
|
+
repo.command('--no-pager', 'log', '-1', "--pretty=format:#{format}", id).execute!.strip
|
23
29
|
end
|
24
30
|
|
25
31
|
FIELDS.each do |field, format|
|
@@ -36,8 +42,21 @@ module EacGit
|
|
36
42
|
changed_files.inject(0) { |a, e| a + e.dst_size }
|
37
43
|
end
|
38
44
|
|
45
|
+
# @return [EacGit::Local::Commit, nil]
|
46
|
+
def parent
|
47
|
+
ps = parents
|
48
|
+
raise "#{self} has more than one parent" if ps.count > 2
|
49
|
+
|
50
|
+
ps.empty? ? nil : ps.first
|
51
|
+
end
|
52
|
+
|
53
|
+
# @return [Array<EacGit::Local::Commit>]
|
54
|
+
def parents
|
55
|
+
format('%P').each_line.map { |line| repo.commitize(line) }
|
56
|
+
end
|
57
|
+
|
39
58
|
def root_child?
|
40
|
-
|
59
|
+
parents.empty?
|
41
60
|
end
|
42
61
|
|
43
62
|
private
|
@@ -45,7 +64,7 @@ module EacGit
|
|
45
64
|
def diff_tree_execute
|
46
65
|
args = []
|
47
66
|
args << '--root' if root_child?
|
48
|
-
args <<
|
67
|
+
args << id
|
49
68
|
repo.command(*::EacGit::Local::Commit::DiffTreeLine::GIT_COMMAND_ARGS, *args).execute!
|
50
69
|
end
|
51
70
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_git/remote'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module EacGit
|
7
|
+
class Local
|
8
|
+
module Log
|
9
|
+
def log(until_commit = nil, from_commit = nil)
|
10
|
+
until_commit, from_commit = [until_commit, from_commit].map { |c| commitize(c) }
|
11
|
+
from_commit ||= head
|
12
|
+
command('log', '--format=%H', "#{until_commit.id}..#{from_commit.id}")
|
13
|
+
.execute!.each_line.map { |line| commitize(line.strip) }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -7,15 +7,43 @@ module EacGit
|
|
7
7
|
# A Git repository in local filesystem.
|
8
8
|
class Local
|
9
9
|
require_sub __FILE__, include_modules: true
|
10
|
+
include ::Comparable
|
11
|
+
|
12
|
+
HEAD_REFERENCE = 'HEAD'
|
13
|
+
|
14
|
+
class << self
|
15
|
+
def find(path)
|
16
|
+
path = path.to_pathname.expand_path
|
17
|
+
if path.join('.git').exist?
|
18
|
+
new(path)
|
19
|
+
elsif path.to_path != '/'
|
20
|
+
find(path.parent)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
10
24
|
|
11
25
|
common_constructor :root_path do
|
12
26
|
self.root_path = root_path.to_pathname
|
13
27
|
end
|
14
28
|
|
29
|
+
def <=>(other)
|
30
|
+
root_path <=> other.root_path
|
31
|
+
end
|
32
|
+
|
15
33
|
def commit(ref, required = false)
|
16
34
|
rev_parse(ref, required).if_present { |v| ::EacGit::Local::Commit.new(self, v) }
|
17
35
|
end
|
18
36
|
|
37
|
+
def commitize(source)
|
38
|
+
if source.is_a?(::EacGit::Local::Commit)
|
39
|
+
return source if source.repo == self
|
40
|
+
|
41
|
+
source = source.id
|
42
|
+
end
|
43
|
+
|
44
|
+
source.to_s.strip.if_present(nil) { |v| ::EacGit::Local::Commit.new(self, v) }
|
45
|
+
end
|
46
|
+
|
19
47
|
def descendant?(descendant, ancestor)
|
20
48
|
base = merge_base(descendant, ancestor)
|
21
49
|
return false if base.blank?
|
@@ -24,6 +52,11 @@ module EacGit
|
|
24
52
|
base == revparse
|
25
53
|
end
|
26
54
|
|
55
|
+
# @return [EacGit::Local::Commit
|
56
|
+
def head(required = true)
|
57
|
+
commit(HEAD_REFERENCE, required)
|
58
|
+
end
|
59
|
+
|
27
60
|
def merge_base(*commits)
|
28
61
|
refs = commits.dup
|
29
62
|
while refs.count > 1
|
@@ -56,6 +89,12 @@ module EacGit
|
|
56
89
|
::EacGit::Local::Subrepo.new(self, subpath)
|
57
90
|
end
|
58
91
|
|
92
|
+
# @return [Array<EacGit::Local::Subrepo>]
|
93
|
+
def subrepos
|
94
|
+
command('subrepo', '-q', 'status').execute!.split("\n").map(&:strip).select(&:present?)
|
95
|
+
.map { |subpath| subrepo(subpath) }
|
96
|
+
end
|
97
|
+
|
59
98
|
def to_s
|
60
99
|
"#{self.class}[#{root_path}]"
|
61
100
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'eac_git/local'
|
4
4
|
require 'eac_ruby_utils/envs'
|
5
5
|
require 'fileutils'
|
6
|
+
require 'securerandom'
|
6
7
|
require 'tmpdir'
|
7
8
|
|
8
9
|
module EacGit
|
@@ -29,6 +30,16 @@ module EacGit
|
|
29
30
|
def file(*subpath)
|
30
31
|
StubbedGitRepositoryFile.new(self, subpath)
|
31
32
|
end
|
33
|
+
|
34
|
+
# @return [EacGit::Local::Commit
|
35
|
+
def random_commit
|
36
|
+
content = ::SecureRandom.hex
|
37
|
+
file = "#{content}.txt"
|
38
|
+
file(file).write(content)
|
39
|
+
command('add', file).execute!
|
40
|
+
command('commit', '-m', "Random commit: #{file}.").execute!
|
41
|
+
head
|
42
|
+
end
|
32
43
|
end
|
33
44
|
|
34
45
|
class StubbedGitRepositoryFile
|
@@ -13,7 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'eac_cli', '~> 0.22', '>= 0.22.2'
|
16
|
-
s.add_dependency '
|
16
|
+
s.add_dependency 'eac_fs', '~> 0.3'
|
17
|
+
s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '~> 0.9.6'
|
17
18
|
s.add_dependency 'eac_ruby_utils', '~> 0.70'
|
18
19
|
|
19
20
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
|
@@ -3,10 +3,10 @@
|
|
3
3
|
require 'eac_cli/config'
|
4
4
|
require 'eac_config/envvars_node'
|
5
5
|
require 'eac_config/yaml_file_node'
|
6
|
+
require 'eac_fs/cache'
|
6
7
|
require 'eac_ruby_base0/application_xdg'
|
7
8
|
require 'eac_ruby_gems_utils/gem'
|
8
9
|
require 'eac_ruby_utils/core_ext'
|
9
|
-
require 'eac_ruby_utils/filesystem_cache'
|
10
10
|
|
11
11
|
module EacRubyBase0
|
12
12
|
class Application
|
@@ -43,9 +43,9 @@ module EacRubyBase0
|
|
43
43
|
delegate "#{item}_xdg_env", "#{item}_dir", to: :app_xdg
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
47
|
-
@
|
48
|
-
cache_dir.join(::
|
46
|
+
def self_fs_cache
|
47
|
+
@self_fs_cache ||= ::EacFs::Cache.new(
|
48
|
+
cache_dir.join(::EacFs::Cache.name.parameterize)
|
49
49
|
)
|
50
50
|
end
|
51
51
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'eac_cli/core_ext'
|
4
4
|
require 'eac_cli/speaker'
|
5
5
|
require 'eac_config/node'
|
6
|
+
require 'eac_fs/cache'
|
6
7
|
require 'eac_ruby_utils/speaker'
|
7
8
|
|
8
9
|
module EacRubyBase0
|
@@ -23,13 +24,11 @@ module EacRubyBase0
|
|
23
24
|
end
|
24
25
|
|
25
26
|
def run
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
run_with_subcommand
|
32
|
-
end
|
27
|
+
on_context do
|
28
|
+
if parsed.version?
|
29
|
+
show_version
|
30
|
+
else
|
31
|
+
run_with_subcommand
|
33
32
|
end
|
34
33
|
end
|
35
34
|
end
|
@@ -38,6 +37,16 @@ module EacRubyBase0
|
|
38
37
|
runner_context.call(:application).version.to_s
|
39
38
|
end
|
40
39
|
|
40
|
+
def on_context
|
41
|
+
::EacRubyUtils::Speaker.context.on(build_speaker) do
|
42
|
+
::EacConfig::Node.context.on(runner_context.call(:application).build_config) do
|
43
|
+
::EacFs::Cache.context.on(application.self_fs_cache) do
|
44
|
+
yield
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
41
50
|
def show_version
|
42
51
|
out("#{application_version}\n")
|
43
52
|
end
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
4
|
require 'eac_ruby_utils/fs/logs'
|
5
|
-
require 'eac_ruby_utils/fs_cache'
|
6
5
|
require 'eac_ruby_utils/listable'
|
7
6
|
require 'eac_ruby_utils/on_clean_ruby_environment'
|
8
7
|
|
@@ -54,10 +53,6 @@ module EacRubyGemsUtils
|
|
54
53
|
logs[:stderr].write(r[:stderr])
|
55
54
|
r[:exit_code].zero?
|
56
55
|
end
|
57
|
-
|
58
|
-
def root_cache
|
59
|
-
::EacRubyUtils.fs_cache.child(gem.root.to_s.parameterize, self.class.name.parameterize)
|
60
|
-
end
|
61
56
|
end
|
62
57
|
end
|
63
58
|
end
|