avm-tools 0.108.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/tools/runner/app_src/info.rb +12 -2
- data/lib/avm/tools/runner/app_src/update.rb +2 -2
- data/lib/avm/tools/runner/app_src.rb +4 -0
- data/lib/avm/tools/runner/self/registry.rb +25 -0
- 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 +1 -1
- 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 +22 -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_ruby_base1/Gemfile +5 -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-eac_ruby_base1/spec/rubocop_spec.rb +3 -0
- data/vendor/avm-eac_ruby_base1/spec/spec_helper.rb +4 -0
- 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 +0 -0
- 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 +0 -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 +0 -0
- data/vendor/{avm → avm-files}/lib/avm/files/formatter/formats/python.rb +0 -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 +0 -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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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-git/lib/avm/git/scms.rb +11 -0
- 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-git/lib/avm/git/version.rb +7 -0
- 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_git/lib/eac_git/local/commit.rb +21 -2
- data/vendor/eac_git/lib/eac_git/local/log.rb +17 -0
- data/vendor/eac_git/lib/eac_git/local.rb +26 -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_utils/lib/eac_ruby_utils/abstract_methods.rb +7 -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/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
- metadata +133 -86
- data/lib/avm/patches/i18n.rb +0 -22
- 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.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d1323f1184dc14780cfebc69d39fc495d7a1e38b7097fbc33259b076decacf9
|
4
|
+
data.tar.gz: 8ee9accc32035421261372235b215e04962a4cc6ae13fb04b70f52702ba947b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7a0c52c5243b5b761b283e6a5fcec27e6ae5cd9937cb23c4c57889cf37d7808cac60606809cbe01aa24467a5cc5a6c3b818ca63bc088f9f72bdc350cffa926c
|
7
|
+
data.tar.gz: da9d2f826df7d74debc75592028919fd04ac6307f813b7e0b165643c97a65c6451c14150ff33f3be14360afc16d261e3a842fa9accbc204f0d63045c85db293a
|
@@ -12,13 +12,23 @@ module Avm
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def run
|
15
|
-
|
16
|
-
|
15
|
+
show_instance
|
16
|
+
show_source
|
17
17
|
show_subs
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
+
def show_instance
|
23
|
+
infov 'Path', instance.path
|
24
|
+
infov 'Stereotypes', instance.stereotypes.map(&:label).join(', ')
|
25
|
+
end
|
26
|
+
|
27
|
+
def show_source
|
28
|
+
infov 'Stereotype', runner_context.call(:subject).stereotype
|
29
|
+
infov 'SCM', runner_context.call(:subject).scm
|
30
|
+
end
|
31
|
+
|
22
32
|
def show_subs
|
23
33
|
infov 'Sub applications', instance.avm_instance.subs.count
|
24
34
|
instance.avm_instance.subs.each do |subapp|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
require 'avm/tools/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Tools
|
8
|
+
class Runner
|
9
|
+
class Self
|
10
|
+
class Registry
|
11
|
+
runner_with :help do
|
12
|
+
desc 'Show information from registry'
|
13
|
+
end
|
14
|
+
|
15
|
+
def run
|
16
|
+
::Avm::Registry.registries.each do |registry|
|
17
|
+
infov registry.module_suffix, registry.registered_modules.count
|
18
|
+
registry.registered_modules.each { |m| infov ' * ', m }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/avm/tools/version.rb
CHANGED
@@ -1,102 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
6
|
-
# this file to always be loaded, without a need to explicitly require it in any
|
7
|
-
# files.
|
8
|
-
#
|
9
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
10
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
11
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
12
|
-
# individual file that may not need all of that loaded. Instead, consider making
|
13
|
-
# a separate helper file that requires the additional dependencies and performs
|
14
|
-
# the additional setup, and require it from the spec files that actually need
|
15
|
-
# it.
|
16
|
-
#
|
17
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
18
|
-
RSpec.configure do |config|
|
19
|
-
# rspec-expectations config goes here. You can use an alternate
|
20
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
21
|
-
# assertions if you prefer.
|
22
|
-
config.expect_with :rspec do |expectations|
|
23
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
24
|
-
# and `failure_message` of custom matchers include text for helper methods
|
25
|
-
# defined using `chain`, e.g.:
|
26
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
27
|
-
# # => "be bigger than 2 and smaller than 4"
|
28
|
-
# ...rather than:
|
29
|
-
# # => "be bigger than 2"
|
30
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
31
|
-
end
|
32
|
-
|
33
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
34
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
35
|
-
config.mock_with :rspec do |mocks|
|
36
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
37
|
-
# a real object. This is generally recommended, and will default to
|
38
|
-
# `true` in RSpec 4.
|
39
|
-
mocks.verify_partial_doubles = true
|
40
|
-
end
|
41
|
-
|
42
|
-
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
43
|
-
# have no way to turn it off -- the option exists only for backwards
|
44
|
-
# compatibility in RSpec 3). It causes shared context metadata to be
|
45
|
-
# inherited by the metadata hash of host groups and examples, rather than
|
46
|
-
# triggering implicit auto-inclusion in groups with matching metadata.
|
47
|
-
config.shared_context_metadata_behavior = :apply_to_host_groups
|
48
|
-
|
49
|
-
# The settings below are suggested to provide a good initial experience
|
50
|
-
# with RSpec, but feel free to customize to your heart's content.
|
51
|
-
# # This allows you to limit a spec run to individual examples or groups
|
52
|
-
# # you care about by tagging them with `:focus` metadata. When nothing
|
53
|
-
# # is tagged with `:focus`, all examples get run. RSpec also provides
|
54
|
-
# # aliases for `it`, `describe`, and `context` that include `:focus`
|
55
|
-
# # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
56
|
-
# config.filter_run_when_matching :focus
|
57
|
-
#
|
58
|
-
# # Allows RSpec to persist some state between runs in order to support
|
59
|
-
# # the `--only-failures` and `--next-failure` CLI options. We recommend
|
60
|
-
# # you configure your source control system to ignore this file.
|
61
|
-
# config.example_status_persistence_file_path = "spec/examples.txt"
|
62
|
-
#
|
63
|
-
# # Limits the available syntax to the non-monkey patched syntax that is
|
64
|
-
# # recommended. For more details, see:
|
65
|
-
# # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
66
|
-
# # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
67
|
-
# # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
68
|
-
# config.disable_monkey_patching!
|
69
|
-
#
|
70
|
-
# # This setting enables warnings. It's recommended, but in some cases may
|
71
|
-
# # be too noisy due to issues in dependencies.
|
72
|
-
# config.warnings = true
|
73
|
-
#
|
74
|
-
# # Many RSpec users commonly either run the entire suite or an individual
|
75
|
-
# # file, and it's useful to allow more verbose output when running an
|
76
|
-
# # individual spec file.
|
77
|
-
# if config.files_to_run.one?
|
78
|
-
# # Use the documentation formatter for detailed output,
|
79
|
-
# # unless a formatter has already been configured
|
80
|
-
# # (e.g. via a command-line flag).
|
81
|
-
# config.default_formatter = "doc"
|
82
|
-
# end
|
83
|
-
#
|
84
|
-
# # Print the 10 slowest examples and example groups at the
|
85
|
-
# # end of the spec run, to help surface which specs are running
|
86
|
-
# # particularly slow.
|
87
|
-
# config.profile_examples = 10
|
88
|
-
#
|
89
|
-
# # Run specs in random order to surface order dependencies. If you find an
|
90
|
-
# # order dependency and want to debug it, you can fix the order by providing
|
91
|
-
# # the seed, which is printed after each run.
|
92
|
-
# # --seed 1234
|
93
|
-
# config.order = :random
|
94
|
-
#
|
95
|
-
# # Seed global randomization in this process using the `--seed` CLI option.
|
96
|
-
# # Setting this allows you to use `--seed` to deterministically reproduce
|
97
|
-
# # test failures related to randomization by passing the same `--seed` value
|
98
|
-
# # as the one that triggered the failure.
|
99
|
-
# Kernel.srand config.seed
|
100
|
-
require 'eac_ruby_gem_support/rspec'
|
101
|
-
::EacRubyGemSupport::Rspec.setup(::File.expand_path('..', __dir__))
|
102
|
-
end
|
3
|
+
require 'eac_ruby_utils/rspec/default_setup'
|
4
|
+
::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
|
data/vendor/avm/avm.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.add_dependency 'eac_docker', '~> 0.3'
|
16
16
|
s.add_dependency 'eac_git', '~> 0.6'
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.77'
|
18
18
|
s.add_dependency 'eac_templates', '~> 0.1', '>= 0.1.1'
|
19
19
|
s.add_dependency 'filesize', '~> 0.2'
|
20
20
|
s.add_dependency 'htmlbeautifier', '~> 1.3', '>= 1.3.1'
|
@@ -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
|
@@ -1,11 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/registry'
|
3
4
|
require 'eac_git'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
|
6
7
|
module Avm
|
7
8
|
module Sources
|
8
9
|
class Base
|
10
|
+
require_sub __FILE__
|
9
11
|
enable_simple_cache
|
10
12
|
enable_listable
|
11
13
|
lists.add_symbol :option, :parent
|
@@ -14,6 +16,7 @@ module Avm
|
|
14
16
|
self.options = self.class.lists.option.hash_keys_validate!(options)
|
15
17
|
end
|
16
18
|
|
19
|
+
delegate :locale, to: :configuration
|
17
20
|
delegate :to_s, to: :path
|
18
21
|
|
19
22
|
# @return [Avm::Sources::Base]
|
@@ -34,12 +37,31 @@ module Avm
|
|
34
37
|
.map { |subrepo| self.class.new(subrepo.subpath.expand_path(path), parent: self) }
|
35
38
|
end
|
36
39
|
|
40
|
+
def update
|
41
|
+
stereotype.update_source(self)
|
42
|
+
end
|
43
|
+
|
37
44
|
private
|
38
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
|
+
|
39
51
|
# @return [EacGit::Local]
|
40
52
|
def git_repo_uncached
|
41
53
|
::EacGit::Local.new(path)
|
42
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
|
43
65
|
end
|
44
66
|
end
|
45
67
|
end
|
@@ -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
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacRubyBase1
|
5
|
+
module SourceStereotypes
|
6
|
+
class Update
|
7
|
+
class SubUpdate
|
8
|
+
enable_simple_cache
|
9
|
+
enable_speaker
|
10
|
+
common_constructor :source_update, :sub do
|
11
|
+
perform
|
12
|
+
end
|
13
|
+
delegate :source, to: :source_update
|
14
|
+
|
15
|
+
protected
|
16
|
+
|
17
|
+
def on_scm_updated(commit)
|
18
|
+
if commit.no_scm_changed_files.any?
|
19
|
+
commit = commit.reword(no_scm_update_commit_message)
|
20
|
+
source.scm.commit_if_change { source_update.bundle_update }
|
21
|
+
.if_present { |v| v.merge_with(commit) }
|
22
|
+
else
|
23
|
+
commit.reword(scm_update_commit_message)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def perform
|
28
|
+
update_scm.if_present { |commit| on_scm_updated(commit) }
|
29
|
+
end
|
30
|
+
|
31
|
+
def ruby_gem_uncached
|
32
|
+
::EacRubyGemsUtils::Gem.new(sub.path)
|
33
|
+
end
|
34
|
+
|
35
|
+
def no_scm_update_commit_message
|
36
|
+
source_update.i18n_translate(__method__, __locale: source.locale,
|
37
|
+
name: ruby_gem.name,
|
38
|
+
version: ruby_gem.version)
|
39
|
+
end
|
40
|
+
|
41
|
+
def scm_update_commit_message
|
42
|
+
source_update.i18n_translate(__method__, __locale: source.locale)
|
43
|
+
end
|
44
|
+
|
45
|
+
# @return [Avm::Scms::Commit]
|
46
|
+
def update_scm
|
47
|
+
infom "Updating \"#{sub}\"..."
|
48
|
+
source.scm.commit_if_change do
|
49
|
+
sub.scm.update
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|