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.
Files changed (256) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +42 -30
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/lib/avm/sources/base/configuration.rb +14 -6
  5. data/sub/avm/lib/avm/sources/base/testing.rb +50 -7
  6. data/sub/avm/lib/avm/sources/tests/builder.rb +8 -1
  7. data/sub/avm/lib/avm/sources/tests/single.rb +28 -9
  8. data/sub/avm/lib/avm/version.rb +1 -1
  9. data/sub/avm-eac_generic_base0/Gemfile +3 -0
  10. data/sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec +3 -3
  11. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base.rb +0 -6
  12. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +1 -1
  13. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/Gemfile +0 -0
  14. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/avm-eac_rails_base0.gemspec +0 -0
  15. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/apache_host.rb +0 -0
  16. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/apache_path.rb +0 -0
  17. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/deploy.rb +0 -0
  18. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/instance.rb +0 -0
  19. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/runners/base.rb +0 -0
  20. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/runners.rb +0 -0
  21. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/sources/base.rb +14 -1
  22. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0/version.rb +1 -1
  23. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/lib/avm/eac_rails_base0.rb +0 -0
  24. 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
  25. 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
  26. 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
  27. 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
  28. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/rubocop_spec.rb +0 -0
  29. data/sub/{avm-tools/sub/avm-eac_rails_base0 → avm-eac_rails_base0}/spec/spec_helper.rb +0 -0
  30. 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
  31. 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
  32. 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
  33. data/sub/avm-eac_rails_base1/Gemfile +3 -0
  34. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +2 -2
  35. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb +16 -0
  36. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  37. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  38. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template +4 -0
  39. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +15 -7
  40. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  41. data/sub/avm-tools/Gemfile.lock +24 -28
  42. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  43. data/sub/eac_ruby_utils/Gemfile +16 -0
  44. data/sub/eac_ruby_utils/MIT-LICENCE +16 -0
  45. data/sub/eac_ruby_utils/README.rdoc +3 -0
  46. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +24 -0
  47. data/sub/eac_ruby_utils/lib/eac_ruby_utils/abstract_methods.rb +68 -0
  48. data/sub/eac_ruby_utils/lib/eac_ruby_utils/arguments_consumer.rb +81 -0
  49. data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit.rb +46 -0
  50. data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit_array.rb +81 -0
  51. data/sub/eac_ruby_utils/lib/eac_ruby_utils/blank_not_blank.rb +19 -0
  52. data/sub/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +31 -0
  53. data/sub/eac_ruby_utils/lib/eac_ruby_utils/by_reference.rb +23 -0
  54. data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte.rb +105 -0
  55. data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte_array.rb +36 -0
  56. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/class_setup.rb +52 -0
  57. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +41 -0
  58. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +20 -0
  59. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +29 -0
  60. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +53 -0
  61. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +54 -0
  62. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +89 -0
  63. data/sub/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
  64. data/sub/eac_ruby_utils/lib/eac_ruby_utils/compare_by.rb +28 -0
  65. data/sub/eac_ruby_utils/lib/eac_ruby_utils/context.rb +33 -0
  66. data/sub/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb +21 -0
  67. data/sub/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +7 -0
  68. data/sub/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +53 -0
  69. data/sub/eac_ruby_utils/lib/eac_ruby_utils/enum.rb +102 -0
  70. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_env.rb +28 -0
  71. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/concat.rb +33 -0
  72. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/envvars.rb +24 -0
  73. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb +33 -0
  74. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +172 -0
  75. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +81 -0
  76. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb +22 -0
  77. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/local_env.rb +17 -0
  78. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/process.rb +27 -0
  79. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/spawn.rb +32 -0
  80. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/dasho_options.rb +53 -0
  81. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +25 -0
  82. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +24 -0
  83. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +34 -0
  84. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env.rb +75 -0
  85. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs.rb +23 -0
  86. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/clearable_directory.rb +57 -0
  87. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/extname.rb +30 -0
  88. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/directory.rb +16 -0
  89. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/file.rb +34 -0
  90. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp.rb +52 -0
  91. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs.rb +9 -0
  92. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +79 -0
  93. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +35 -0
  94. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/array_accessor.rb +32 -0
  95. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/base_accessor.rb +23 -0
  96. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/boolean_accessor.rb +16 -0
  97. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/class_methods.rb +20 -0
  98. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/common_accessor.rb +30 -0
  99. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/hash_accessor.rb +46 -0
  100. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/instance_methods.rb +21 -0
  101. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable.rb +15 -0
  102. data/sub/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +29 -0
  103. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/class_methods.rb +14 -0
  104. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/instance_methods.rb +30 -0
  105. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/integer_list.rb +23 -0
  106. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +111 -0
  107. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/lists.rb +59 -0
  108. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/string_list.rb +19 -0
  109. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/symbol_list.rb +19 -0
  110. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +49 -0
  111. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable.rb +17 -0
  112. data/sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +48 -0
  113. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_all_gems.rb +4 -0
  114. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_gem.rb +47 -0
  115. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/module_i18n_translate.rb +74 -0
  116. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales.rb +9 -0
  117. data/sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb +35 -0
  118. data/sub/eac_ruby_utils/lib/eac_ruby_utils/options_consumer.rb +62 -0
  119. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patch.rb +11 -0
  120. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +9 -0
  121. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/common_constructor.rb +9 -0
  122. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +7 -0
  123. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
  124. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class.rb +4 -0
  125. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb +45 -0
  126. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable.rb +4 -0
  127. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb +9 -0
  128. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb +14 -0
  129. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator.rb +4 -0
  130. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/options_consumer.rb +10 -0
  131. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb +10 -0
  132. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/to_struct.rb +10 -0
  133. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash.rb +5 -0
  134. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +10 -0
  135. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
  136. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/abstract_methods.rb +10 -0
  137. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/common_concern.rb +9 -0
  138. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/compare_by.rb +9 -0
  139. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/context.rb +11 -0
  140. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb +9 -0
  141. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/immutable.rb +10 -0
  142. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/listable.rb +10 -0
  143. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/method_class.rb +9 -0
  144. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/patch.rb +9 -0
  145. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/require_sub.rb +9 -0
  146. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/simple_cache.rb +10 -0
  147. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/speaker.rb +9 -0
  148. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module.rb +4 -0
  149. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb +25 -0
  150. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +11 -0
  151. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  152. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +23 -0
  153. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +13 -0
  154. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
  155. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb +19 -0
  156. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_respond.rb +22 -0
  157. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_pathname.rb +15 -0
  158. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_uri.rb +15 -0
  159. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object.rb +5 -0
  160. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_noext.rb +10 -0
  161. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +9 -0
  162. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/if_exist.rb +10 -0
  163. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/mkpath_s.rb +12 -0
  164. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/parent_n.rb +11 -0
  165. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/readlink_r.rb +11 -0
  166. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/reqdir_glob.rb +13 -0
  167. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb +4 -0
  168. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb +16 -0
  169. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb +10 -0
  170. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb +4 -0
  171. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  172. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +11 -0
  173. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb +4 -0
  174. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
  175. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time.rb +4 -0
  176. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches.rb +4 -0
  177. data/sub/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  178. data/sub/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +34 -0
  179. data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +134 -0
  180. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +20 -0
  181. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  182. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +12 -0
  183. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  184. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/stub_speaker.rb +39 -0
  185. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec.rb +9 -0
  186. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb +32 -0
  187. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +38 -0
  188. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby.rb +9 -0
  189. data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb +69 -0
  190. data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +46 -0
  191. data/sub/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +77 -0
  192. data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +64 -0
  193. data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/sender.rb +32 -0
  194. data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker.rb +16 -0
  195. data/sub/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  196. data/sub/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +63 -0
  197. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +5 -0
  198. data/sub/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +105 -0
  199. data/sub/eac_ruby_utils/lib/eac_ruby_utils.rb +6 -0
  200. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/abstract_methods_spec.rb +28 -0
  201. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb +17 -0
  202. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/bit_array_spec.rb +22 -0
  203. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/blank_not_blank_spec.rb +16 -0
  204. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/byte_spec.rb +54 -0
  205. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +65 -0
  206. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +125 -0
  207. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
  208. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compare_by_spec.rb +38 -0
  209. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/custom_format_spec.rb +60 -0
  210. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/enum_spec.rb +43 -0
  211. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/executable_spec.rb +37 -0
  212. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/ssh_env_spec.rb +25 -0
  213. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb +18 -0
  214. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb +12 -0
  215. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +52 -0
  216. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +16 -0
  217. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +275 -0
  218. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +17 -0
  219. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/method_class_spec.rb +46 -0
  220. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +80 -0
  221. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +25 -0
  222. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +30 -0
  223. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerable/boolean_combinations_spec.rb +39 -0
  224. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/current_spec.rb +26 -0
  225. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/stopped_spec.rb +32 -0
  226. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/options_consumer_spec.rb +17 -0
  227. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb +13 -0
  228. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/compare_by_spec.rb +36 -0
  229. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +15 -0
  230. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/method_class_spec.rb +20 -0
  231. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +15 -0
  232. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/speaker_spec.rb +13 -0
  233. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +11 -0
  234. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
  235. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/if_present_spec.rb +13 -0
  236. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec_files/path/my_stub_with_template +1 -0
  237. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_noext_spec.rb +26 -0
  238. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb +17 -0
  239. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/parent_n_spec.rb +33 -0
  240. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
  241. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  242. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec/stubbed_module_a.rb +6 -0
  243. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec/stubbed_not_module.rb +6 -0
  244. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec.rb +19 -0
  245. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby_spec.rb +22 -0
  246. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +57 -0
  247. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +129 -0
  248. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb +57 -0
  249. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/yaml_spec.rb +75 -0
  250. data/sub/eac_ruby_utils/spec/locales/pt-BR.yml +58 -0
  251. data/sub/eac_ruby_utils/spec/rubocop_check_spec.rb +3 -0
  252. data/sub/eac_ruby_utils/spec/spec_helper.rb +15 -0
  253. metadata +255 -52
  254. data/sub/avm/lib/avm/sources/tester.rb +0 -24
  255. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/tester.rb +0 -56
  256. 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: a71c505659f946f57541a262d512b04250607f653e15443d45da2450656a2f39
4
- data.tar.gz: 80d857d14af3b2e6d5dd46c4429b8f8cf6a3c811a03cce11abe83ffd98f18c94
3
+ metadata.gz: 6e96780cde14c4b87945f466bcedbb9344b12aa87a9b9832fc520d5ab681fa13
4
+ data.tar.gz: '028b3f2c1c65d20cf6c0a1b65470806c49d6368e688bb962161674472e7b7b84'
5
5
  SHA512:
6
- metadata.gz: fa69b309ceef7296b7b95319ee6aab4fd4fdcc69ede0b018485110a24fe6db132041834cb15ccd5b7a472d5824d70fe6e4abcb15504448eac7bfc0d3e1615004
7
- data.tar.gz: a4e6c32ffe03e22954a14d3b62cb2a22b6a585bd289cf19464f90d920fe1bd08a920e4f8369c7c6d738c1052433bbdfe77c3f66242dc7a4a93dd58705df37e65
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.2.2)
5
- avm-eac_generic_base0 (~> 0.2, >= 0.2.2)
6
- avm-eac_rails_base1 (~> 0.3, >= 0.3.1)
7
- avm-eac_redmine_base0 (~> 0.7)
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.8, >= 0.8.2)
10
+ avm-eac_ruby_base1 (~> 0.9)
10
11
  avm-tools (~> 0.121)
11
- eac_ruby_utils (~> 0.95, >= 0.95.1)
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.2.2)
17
- avm (~> 0.19)
18
- eac_ruby_utils (~> 0.80)
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.3.2)
24
- avm-eac_ruby_base1 (~> 0.8)
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.1)
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.7.1)
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.8.2)
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.1)
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.23.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.1)
168
- parslet (~> 1.5)
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.10.0)
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.6-x86_64-linux)
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 (1.8.2)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.2.2'
4
+ VERSION = '0.5.0'
5
5
  end
@@ -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.if_present do |v|
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
- read_configuration_as_shell_words(key).if_present do |v|
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
- TEST_COMMAND_KEY = 'test.command'
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 [Avm::Sources::Tester]
16
- def tester
17
- tester_class.new(self)
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 [Class<Avm::Sources::Tester>
21
- def tester_class
22
- Avm::Sources::Tester
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.map { |a_source| create_unit(a_source) }
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
- if main?
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
- def tester_uncached
51
- source.tester
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.23.0'
4
+ VERSION = '0.24.0'
5
5
  end
@@ -3,3 +3,6 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -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.19'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.80'
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.4'
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacGenericBase0
5
- VERSION = '0.2.2'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
@@ -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 && config_ru_path.exist?
35
+ super && gemfile_lock_gem_version(EAC_RAILS_BASE0_GEMNAME).present?
23
36
  end
24
37
  end
25
38
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.4.1'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
@@ -3,3 +3,6 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -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.8'
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.1'
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.3.2'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.7.1'
5
+ VERSION = '0.8.0'
6
6
  end
7
7
  end
@@ -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
- require_sub __FILE__, include_modules: :prepend, require_dependency: true
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
- def valid?
30
- gemfile_path.exist? || gemspec_path.present?
37
+ # @return [EacRubyUtils::Envs::Command]
38
+ def rspec_test_command
39
+ bundle('exec', 'rspec', '--fail-fast').chdir_root
31
40
  end
32
41
 
33
- # @return [Avm::EacRubyBase1::Sources::Tester]
34
- def tester_class
35
- Avm::EacRubyBase1::Sources::Tester
42
+ def valid?
43
+ gemfile_path.exist? || gemspec_path.present?
36
44
  end
37
45
 
38
46
  def update