eac_tools 0.90.0 → 0.90.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -35
- data/lib/eac_tools/version.rb +1 -1
- data/sub/{eac_templates/eac_templates.gemspec → avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec} +7 -5
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/add_or_replace_gem_line.rb +56 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/dependency.rb +19 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile.rb +34 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/depends_on.rb +25 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/gem_conflict.rb +44 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/in_gemfile.rb +17 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_buffer.rb +77 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_factory.rb +33 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base.rb +19 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/ruby_requirement.rb +16 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/version_requirement.rb +26 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser.rb +25 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats/base/file_resource_name.rb +47 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats/base.rb +22 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/instances/mixin.rb +19 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/instances.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/build.rb +126 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/specification.rb +63 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem.rb +13 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/local_project_mixin.rb +28 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +130 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base.rb +37 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/preferred_version_requirements.rb +43 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec/setup.rb +16 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec/source_generator.rb +22 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb +31 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb +17 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +42 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb +55 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/add_or_replace_gem_line.rb +62 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/dependency.rb +19 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec.rb +42 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/version_file.rb +45 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base/lib_rename.rb +77 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base/rubocop.rb +30 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base.rb +18 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/dependencies.rb +27 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/gemfile_lock.rb +27 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/options.rb +30 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/version_builder.rb +52 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base.rb +111 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundle_command.rb +39 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +68 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rake.rb +42 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubocop.rb +28 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubocop_command.rb +73 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubygems.rb +43 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/update.rb +25 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version.rb +31 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb +19 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +61 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/bundle_update.rb +23 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb +53 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/gemfile_local.rb +69 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/namespace_replacer.rb +55 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundle.rb +29 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb +58 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock/git.rb +60 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock.rb +89 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb +76 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler.rb +19 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/update_dependencies_requirements.rb +68 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners.rb +13 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/base.rb +59 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/minitest.rb +29 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple/decorated_gem.rb +52 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple/result.rb +29 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple.rb +90 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/rspec.rb +25 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests.rb +13 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +59 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update_dependency_requirements.rb +64 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +7 -0
- data/sub/{eac_templates/lib/eac_templates/sources.rb → avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb} +2 -2
- data/sub/avm-eac_ruby_base1/locale/en.yml +9 -0
- data/sub/avm-eac_ruby_base1/locale/pt-BR.yml +9 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec.rb +7 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.source.out +192 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.target.yaml +300 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.source.out +245 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.target.yaml +355 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/3.source.out +0 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/3.target.yaml +305 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec.rb +15 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/Gemfile.source +6 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/Gemfile.target +3 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/ruby_code.rb.source +6 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/ruby_code.rb.target +5 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/build_spec.rb +46 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/specification_spec.rb +49 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish_spec.rb +29 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base_spec.rb +23 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/preferred_version_requirements_spec.rb +23 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec.rb +14 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec_files/a_version_file.rb +7 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb +36 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile +5 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile.lock +27 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir4/false_command.rb +4 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec.rb +19 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile.lock +1 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/_gitignore +2 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/dashed-mygem.gemspec +19 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/lib/dashed/mygem/version.rb +7 -0
- data/sub/{eac_templates/lib/eac_templates/modules.rb → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/lib/dashed/mygem.rb} +2 -2
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile +8 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile.lock +1 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/_gitignore +2 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/lib/mygem/version.rb +5 -0
- data/sub/{eac_templates/lib/eac_templates.rb → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/lib/mygem.rb} +1 -1
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/mygem.gemspec +19 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/spec/spec_helper.rb +4 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec.rb +30 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Gemfile +5 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Gemfile.lock +19 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Rakefile +14 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/exe/myrunner +5 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/lib/mygem/version.rb +5 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/lib/mygem.rb +5 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/mygem.gemspec +17 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base_spec.rb +16 -0
- data/sub/avm-eac_ruby_base1/spec/rubocop_spec.rb +3 -0
- data/sub/avm-eac_ruby_base1/spec/spec_helper.rb +4 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/gemspec.template +19 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/root_lib.template +7 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/Gemfile +8 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/spec/rubocop_spec.rb +3 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/spec/spec_helper.rb +4 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/version.template +5 -0
- metadata +149 -348
- data/sub/eac_ruby_utils/MIT-LICENCE +0 -16
- data/sub/eac_ruby_utils/README.rdoc +0 -3
- data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +0 -26
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_abstract.rb +0 -100
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/array_accessor.rb +0 -25
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/base_accessor.rb +0 -57
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb +0 -16
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/class_methods.rb +0 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/common_accessor.rb +0 -30
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/enumerable_accessor.rb +0 -52
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/hash_accessor.rb +0 -57
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/instance_methods.rb +0 -21
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/set_accessor.rb +0 -25
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable.rb +0 -15
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_instance_method.rb +0 -34
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/arguments_consumer.rb +0 -80
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit.rb +0 -47
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit_array.rb +0 -81
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/blank_not_blank.rb +0 -19
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +0 -31
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/by_reference.rb +0 -23
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte.rb +0 -106
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte_array.rb +0 -36
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/class_setup.rb +0 -52
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +0 -41
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +0 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_accessors.rb +0 -36
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +0 -39
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +0 -64
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +0 -55
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +0 -93
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +0 -32
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/compare_by.rb +0 -28
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/context.rb +0 -33
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb +0 -21
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +0 -7
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +0 -53
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/enum.rb +0 -102
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/enumerables_methods.rb +0 -42
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/append_command_options.rb +0 -38
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/concat.rb +0 -41
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/debugging.rb +0 -19
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/execution.rb +0 -52
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/extra_options.rb +0 -28
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command.rb +0 -45
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_env.rb +0 -28
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/envvars.rb +0 -27
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb +0 -23
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +0 -67
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/composite_command.rb +0 -45
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +0 -93
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/execution_error.rb +0 -8
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/execution_result.rb +0 -45
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb +0 -22
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/local_env.rb +0 -17
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/process.rb +0 -27
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/spawn.rb +0 -32
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/dasho_options.rb +0 -53
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +0 -25
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +0 -24
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +0 -34
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env.rb +0 -74
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs.rb +0 -23
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/clearable_directory.rb +0 -57
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/extname.rb +0 -30
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/directory.rb +0 -16
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/file.rb +0 -34
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp.rb +0 -52
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +0 -80
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +0 -34
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +0 -29
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/class_methods.rb +0 -14
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/instance_methods.rb +0 -30
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/integer_list.rb +0 -23
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/item.rb +0 -48
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +0 -129
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/lists.rb +0 -51
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/string_list.rb +0 -19
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/symbol_list.rb +0 -19
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable.rb +0 -17
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +0 -48
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_all_gems.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_gem.rb +0 -47
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/module_i18n_translate.rb +0 -74
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb +0 -30
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/base.rb +0 -34
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/hash.rb +0 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/set.rb +0 -19
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/options_consumer.rb +0 -62
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patch.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable/uri/query_value.rb +0 -37
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable/uri.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/common_constructor.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/method_class.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +0 -7
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/static_method_class.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb +0 -45
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb +0 -14
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/if_key.rb +0 -12
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/options_consumer.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/to_struct.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash.rb +0 -5
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/ibr.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/abstract_methods.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/acts_as_abstract.rb +0 -14
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/acts_as_immutable.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/acts_as_instance_method.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/common_concern.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/compare_by.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/context.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/immutable.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/listable.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/module_parent.rb +0 -5
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/patch.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/require_sub.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/simple_cache.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/speaker.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb +0 -25
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +0 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +0 -55
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +0 -13
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +0 -17
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb +0 -19
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_respond.rb +0 -22
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/recursive_build.rb +0 -12
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_bool.rb +0 -12
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_pathname.rb +0 -15
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_uri.rb +0 -15
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object.rb +0 -5
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/assert_parent.rb +0 -12
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_noext.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +0 -13
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/child_of.rb +0 -16
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/if_exist.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/mkpath_s.rb +0 -12
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/parent_n.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/readlink_r.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/reqdir_glob.rb +0 -13
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb +0 -16
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb +0 -10
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +0 -16
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches.rb +0 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +0 -51
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +0 -39
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub/base.rb +0 -80
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub/sub_file.rb +0 -59
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +0 -11
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +0 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +0 -17
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/setup_manager.rb +0 -17
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +0 -27
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +0 -49
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/stub_speaker.rb +0 -39
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb +0 -32
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +0 -71
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects/replace_instance_method.rb +0 -36
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects.rb +0 -52
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby.rb +0 -9
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb +0 -79
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +0 -50
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +0 -77
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +0 -64
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/sender.rb +0 -37
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker.rb +0 -16
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/static_method_class.rb +0 -12
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +0 -70
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +0 -63
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/unimplemented_method_error.rb +0 -6
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +0 -5
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/wildcards.rb +0 -26
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +0 -105
- data/sub/eac_ruby_utils/lib/eac_ruby_utils.rb +0 -6
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_abstract_spec.rb +0 -94
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/array_accessor_spec.rb +0 -43
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/common_accessor_spec.rb +0 -57
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/hash_accessor_spec.rb +0 -42
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/set_accessor_spec.rb +0 -43
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb +0 -17
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/bit_array_spec.rb +0 -22
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/blank_not_blank_spec.rb +0 -16
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/byte_spec.rb +0 -54
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +0 -65
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +0 -151
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +0 -21
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compare_by_spec.rb +0 -39
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/custom_format_spec.rb +0 -60
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/enum_spec.rb +0 -44
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/enumerables_methods_spec.rb +0 -50
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/base_example.rb +0 -97
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/local_env_spec.rb +0 -11
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/ssh_env_spec.rb +0 -17
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/executable_spec.rb +0 -37
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/ssh_env_spec.rb +0 -25
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb +0 -18
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb +0 -12
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +0 -52
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +0 -16
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +0 -225
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +0 -17
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/method_class_spec.rb +0 -46
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/module_ancestors_variable/hash_spec.rb +0 -57
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/module_ancestors_variable/set_spec.rb +0 -57
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +0 -80
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/addressable/uri/query_value_spec.rb +0 -25
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +0 -25
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/acts_as_abstract_spec.rb +0 -14
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/method_class_spec.rb +0 -20
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +0 -30
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/static_method_class_spec.rb +0 -20
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerable/boolean_combinations_spec.rb +0 -39
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/current_spec.rb +0 -26
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/stopped_spec.rb +0 -32
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/if_key_spec.rb +0 -23
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/options_consumer_spec.rb +0 -17
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb +0 -13
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/compare_by_spec.rb +0 -37
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +0 -15
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +0 -15
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/speaker_spec.rb +0 -15
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +0 -11
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +0 -20
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/if_present_spec.rb +0 -13
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/recursive_build_spec.rb +0 -62
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/assert_parent_spec.rb +0 -21
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_noext_spec.rb +0 -26
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb +0 -17
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/child_of_spec.rb +0 -26
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/parent_n_spec.rb +0 -33
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +0 -34
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +0 -65
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub/base_spec/stubbed_module_a.rb +0 -6
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub/base_spec/stubbed_not_module.rb +0 -6
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub/base_spec.rb +0 -19
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/rspec/setup/setup_manager_spec.rb +0 -17
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby/on_clean_environment_spec.rb +0 -31
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby/on_replace_objects_spec.rb +0 -65
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +0 -64
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +0 -129
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/static_method_class_spec.rb +0 -44
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb +0 -57
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/wildcards_spec.rb +0 -27
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/yaml_spec.rb +0 -76
- data/sub/eac_ruby_utils/spec/locales/pt-BR.yml +0 -58
- data/sub/eac_ruby_utils/spec/spec_helper.rb +0 -15
- data/sub/eac_templates/README.textile +0 -59
- data/sub/eac_templates/lib/eac_templates/abstract/directory.rb +0 -42
- data/sub/eac_templates/lib/eac_templates/abstract/file.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/abstract/fs_object.rb +0 -94
- data/sub/eac_templates/lib/eac_templates/abstract/fs_object_by_pathname.rb +0 -13
- data/sub/eac_templates/lib/eac_templates/abstract/not_found_error.rb +0 -8
- data/sub/eac_templates/lib/eac_templates/abstract/with_directory_file_methods.rb +0 -46
- data/sub/eac_templates/lib/eac_templates/core_ext.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/interface_methods.rb +0 -12
- data/sub/eac_templates/lib/eac_templates/modules/ancestor/directory.rb +0 -17
- data/sub/eac_templates/lib/eac_templates/modules/ancestor/file.rb +0 -16
- data/sub/eac_templates/lib/eac_templates/modules/ancestor/fs_object.rb +0 -23
- data/sub/eac_templates/lib/eac_templates/modules/ancestor.rb +0 -37
- data/sub/eac_templates/lib/eac_templates/modules/base/directory.rb +0 -44
- data/sub/eac_templates/lib/eac_templates/modules/base/file.rb +0 -27
- data/sub/eac_templates/lib/eac_templates/modules/base/fs_object.rb +0 -18
- data/sub/eac_templates/lib/eac_templates/modules/base.rb +0 -66
- data/sub/eac_templates/lib/eac_templates/patches/module/erb_template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/module/template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/module.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/patches/object/erb_template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/object/template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/object.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/patches.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/sources/directory.rb +0 -37
- data/sub/eac_templates/lib/eac_templates/sources/file.rb +0 -13
- data/sub/eac_templates/lib/eac_templates/sources/from_all_gems.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/sources/from_gem.rb +0 -37
- data/sub/eac_templates/lib/eac_templates/sources/fs_object.rb +0 -53
- data/sub/eac_templates/lib/eac_templates/sources/internal_set.rb +0 -22
- data/sub/eac_templates/lib/eac_templates/sources/set.rb +0 -56
- data/sub/eac_templates/lib/eac_templates/sources/single.rb +0 -29
- data/sub/eac_templates/lib/eac_templates/variables/content.rb +0 -52
- data/sub/eac_templates/lib/eac_templates/variables/directory.rb +0 -48
- data/sub/eac_templates/lib/eac_templates/variables/file.rb +0 -26
- data/sub/eac_templates/lib/eac_templates/variables/fs_object.rb +0 -65
- data/sub/eac_templates/lib/eac_templates/variables/not_found_error.rb +0 -7
- data/sub/eac_templates/lib/eac_templates/variables/providers/base.rb +0 -24
- data/sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb +0 -29
- data/sub/eac_templates/lib/eac_templates/variables/providers/entries_reader.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/variables/providers/generic.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/variables/providers/hash.rb +0 -29
- data/sub/eac_templates/lib/eac_templates/variables/providers.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/variables.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/version.rb +0 -5
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec.rb +0 -141
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/a/a_a +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/sub_class/a/a_c +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/a/a_b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/a/a_b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/c +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/prepended_module/c +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/sub_class/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/a/a_b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec.rb +0 -26
- data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec_files/path/my_stub_with_template +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec.rb +0 -42
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file1.template +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file2 +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path2/subdir1/file3.template +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec.rb +0 -35
- data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/expected_content +0 -2
- data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/source.template +0 -2
- /data/sub/{eac_ruby_utils → avm-eac_ruby_base1}/Gemfile +0 -0
- /data/sub/{eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec_files/path/my_stub_with_template → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir2/empty.rb} +0 -0
- /data/sub/{eac_templates → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem}/Gemfile +0 -0
- /data/sub/{eac_templates → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem}/spec/rubocop_spec.rb +0 -0
- /data/sub/{eac_templates → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem}/spec/spec_helper.rb +0 -0
- /data/sub/{eac_ruby_utils/spec/rubocop_check_spec.rb → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/spec/rubocop_spec.rb} +0 -0
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
-
|
5
|
-
# Maintain your gem's version:
|
6
|
-
require 'eac_ruby_utils/version'
|
7
|
-
|
8
|
-
# Describe your gem and declare its dependencies:
|
9
|
-
Gem::Specification.new do |s|
|
10
|
-
s.name = 'eac_ruby_utils'
|
11
|
-
s.version = EacRubyUtils::VERSION
|
12
|
-
s.authors = ['Esquilo Azul Company']
|
13
|
-
s.summary = 'Utilities for E.A.C.\'s Ruby projects.'
|
14
|
-
s.license = 'MIT'
|
15
|
-
|
16
|
-
s.files = Dir['{lib}/**/*', 'MIT-LICENSE', 'README.rdoc']
|
17
|
-
s.required_ruby_version = '>= 2.7'
|
18
|
-
|
19
|
-
s.add_dependency 'activesupport', '>= 4', '< 7'
|
20
|
-
s.add_dependency 'addressable', '~> 2.8', '>= 2.8.6'
|
21
|
-
s.add_dependency 'bundler'
|
22
|
-
s.add_dependency 'filesize', '~> 0.2'
|
23
|
-
s.add_dependency 'net-ssh', '~> 4.2'
|
24
|
-
s.add_development_dependency 'avm-eac_ubuntu_base0', '~> 0.5'
|
25
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.9'
|
26
|
-
end
|
@@ -1,100 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/module_ancestors_variable/hash'
|
4
|
-
require 'eac_ruby_utils/patches/class/self_included_modules'
|
5
|
-
require 'eac_ruby_utils/patches/module/common_concern'
|
6
|
-
require 'eac_ruby_utils/unimplemented_method_error'
|
7
|
-
|
8
|
-
module EacRubyUtils
|
9
|
-
# Support to abstract methods.
|
10
|
-
#
|
11
|
-
# Usage:
|
12
|
-
#
|
13
|
-
# require 'eac_ruby_utils/acts_as_abstract'
|
14
|
-
#
|
15
|
-
# class BaseClass
|
16
|
-
# include EacRubyUtils::ActsAsAbstract
|
17
|
-
#
|
18
|
-
# abstract_methods :mymethod
|
19
|
-
# end
|
20
|
-
#
|
21
|
-
# BaseClass.new.mymethod # raise "Abstract method: mymethod"
|
22
|
-
#
|
23
|
-
# class SubClass
|
24
|
-
# def mymethod
|
25
|
-
# "Implemented"
|
26
|
-
# end
|
27
|
-
# end
|
28
|
-
#
|
29
|
-
# SubClass.new.mymethod # return "Implemented"
|
30
|
-
module ActsAsAbstract
|
31
|
-
common_concern
|
32
|
-
|
33
|
-
class << self
|
34
|
-
def abstract?(a_class)
|
35
|
-
a_class.self_included_modules.include?(::EacRubyUtils::ActsAsAbstract)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
module ClassMethods
|
40
|
-
# @param name [Symbol]
|
41
|
-
# @param arguments [Enumerable<Symbol>]
|
42
|
-
# @return [void]
|
43
|
-
def abstract_method(name, *arguments)
|
44
|
-
abstract_methods_hash[name.to_sym] = arguments
|
45
|
-
end
|
46
|
-
|
47
|
-
# @param methods_names [Enumerable<Object>] Each item can be a symbolizable or a hash.
|
48
|
-
# @return [void]
|
49
|
-
def abstract_methods(*methods_names)
|
50
|
-
methods_names.each do |method_name|
|
51
|
-
if method_name.is_a?(::Hash)
|
52
|
-
abstract_methods_from_hash(method_name)
|
53
|
-
else
|
54
|
-
abstract_method(method_name)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
private
|
60
|
-
|
61
|
-
# @param hash [Hash]
|
62
|
-
# @return [void]
|
63
|
-
def abstract_methods_from_hash(hash)
|
64
|
-
hash.each { |name, arguments| abstract_method(name, *arguments) }
|
65
|
-
end
|
66
|
-
|
67
|
-
# @return [Hash<Symbol, Array]
|
68
|
-
def abstract_methods_hash
|
69
|
-
@abstract_methods_hash ||=
|
70
|
-
::EacRubyUtils::ModuleAncestorsVariable::Hash.new(self, __method__)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
module InstanceMethods
|
75
|
-
def respond_to_missing?(method_name, include_private = false)
|
76
|
-
super || abstract_method?(method_name)
|
77
|
-
end
|
78
|
-
|
79
|
-
def method_missing(method_name, *arguments, &block)
|
80
|
-
raise_abstract_method(method_name) if abstract_method?(method_name)
|
81
|
-
|
82
|
-
super
|
83
|
-
end
|
84
|
-
|
85
|
-
# @param method_name [Symbol]
|
86
|
-
# @return [Boolean]
|
87
|
-
def abstract_method?(method_name)
|
88
|
-
return false if self.class.method_defined?(method_name)
|
89
|
-
|
90
|
-
self.class.send(:abstract_methods_hash).key?(method_name.to_sym)
|
91
|
-
end
|
92
|
-
|
93
|
-
def raise_abstract_method(method_name, arguments = [])
|
94
|
-
raise ::EacRubyUtils::UnimplementedMethodError,
|
95
|
-
"Abstract method #{method_name}(#{arguments.join(', ')}) hit in " \
|
96
|
-
"#{self}\" (Class: #{self.class})"
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/acts_as_immutable/enumerable_accessor'
|
4
|
-
|
5
|
-
module EacRubyUtils
|
6
|
-
module ActsAsImmutable
|
7
|
-
class ArrayAccessor < ::EacRubyUtils::ActsAsImmutable::EnumerableAccessor
|
8
|
-
INITIAL_VALUE = [].freeze
|
9
|
-
|
10
|
-
# @param value [Object]
|
11
|
-
# @return [Array]
|
12
|
-
def immutable_value_set_assert(value)
|
13
|
-
return value if value.is_a?(::Array)
|
14
|
-
return value.to_a if value.respond_to?(:to_a)
|
15
|
-
|
16
|
-
Array(value)
|
17
|
-
end
|
18
|
-
|
19
|
-
# @return [Array] A empty array.
|
20
|
-
def initial_value
|
21
|
-
INITIAL_VALUE
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/patches/object/if_respond'
|
4
|
-
|
5
|
-
module EacRubyUtils
|
6
|
-
module ActsAsImmutable
|
7
|
-
class BaseAccessor
|
8
|
-
FILTER_GET_METHOD_NAME_FORMAT = '%s_get_filter'
|
9
|
-
FILTER_SET_METHOD_NAME_FORMAT = '%s_set_filter'
|
10
|
-
|
11
|
-
common_constructor :name do
|
12
|
-
self.name = name.to_sym
|
13
|
-
end
|
14
|
-
|
15
|
-
def duplicate_object(object)
|
16
|
-
accessor_new_value = yield(immutable_value_get(object))
|
17
|
-
new_values = object.send(:immutable_values_get).merge(name => accessor_new_value)
|
18
|
-
r = object.class.new(*object.immutable_constructor_args)
|
19
|
-
r.send(:immutable_values_set, new_values)
|
20
|
-
r
|
21
|
-
end
|
22
|
-
|
23
|
-
def immutable_value_get(object)
|
24
|
-
object.send(:immutable_values_get)[name]
|
25
|
-
end
|
26
|
-
|
27
|
-
# @param object [Object]
|
28
|
-
# @return [Object]
|
29
|
-
def immutable_value_get_filtered(object)
|
30
|
-
r = immutable_value_get(object)
|
31
|
-
if object.respond_to?(immutable_value_get_filtered_method_name, true)
|
32
|
-
r = object.send(immutable_value_get_filtered_method_name, r)
|
33
|
-
end
|
34
|
-
r
|
35
|
-
end
|
36
|
-
|
37
|
-
# @return [Symbol]
|
38
|
-
def immutable_value_get_filtered_method_name
|
39
|
-
format(FILTER_GET_METHOD_NAME_FORMAT, name)
|
40
|
-
end
|
41
|
-
|
42
|
-
# @param object [Object]
|
43
|
-
# @return [Object]
|
44
|
-
def immutable_value_set_filtered(object, value)
|
45
|
-
if object.respond_to?(immutable_value_set_filtered_method_name, true)
|
46
|
-
value = object.send(immutable_value_set_filtered_method_name, value)
|
47
|
-
end
|
48
|
-
immutable_value_set(object, value)
|
49
|
-
end
|
50
|
-
|
51
|
-
# @return [Symbol]
|
52
|
-
def immutable_value_set_filtered_method_name
|
53
|
-
format(FILTER_SET_METHOD_NAME_FORMAT, name)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/acts_as_immutable/common_accessor'
|
4
|
-
require 'eac_ruby_utils/patches/class/common_constructor'
|
5
|
-
|
6
|
-
module EacRubyUtils
|
7
|
-
module ActsAsImmutable
|
8
|
-
class BooleanAccessor < ::EacRubyUtils::ActsAsImmutable::CommonAccessor
|
9
|
-
def apply(klass)
|
10
|
-
super
|
11
|
-
accessor = self
|
12
|
-
klass.send(:define_method, "#{name}?") { send(accessor.name) }
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module EacRubyUtils
|
4
|
-
module ActsAsImmutable
|
5
|
-
module ClassMethods
|
6
|
-
def immutable_accessor(*accessors)
|
7
|
-
options = accessors.extract_options!
|
8
|
-
options[:type] ||= const_get('TYPE_COMMON')
|
9
|
-
accessors.each do |name|
|
10
|
-
class_name = "#{options.fetch(:type).to_s.camelize}Accessor"
|
11
|
-
::EacRubyUtils::ActsAsImmutable.const_get(class_name).new(name).apply(self)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def imutable_single_accessor(name, options); end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/acts_as_immutable/base_accessor'
|
4
|
-
require 'eac_ruby_utils/patches/class/common_constructor'
|
5
|
-
|
6
|
-
module EacRubyUtils
|
7
|
-
module ActsAsImmutable
|
8
|
-
class CommonAccessor < ::EacRubyUtils::ActsAsImmutable::BaseAccessor
|
9
|
-
def apply(klass)
|
10
|
-
accessor = self
|
11
|
-
klass.send(:define_method, name) do |*args|
|
12
|
-
case args.count
|
13
|
-
when 0 then next accessor.immutable_value_get_filtered(self)
|
14
|
-
when 1 then next accessor.immutable_value_set_filtered(self, args.first)
|
15
|
-
else
|
16
|
-
raise ::ArgumentError, "wrong number of arguments (given #{args.count}, expected 0..1)"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def immutable_value_get(object)
|
22
|
-
object.send(:immutable_values_get)[name]
|
23
|
-
end
|
24
|
-
|
25
|
-
def immutable_value_set(object, value)
|
26
|
-
duplicate_object(object) { |_old_value| value }
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'active_support/inflector'
|
4
|
-
require 'eac_ruby_utils/acts_as_immutable/base_accessor'
|
5
|
-
require 'eac_ruby_utils/patches/class/common_constructor'
|
6
|
-
|
7
|
-
module EacRubyUtils
|
8
|
-
module ActsAsImmutable
|
9
|
-
# Should implement in concrect classes:
|
10
|
-
# * immutable_value_set_assert(value)
|
11
|
-
# * initial_value()
|
12
|
-
class EnumerableAccessor < ::EacRubyUtils::ActsAsImmutable::BaseAccessor
|
13
|
-
def apply(klass)
|
14
|
-
apply_singular(klass)
|
15
|
-
apply_plural(klass)
|
16
|
-
end
|
17
|
-
|
18
|
-
def apply_plural(klass)
|
19
|
-
accessor = self
|
20
|
-
klass.send(:define_method, ::ActiveSupport::Inflector.pluralize(name)) do |*args|
|
21
|
-
case args.count
|
22
|
-
when 0 then next accessor.immutable_value_get_filtered(self)
|
23
|
-
when 1 then next accessor.immutable_value_set_filtered(self, args.first)
|
24
|
-
else
|
25
|
-
raise ::ArgumentError, "wrong number of arguments (given #{args.count}, expected 0..1)"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def apply_singular(klass)
|
31
|
-
accessor = self
|
32
|
-
klass.send(:define_method, name) do |value|
|
33
|
-
accessor.immutable_value_push(self, value)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def immutable_value_get(object)
|
38
|
-
super || initial_value.dup
|
39
|
-
end
|
40
|
-
|
41
|
-
def immutable_value_push(object, value)
|
42
|
-
duplicate_object(object) do |old_value|
|
43
|
-
(old_value || initial_value.dup) + [value]
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def immutable_value_set(object, value)
|
48
|
-
duplicate_object(object) { |_old_value| immutable_value_set_assert(value) }
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/acts_as_immutable/base_accessor'
|
4
|
-
require 'eac_ruby_utils/patches/class/common_constructor'
|
5
|
-
|
6
|
-
module EacRubyUtils
|
7
|
-
module ActsAsImmutable
|
8
|
-
class HashAccessor < ::EacRubyUtils::ActsAsImmutable::BaseAccessor
|
9
|
-
def apply(klass)
|
10
|
-
apply_plural(klass)
|
11
|
-
apply_singular(klass)
|
12
|
-
end
|
13
|
-
|
14
|
-
def immutable_value_get(object)
|
15
|
-
super || {}
|
16
|
-
end
|
17
|
-
|
18
|
-
def immutable_value_get_single(object, key)
|
19
|
-
immutable_value_get(object)[key]
|
20
|
-
end
|
21
|
-
|
22
|
-
def immutable_value_set(object, new_hash)
|
23
|
-
duplicate_object(object) { |_old_value| new_hash }
|
24
|
-
end
|
25
|
-
|
26
|
-
def immutable_value_set_single(object, key, value)
|
27
|
-
immutable_value_set(object, immutable_value_get(object).merge(key => value))
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
def apply_plural(klass)
|
33
|
-
accessor = self
|
34
|
-
klass.send(:define_method, ::ActiveSupport::Inflector.pluralize(name)) do |*args|
|
35
|
-
case args.count
|
36
|
-
when 0 then next accessor.immutable_value_get_filtered(self)
|
37
|
-
when 1 then next accessor.immutable_value_set_filtered(self, args[0])
|
38
|
-
else
|
39
|
-
raise ::ArgumentError, "wrong number of arguments (given #{args.count}, expected 0..1)"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def apply_singular(klass)
|
45
|
-
accessor = self
|
46
|
-
klass.send(:define_method, name) do |*args|
|
47
|
-
case args.count
|
48
|
-
when 1 then next accessor.immutable_value_get_single(self, args[0])
|
49
|
-
when 2 then next accessor.immutable_value_set_single(self, *args[0..1])
|
50
|
-
else
|
51
|
-
raise ::ArgumentError, "wrong number of arguments (given #{args.count}, expected 1..2)"
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module EacRubyUtils
|
4
|
-
module ActsAsImmutable
|
5
|
-
module InstanceMethods
|
6
|
-
def immutable_constructor_args
|
7
|
-
[]
|
8
|
-
end
|
9
|
-
|
10
|
-
private
|
11
|
-
|
12
|
-
def immutable_values_get
|
13
|
-
@immutable_values || {}
|
14
|
-
end
|
15
|
-
|
16
|
-
def immutable_values_set(new_values)
|
17
|
-
@immutable_values = new_values
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/acts_as_immutable/enumerable_accessor'
|
4
|
-
|
5
|
-
module EacRubyUtils
|
6
|
-
module ActsAsImmutable
|
7
|
-
class SetAccessor < ::EacRubyUtils::ActsAsImmutable::EnumerableAccessor
|
8
|
-
INITIAL_VALUE = ::Set.new.freeze
|
9
|
-
|
10
|
-
# @param value [Object]
|
11
|
-
# @return [Set]
|
12
|
-
def immutable_value_set_assert(value)
|
13
|
-
return value if value.is_a?(::Set)
|
14
|
-
return value.to_set if value.respond_to?(:to_set)
|
15
|
-
|
16
|
-
::Set.new(value)
|
17
|
-
end
|
18
|
-
|
19
|
-
# @return [Set] A empty Set.
|
20
|
-
def initial_value
|
21
|
-
INITIAL_VALUE
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/patches/module/common_concern'
|
4
|
-
require 'eac_ruby_utils/require_sub'
|
5
|
-
|
6
|
-
module EacRubyUtils
|
7
|
-
module ActsAsImmutable
|
8
|
-
::EacRubyUtils.require_sub __FILE__
|
9
|
-
|
10
|
-
common_concern do
|
11
|
-
include ::EacRubyUtils::Listable
|
12
|
-
lists.add_symbol :type, :array, :boolean, :common, :hash
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'active_support/core_ext/module/introspection'
|
4
|
-
require 'eac_ruby_utils/patches/class/common_constructor'
|
5
|
-
require 'eac_ruby_utils/patches/module/module_parent'
|
6
|
-
require 'eac_ruby_utils/patches/string/inflector'
|
7
|
-
|
8
|
-
module EacRubyUtils
|
9
|
-
class ActsAsInstanceMethod
|
10
|
-
common_constructor :method_class
|
11
|
-
|
12
|
-
# @param sender_module [Module, nil]
|
13
|
-
# @return [self]
|
14
|
-
def setup(sender_module = nil)
|
15
|
-
sender_module ||= default_sender_module
|
16
|
-
the_setup = self
|
17
|
-
sender_module.define_method(method_name) do |*args, &block|
|
18
|
-
the_setup.method_class.new(self, *args, &block).result
|
19
|
-
end
|
20
|
-
|
21
|
-
self
|
22
|
-
end
|
23
|
-
|
24
|
-
# @return [String]
|
25
|
-
def method_name
|
26
|
-
method_class.name.demodulize.underscore.variableize
|
27
|
-
end
|
28
|
-
|
29
|
-
# @return [Module]
|
30
|
-
def default_sender_module
|
31
|
-
method_class.module_parent
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'active_support/hash_with_indifferent_access'
|
4
|
-
|
5
|
-
module EacRubyUtils
|
6
|
-
class ArgumentsConsumer
|
7
|
-
class << self
|
8
|
-
def parse(args, positional = [], options = {})
|
9
|
-
new(args, positional, options).data
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
attr_reader :positional, :default_options
|
14
|
-
|
15
|
-
def initialize(positional, default_options)
|
16
|
-
@positional = positional.dup.freeze
|
17
|
-
@default_options = default_options.dup.freeze
|
18
|
-
end
|
19
|
-
|
20
|
-
def parse(args)
|
21
|
-
Parser.new(self, args).data
|
22
|
-
end
|
23
|
-
|
24
|
-
class Parser
|
25
|
-
attr_reader :data, :arguments_consumer
|
26
|
-
|
27
|
-
def initialize(arguments_consumer, args)
|
28
|
-
@arguments_consumer = arguments_consumer
|
29
|
-
@data = ::ActiveSupport::HashWithIndifferentAccess.new
|
30
|
-
@options_found = false
|
31
|
-
arguments_consumer.positional.each { |key| data[key] = nil }
|
32
|
-
data.merge!(arguments_consumer.default_options)
|
33
|
-
args.each_with_index { |value, index| add_arg(value, index) }
|
34
|
-
data.freeze
|
35
|
-
end
|
36
|
-
|
37
|
-
private
|
38
|
-
|
39
|
-
def add_arg(value, index)
|
40
|
-
arg = ::Struct.new(:value, :index).new(value, index)
|
41
|
-
if arg.value.is_a?(::Hash)
|
42
|
-
add_hash_arg(arg)
|
43
|
-
else
|
44
|
-
add_positional_arg(arg)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def add_hash_arg(arg)
|
49
|
-
check_no_more_arguments(arg)
|
50
|
-
data.merge!(arg.value)
|
51
|
-
@options_found = true
|
52
|
-
end
|
53
|
-
|
54
|
-
def add_positional_arg(arg)
|
55
|
-
check_no_more_arguments(arg)
|
56
|
-
invalid_argument arg, 'No more valid positional' if
|
57
|
-
arg.index >= arguments_consumer.positional.count
|
58
|
-
data[arguments_consumer.positional[arg.index]] = arg.value
|
59
|
-
end
|
60
|
-
|
61
|
-
def check_no_more_arguments(arg)
|
62
|
-
return unless @options_found
|
63
|
-
|
64
|
-
invalid_argument arg, 'Hash already found - no more positional allowed'
|
65
|
-
end
|
66
|
-
|
67
|
-
def invalid_argument(arg, message)
|
68
|
-
raise InvalidArgumentError.new(self, arg, message)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
class InvalidArgumentError < StandardError
|
73
|
-
def initialize(args_consumer, arg, message)
|
74
|
-
@args_consumer = args_consumer
|
75
|
-
@arg = arg
|
76
|
-
super("#{message} (Arg: #{arg}, Args Consumer: #{args_consumer})")
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/patches/module/compare_by'
|
4
|
-
|
5
|
-
module EacRubyUtils
|
6
|
-
class Bit
|
7
|
-
VALID_VALUES = [0, 1].freeze
|
8
|
-
|
9
|
-
class << self
|
10
|
-
def assert(obj)
|
11
|
-
return obj if obj.is_a?(self)
|
12
|
-
|
13
|
-
new(obj.to_i)
|
14
|
-
end
|
15
|
-
|
16
|
-
def valid_integer?(value)
|
17
|
-
value.is_a?(::Integer) && VALID_VALUES.include?(value)
|
18
|
-
end
|
19
|
-
|
20
|
-
def validate_integer(value)
|
21
|
-
return value if valid_integer?(value)
|
22
|
-
|
23
|
-
raise(::ArgumentError, "Invalid bit value: #{value} (Valid: #{VALID_VALUES})")
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
attr_reader :value
|
28
|
-
|
29
|
-
compare_by :value
|
30
|
-
delegate :to_s, :zero?, to: :value
|
31
|
-
|
32
|
-
# @param value [Integer]
|
33
|
-
def initialize(value)
|
34
|
-
@value = self.class.validate_integer(value)
|
35
|
-
end
|
36
|
-
|
37
|
-
# @return [Boolean]
|
38
|
-
def one?
|
39
|
-
!zero?
|
40
|
-
end
|
41
|
-
|
42
|
-
# @return [Integer]
|
43
|
-
def to_i
|
44
|
-
value
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|