eac_tools 0.126.0 → 0.126.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +35 -24
  3. data/eac_tools.gemspec +2 -2
  4. data/lib/eac_tools/version.rb +1 -1
  5. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -1
  6. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build.rb +2 -2
  7. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb +2 -8
  8. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  9. data/sub/avm-eac_webapp_base0/.gitignore +2 -0
  10. data/sub/avm-eac_webapp_base0/.gitrepo +7 -0
  11. data/sub/avm-eac_webapp_base0/.rspec +1 -0
  12. data/sub/avm-eac_webapp_base0/.rubocop.yml +3 -0
  13. data/sub/avm-eac_webapp_base0/Gemfile +8 -0
  14. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +25 -0
  15. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/executables.rb +23 -0
  16. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css/file_apply.rb +44 -0
  17. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/css.rb +17 -0
  18. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/html.rb +42 -0
  19. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/javascript.rb +19 -0
  20. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb +25 -0
  21. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/provider.rb +17 -0
  22. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/xml.rb +23 -0
  23. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_base.rb +28 -0
  24. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +72 -0
  25. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb +37 -0
  26. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/apache.rb +42 -0
  27. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/deploy.rb +24 -0
  28. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/deploy_info.rb +27 -0
  29. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/install.rb +24 -0
  30. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +37 -0
  31. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb +25 -0
  32. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb +61 -0
  33. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/info.rb +44 -0
  34. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/scm.rb +88 -0
  35. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/setup_files_unit.rb +53 -0
  36. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/write_on_target.rb +18 -0
  37. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +72 -0
  38. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy_info.rb +35 -0
  39. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/processes/web_server.rb +34 -0
  40. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_host.rb +34 -0
  41. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_path.rb +38 -0
  42. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb +47 -0
  43. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy_info.rb +24 -0
  44. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/sources/base.rb +13 -0
  45. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +7 -0
  46. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0.rb +9 -0
  47. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec.rb +7 -0
  48. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec_files/css1.source.css +11 -0
  49. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/css_spec_files/css1.target.css +11 -0
  50. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec.rb +7 -0
  51. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.erb.source +8 -0
  52. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.erb.target +8 -0
  53. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.source +5 -0
  54. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/html_spec_files/html_code.html.target +5 -0
  55. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec.rb +7 -0
  56. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec_files/javascript_code1.js.source +29 -0
  57. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/javascript_spec_files/javascript_code1.js.target +21 -0
  58. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec.rb +7 -0
  59. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec_files/json_code.json.source +8 -0
  60. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/json_spec_files/json_code.json.target +7 -0
  61. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec.rb +7 -0
  62. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec_files/xml_code.xml.source +11 -0
  63. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/file_formats/xml_spec_files/xml_code.xml.target +9 -0
  64. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/instances/base_spec.rb +11 -0
  65. data/sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/sources/base_spec.rb +7 -0
  66. data/sub/avm-eac_webapp_base0/spec/spec_helper.rb +5 -0
  67. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_host/no_ssl.conf +11 -0
  68. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_path/default.conf +7 -0
  69. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/deploy/.keep +1 -0
  70. data/sub/eac_ruby_utils/.avm.yaml +3 -0
  71. data/sub/eac_ruby_utils/.gitignore +4 -0
  72. data/sub/eac_ruby_utils/.gitrepo +7 -0
  73. data/sub/eac_ruby_utils/.rspec +1 -0
  74. data/sub/eac_ruby_utils/.rubocop.yml +3 -0
  75. data/sub/eac_ruby_utils/.yardopts +1 -0
  76. data/sub/eac_ruby_utils/Gemfile +8 -0
  77. data/sub/eac_ruby_utils/MIT-LICENCE +16 -0
  78. data/sub/eac_ruby_utils/README.rdoc +3 -0
  79. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +29 -0
  80. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_abstract.rb +100 -0
  81. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/array_accessor.rb +25 -0
  82. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/base_accessor.rb +57 -0
  83. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb +16 -0
  84. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/class_methods.rb +20 -0
  85. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/common_accessor.rb +30 -0
  86. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/enumerable_accessor.rb +52 -0
  87. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/hash_accessor.rb +57 -0
  88. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/instance_methods.rb +21 -0
  89. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/set_accessor.rb +25 -0
  90. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable.rb +16 -0
  91. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_instance_method.rb +46 -0
  92. data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_static_method.rb +12 -0
  93. data/sub/eac_ruby_utils/lib/eac_ruby_utils/arguments_consumer.rb +80 -0
  94. data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit.rb +47 -0
  95. data/sub/eac_ruby_utils/lib/eac_ruby_utils/bit_array.rb +81 -0
  96. data/sub/eac_ruby_utils/lib/eac_ruby_utils/blank_not_blank.rb +19 -0
  97. data/sub/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +31 -0
  98. data/sub/eac_ruby_utils/lib/eac_ruby_utils/by_reference.rb +23 -0
  99. data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte.rb +106 -0
  100. data/sub/eac_ruby_utils/lib/eac_ruby_utils/byte_array.rb +36 -0
  101. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/class_setup.rb +53 -0
  102. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +42 -0
  103. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +20 -0
  104. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_accessors.rb +36 -0
  105. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +39 -0
  106. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +64 -0
  107. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +55 -0
  108. data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +95 -0
  109. data/sub/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +32 -0
  110. data/sub/eac_ruby_utils/lib/eac_ruby_utils/compare_by.rb +28 -0
  111. data/sub/eac_ruby_utils/lib/eac_ruby_utils/context.rb +33 -0
  112. data/sub/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb +19 -0
  113. data/sub/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +6 -0
  114. data/sub/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +51 -0
  115. data/sub/eac_ruby_utils/lib/eac_ruby_utils/enum.rb +102 -0
  116. data/sub/eac_ruby_utils/lib/eac_ruby_utils/enumerables_methods.rb +42 -0
  117. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/append_command_options.rb +38 -0
  118. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/concat.rb +41 -0
  119. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/debugging.rb +19 -0
  120. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/execution.rb +62 -0
  121. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command/extra_options.rb +28 -0
  122. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_command.rb +45 -0
  123. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/base_env.rb +28 -0
  124. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/envvars.rb +27 -0
  125. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb +23 -0
  126. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +67 -0
  127. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/composite_command.rb +45 -0
  128. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +93 -0
  129. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/execution_error.rb +8 -0
  130. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/execution_result.rb +45 -0
  131. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb +22 -0
  132. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/local_env.rb +17 -0
  133. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/process.rb +27 -0
  134. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/spawn.rb +32 -0
  135. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/dasho_options.rb +51 -0
  136. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +26 -0
  137. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +25 -0
  138. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +36 -0
  139. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env.rb +74 -0
  140. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs.rb +23 -0
  141. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/clearable_directory.rb +57 -0
  142. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/extname.rb +35 -0
  143. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/directory.rb +16 -0
  144. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/file.rb +41 -0
  145. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs/temp.rb +52 -0
  146. data/sub/eac_ruby_utils/lib/eac_ruby_utils/fs.rb +11 -0
  147. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem/dependencies.rb +33 -0
  148. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb +57 -0
  149. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +50 -0
  150. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +34 -0
  151. data/sub/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +29 -0
  152. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/class_methods.rb +14 -0
  153. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/instance_methods.rb +30 -0
  154. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/integer_list.rb +23 -0
  155. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/item.rb +48 -0
  156. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +129 -0
  157. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/lists.rb +51 -0
  158. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/string_list.rb +19 -0
  159. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/symbol_list.rb +19 -0
  160. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable.rb +17 -0
  161. data/sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +48 -0
  162. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_all_gems.rb +4 -0
  163. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/from_gem.rb +47 -0
  164. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales/module_i18n_translate.rb +74 -0
  165. data/sub/eac_ruby_utils/lib/eac_ruby_utils/locales.rb +9 -0
  166. data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/base.rb +34 -0
  167. data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/hash.rb +20 -0
  168. data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/set.rb +19 -0
  169. data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable.rb +9 -0
  170. data/sub/eac_ruby_utils/lib/eac_ruby_utils/objects_table.rb +41 -0
  171. data/sub/eac_ruby_utils/lib/eac_ruby_utils/options_consumer.rb +62 -0
  172. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patch_module.rb +21 -0
  173. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable/uri/query_value.rb +37 -0
  174. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable/uri.rb +4 -0
  175. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable.rb +4 -0
  176. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/abstract.rb +9 -0
  177. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/acts_as_instance_method.rb +11 -0
  178. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/acts_as_static_method.rb +11 -0
  179. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/common_constructor.rb +9 -0
  180. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/method_class.rb +10 -0
  181. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/self_included_modules.rb +7 -0
  182. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
  183. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/static_method_class.rb +12 -0
  184. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class.rb +4 -0
  185. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb +45 -0
  186. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable.rb +4 -0
  187. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb +9 -0
  188. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb +14 -0
  189. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator.rb +4 -0
  190. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/if_key.rb +12 -0
  191. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/options_consumer.rb +10 -0
  192. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb +10 -0
  193. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/to_struct.rb +10 -0
  194. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/hash.rb +5 -0
  195. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/integer/rjust_zero.rb +13 -0
  196. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/integer.rb +4 -0
  197. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/ibr.rb +10 -0
  198. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +10 -0
  199. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
  200. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/abstract_methods.rb +10 -0
  201. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/acts_as_abstract.rb +15 -0
  202. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/acts_as_immutable.rb +10 -0
  203. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/common_concern.rb +9 -0
  204. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/compare_by.rb +9 -0
  205. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/context.rb +11 -0
  206. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/enable_memoized.rb +10 -0
  207. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/i18n_translate.rb +9 -0
  208. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/immutable.rb +11 -0
  209. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/listable.rb +10 -0
  210. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/module_parent.rb +5 -0
  211. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/patch_self.rb +9 -0
  212. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/require_sub.rb +9 -0
  213. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/simple_cache.rb +10 -0
  214. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/speaker.rb +9 -0
  215. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module.rb +4 -0
  216. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb +25 -0
  217. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/call_if_proc.rb +11 -0
  218. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  219. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +55 -0
  220. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/i18n_translate.rb +11 -0
  221. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
  222. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb +19 -0
  223. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_respond.rb +22 -0
  224. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/recursive_build.rb +12 -0
  225. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_bool.rb +12 -0
  226. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_pathname.rb +15 -0
  227. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_sym_by_eac.rb +11 -0
  228. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_uri.rb +15 -0
  229. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object.rb +5 -0
  230. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/assert_parent.rb +12 -0
  231. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_noext.rb +9 -0
  232. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +13 -0
  233. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/child_of.rb +16 -0
  234. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/if_exist.rb +10 -0
  235. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/mkpath_s.rb +12 -0
  236. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/parent_n.rb +11 -0
  237. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/readlink_r.rb +11 -0
  238. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/reqdir_glob.rb +13 -0
  239. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb +4 -0
  240. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb +16 -0
  241. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb +10 -0
  242. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb +4 -0
  243. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  244. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +11 -0
  245. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb +4 -0
  246. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
  247. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/time.rb +4 -0
  248. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches.rb +4 -0
  249. data/sub/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  250. data/sub/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +39 -0
  251. data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub/base.rb +93 -0
  252. data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub/sub_file.rb +64 -0
  253. data/sub/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +11 -0
  254. data/sub/eac_ruby_utils/lib/eac_ruby_utils/root_module_setup/ignore.rb +57 -0
  255. data/sub/eac_ruby_utils/lib/eac_ruby_utils/root_module_setup.rb +108 -0
  256. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +23 -0
  257. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  258. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/setup_manager.rb +17 -0
  259. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +27 -0
  260. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  261. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec/stub_speaker.rb +39 -0
  262. data/sub/eac_ruby_utils/lib/eac_ruby_utils/rspec.rb +9 -0
  263. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb +32 -0
  264. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +71 -0
  265. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects/replace_instance_method.rb +36 -0
  266. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects.rb +52 -0
  267. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby.rb +9 -0
  268. data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb +79 -0
  269. data/sub/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +50 -0
  270. data/sub/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +77 -0
  271. data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +64 -0
  272. data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker/sender.rb +37 -0
  273. data/sub/eac_ruby_utils/lib/eac_ruby_utils/speaker.rb +16 -0
  274. data/sub/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  275. data/sub/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +63 -0
  276. data/sub/eac_ruby_utils/lib/eac_ruby_utils/unimplemented_method_error.rb +6 -0
  277. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +5 -0
  278. data/sub/eac_ruby_utils/lib/eac_ruby_utils/wildcards.rb +26 -0
  279. data/sub/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +107 -0
  280. data/sub/eac_ruby_utils/lib/eac_ruby_utils.rb +14 -0
  281. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_abstract_spec.rb +91 -0
  282. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/array_accessor_spec.rb +41 -0
  283. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/common_accessor_spec.rb +55 -0
  284. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/hash_accessor_spec.rb +40 -0
  285. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/set_accessor_spec.rb +41 -0
  286. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_instance_method_spec.rb +11 -0
  287. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_static_method_spec.rb +12 -0
  288. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb +15 -0
  289. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/bit_array_spec.rb +20 -0
  290. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/blank_not_blank_spec.rb +14 -0
  291. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/byte_spec.rb +52 -0
  292. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +63 -0
  293. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +149 -0
  294. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +19 -0
  295. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/compare_by_spec.rb +37 -0
  296. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/custom_format_spec.rb +58 -0
  297. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/enum_spec.rb +42 -0
  298. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/enumerables_methods_spec.rb +48 -0
  299. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/base_example.rb +95 -0
  300. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/local_env_spec.rb +9 -0
  301. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/ssh_env_spec.rb +16 -0
  302. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/executable_spec.rb +34 -0
  303. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/ssh_env_spec.rb +23 -0
  304. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb +16 -0
  305. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb +27 -0
  306. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +50 -0
  307. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/gems_registry_spec.rb +14 -0
  308. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +14 -0
  309. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +223 -0
  310. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +15 -0
  311. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/module_ancestors_variable/hash_spec.rb +55 -0
  312. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/module_ancestors_variable/set_spec.rb +55 -0
  313. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +78 -0
  314. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/addressable/uri/query_value_spec.rb +23 -0
  315. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/abstract_spec.rb +23 -0
  316. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/acts_as_abstract_spec.rb +11 -0
  317. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/acts_as_instance_method_spec.rb +11 -0
  318. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/acts_as_static_method_spec.rb +12 -0
  319. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/self_included_modules_spec.rb +28 -0
  320. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerable/boolean_combinations_spec.rb +37 -0
  321. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/current_spec.rb +24 -0
  322. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerator/stopped_spec.rb +30 -0
  323. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/if_key_spec.rb +21 -0
  324. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/options_consumer_spec.rb +15 -0
  325. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb +11 -0
  326. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/integer/rjust_zero_spec.rb +18 -0
  327. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/compare_by_spec.rb +35 -0
  328. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +13 -0
  329. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +13 -0
  330. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/speaker_spec.rb +13 -0
  331. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/call_if_proc_spec.rb +9 -0
  332. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +18 -0
  333. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/if_present_spec.rb +11 -0
  334. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/recursive_build_spec.rb +60 -0
  335. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec_files/path/my_stub_with_template +1 -0
  336. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/assert_parent_spec.rb +19 -0
  337. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_noext_spec.rb +24 -0
  338. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb +15 -0
  339. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/child_of_spec.rb +24 -0
  340. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/parent_n_spec.rb +31 -0
  341. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +32 -0
  342. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +63 -0
  343. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub/base_spec/stubbed_module_a.rb +6 -0
  344. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub/base_spec/stubbed_not_module.rb +6 -0
  345. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub/base_spec.rb +17 -0
  346. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/rspec/setup/setup_manager_spec.rb +14 -0
  347. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby/on_clean_environment_spec.rb +29 -0
  348. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby/on_replace_objects_spec.rb +63 -0
  349. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +62 -0
  350. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +127 -0
  351. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb +55 -0
  352. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/wildcards_spec.rb +25 -0
  353. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/yaml_spec.rb +73 -0
  354. data/sub/eac_ruby_utils/spec/locales/pt-BR.yml +58 -0
  355. data/sub/eac_ruby_utils/spec/spec_helper/acts_as_method_example.rb +41 -0
  356. data/sub/eac_ruby_utils/spec/spec_helper.rb +13 -0
  357. metadata +353 -11
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module EacWebappBase0
5
+ module Instances
6
+ module Runners
7
+ class DeployInfo
8
+ runner_with :help, :output_item do
9
+ desc 'Fetch instance\'s last deploy information.'
10
+ end
11
+
12
+ def run
13
+ run_output
14
+ end
15
+
16
+ # @return [Hash]
17
+ def item_hash
18
+ instance.deploy_info.to_h
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module EacWebappBase0
5
+ module Sources
6
+ class Base < ::Avm::EacGenericBase0::Sources::Base
7
+ def valid?
8
+ false
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module EacWebappBase0
5
+ VERSION = '0.23.0'
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_base1'
4
+ EacRubyBase1::RootModuleSetup.perform __FILE__ do
5
+ require 'avm'
6
+ require 'avm/eac_generic_base0'
7
+ require 'avm/eac_postgresql_base0'
8
+ require 'avm/eac_ubuntu_base0'
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/file_formats/css'
4
+
5
+ RSpec.describe Avm::EacWebappBase0::FileFormats::Css do
6
+ include_examples 'avm_file_formats_with_fixtures', __FILE__
7
+ end
@@ -0,0 +1,11 @@
1
+
2
+ h1, h2 { font-color: red }
3
+
4
+
5
+ /* Comment */
6
+
7
+
8
+ .teste
9
+ {
10
+ border-style: dashed
11
+ }
@@ -0,0 +1,11 @@
1
+ h1, h2 {
2
+ font-color: red;
3
+ }
4
+
5
+
6
+ /* Comment */
7
+
8
+
9
+ .teste {
10
+ border-style: dashed;
11
+ }
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/file_formats/html'
4
+
5
+ RSpec.describe Avm::EacWebappBase0::FileFormats::Html do
6
+ include_examples 'avm_file_formats_with_fixtures', __FILE__
7
+ end
@@ -0,0 +1,8 @@
1
+ <html>
2
+ <body>
3
+ <p>Unformatted code</p>
4
+ <% array.each do |item| %>
5
+ <%= '<b>' + item + '</br>' %>
6
+ <% end %>
7
+ </body>
8
+ </html>
@@ -0,0 +1,8 @@
1
+ <html>
2
+ <body>
3
+ <p>Unformatted code</p>
4
+ <% array.each do |item| %>
5
+ <%= '<b>' + item + '</br>' %>
6
+ <% end %>
7
+ </body>
8
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ <p>Unformatted code</p>
4
+ </body>
5
+ </html>
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ <p>Unformatted code</p>
4
+ </body>
5
+ </html>
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/file_formats/javascript'
4
+
5
+ RSpec.describe Avm::EacWebappBase0::FileFormats::Javascript do
6
+ include_examples 'avm_file_formats_with_fixtures', __FILE__
7
+ end
@@ -0,0 +1,29 @@
1
+ if (typeof TasksScheduler == "undefined")
2
+
3
+
4
+
5
+ TasksScheduler = function() {};
6
+
7
+ TasksScheduler.Status = function () {
8
+
9
+ };
10
+
11
+ // Shortcut
12
+ var _S = TasksScheduler.Status;
13
+
14
+ _S.initialized = false;
15
+
16
+ _S.init = function(url, interval_max) {
17
+ if (!_S.initialized) {
18
+ _S.initialized = true;
19
+ _S.update();
20
+ }
21
+ };
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
@@ -0,0 +1,21 @@
1
+ if (typeof TasksScheduler == "undefined")
2
+
3
+
4
+
5
+ TasksScheduler = function() {};
6
+
7
+ TasksScheduler.Status = function() {
8
+
9
+ };
10
+
11
+ // Shortcut
12
+ var _S = TasksScheduler.Status;
13
+
14
+ _S.initialized = false;
15
+
16
+ _S.init = function(url, interval_max) {
17
+ if (!_S.initialized) {
18
+ _S.initialized = true;
19
+ _S.update();
20
+ }
21
+ };
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/file_formats/json'
4
+
5
+ RSpec.describe Avm::EacWebappBase0::FileFormats::Json do
6
+ include_examples 'avm_file_formats_with_fixtures', __FILE__
7
+ end
@@ -0,0 +1,8 @@
1
+ {
2
+ "any_attribute": [
3
+
4
+
5
+ "value 1",
6
+ "value_2"],
7
+ "second_attribute": 123
8
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "any_attribute": [
3
+ "value 1",
4
+ "value_2"
5
+ ],
6
+ "second_attribute": 123
7
+ }
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/file_formats/xml'
4
+
5
+ RSpec.describe Avm::EacWebappBase0::FileFormats::Xml do
6
+ include_examples 'avm_file_formats_with_fixtures', __FILE__
7
+ end
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ To change this license header, choose License Headers in Project Properties.
4
+ To change this template file, choose Tools | Templates
5
+ and open the template in the editor.
6
+ -->
7
+
8
+
9
+ <root> <a_tag> a Content</a_tag>
10
+
11
+ </root>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ To change this license header, choose License Headers in Project Properties.
4
+ To change this template file, choose Tools | Templates
5
+ and open the template in the editor.
6
+ -->
7
+ <root>
8
+ <a_tag>a Content</a_tag>
9
+ </root>
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/instances/base'
4
+
5
+ RSpec.describe Avm::EacWebappBase0::Instances::Base do
6
+ let(:instance) { described_class.by_id('the-app_0') }
7
+
8
+ describe '#install_apache_resource_name' do
9
+ it { expect(instance.install_apache_resource_name).to eq(instance.id) }
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/sources/base'
4
+
5
+ RSpec.describe Avm::EacWebappBase0::Sources::Base do
6
+ include_examples 'in_avm_registry', 'sources'
7
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0'
4
+ require 'eac_ruby_gem_support'
5
+ EacRubyUtils::Rspec.default_setup_create(File.expand_path('..', __dir__)).stub_avm_contexts
@@ -0,0 +1,11 @@
1
+ <VirtualHost *:80>
2
+ ServerName "%%WEB.HOSTNAME%%"
3
+ DocumentRoot "%%DOCUMENT_ROOT%%"
4
+ %%EXTRA_CONTENT%%
5
+
6
+ <Directory "%%DOCUMENT_ROOT%%">
7
+ Allow from all
8
+ Options -MultiViews
9
+ Require all granted
10
+ %%DIRECTORY_EXTRA_CONFIG%% </Directory>
11
+ </VirtualHost>
@@ -0,0 +1,7 @@
1
+ Alias "%%WEB.PATH%%" "%%DOCUMENT_ROOT%%"
2
+ %%EXTRA_CONTENT%%
3
+ <Directory "%%DOCUMENT_ROOT%%">
4
+ Allow from all
5
+ Options -MultiViews
6
+ Require all granted
7
+ </Directory>
@@ -0,0 +1,3 @@
1
+ ---
2
+ locale: en
3
+ bundle_test_command: exec rspec
@@ -0,0 +1,4 @@
1
+ Gemfile.local
2
+ Gemfile.lock
3
+ doc/
4
+ .yardoc/
@@ -0,0 +1,7 @@
1
+ [subrepo]
2
+ cmdver = 0.4.9
3
+ commit = 4f5b21a4174d981a79874e8eddc1d2725902a4a6
4
+ method = merge
5
+ parent = 606e0534afce4e4cdc7d788f892dbb613011a913
6
+ branch = master
7
+ remote = https://github.com/esquilo-azul/eac_ruby_utils.git
@@ -0,0 +1 @@
1
+ --require spec/spec_helper --color --format doc --default-path . --pattern 'spec/**/*_spec.rb'
@@ -0,0 +1,3 @@
1
+ ---
2
+ inherit_gem:
3
+ eac_ruby_gem_support: ".rubocop.yml"
@@ -0,0 +1 @@
1
+ --no-private --protected lib/**/*.rb
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if File.exist?(local_gemfile)
@@ -0,0 +1,16 @@
1
+ Copyright 2018 Eduardo Henrique Bogoni <eduardobogoni@gmail.com>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
4
+ associated documentation files (the "Software"), to deal in the Software without restriction,
5
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
6
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
7
+ furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial
10
+ portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
13
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
15
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
16
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,3 @@
1
+ = E.A.C. Ruby Utilities
2
+
3
+ Utilities for E.A.C.'s Ruby projects.
@@ -0,0 +1,29 @@
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 = '>= 3.2' # rubocop:disable Gemspec/RequiredRubyVersion
18
+
19
+ s.add_dependency 'activesupport', '>= 6.1.7.10'
20
+ s.add_dependency 'addressable', '~> 2.9'
21
+ s.add_dependency 'bundler'
22
+ s.add_dependency 'json', '< 3' # While "activesupport" does not support "json" '>= 3'
23
+ s.add_dependency 'memoized', '~> 1.1', '>= 1.1.3'
24
+ s.add_dependency 'net-ssh', '~> 4.2'
25
+ s.add_dependency 'ostruct'
26
+ s.add_dependency 'zeitwerk', '~> 2.8', '>= 2.8.3'
27
+ s.add_development_dependency 'avm-eac_ubuntu_base0', '~> 0.7', '>= 0.7.2'
28
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.15'
29
+ end
@@ -0,0 +1,100 @@
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, &)
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
@@ -0,0 +1,25 @@
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
@@ -0,0 +1,57 @@
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
@@ -0,0 +1,16 @@
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
@@ -0,0 +1,20 @@
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
@@ -0,0 +1,30 @@
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