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
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'eac_ruby_utils/patches/class/self_included_modules'
|
3
4
|
require 'eac_ruby_utils/patches/module/common_concern'
|
4
5
|
|
5
6
|
module EacRubyUtils
|
@@ -27,6 +28,12 @@ module EacRubyUtils
|
|
27
28
|
module AbstractMethods
|
28
29
|
common_concern
|
29
30
|
|
31
|
+
class << self
|
32
|
+
def abstract?(a_class)
|
33
|
+
a_class.self_included_modules.include?(::EacRubyUtils::AbstractMethods)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
30
37
|
module ClassMethods
|
31
38
|
def abstract_methods(*methods_names)
|
32
39
|
methods_names.each do |method_name|
|
@@ -1,21 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'active_support/core_ext/string/inflections'
|
4
|
+
require 'i18n'
|
4
5
|
|
5
|
-
class
|
6
|
+
class Module
|
6
7
|
TRANSLATE_LOCALE_KEY = :__locale
|
7
8
|
|
8
|
-
def
|
9
|
+
def i18n_translate(entry_suffix, values = {})
|
9
10
|
on_i18n_locale(values.delete(TRANSLATE_LOCALE_KEY)) do
|
10
|
-
::I18n.translate(
|
11
|
+
::I18n.translate(i18n_translate_entry_full(entry_suffix), values)
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
|
-
def
|
15
|
-
"#{
|
15
|
+
def i18n_translate_entry_full(entry_suffix)
|
16
|
+
"#{i18n_translate_entry_self_prefix}.#{entry_suffix}"
|
16
17
|
end
|
17
18
|
|
18
|
-
def
|
19
|
+
def i18n_translate_entry_self_prefix
|
19
20
|
name.underscore.gsub('/', '.')
|
20
21
|
end
|
21
22
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/patches/module/i18n_translate'
|
4
|
+
|
5
|
+
class Object
|
6
|
+
def i18n_translate(entry_suffix, values = {})
|
7
|
+
self.class.i18n_translate(entry_suffix, values)
|
8
|
+
end
|
9
|
+
|
10
|
+
def on_i18n_locale(locale)
|
11
|
+
self.class.on_i18n_locale(locale)
|
12
|
+
end
|
13
|
+
end
|
@@ -8,7 +8,7 @@ module EacRubyUtils
|
|
8
8
|
extend ::EacRubyUtils::AbstractMethods
|
9
9
|
|
10
10
|
def error(_string)
|
11
|
-
raise_abstract_method(
|
11
|
+
raise_abstract_method(__method__)
|
12
12
|
end
|
13
13
|
|
14
14
|
def fatal_error(string)
|
@@ -18,39 +18,39 @@ module EacRubyUtils
|
|
18
18
|
|
19
19
|
# @see EacRubyUtils::Speaker::Sender.input
|
20
20
|
def input(_question, _options = {})
|
21
|
-
raise_abstract_method(
|
21
|
+
raise_abstract_method(__method__)
|
22
22
|
end
|
23
23
|
|
24
24
|
def info(_string)
|
25
|
-
raise_abstract_method(
|
25
|
+
raise_abstract_method(__method__)
|
26
26
|
end
|
27
27
|
|
28
28
|
def infom(_string)
|
29
|
-
raise_abstract_method(
|
29
|
+
raise_abstract_method(__method__)
|
30
30
|
end
|
31
31
|
|
32
32
|
def infov(*_args)
|
33
|
-
raise_abstract_method(
|
33
|
+
raise_abstract_method(__method__)
|
34
34
|
end
|
35
35
|
|
36
36
|
def out(_string = '')
|
37
|
-
raise_abstract_method(
|
37
|
+
raise_abstract_method(__method__)
|
38
38
|
end
|
39
39
|
|
40
40
|
def puts(_string = '')
|
41
|
-
raise_abstract_method(
|
41
|
+
raise_abstract_method(__method__)
|
42
42
|
end
|
43
43
|
|
44
44
|
def success(_string)
|
45
|
-
raise_abstract_method(
|
45
|
+
raise_abstract_method(__method__)
|
46
46
|
end
|
47
47
|
|
48
48
|
def title(_string)
|
49
|
-
raise_abstract_method(
|
49
|
+
raise_abstract_method(__method__)
|
50
50
|
end
|
51
51
|
|
52
52
|
def warn(_string)
|
53
|
-
raise_abstract_method(
|
53
|
+
raise_abstract_method(__method__)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/patches/class/abstract'
|
4
|
+
|
5
|
+
RSpec.describe ::Class do
|
6
|
+
let(:abstract_class) do
|
7
|
+
described_class.new do
|
8
|
+
enable_abstract_methods
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:concrect_class) do
|
13
|
+
described_class.new(abstract_class)
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '#abstract' do
|
17
|
+
it do
|
18
|
+
expect(abstract_class).to be_abstract
|
19
|
+
end
|
20
|
+
|
21
|
+
it do
|
22
|
+
expect(concrect_class).not_to be_abstract
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/patches/class/self_included_modules'
|
4
|
+
|
5
|
+
RSpec.describe ::Class do
|
6
|
+
let(:includeable_module) do
|
7
|
+
::Module.new
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:parent_class) do
|
11
|
+
module_to_include = includeable_module
|
12
|
+
described_class.new do
|
13
|
+
include module_to_include
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
let(:child_class) do
|
18
|
+
described_class.new(parent_class)
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#self_included_modules' do
|
22
|
+
it do
|
23
|
+
expect(parent_class.self_included_modules).to include(includeable_module)
|
24
|
+
end
|
25
|
+
|
26
|
+
it do
|
27
|
+
expect(child_class.self_included_modules).not_to include(includeable_module)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/patches/object/call_if_proc'
|
4
|
+
|
5
|
+
RSpec.describe ::Object do
|
6
|
+
describe '#call_if_proc' do
|
7
|
+
it { expect(nil.call_if_proc).to eq(nil) }
|
8
|
+
it { expect('a string'.call_if_proc).to eq('a string') }
|
9
|
+
it { expect(-> { 'a returned value' }.call_if_proc).to eq('a returned value') }
|
10
|
+
end
|
11
|
+
end
|