eac_tools 0.113.1 → 0.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +40 -39
- data/eac_tools.gemspec +9 -7
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm-eac_ruby_base0/.gitignore +2 -0
- data/sub/avm-eac_ruby_base0/.gitrepo +7 -0
- data/sub/avm-eac_ruby_base0/.rspec +1 -0
- data/sub/avm-eac_ruby_base0/.rubocop.yml +3 -0
- data/sub/avm-eac_ruby_base0/avm-eac_ruby_base0.gemspec +4 -4
- data/sub/avm-eac_ruby_base0/lib/avm/eac_ruby_base0/version.rb +1 -1
- data/sub/avm-eac_ruby_base0/spec/lib/avm/eac_ruby_base0/source_generators/base_spec.rb +1 -1
- data/sub/avm-eac_ruby_base0/spec/lib/avm/eac_ruby_base0/source_generators/base_spec_files/dashed-mygem/.rspec +1 -0
- data/sub/avm-eac_ruby_base0/spec/lib/avm/eac_ruby_base0/source_generators/base_spec_files/dashed-mygem/.rubocop.yml +3 -0
- data/sub/avm-eac_ruby_base0/spec/lib/avm/eac_ruby_base0/source_generators/base_spec_files/dashed-mygem/dashed-mygem.gemspec +1 -1
- data/sub/avm-eac_ruby_base0/spec/lib/avm/eac_ruby_base0/source_generators/base_spec_files/mygem_underscore/.rspec +1 -0
- data/sub/avm-eac_ruby_base0/spec/lib/avm/eac_ruby_base0/source_generators/base_spec_files/mygem_underscore/.rubocop.yml +3 -0
- data/sub/avm-eac_ruby_base0/spec/lib/avm/eac_ruby_base0/source_generators/base_spec_files/mygem_underscore/mygem_underscore.gemspec +1 -1
- data/sub/avm-eac_ruby_base1/.gitignore +2 -0
- data/sub/avm-eac_ruby_base1/.gitrepo +7 -0
- data/sub/avm-eac_ruby_base1/.rspec +1 -0
- data/sub/avm-eac_ruby_base1/.rubocop.yml +3 -0
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +4 -4
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats/base/file_resource_name.rb +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/instances/mixin.rb +1 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/build.rb +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/version_file.rb +1 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/gemspec.rb +1 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rake.rb +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock.rb +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gemspec_spec_files/changes1.target.txt +1 -1
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gemspec_spec_files/the_gem.gemspec +1 -1
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/.avm.yml +4 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir4/.avm.yml +4 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/.rspec +1 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/.rubocop.yml +3 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/dashed-mygem.gemspec +1 -1
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/.rspec +1 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/.rubocop.yml +3 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/mygem.gemspec +1 -1
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/mygem.gemspec +1 -1
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/.gitignore +2 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/.rspec +1 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/.rubocop.yml +3 -0
- data/sub/eac_ruby_gem_support/.gitignore +2 -0
- data/sub/eac_ruby_gem_support/.gitrepo +7 -0
- data/sub/eac_ruby_gem_support/.rspec +1 -0
- data/sub/eac_ruby_gem_support/.rubocop.yml +45 -0
- data/sub/eac_ruby_gem_support/eac_ruby_gem_support.gemspec +27 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/helpers/filesystem.rb +73 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/helpers/utils.rb +22 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/setup.rb +51 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures.rb +73 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/shared_examples/spec_paths.rb +11 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/source_target_fixtures_controller.rb +29 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/spec_paths_controller.rb +27 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/rspec/specs/rubocop.rb +33 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/source_target_fixtures/source_target_file.rb +17 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/source_target_fixtures.rb +72 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support/version.rb +5 -0
- data/sub/eac_ruby_gem_support/lib/eac_ruby_gem_support.rb +14 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/rspec/helpers/filesystem_spec.rb +30 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures_spec.rb +11 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures_spec_files/one.source.yaml +2 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/rspec/shared_examples/source_target_fixtures_spec_files/one.target.yaml +2 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/rspec/shared_examples/spec_paths_spec.rb +17 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/source_target_fixtures_spec.rb +25 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/source_target_fixtures_spec_files/stub1.source.txt +1 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/source_target_fixtures_spec_files/stub1.target.html +1 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/source_target_fixtures_spec_files/stub2.source.html +1 -0
- data/sub/eac_ruby_gem_support/spec/lib/eac_ruby_gem_support/source_target_fixtures_spec_files/stub3.target.yaml +1 -0
- data/sub/{avm → eac_ruby_gem_support}/spec/spec_helper.rb +2 -4
- metadata +68 -262
- data/sub/avm/avm.gemspec +0 -28
- data/sub/avm/lib/avm/application_scms/base.rb +0 -37
- data/sub/avm/lib/avm/application_stereotypes/base.rb +0 -29
- data/sub/avm/lib/avm/applications/base/auto_local_source_path.rb +0 -22
- data/sub/avm/lib/avm/applications/base/local_instance.rb +0 -28
- data/sub/avm/lib/avm/applications/base/local_source.rb +0 -31
- data/sub/avm/lib/avm/applications/base/naming.rb +0 -26
- data/sub/avm/lib/avm/applications/base/organization.rb +0 -27
- data/sub/avm/lib/avm/applications/base/publishing.rb +0 -39
- data/sub/avm/lib/avm/applications/base/scm.rb +0 -24
- data/sub/avm/lib/avm/applications/base/stereotype.rb +0 -29
- data/sub/avm/lib/avm/applications/base.rb +0 -34
- data/sub/avm/lib/avm/data/callbacks.rb +0 -36
- data/sub/avm/lib/avm/data/clearer.rb +0 -17
- data/sub/avm/lib/avm/data/dumper.rb +0 -137
- data/sub/avm/lib/avm/data/loader.rb +0 -23
- data/sub/avm/lib/avm/data/package/base_performer.rb +0 -36
- data/sub/avm/lib/avm/data/package/build_directory.rb +0 -25
- data/sub/avm/lib/avm/data/package/clear.rb +0 -19
- data/sub/avm/lib/avm/data/package/dump.rb +0 -42
- data/sub/avm/lib/avm/data/package/load.rb +0 -33
- data/sub/avm/lib/avm/data/package.rb +0 -64
- data/sub/avm/lib/avm/data/performer.rb +0 -45
- data/sub/avm/lib/avm/data/rotate.rb +0 -106
- data/sub/avm/lib/avm/data/unit.rb +0 -44
- data/sub/avm/lib/avm/data/unit_with_commands.rb +0 -48
- data/sub/avm/lib/avm/docker/container.rb +0 -47
- data/sub/avm/lib/avm/docker/image.rb +0 -70
- data/sub/avm/lib/avm/docker/runner.rb +0 -129
- data/sub/avm/lib/avm/entries/auto_values/entry.rb +0 -36
- data/sub/avm/lib/avm/entries/auto_values/uri_entry.rb +0 -21
- data/sub/avm/lib/avm/entries/base/inherited_entry_value.rb +0 -42
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/default_value.rb +0 -24
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb +0 -35
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/url_entry_value.rb +0 -27
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value.rb +0 -40
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/component_factory.rb +0 -40
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/generic_component.rb +0 -59
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/path_component.rb +0 -16
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/url_component.rb +0 -22
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values.rb +0 -23
- data/sub/avm/lib/avm/entries/base.rb +0 -53
- data/sub/avm/lib/avm/entries/entry/no_context_entry.rb +0 -21
- data/sub/avm/lib/avm/entries/entry.rb +0 -69
- data/sub/avm/lib/avm/entries/jobs/base.rb +0 -58
- data/sub/avm/lib/avm/entries/jobs/variables_source/read_entry.rb +0 -48
- data/sub/avm/lib/avm/entries/jobs/variables_source.rb +0 -13
- data/sub/avm/lib/avm/entries/jobs/with_variables_source.rb +0 -13
- data/sub/avm/lib/avm/entries/keys_constants_set.rb +0 -41
- data/sub/avm/lib/avm/entries/uri_builder.rb +0 -87
- data/sub/avm/lib/avm/executables.rb +0 -21
- data/sub/avm/lib/avm/file_formats/base.rb +0 -34
- data/sub/avm/lib/avm/file_formats/file_result.rb +0 -11
- data/sub/avm/lib/avm/file_formats/search_formatter.rb +0 -83
- data/sub/avm/lib/avm/file_formats/unknown.rb +0 -15
- data/sub/avm/lib/avm/file_formats/utf8_assert.rb +0 -72
- data/sub/avm/lib/avm/files/appendable/file_content.rb +0 -28
- data/sub/avm/lib/avm/files/appendable/plain_directory.rb +0 -27
- data/sub/avm/lib/avm/files/appendable/resource_base.rb +0 -17
- data/sub/avm/lib/avm/files/appendable/tar_output_command.rb +0 -27
- data/sub/avm/lib/avm/files/appendable/templatized_directory.rb +0 -36
- data/sub/avm/lib/avm/files/appendable.rb +0 -51
- data/sub/avm/lib/avm/files/appender.rb +0 -9
- data/sub/avm/lib/avm/files/deploy.rb +0 -70
- data/sub/avm/lib/avm/files/text_replacer/gsub.rb +0 -22
- data/sub/avm/lib/avm/files/text_replacer.rb +0 -29
- data/sub/avm/lib/avm/instances/base/auto_values/data.rb +0 -28
- data/sub/avm/lib/avm/instances/base/auto_values/database.rb +0 -60
- data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +0 -31
- data/sub/avm/lib/avm/instances/base/auto_values/source.rb +0 -16
- data/sub/avm/lib/avm/instances/base/auto_values.rb +0 -12
- data/sub/avm/lib/avm/instances/base/dockerizable.rb +0 -41
- data/sub/avm/lib/avm/instances/base/entry_keys.rb +0 -25
- data/sub/avm/lib/avm/instances/base/install.rb +0 -28
- data/sub/avm/lib/avm/instances/base/processes.rb +0 -25
- data/sub/avm/lib/avm/instances/base/production.rb +0 -33
- data/sub/avm/lib/avm/instances/base/subcommand_parent.rb +0 -23
- data/sub/avm/lib/avm/instances/base/web.rb +0 -15
- data/sub/avm/lib/avm/instances/base.rb +0 -70
- data/sub/avm/lib/avm/instances/data/files_unit.rb +0 -57
- data/sub/avm/lib/avm/instances/data/loading_denied_error.rb +0 -10
- data/sub/avm/lib/avm/instances/data/package.rb +0 -25
- data/sub/avm/lib/avm/instances/data/unit.rb +0 -36
- data/sub/avm/lib/avm/instances/docker_image.rb +0 -13
- data/sub/avm/lib/avm/instances/entry_keys.rb +0 -39
- data/sub/avm/lib/avm/instances/ids.rb +0 -28
- data/sub/avm/lib/avm/instances/process.rb +0 -29
- data/sub/avm/lib/avm/instances/runner.rb +0 -34
- data/sub/avm/lib/avm/launcher/context/instance_collector.rb +0 -44
- data/sub/avm/lib/avm/launcher/context/instance_discovery/root_instance_paths.rb +0 -51
- data/sub/avm/lib/avm/launcher/context/instance_discovery.rb +0 -53
- data/sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb +0 -34
- data/sub/avm/lib/avm/launcher/context/instance_manager/cached_instances.rb +0 -32
- data/sub/avm/lib/avm/launcher/context/instance_manager.rb +0 -74
- data/sub/avm/lib/avm/launcher/context/settings.rb +0 -51
- data/sub/avm/lib/avm/launcher/context.rb +0 -83
- data/sub/avm/lib/avm/launcher/errors/base.rb +0 -10
- data/sub/avm/lib/avm/launcher/errors/non_project.rb +0 -13
- data/sub/avm/lib/avm/launcher/instances/base/cache.rb +0 -43
- data/sub/avm/lib/avm/launcher/instances/base/publishing.rb +0 -53
- data/sub/avm/lib/avm/launcher/instances/base.rb +0 -77
- data/sub/avm/lib/avm/launcher/instances/error.rb +0 -10
- data/sub/avm/lib/avm/launcher/instances/runner_helper.rb +0 -43
- data/sub/avm/lib/avm/launcher/instances/settings.rb +0 -24
- data/sub/avm/lib/avm/launcher/paths/logical.rb +0 -76
- data/sub/avm/lib/avm/launcher/paths/real.rb +0 -44
- data/sub/avm/lib/avm/launcher/project.rb +0 -15
- data/sub/avm/lib/avm/launcher/publish/base.rb +0 -44
- data/sub/avm/lib/avm/launcher/publish/check_result.rb +0 -64
- data/sub/avm/lib/avm/launcher/stereotype.rb +0 -63
- data/sub/avm/lib/avm/patches/eac_config/entry_path.rb +0 -44
- data/sub/avm/lib/avm/path_string.rb +0 -27
- data/sub/avm/lib/avm/registry/application_scms.rb +0 -13
- data/sub/avm/lib/avm/registry/application_stereotypes/build_available.rb +0 -45
- data/sub/avm/lib/avm/registry/application_stereotypes/stereotype_builder.rb +0 -30
- data/sub/avm/lib/avm/registry/application_stereotypes.rb +0 -42
- data/sub/avm/lib/avm/registry/applications.rb +0 -35
- data/sub/avm/lib/avm/registry/base.rb +0 -26
- data/sub/avm/lib/avm/registry/config_objects.rb +0 -15
- data/sub/avm/lib/avm/registry/detection_error.rb +0 -8
- data/sub/avm/lib/avm/registry/file_formats.rb +0 -17
- data/sub/avm/lib/avm/registry/from_gems.rb +0 -67
- data/sub/avm/lib/avm/registry/instances.rb +0 -13
- data/sub/avm/lib/avm/registry/launcher_stereotypes.rb +0 -8
- data/sub/avm/lib/avm/registry/runners.rb +0 -8
- data/sub/avm/lib/avm/registry/scms.rb +0 -8
- data/sub/avm/lib/avm/registry/source_generators.rb +0 -14
- data/sub/avm/lib/avm/registry/sources.rb +0 -38
- data/sub/avm/lib/avm/registry/with_path/cache.rb +0 -28
- data/sub/avm/lib/avm/registry/with_path.rb +0 -44
- data/sub/avm/lib/avm/registry.rb +0 -31
- data/sub/avm/lib/avm/result.rb +0 -80
- data/sub/avm/lib/avm/rspec/launcher_controller.rb +0 -91
- data/sub/avm/lib/avm/rspec/setup/launcher.rb +0 -18
- data/sub/avm/lib/avm/rspec/setup/source_generator.rb +0 -20
- data/sub/avm/lib/avm/rspec/setup.rb +0 -32
- data/sub/avm/lib/avm/rspec/shared_examples/avm_file_format_file_resource_name.rb +0 -13
- data/sub/avm/lib/avm/rspec/shared_examples/avm_file_formats_with_fixtures.rb +0 -28
- data/sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb +0 -27
- data/sub/avm/lib/avm/rspec/shared_examples/entries_values.rb +0 -19
- data/sub/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb +0 -9
- data/sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +0 -12
- data/sub/avm/lib/avm/rspec/shared_examples/with_config.rb +0 -9
- data/sub/avm/lib/avm/rspec/shared_examples/with_launcher.rb +0 -13
- data/sub/avm/lib/avm/runner_with/file_replacer.rb +0 -28
- data/sub/avm/lib/avm/runner_with/filesystem_renamer.rb +0 -99
- data/sub/avm/lib/avm/runner_with/filesystem_traverser.rb +0 -49
- data/sub/avm/lib/avm/runners/base.rb +0 -25
- data/sub/avm/lib/avm/scms/auto_commit/file_resource_name.rb +0 -47
- data/sub/avm/lib/avm/scms/auto_commit/for_file.rb +0 -79
- data/sub/avm/lib/avm/scms/auto_commit/rules/base.rb +0 -37
- data/sub/avm/lib/avm/scms/auto_commit/rules/last.rb +0 -17
- data/sub/avm/lib/avm/scms/auto_commit/rules/manual.rb +0 -38
- data/sub/avm/lib/avm/scms/auto_commit/rules/new.rb +0 -21
- data/sub/avm/lib/avm/scms/auto_commit/rules/nth.rb +0 -29
- data/sub/avm/lib/avm/scms/auto_commit/rules/unique.rb +0 -19
- data/sub/avm/lib/avm/scms/auto_commit/rules.rb +0 -32
- data/sub/avm/lib/avm/scms/base/branches.rb +0 -20
- data/sub/avm/lib/avm/scms/base/commits.rb +0 -32
- data/sub/avm/lib/avm/scms/base/milestones.rb +0 -19
- data/sub/avm/lib/avm/scms/base/remotes.rb +0 -20
- data/sub/avm/lib/avm/scms/base.rb +0 -59
- data/sub/avm/lib/avm/scms/branch.rb +0 -24
- data/sub/avm/lib/avm/scms/changed_file.rb +0 -46
- data/sub/avm/lib/avm/scms/commit.rb +0 -64
- data/sub/avm/lib/avm/scms/commit_info.rb +0 -37
- data/sub/avm/lib/avm/scms/inflector.rb +0 -22
- data/sub/avm/lib/avm/scms/interval.rb +0 -16
- data/sub/avm/lib/avm/scms/null/commit.rb +0 -11
- data/sub/avm/lib/avm/scms/null.rb +0 -16
- data/sub/avm/lib/avm/scms/remote.rb +0 -9
- data/sub/avm/lib/avm/self/docker_image.rb +0 -11
- data/sub/avm/lib/avm/self/instance/entry_keys.rb +0 -12
- data/sub/avm/lib/avm/self/instance.rb +0 -27
- data/sub/avm/lib/avm/source_generators/base.rb +0 -69
- data/sub/avm/lib/avm/source_generators/option.rb +0 -11
- data/sub/avm/lib/avm/source_generators/option_list.rb +0 -29
- data/sub/avm/lib/avm/source_generators/runner.rb +0 -55
- data/sub/avm/lib/avm/sources/auto_commit/for_file.rb +0 -29
- data/sub/avm/lib/avm/sources/base/application.rb +0 -32
- data/sub/avm/lib/avm/sources/base/configuration.rb +0 -89
- data/sub/avm/lib/avm/sources/base/instance.rb +0 -13
- data/sub/avm/lib/avm/sources/base/locale.rb +0 -30
- data/sub/avm/lib/avm/sources/base/organizational.rb +0 -30
- data/sub/avm/lib/avm/sources/base/parent.rb +0 -26
- data/sub/avm/lib/avm/sources/base/stereotype.rb +0 -16
- data/sub/avm/lib/avm/sources/base/sub/remove.rb +0 -36
- data/sub/avm/lib/avm/sources/base/sub.rb +0 -23
- data/sub/avm/lib/avm/sources/base/subs.rb +0 -63
- data/sub/avm/lib/avm/sources/base/subs_paths.rb +0 -30
- data/sub/avm/lib/avm/sources/base/testing.rb +0 -67
- data/sub/avm/lib/avm/sources/base/update.rb +0 -37
- data/sub/avm/lib/avm/sources/base/update_sub.rb +0 -55
- data/sub/avm/lib/avm/sources/base/update_subs.rb +0 -17
- data/sub/avm/lib/avm/sources/base/version_bump.rb +0 -26
- data/sub/avm/lib/avm/sources/base.rb +0 -56
- data/sub/avm/lib/avm/sources/configuration/rubocop.rb +0 -26
- data/sub/avm/lib/avm/sources/configuration.rb +0 -57
- data/sub/avm/lib/avm/sources/issues/deliver.rb +0 -51
- data/sub/avm/lib/avm/sources/runner.rb +0 -38
- data/sub/avm/lib/avm/sources/tests/builder.rb +0 -91
- data/sub/avm/lib/avm/sources/tests/performer.rb +0 -32
- data/sub/avm/lib/avm/sources/tests/result.rb +0 -13
- data/sub/avm/lib/avm/sources/tests/single.rb +0 -71
- data/sub/avm/lib/avm/sources/update_error.rb +0 -8
- data/sub/avm/lib/avm/sync.rb +0 -90
- data/sub/avm/lib/avm/version.rb +0 -5
- data/sub/avm/lib/avm/version_number.rb +0 -45
- data/sub/avm/lib/avm/with/application_stereotype.rb +0 -29
- data/sub/avm/lib/avm/with/extra_subcommands.rb +0 -41
- data/sub/avm/lib/avm.rb +0 -18
- data/sub/avm/locale/en.yml +0 -6
- data/sub/avm/locale/pt-BR.yml +0 -6
- data/sub/avm/spec/lib/avm/applications/base/entries_spec.rb +0 -29
- data/sub/avm/spec/lib/avm/applications/base/entries_spec_files/config.yml +0 -12
- data/sub/avm/spec/lib/avm/applications/base_spec.rb +0 -21
- data/sub/avm/spec/lib/avm/applications/base_spec_fixture.yml +0 -3
- data/sub/avm/spec/lib/avm/file_formats/base_spec.rb +0 -9
- data/sub/avm/spec/lib/avm/instances/base/entries_spec.rb +0 -78
- data/sub/avm/spec/lib/avm/instances/base/entries_spec_files/config.yml +0 -50
- data/sub/avm/spec/lib/avm/instances/base_spec.rb +0 -29
- data/sub/avm/spec/lib/avm/launcher/context_spec.rb +0 -98
- data/sub/avm/spec/lib/avm/launcher/context_spec.yml +0 -5
- data/sub/avm/spec/lib/avm/launcher/context_spec_files/config.yml +0 -9
- data/sub/avm/spec/lib/avm/launcher/instances/base_spec.rb +0 -39
- data/sub/avm/spec/lib/avm/launcher/instances/base_spec_files/config.yml +0 -5
- data/sub/avm/spec/lib/avm/launcher/instances/base_spec_files/settings.yaml +0 -5
- data/sub/avm/spec/lib/avm/patches/eac_config/entry_path_spec.rb +0 -26
- data/sub/avm/spec/lib/avm/scms/auto_commit/file_resource_name_spec.rb +0 -20
- data/sub/avm/spec/lib/avm/scms/base_spec.rb +0 -5
- data/sub/avm/spec/lib/avm/sources/base_spec.rb +0 -5
- data/sub/avm/spec/lib/avm/sources/runner_spec.rb +0 -7
- data/sub/avm/spec/spec_helper/launcher_context/settings.yml +0 -6
- data/sub/avm/template/avm/rspec/launcher_controller/dummy/avm-tools_stub/avm-tools.gemspec +0 -29
- data/sub/avm/template/avm/rspec/launcher_controller/dummy/avm-tools_stub/lib/avm/tools/version.rb +0 -7
- data/sub/avm/template/avm/rspec/launcher_controller/dummy/avm-tools_stub/lib/avm/tools.rb +0 -6
- data/sub/avm/template/avm/rspec/launcher_controller/dummy/ruby_gem_stub/lib/ruby_gem_stub/version.rb +0 -5
- data/sub/avm/template/avm/rspec/launcher_controller/dummy/ruby_gem_stub/lib/ruby_gem_stub.rb +0 -3
- data/sub/avm/template/avm/rspec/launcher_controller/dummy/ruby_gem_stub/ruby_gem_stub.gemspec +0 -16
- data/sub/avm/template/avm/rspec/launcher_controller/settings.yml +0 -1
- data/sub/avm/template/avm/self/docker_image/Dockerfile +0 -17
- data/sub/avm/template/avm/self/docker_image/entrypoint.sh +0 -12
- /data/sub/{avm → eac_ruby_gem_support}/Gemfile +0 -0
- /data/sub/{avm/spec/meta/rubocop_spec.rb → eac_ruby_gem_support/spec/meta/rubocop_check_spec.rb} +0 -0
data/sub/avm/lib/avm/registry.rb
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module Registry
|
|
5
|
-
enable_listable
|
|
6
|
-
lists.add_symbol :category, :applications, :application_scms, :application_stereotypes,
|
|
7
|
-
:config_objects, :file_formats, :instances, :launcher_stereotypes, :runners,
|
|
8
|
-
:scms, :source_generators, :sources
|
|
9
|
-
|
|
10
|
-
class << self
|
|
11
|
-
enable_simple_cache
|
|
12
|
-
|
|
13
|
-
# @return [Array<Avm::Registry::FromGems>]
|
|
14
|
-
def registries
|
|
15
|
-
lists.category.values.map { |c| send(c) }
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
|
|
20
|
-
::Avm::Registry.lists.category.each_value do |category|
|
|
21
|
-
define_method "#{category}_uncached" do
|
|
22
|
-
registry_class(category).new(category.to_s.camelize)
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def registry_class(category)
|
|
27
|
-
::Avm::Registry.const_get(category.to_s.camelize)
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
data/sub/avm/lib/avm/result.rb
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'colorized_string'
|
|
4
|
-
|
|
5
|
-
module Avm
|
|
6
|
-
class Result < ::SimpleDelegator
|
|
7
|
-
include ::EacRubyUtils::Listable
|
|
8
|
-
|
|
9
|
-
lists.add_string :type, :success, :error, :neutral, :pending, :outdated
|
|
10
|
-
|
|
11
|
-
lists.type.values.each do |type| # rubocop:disable Style/HashEachMethods
|
|
12
|
-
singleton_class.define_method type do |value|
|
|
13
|
-
new(value, type)
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
TYPE_SUCCESS_COLOR = 'green'
|
|
18
|
-
TYPE_ERROR_COLOR = 'red'
|
|
19
|
-
TYPE_NEUTRAL_COLOR = 'light_black'
|
|
20
|
-
TYPE_PENDING_COLOR = 'yellow'
|
|
21
|
-
TYPE_OUTDATED_COLOR = 'blue'
|
|
22
|
-
|
|
23
|
-
class << self
|
|
24
|
-
# Return Avm::Result.success(success_value) if +success+ is truthy.
|
|
25
|
-
# Return Avm::Result.error(error_value || success_value) if +success+ is falsely.
|
|
26
|
-
# @return [Avm::Result]
|
|
27
|
-
def success_or_error(success, success_value, error_value = nil)
|
|
28
|
-
if success
|
|
29
|
-
self.success(success_value)
|
|
30
|
-
else
|
|
31
|
-
error(error_value.presence || success_value)
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
attr_reader :type
|
|
37
|
-
|
|
38
|
-
def initialize(value, type)
|
|
39
|
-
super(value)
|
|
40
|
-
validate_type(type)
|
|
41
|
-
@type = type
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def label
|
|
45
|
-
label_fg
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def label_fg
|
|
49
|
-
ColorizedString.new(to_s).send(type_color)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def label_bg
|
|
53
|
-
ColorizedString.new(to_s).light_white.send("on_#{type_color}")
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def type_color
|
|
57
|
-
self.class.const_get("type_#{type}_color".upcase)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
lists.type.values.each do |type| # rubocop:disable Style/HashEachMethods
|
|
61
|
-
define_method "#{type}?" do
|
|
62
|
-
@type == type
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
private
|
|
67
|
-
|
|
68
|
-
def validate_type(type)
|
|
69
|
-
return if self.class.lists.type.values.include?(type)
|
|
70
|
-
|
|
71
|
-
raise "Tipo desconhecido: \"#{type}\" (Válido: #{self.class.lists.type.values.join(', ')})"
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
class Error < StandardError
|
|
75
|
-
def to_result
|
|
76
|
-
::Avm::Result.error(message)
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
require 'ruby-progressbar'
|
|
5
|
-
require 'tmpdir'
|
|
6
|
-
|
|
7
|
-
module Avm
|
|
8
|
-
module Rspec
|
|
9
|
-
class LauncherController
|
|
10
|
-
attr_accessor :remotes_dir
|
|
11
|
-
|
|
12
|
-
# @param application_id [String]
|
|
13
|
-
# @param path [Pathname]
|
|
14
|
-
# @return void
|
|
15
|
-
def application_source_path(application_id, path)
|
|
16
|
-
EacConfig::Node.context.current.entry("#{application_id}_dev.install.path").value =
|
|
17
|
-
path.to_pathname.to_path
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# @param settings_path [Pathname]
|
|
21
|
-
# @param projects_root [Pathname]
|
|
22
|
-
def context_set(settings_path, projects_root)
|
|
23
|
-
Avm::Launcher::Context.current = Avm::Launcher::Context.new(
|
|
24
|
-
settings_file: settings_path.to_pathname.to_path,
|
|
25
|
-
cache_root: Dir.mktmpdir
|
|
26
|
-
)
|
|
27
|
-
self.projects_root = projects_root
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @return [Pathname]
|
|
31
|
-
def default_settings_path
|
|
32
|
-
templates_directory.join('settings.yml')
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# @return [Pathname]
|
|
36
|
-
def dummy_directory
|
|
37
|
-
templates_directory.join('dummy')
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# @param settings_path [Pathname]
|
|
41
|
-
def temp_context(settings_path)
|
|
42
|
-
context_set(settings_path, Dir.mktmpdir)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def init_remote(name)
|
|
46
|
-
r = Avm::Git::Launcher::Base.new(File.join(remotes_dir, name))
|
|
47
|
-
r.init_bare
|
|
48
|
-
r
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def init_git(subdir)
|
|
52
|
-
r = Avm::Git::Launcher::Base.new(File.join(projects_root, subdir))
|
|
53
|
-
r.git
|
|
54
|
-
r.execute!('config', 'user.email', 'theuser@example.net')
|
|
55
|
-
r.execute!('config', 'user.name', 'The User')
|
|
56
|
-
r
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# @return [Avm::Launcher::Context]
|
|
60
|
-
def new_context
|
|
61
|
-
Avm::Launcher::Context.new(
|
|
62
|
-
settings_file: default_settings_path,
|
|
63
|
-
cache_root: Dir.mktmpdir
|
|
64
|
-
)
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
# @param path [String]
|
|
68
|
-
def projects_root
|
|
69
|
-
@projects_root ||= Dir.mktmpdir
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
# @param path [Pathname]
|
|
73
|
-
def projects_root=(path)
|
|
74
|
-
@projects_root = path.to_pathname.to_path
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# @return [Pathname]
|
|
78
|
-
def templates_directory
|
|
79
|
-
'../../../template/avm/rspec/launcher_controller'.to_pathname.expand_path(__dir__)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
def touch_commit(repos, subpath)
|
|
83
|
-
require 'fileutils'
|
|
84
|
-
FileUtils.mkdir_p(File.dirname(repos.subpath(subpath)))
|
|
85
|
-
FileUtils.touch(repos.subpath(subpath))
|
|
86
|
-
repos.execute!('add', repos.subpath(subpath))
|
|
87
|
-
repos.execute!('commit', '-m', subpath)
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'tmpdir'
|
|
4
|
-
|
|
5
|
-
module Avm
|
|
6
|
-
module Rspec
|
|
7
|
-
module Setup
|
|
8
|
-
module Launcher
|
|
9
|
-
def temp_launcher_context(settings_file = nil)
|
|
10
|
-
settings_file ||= temp_file
|
|
11
|
-
::Avm::Launcher::Context.current = ::Avm::Launcher::Context.new(
|
|
12
|
-
projects_root: ::Dir.mktmpdir, settings_file: settings_file, cache_root: ::Dir.mktmpdir
|
|
13
|
-
)
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module Rspec
|
|
5
|
-
module Setup
|
|
6
|
-
module SourceGenerator
|
|
7
|
-
DEFAULT_TARGET_BASENAME = 'generated_app'
|
|
8
|
-
|
|
9
|
-
# @return [Avm::Sources::Base]
|
|
10
|
-
def avm_source(stereotype_name, options = {})
|
|
11
|
-
options = options.dup
|
|
12
|
-
target_basename ||= options.delete(:target_basename) || DEFAULT_TARGET_BASENAME
|
|
13
|
-
target_path ||= options.delete(:target_path) || temp_dir.join(target_basename)
|
|
14
|
-
::Avm::Registry.source_generators.detect(stereotype_name, target_path, options).perform
|
|
15
|
-
::Avm::Registry.sources.detect(target_path)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module Rspec
|
|
5
|
-
module Setup
|
|
6
|
-
EXAMPLES = %w[avm_file_formats_with_fixtures avm_file_format_file_resource_name
|
|
7
|
-
avm_source_generated entries_values in_avm_registry not_in_avm_registry
|
|
8
|
-
with_config with_launcher].freeze
|
|
9
|
-
|
|
10
|
-
def self.extended(obj)
|
|
11
|
-
obj.setup_examples
|
|
12
|
-
obj.rspec_config.include(::Avm::Rspec::Setup::Launcher)
|
|
13
|
-
obj.rspec_config.include(::Avm::Rspec::Setup::SourceGenerator)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def setup_examples
|
|
17
|
-
EXAMPLES.each do |example|
|
|
18
|
-
require "avm/rspec/shared_examples/#{example}"
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# @return [self]
|
|
23
|
-
def stub_avm_contexts
|
|
24
|
-
stub_eac_config_node
|
|
25
|
-
stub_eac_fs_contexts
|
|
26
|
-
stub_eac_speaker
|
|
27
|
-
|
|
28
|
-
self
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_examples 'avm_file_format_file_resource_name' do |input_expected|
|
|
4
|
-
describe '#file_resource_name' do
|
|
5
|
-
input_expected.each do |path, expected_resource_name|
|
|
6
|
-
context "when path is \"#{path}\"" do
|
|
7
|
-
let(:instance) { described_class.new }
|
|
8
|
-
|
|
9
|
-
it { expect(instance.file_resource_name(path)).to eq(expected_resource_name) }
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_examples 'avm_file_formats_with_fixtures' do |the_spec_file|
|
|
4
|
-
include_examples 'source_target_fixtures', the_spec_file
|
|
5
|
-
|
|
6
|
-
def format_files_in_directory(target_dir)
|
|
7
|
-
Avm::FileFormats::SearchFormatter
|
|
8
|
-
.new([target_dir], recursive: true, apply: true, verbose: false)
|
|
9
|
-
.run
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def source_data(source_file)
|
|
13
|
-
dir = temp_dir
|
|
14
|
-
source_basename = source_file_basename_without_source_extname(source_file)
|
|
15
|
-
source_path = dir.join(source_basename)
|
|
16
|
-
FileUtils.cp(source_file, source_path)
|
|
17
|
-
format_files_in_directory(dir)
|
|
18
|
-
source_path.read
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def source_file_basename_without_source_extname(source_file)
|
|
22
|
-
source_file.to_pathname.basename_sub { |b| b.to_path.gsub('.source', '') }.basename
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def target_data(target_file)
|
|
26
|
-
File.read(target_file)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_examples 'avm_source_generated' do |spec_file, stereotype, options = {}|
|
|
4
|
-
include_context 'spec_paths', spec_file
|
|
5
|
-
block_on_each_source = options.delete(:block_on_each_source)
|
|
6
|
-
|
|
7
|
-
spec_paths_controller.fixtures_directory.children.select(&:directory?).each do |target_dir|
|
|
8
|
-
context "when target is \"#{target_dir.basename}\"" do
|
|
9
|
-
let(:source) { avm_source(stereotype, options.merge(target_basename: target_dir.basename)) }
|
|
10
|
-
|
|
11
|
-
it do
|
|
12
|
-
if ENV['WRITE_TARGET_FIXTURES'].to_bool
|
|
13
|
-
FileUtils.rm_rf(target_dir)
|
|
14
|
-
FileUtils.cp_r(source.path, target_dir)
|
|
15
|
-
end
|
|
16
|
-
expect(fs_comparator.build(source.path)).to eq(fs_comparator.build(target_dir))
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
instance_exec(&block_on_each_source) if block_on_each_source
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
# @return [EacFs::Comparato]
|
|
24
|
-
def fs_comparator
|
|
25
|
-
EacFs::Comparator.new.rename_file('.gitignore', '_gitignore')
|
|
26
|
-
end
|
|
27
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_examples 'entries_values' do |spec_file, expected_values|
|
|
4
|
-
describe '#read_entry' do
|
|
5
|
-
include_examples 'with_config', spec_file
|
|
6
|
-
|
|
7
|
-
expected_values.each do |instance_id, values|
|
|
8
|
-
values.each do |input, expected|
|
|
9
|
-
context "when a auto value is requested for \"#{instance_id}.#{input}\"" do
|
|
10
|
-
let(:instance) { described_class.by_id(instance_id) }
|
|
11
|
-
|
|
12
|
-
it ".entry('#{input}').value should return \"#{expected}\"" do
|
|
13
|
-
expect(instance.entry(input).value).to eq(expected)
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_examples 'in_avm_registry' do |registry_method|
|
|
4
|
-
let(:avm_registry) { Avm::Registry.send(registry_method) }
|
|
5
|
-
|
|
6
|
-
it 'is in the avm registry' do
|
|
7
|
-
expect(avm_registry.registered_modules).to include(described_class)
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_examples 'not_in_avm_registry' do |registry_method = nil|
|
|
4
|
-
registry_method.if_present(Avm::Registry.registries) { |v| [Avm::Registry.send(v)] }
|
|
5
|
-
.each do |registry|
|
|
6
|
-
context "when registry is #{registry}" do
|
|
7
|
-
it 'is not in the avm registry' do
|
|
8
|
-
expect(registry.available).not_to include(described_class)
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_examples 'with_config' do |spec_file|
|
|
4
|
-
config_path = spec_file.to_pathname
|
|
5
|
-
config_path = config_path.dirname.join("#{config_path.basename_noext}_files", 'config.yml')
|
|
6
|
-
temp_config_path = EacRubyUtils::Fs::Temp.file
|
|
7
|
-
FileUtils.cp(config_path, temp_config_path)
|
|
8
|
-
EacRubyUtils::Rspec.default_setup.stub_eac_config_node(self, temp_config_path)
|
|
9
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
RSpec.shared_context 'with_launcher' do
|
|
4
|
-
let(:launcher_controller) { Avm::Rspec::LauncherController.new }
|
|
5
|
-
|
|
6
|
-
before do
|
|
7
|
-
Avm::Launcher::Context.current = launcher_controller.new_context
|
|
8
|
-
launcher_controller.remotes_dir = Dir.mktmpdir
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
delegate :application_source_path, :context_set, :init_git, :init_remote, :temp_context,
|
|
12
|
-
:projects_root, :projects_root=, :touch_commit, to: :launcher_controller
|
|
13
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module RunnerWith
|
|
5
|
-
module FileReplacer
|
|
6
|
-
common_concern do
|
|
7
|
-
include ::Avm::RunnerWith::FilesystemTraverser
|
|
8
|
-
include TopMethods
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
module TopMethods
|
|
12
|
-
def text_replacer
|
|
13
|
-
::Avm::Files::TextReplacer.new
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def replace_file?(_file)
|
|
17
|
-
true
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def traverser_check_file(file)
|
|
21
|
-
return unless replace_file?(file)
|
|
22
|
-
|
|
23
|
-
infov 'Changed', file if text_replacer.file_apply(file)
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module RunnerWith
|
|
5
|
-
module FilesystemRenamer
|
|
6
|
-
common_concern do
|
|
7
|
-
runner_with :confirmation, :filesystem_traverser
|
|
8
|
-
prepend PrependMethods
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
class RenameFile
|
|
12
|
-
enable_speaker
|
|
13
|
-
common_constructor :runner, :file
|
|
14
|
-
delegate :path, :target_path, :valid?, to: :file
|
|
15
|
-
|
|
16
|
-
CONFIRM_MESSAGE = 'Rename?'
|
|
17
|
-
|
|
18
|
-
def show
|
|
19
|
-
if rename?
|
|
20
|
-
puts [target_path_to_s, '<='.green, path_to_s].join(' ')
|
|
21
|
-
else
|
|
22
|
-
puts path_to_s
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def rename
|
|
27
|
-
return unless rename?
|
|
28
|
-
|
|
29
|
-
show
|
|
30
|
-
do_rename if runner.confirm?(CONFIRM_MESSAGE)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# @return [Boolean]
|
|
34
|
-
def rename?
|
|
35
|
-
path.to_pathname != target_path.to_pathname
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
|
|
40
|
-
def do_rename
|
|
41
|
-
::FileUtils.mv(path, target_path)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# @return [String]
|
|
45
|
-
def path_to_s
|
|
46
|
-
path.basename.to_path.light_black
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# @return [String]
|
|
50
|
-
def target_path_to_s
|
|
51
|
-
target_path.relative_path_from(path.dirname).to_path
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
module PrependMethods
|
|
56
|
-
# @param path [Pathname]
|
|
57
|
-
# @return [void]
|
|
58
|
-
def traverser_check_file(path)
|
|
59
|
-
file = RenameFile.new(self, file_class.new(path))
|
|
60
|
-
files << file if file.valid?
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
FILE_WRAPPER_CLASS_BASENAME = 'FileWrapper'
|
|
65
|
-
|
|
66
|
-
# @return [Class]
|
|
67
|
-
def file_class
|
|
68
|
-
self.class.const_get(FILE_WRAPPER_CLASS_BASENAME)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# @return [void]
|
|
72
|
-
def run_filesystem_renamer
|
|
73
|
-
self.files = []
|
|
74
|
-
run_filesystem_traverser
|
|
75
|
-
show_files
|
|
76
|
-
rename_files
|
|
77
|
-
success 'Done'
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# @return [void]
|
|
81
|
-
def show_files
|
|
82
|
-
infov 'Files found', files.count
|
|
83
|
-
files.each(&:show)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# @return [void]
|
|
87
|
-
def rename_files
|
|
88
|
-
return if parsed.no? || files.none?(&:rename?)
|
|
89
|
-
|
|
90
|
-
infom 'Renaming files...'
|
|
91
|
-
files.each(&:rename)
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
private
|
|
95
|
-
|
|
96
|
-
attr_accessor :files
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
end
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module RunnerWith
|
|
5
|
-
module FilesystemTraverser
|
|
6
|
-
DEFAULT_DEFAULT_TRAVERSER_RECURSIVE = false
|
|
7
|
-
|
|
8
|
-
common_concern do
|
|
9
|
-
include ::EacCli::Runner
|
|
10
|
-
include ::EacFs::Traversable
|
|
11
|
-
|
|
12
|
-
enable_settings_provider
|
|
13
|
-
include TopMethods
|
|
14
|
-
|
|
15
|
-
runner_definition do
|
|
16
|
-
bool_opt '-R', '--recursive', 'Recursive.'
|
|
17
|
-
bool_opt '--no-recursive', 'No recursive.'
|
|
18
|
-
pos_arg :paths, optional: true, repeat: true
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
module TopMethods
|
|
23
|
-
def on_none_path_informed
|
|
24
|
-
infom 'Warning: none path informed'
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def paths
|
|
28
|
-
parsed.paths.map(&:to_pathname)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def run_filesystem_traverser
|
|
32
|
-
if paths.any?
|
|
33
|
-
paths.each { |path| traverser_check_path(path) }
|
|
34
|
-
else
|
|
35
|
-
on_none_path_informed
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def traverser_recursive
|
|
40
|
-
return false if parsed.no_recursive?
|
|
41
|
-
return true if parsed.recursive?
|
|
42
|
-
|
|
43
|
-
setting_value(:default_traverser_recursive, required: false)
|
|
44
|
-
.if_not_nil(DEFAULT_DEFAULT_TRAVERSER_RECURSIVE)
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module Runners
|
|
5
|
-
class Base
|
|
6
|
-
enable_abstract_methods
|
|
7
|
-
|
|
8
|
-
class << self
|
|
9
|
-
def command_argument
|
|
10
|
-
stereotype_name.underscore.dasherize
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def stereotype_name
|
|
14
|
-
name.split('::')[-3]
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
delegate :command_argument, :stereotype_name, to: :class
|
|
19
|
-
|
|
20
|
-
def to_s
|
|
21
|
-
stereotype_name
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avm
|
|
4
|
-
module Scms
|
|
5
|
-
module AutoCommit
|
|
6
|
-
class FileResourceName
|
|
7
|
-
require_sub __FILE__, include_modules: true
|
|
8
|
-
enable_simple_cache
|
|
9
|
-
common_constructor :scm, :path do
|
|
10
|
-
self.path = path.to_pathname
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def class_name
|
|
14
|
-
file_format.file_resource_name(relative_path)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def commit_message
|
|
18
|
-
r = class_name
|
|
19
|
-
r += ': *' if modified?
|
|
20
|
-
r += ': remove' unless path.file?
|
|
21
|
-
"#{r}."
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# @return [Boolean]
|
|
25
|
-
def modified?
|
|
26
|
-
dirty_file.if_present(false, &:modify?)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# @return [Pathname]
|
|
30
|
-
def relative_path
|
|
31
|
-
path.expand_path.relative_path_from(scm.path.expand_path)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
private
|
|
35
|
-
|
|
36
|
-
def dirty_file_uncached
|
|
37
|
-
scm.changed_files.find { |e| e.absolute_path == path.expand_path }
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# @return [Avm::FileFormats::Base]
|
|
41
|
-
def file_format_uncached
|
|
42
|
-
::Avm::Registry.file_formats.detect(path)
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|