eac_tools 0.2.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +42 -30
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/sources/base/configuration.rb +14 -6
- data/sub/avm/lib/avm/sources/base/testing.rb +50 -7
- data/sub/avm/lib/avm/sources/tests/builder.rb +8 -1
- data/sub/avm/lib/avm/sources/tests/single.rb +28 -9
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_generic_base0/Gemfile +3 -0
- data/sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec +3 -3
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base.rb +0 -6
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +1 -1
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/Gemfile +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/avm-eac_rails_base0.gemspec +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/apache_host.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/apache_path.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/deploy.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/instance.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/runners/base.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/runners.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/sources/base.rb +14 -1
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/lib/avm/eac_rails_base0/apache_host_spec.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/lib/avm/eac_rails_base0/apache_host_spec_files/apache_host_spec_no_ssl_content.conf +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/lib/avm/eac_rails_base0/apache_path_spec.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/lib/avm/eac_rails_base0/apache_path_spec_files/stub-app_0_apache_path.conf +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/rubocop_spec.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/spec_helper.rb +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/template/avm/eac_rails_base0/apache_path/extra_content.conf +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/template/avm/eac_rails_base0/deploy/config/database.yml.template +0 -0
- data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template +0 -0
- data/sub/avm-eac_rails_base1/Gemfile +3 -0
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +2 -2
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb +16 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template +4 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +15 -7
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-tools/Gemfile.lock +24 -28
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/eac_ruby_utils/Gemfile +16 -0
- data/sub/eac_ruby_utils/MIT-LICENCE +16 -0
- data/sub/eac_ruby_utils/README.rdoc +3 -0
- data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +24 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +68 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/arguments_consumer.rb +81 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit.rb +46 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit_array.rb +81 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/blank_not_blank.rb +19 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +31 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/by_reference.rb +23 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte.rb +105 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte_array.rb +36 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/class_setup.rb +52 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +41 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +20 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +29 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +53 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +54 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +89 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/compare_by.rb +28 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/context.rb +33 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb +21 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +7 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +53 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/enum.rb +102 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_env.rb +28 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/concat.rb +33 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/envvars.rb +24 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb +33 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +172 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +81 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb +22 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/local_env.rb +17 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/process.rb +27 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/spawn.rb +32 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/dasho_options.rb +53 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +25 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +24 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +34 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env.rb +75 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs.rb +23 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/clearable_directory.rb +57 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/extname.rb +30 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/directory.rb +16 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/file.rb +34 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp.rb +52 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +79 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/array_accessor.rb +32 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/base_accessor.rb +23 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/boolean_accessor.rb +16 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/class_methods.rb +20 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/common_accessor.rb +30 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/hash_accessor.rb +46 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/instance_methods.rb +21 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable.rb +15 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +29 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/class_methods.rb +14 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/instance_methods.rb +30 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/integer_list.rb +23 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +111 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/lists.rb +59 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/string_list.rb +19 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/symbol_list.rb +19 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +49 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable.rb +17 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +48 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_all_gems.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_gem.rb +47 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/module_i18n_translate.rb +74 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb +35 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/options_consumer.rb +62 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patch.rb +11 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/common_constructor.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +7 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb +45 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb +14 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/options_consumer.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/to_struct.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash.rb +5 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/abstract_methods.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/common_concern.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/compare_by.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/context.rb +11 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/immutable.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/listable.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/method_class.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/patch.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/require_sub.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/simple_cache.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/speaker.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb +25 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +11 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +23 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +13 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb +19 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_respond.rb +22 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_pathname.rb +15 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_uri.rb +15 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object.rb +5 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_noext.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/if_exist.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/mkpath_s.rb +12 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/parent_n.rb +11 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/readlink_r.rb +11 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/reqdir_glob.rb +13 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb +16 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +11 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +34 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +134 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/stub_speaker.rb +39 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb +32 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +38 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb +69 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +46 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +77 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +64 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/sender.rb +32 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker.rb +16 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +63 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +5 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +105 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils.rb +6 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/abstract_methods_spec.rb +28 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb +17 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/bit_array_spec.rb +22 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/blank_not_blank_spec.rb +16 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/byte_spec.rb +54 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +65 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +125 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compare_by_spec.rb +38 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/custom_format_spec.rb +60 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/enum_spec.rb +43 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/executable_spec.rb +37 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/ssh_env_spec.rb +25 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb +18 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb +12 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +52 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +16 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +275 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +17 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/method_class_spec.rb +46 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +80 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +25 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +30 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerable/boolean_combinations_spec.rb +39 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/current_spec.rb +26 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/stopped_spec.rb +32 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/options_consumer_spec.rb +17 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb +13 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/compare_by_spec.rb +36 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +15 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/method_class_spec.rb +20 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +15 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/speaker_spec.rb +13 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +11 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/if_present_spec.rb +13 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec_files/path/my_stub_with_template +1 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_noext_spec.rb +26 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb +17 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/parent_n_spec.rb +33 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec/stubbed_module_a.rb +6 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec/stubbed_not_module.rb +6 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec.rb +19 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby_spec.rb +22 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +57 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +129 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb +57 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/yaml_spec.rb +75 -0
- data/sub/eac_ruby_utils/spec/locales/pt-BR.yml +58 -0
- data/sub/eac_ruby_utils/spec/rubocop_check_spec.rb +3 -0
- data/sub/eac_ruby_utils/spec/spec_helper.rb +15 -0
- metadata +255 -52
- data/sub/avm/lib/avm/sources/tester.rb +0 -24
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/tester.rb +0 -56
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e96780cde14c4b87945f466bcedbb9344b12aa87a9b9832fc520d5ab681fa13
|
4
|
+
data.tar.gz: '028b3f2c1c65d20cf6c0a1b65470806c49d6368e688bb962161674472e7b7b84'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68acf9dcd522d222060f070a7400834e2baabdfa3a5cd8a268077b6b8863abf5470588d8dd040aea08b9542144b57f983434511b1b44c6d4d10d83b8581eed42
|
7
|
+
data.tar.gz: cdf796ff102923bd500a1c427d6598ae6d1026f4146d80ddff2ffd212ff13c596c9309445c43b1b6e76b9c8015865fadf8927570986afd0fb1ac3945b778a23f
|
data/Gemfile.lock
CHANGED
@@ -1,34 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm-eac_generic_base0 (~> 0.
|
6
|
-
avm-
|
7
|
-
avm-
|
4
|
+
eac_tools (0.5.0)
|
5
|
+
avm-eac_generic_base0 (~> 0.3)
|
6
|
+
avm-eac_rails_base0 (~> 0.5)
|
7
|
+
avm-eac_rails_base1 (~> 0.4)
|
8
|
+
avm-eac_redmine_base0 (~> 0.8)
|
8
9
|
avm-eac_redmine_plugin_base0 (~> 0.1, >= 0.1.1)
|
9
|
-
avm-eac_ruby_base1 (~> 0.
|
10
|
+
avm-eac_ruby_base1 (~> 0.9)
|
10
11
|
avm-tools (~> 0.121)
|
11
|
-
eac_ruby_utils (~> 0.95, >= 0.95.
|
12
|
+
eac_ruby_utils (~> 0.95, >= 0.95.2)
|
12
13
|
|
13
14
|
PATH
|
14
15
|
remote: sub/avm-eac_generic_base0
|
15
16
|
specs:
|
16
|
-
avm-eac_generic_base0 (0.
|
17
|
-
avm (~> 0.
|
18
|
-
eac_ruby_utils (~> 0.
|
17
|
+
avm-eac_generic_base0 (0.3.0)
|
18
|
+
avm (~> 0.24)
|
19
|
+
eac_ruby_utils (~> 0.05, >= 0.95.2)
|
20
|
+
|
21
|
+
PATH
|
22
|
+
remote: sub/avm-eac_rails_base0
|
23
|
+
specs:
|
24
|
+
avm-eac_rails_base0 (0.5.0)
|
25
|
+
avm-eac_rails_base1 (~> 0.3)
|
26
|
+
eac_ruby_utils (~> 0.80, >= 0.80.2)
|
19
27
|
|
20
28
|
PATH
|
21
29
|
remote: sub/avm-eac_rails_base1
|
22
30
|
specs:
|
23
|
-
avm-eac_rails_base1 (0.
|
24
|
-
avm-eac_ruby_base1 (~> 0.
|
31
|
+
avm-eac_rails_base1 (0.4.0)
|
32
|
+
avm-eac_ruby_base1 (~> 0.9)
|
25
33
|
avm-eac_webapp_base0 (~> 0.3)
|
26
|
-
eac_ruby_utils (~> 0.95, >= 0.95.
|
34
|
+
eac_ruby_utils (~> 0.95, >= 0.95.2)
|
27
35
|
|
28
36
|
PATH
|
29
37
|
remote: sub/avm-eac_redmine_base0
|
30
38
|
specs:
|
31
|
-
avm-eac_redmine_base0 (0.
|
39
|
+
avm-eac_redmine_base0 (0.8.0)
|
32
40
|
avm-eac_rails_base1 (~> 0.3)
|
33
41
|
avm-eac_ubuntu_base0 (~> 0.2)
|
34
42
|
curb (~> 0.9.10)
|
@@ -46,7 +54,7 @@ PATH
|
|
46
54
|
PATH
|
47
55
|
remote: sub/avm-eac_ruby_base1
|
48
56
|
specs:
|
49
|
-
avm-eac_ruby_base1 (0.
|
57
|
+
avm-eac_ruby_base1 (0.9.0)
|
50
58
|
avm (~> 0.23)
|
51
59
|
avm-eac_generic_base0 (~> 0.2)
|
52
60
|
eac_ruby_utils (~> 0.95, >= 0.95.1)
|
@@ -54,7 +62,7 @@ PATH
|
|
54
62
|
PATH
|
55
63
|
remote: sub/avm-tools
|
56
64
|
specs:
|
57
|
-
avm-tools (0.121.
|
65
|
+
avm-tools (0.121.2)
|
58
66
|
aranha-parsers (~> 0.4)
|
59
67
|
avm (~> 0.22)
|
60
68
|
avm-eac_asciidoctor_base0 (~> 0.3, >= 0.3.4)
|
@@ -73,7 +81,7 @@ PATH
|
|
73
81
|
PATH
|
74
82
|
remote: sub/avm
|
75
83
|
specs:
|
76
|
-
avm (0.
|
84
|
+
avm (0.24.0)
|
77
85
|
eac_cli (~> 0.27, >= 0.27.6)
|
78
86
|
eac_docker (~> 0.3)
|
79
87
|
eac_git (~> 0.6)
|
@@ -108,10 +116,20 @@ PATH
|
|
108
116
|
eac_fs (~> 0.10)
|
109
117
|
eac_ruby_utils (~> 0.95, >= 0.95.1)
|
110
118
|
|
119
|
+
PATH
|
120
|
+
remote: sub/eac_ruby_utils
|
121
|
+
specs:
|
122
|
+
eac_ruby_utils (0.95.2)
|
123
|
+
activesupport (>= 4, < 7)
|
124
|
+
addressable (~> 2.6)
|
125
|
+
bundler
|
126
|
+
filesize
|
127
|
+
net-ssh (~> 4.2)
|
128
|
+
|
111
129
|
GEM
|
112
130
|
remote: https://rubygems.org/
|
113
131
|
specs:
|
114
|
-
activesupport (6.1.6)
|
132
|
+
activesupport (6.1.6.1)
|
115
133
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
116
134
|
i18n (>= 1.6, < 2)
|
117
135
|
minitest (>= 5.1)
|
@@ -139,9 +157,6 @@ GEM
|
|
139
157
|
avm-eac_postgresql_base0 (0.2.0)
|
140
158
|
avm (~> 0.12, >= 0.12.1)
|
141
159
|
eac_ruby_utils (~> 0.82)
|
142
|
-
avm-eac_rails_base0 (0.4.1)
|
143
|
-
avm-eac_rails_base1 (~> 0.3)
|
144
|
-
eac_ruby_utils (~> 0.80, >= 0.80.2)
|
145
160
|
avm-eac_ubuntu_base0 (0.3.0)
|
146
161
|
avm (~> 0.7)
|
147
162
|
eac_ruby_utils (~> 0.77, >= 0.77.1)
|
@@ -164,8 +179,8 @@ GEM
|
|
164
179
|
clipboard (1.3.6)
|
165
180
|
colorize (0.8.1)
|
166
181
|
concurrent-ruby (1.1.10)
|
167
|
-
content-type (0.0.
|
168
|
-
parslet (~>
|
182
|
+
content-type (0.0.2)
|
183
|
+
parslet (~> 2.0)
|
169
184
|
curb (0.9.11)
|
170
185
|
diff-lcs (1.5.0)
|
171
186
|
eac_config (0.8.1)
|
@@ -185,11 +200,6 @@ GEM
|
|
185
200
|
rubocop (~> 0.80.1)
|
186
201
|
rubocop-rails (~> 2.4.2)
|
187
202
|
rubocop-rspec (~> 1.38.1)
|
188
|
-
eac_ruby_utils (0.95.1)
|
189
|
-
activesupport (>= 4, < 7)
|
190
|
-
addressable (~> 2.6)
|
191
|
-
filesize
|
192
|
-
net-ssh (~> 4.2)
|
193
203
|
eac_templates (0.3.1)
|
194
204
|
eac_config (~> 0.5)
|
195
205
|
eac_ruby_utils (~> 0.64)
|
@@ -226,14 +236,14 @@ GEM
|
|
226
236
|
rchardet (~> 1.8)
|
227
237
|
hpricot (0.8.6)
|
228
238
|
htmlbeautifier (1.4.2)
|
229
|
-
i18n (1.
|
239
|
+
i18n (1.12.0)
|
230
240
|
concurrent-ruby (~> 1.0)
|
231
241
|
jaro_winkler (1.5.4)
|
232
242
|
minitar (0.9)
|
233
243
|
minitest (5.16.2)
|
234
244
|
multipart-post (2.2.3)
|
235
245
|
net-ssh (4.2.0)
|
236
|
-
nokogiri (1.13.
|
246
|
+
nokogiri (1.13.7-x86_64-linux)
|
237
247
|
racc (~> 1.4)
|
238
248
|
ofx-parser (1.1.0)
|
239
249
|
hpricot (>= 0.6)
|
@@ -242,7 +252,7 @@ GEM
|
|
242
252
|
parseconfig (1.1.2)
|
243
253
|
parser (3.1.2.0)
|
244
254
|
ast (~> 2.4.1)
|
245
|
-
parslet (
|
255
|
+
parslet (2.0.0)
|
246
256
|
public_suffix (4.0.7)
|
247
257
|
racc (1.6.0)
|
248
258
|
rack (2.2.4)
|
@@ -291,6 +301,7 @@ PLATFORMS
|
|
291
301
|
DEPENDENCIES
|
292
302
|
avm!
|
293
303
|
avm-eac_generic_base0!
|
304
|
+
avm-eac_rails_base0!
|
294
305
|
avm-eac_rails_base1!
|
295
306
|
avm-eac_redmine_base0!
|
296
307
|
avm-eac_redmine_plugin_base0!
|
@@ -300,6 +311,7 @@ DEPENDENCIES
|
|
300
311
|
eac_fs!
|
301
312
|
eac_ruby_base0!
|
302
313
|
eac_ruby_gem_support (~> 0.5.1)
|
314
|
+
eac_ruby_utils!
|
303
315
|
eac_tools!
|
304
316
|
|
305
317
|
BUNDLED WITH
|
data/lib/eac_tools/version.rb
CHANGED
@@ -11,19 +11,27 @@ module Avm
|
|
11
11
|
module Configuration
|
12
12
|
CONFIGURATION_FILENAMES = %w[.avm.yml .avm.yaml].freeze
|
13
13
|
|
14
|
+
# @return [EacRubyUtils::Envs::Command, nil]
|
15
|
+
def configuration_value_to_env_command(value)
|
16
|
+
configuration_value_to_shell_words(value).if_present { |v| env.command(v).chdir(path) }
|
17
|
+
end
|
18
|
+
|
19
|
+
# @return [Array<String>, nil]
|
20
|
+
def configuration_value_to_shell_words(value)
|
21
|
+
return nil if value.blank?
|
22
|
+
|
23
|
+
value.is_a?(::Enumerable) ? value.map(&:to_s) : ::Shellwords.split(value.to_s)
|
24
|
+
end
|
25
|
+
|
14
26
|
# @return [Array<String>, nil]
|
15
27
|
def read_configuration_as_shell_words(key)
|
16
|
-
configuration.entry(key).value
|
17
|
-
v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v.to_s)
|
18
|
-
end
|
28
|
+
configuration_value_to_shell_words(configuration.entry(key).value)
|
19
29
|
end
|
20
30
|
|
21
31
|
# Utility to read a configuration as a [EacRubyUtils::Envs::Command].
|
22
32
|
# @return [EacRubyUtils::Envs::Command]
|
23
33
|
def read_configuration_as_env_command(key)
|
24
|
-
|
25
|
-
env.command(v).chdir(path)
|
26
|
-
end
|
34
|
+
configuration_value_to_env_command(configuration.entry(key).value)
|
27
35
|
end
|
28
36
|
|
29
37
|
private
|
@@ -1,25 +1,68 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_ruby_utils/envs/command'
|
4
5
|
|
5
6
|
module Avm
|
6
7
|
module Sources
|
7
8
|
class Base
|
8
9
|
module Testing
|
9
|
-
|
10
|
+
DEFAULT_TEST_COMMANDS = {}.freeze
|
11
|
+
TEST_KEY = 'test'
|
12
|
+
TEST_COMMAND_KEY = "#{TEST_KEY}.command"
|
13
|
+
TEST_COMMANDS_KEY = "#{TEST_KEY}.commands"
|
10
14
|
|
11
15
|
def configured_test_command
|
12
16
|
read_configuration_as_env_command(TEST_COMMAND_KEY)
|
13
17
|
end
|
14
18
|
|
15
|
-
# @return [
|
16
|
-
def
|
17
|
-
|
19
|
+
# @return [Hash<String, EacRubyUtils::Envs::Command>, nil]
|
20
|
+
def configured_test_commands
|
21
|
+
configured_value_as_test_commands(configuration.entry(TEST_COMMANDS_KEY).value)
|
18
22
|
end
|
19
23
|
|
20
|
-
# @return [
|
21
|
-
def
|
22
|
-
|
24
|
+
# @return [Hash<String, EacRubyUtils::Envs::Command>, nil]
|
25
|
+
def configured_value_as_test_commands(value)
|
26
|
+
return nil if value.blank?
|
27
|
+
|
28
|
+
[::EacRubyUtils::Envs::Command, ::Hash, ::Enumerable].each do |type|
|
29
|
+
next unless value.is_a?(type)
|
30
|
+
|
31
|
+
return send(
|
32
|
+
"configured_#{type.name.demodulize.variableize}_value_as_test_commands",
|
33
|
+
value
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
raise "Value for test commands should be a Hash or a Enumerable (Actual: #{value})"
|
38
|
+
end
|
39
|
+
|
40
|
+
# @return [Hash<String, EacRubyUtils::Envs::Command>]
|
41
|
+
def default_test_commands
|
42
|
+
DEFAULT_TEST_COMMANDS
|
43
|
+
end
|
44
|
+
|
45
|
+
# @return [Enumerable<EacRubyUtils::Envs::Command>]
|
46
|
+
def test_commands
|
47
|
+
configured_test_commands ||
|
48
|
+
configured_value_as_test_commands(configured_test_command)
|
49
|
+
default_test_commands
|
50
|
+
end
|
51
|
+
|
52
|
+
protected
|
53
|
+
|
54
|
+
def configured_command_value_as_test_commands(value)
|
55
|
+
configured_enumerable_value_as_test_commands([value])
|
56
|
+
end
|
57
|
+
|
58
|
+
def configured_enumerable_value_as_test_commands(value)
|
59
|
+
configured_hash_value_as_test_commands(
|
60
|
+
value.each_with_index.map { |v| ["test_#{v[1]}", v[0]] }.to_h
|
61
|
+
)
|
62
|
+
end
|
63
|
+
|
64
|
+
def configured_hash_value_as_test_commands(value)
|
65
|
+
value.map { |k, v| [k.to_s.strip, configuration_value_to_env_command(v)] }.to_h
|
23
66
|
end
|
24
67
|
end
|
25
68
|
end
|
@@ -44,6 +44,13 @@ module Avm
|
|
44
44
|
create_units(main_source.subs)
|
45
45
|
end
|
46
46
|
|
47
|
+
# @return [Array<Avm::Sources::Tests::Single>]
|
48
|
+
def create_source_units(source)
|
49
|
+
source.test_commands.map do |test_name, test_command|
|
50
|
+
::Avm::Sources::Tests::Single.new(self, source, test_name, test_command)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
47
54
|
# @return [Avm::Sources::Tests::Single]
|
48
55
|
def create_unit(source)
|
49
56
|
::Avm::Sources::Tests::Single.new(self, source)
|
@@ -51,7 +58,7 @@ module Avm
|
|
51
58
|
|
52
59
|
# @return [Array<Avm::Sources::Tests::Single>]
|
53
60
|
def create_units(sources)
|
54
|
-
sources.
|
61
|
+
sources.flat_map { |a_source| create_source_units(a_source) }
|
55
62
|
end
|
56
63
|
|
57
64
|
# @return [Avm::Sources::Tests::Single]
|
@@ -14,9 +14,8 @@ module Avm
|
|
14
14
|
enable_simple_cache
|
15
15
|
enable_speaker
|
16
16
|
|
17
|
-
common_constructor :builder, :source
|
17
|
+
common_constructor :builder, :source, :test_name, :test_command
|
18
18
|
|
19
|
-
delegate :logs, :result, to: :tester
|
20
19
|
delegate :to_s, to: :id
|
21
20
|
|
22
21
|
def failed?
|
@@ -25,11 +24,7 @@ module Avm
|
|
25
24
|
|
26
25
|
# @return [String]
|
27
26
|
def id
|
28
|
-
|
29
|
-
MAIN_SOURCE_ID
|
30
|
-
else
|
31
|
-
relative_path_from_main_source.to_s
|
32
|
-
end
|
27
|
+
"#{main? ? MAIN_SOURCE_ID : relative_path_from_main_source}\##{test_name}"
|
33
28
|
end
|
34
29
|
|
35
30
|
def main?
|
@@ -47,8 +42,32 @@ module Avm
|
|
47
42
|
|
48
43
|
private
|
49
44
|
|
50
|
-
|
51
|
-
|
45
|
+
# @return [EacFs::Logs]
|
46
|
+
def logs_uncached
|
47
|
+
::EacFs::Logs.new.add(:stdout).add(:stderr)
|
48
|
+
end
|
49
|
+
|
50
|
+
# @return [Avm::Sources::Tests::Result]
|
51
|
+
def result_uncached
|
52
|
+
if test_command.blank?
|
53
|
+
::Avm::Sources::Tests::Result::NONEXISTENT
|
54
|
+
elsif run_test_command
|
55
|
+
::Avm::Sources::Tests::Result::SUCESSFUL
|
56
|
+
else
|
57
|
+
::Avm::Sources::Tests::Result::FAILED
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def run_test_command
|
62
|
+
execute_command_and_log(test_command)
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [true, false]
|
66
|
+
def execute_command_and_log(command)
|
67
|
+
r = command.execute
|
68
|
+
logs[:stdout].write(r[:stdout])
|
69
|
+
logs[:stderr].write(r[:stderr])
|
70
|
+
r[:exit_code].zero?
|
52
71
|
end
|
53
72
|
end
|
54
73
|
end
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,locale}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.24'
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.05', '>= 0.95.2'
|
17
17
|
|
18
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.
|
18
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
19
19
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/eac_generic_base0/sources/tester'
|
4
3
|
require 'avm/sources/base'
|
5
4
|
require 'eac_ruby_utils/core_ext'
|
6
5
|
|
@@ -11,11 +10,6 @@ module Avm
|
|
11
10
|
require_sub __FILE__, include_modules: true
|
12
11
|
enable_abstract_methods
|
13
12
|
|
14
|
-
# @return [Avm::EacGenericBase0::Sources::Tester]
|
15
|
-
def tester_class
|
16
|
-
Avm::EacGenericBase0::Sources::Tester
|
17
|
-
end
|
18
|
-
|
19
13
|
def valid?
|
20
14
|
::Avm::Registry.scms.detect_optional(path).present?
|
21
15
|
end
|
File without changes
|
data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/avm-eac_rails_base0.gemspec
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/deploy.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -8,18 +8,31 @@ module Avm
|
|
8
8
|
module Sources
|
9
9
|
class Base < ::Avm::EacRailsBase1::Sources::Base
|
10
10
|
CONFIG_RU_SUBPATH = 'config.ru'
|
11
|
+
EAC_RAILS_BASE0_GEMNAME = 'eac_rails_base0'
|
12
|
+
EAC_RAILS_BASE0_TEST_NAME = 'eac_rails_base0'
|
13
|
+
EAC_RAILS_BASE0_TEST_RAKE_TASK_NAME = 'eac_rails_base0:test'
|
11
14
|
SUBS_INCLUDE_PATHS_DEFAULT = ['sub/*/*'].freeze
|
12
15
|
|
13
16
|
def config_ru_path
|
14
17
|
path.join(CONFIG_RU_SUBPATH)
|
15
18
|
end
|
16
19
|
|
20
|
+
def default_test_commands
|
21
|
+
{
|
22
|
+
EAC_RAILS_BASE0_TEST_NAME => eac_rails_base0_test_command
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def eac_rails_base0_test_command
|
27
|
+
rake_test_command(EAC_RAILS_BASE0_TEST_RAKE_TASK_NAME)
|
28
|
+
end
|
29
|
+
|
17
30
|
def subs_include_paths_default
|
18
31
|
SUBS_PATHS_DEFAULT
|
19
32
|
end
|
20
33
|
|
21
34
|
def valid?
|
22
|
-
super &&
|
35
|
+
super && gemfile_lock_gem_version(EAC_RAILS_BASE0_GEMNAME).present?
|
23
36
|
end
|
24
37
|
end
|
25
38
|
end
|
data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm-eac_ruby_base1', '~> 0.
|
15
|
+
s.add_dependency 'avm-eac_ruby_base1', '~> 0.9'
|
16
16
|
s.add_dependency 'avm-eac_webapp_base0', '~> 0.3'
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.95', '>= 0.95.
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.95', '>= 0.95.2'
|
18
18
|
|
19
19
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
20
20
|
end
|
@@ -8,12 +8,28 @@ module Avm
|
|
8
8
|
module Sources
|
9
9
|
class Base < ::Avm::EacRubyBase1::Sources::Base
|
10
10
|
CONFIG_RU_SUBPATH = 'config.ru'
|
11
|
+
EAC_RAILS_BASE1_TEST_NAME = 'eac_rails_base1'
|
12
|
+
RAKE_TEST_COMMAND_DEFAULT_TASK_NAME = 'test'
|
11
13
|
SUBS_PATHS_DEFAULT = ['sub/*/*'].freeze
|
12
14
|
|
13
15
|
def config_ru_path
|
14
16
|
path.join(CONFIG_RU_SUBPATH)
|
15
17
|
end
|
16
18
|
|
19
|
+
def default_test_commands
|
20
|
+
{
|
21
|
+
EAC_RAILS_BASE1_TEST_NAME => eac_rails_base1_test_command
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
def eac_rails_base1_test_command
|
26
|
+
rake_test_command
|
27
|
+
end
|
28
|
+
|
29
|
+
def rake_test_command(task_name = RAKE_TEST_COMMAND_DEFAULT_TASK_NAME)
|
30
|
+
rake(task_name).chdir_root.envvar('RAILS_ENV', 'test')
|
31
|
+
end
|
32
|
+
|
17
33
|
def subs_paths_default
|
18
34
|
SUBS_PATHS_DEFAULT
|
19
35
|
end
|
data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template
CHANGED
@@ -12,7 +12,11 @@ else
|
|
12
12
|
fi
|
13
13
|
export address_host='%%WEB.AUTHORITY%%'
|
14
14
|
export address_path='%%WEB.PATH%%'
|
15
|
+
|
16
|
+
# Git
|
15
17
|
export git_repositories_hierarchical_organisation=false
|
18
|
+
export gitolite_user='%%GIT.USERNAME%%'
|
19
|
+
export gitolite_user_home="/var/lib/${gitolite_user}"
|
16
20
|
|
17
21
|
# Mail settings
|
18
22
|
export smtp_server='%%MAILER.SMTP.ADDRESS%%'
|
@@ -3,7 +3,6 @@
|
|
3
3
|
require 'avm/eac_generic_base0/sources/base'
|
4
4
|
require 'avm/eac_ruby_base1/rubygems/version_file'
|
5
5
|
require 'avm/eac_ruby_base1/sources/update'
|
6
|
-
require 'avm/eac_ruby_base1/sources/tester'
|
7
6
|
require 'avm/eac_ruby_base1/sources/runners/bundler'
|
8
7
|
require 'avm/version_number'
|
9
8
|
require 'eac_ruby_utils/core_ext'
|
@@ -12,12 +11,21 @@ module Avm
|
|
12
11
|
module EacRubyBase1
|
13
12
|
module Sources
|
14
13
|
class Base < ::Avm::EacGenericBase0::Sources::Base
|
15
|
-
|
14
|
+
RSPEC_TEST_COMMAND = 'rspec'
|
15
|
+
|
16
|
+
require_sub __FILE__, include_modules: :prepend
|
16
17
|
|
17
18
|
# To-do: dismiss this method at Avm::EacRailsBase1::Instance and remove.
|
18
19
|
# @return [EacRubyUtils::Envs::BaseEnv]
|
19
20
|
attr_reader :env
|
20
21
|
|
22
|
+
# @return [Hash<String, EacRubyUtils::Envs::Command>]
|
23
|
+
def default_test_commands
|
24
|
+
{
|
25
|
+
RSPEC_TEST_COMMAND => rspec_test_command
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
21
29
|
# To-do: dismiss this method at Avm::EacRailsBase1::Instance and remove.
|
22
30
|
# @return [Avm::EacRubyBase1::Sources::Base]
|
23
31
|
def env_set(env)
|
@@ -26,13 +34,13 @@ module Avm
|
|
26
34
|
self
|
27
35
|
end
|
28
36
|
|
29
|
-
|
30
|
-
|
37
|
+
# @return [EacRubyUtils::Envs::Command]
|
38
|
+
def rspec_test_command
|
39
|
+
bundle('exec', 'rspec', '--fail-fast').chdir_root
|
31
40
|
end
|
32
41
|
|
33
|
-
|
34
|
-
|
35
|
-
Avm::EacRubyBase1::Sources::Tester
|
42
|
+
def valid?
|
43
|
+
gemfile_path.exist? || gemspec_path.present?
|
36
44
|
end
|
37
45
|
|
38
46
|
def update
|