eac_tools 0.75.2 → 0.76.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -5
  3. data/Gemfile.lock +69 -71
  4. data/lib/eac_tools/version.rb +1 -1
  5. data/sub/avm-eac_redmine_base0/Gemfile +2 -2
  6. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +8 -6
  7. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/install.rb +9 -0
  8. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +1 -1
  9. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/entity_base.rb +2 -2
  10. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/core_update.rb +1 -1
  11. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  12. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec.rb +3 -3
  13. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec.rb +1 -1
  14. data/sub/avm-eac_redmine_base0/spec/rubocop_spec.rb +1 -1
  15. data/sub/avm-eac_redmine_base0/spec/spec_helper.rb +2 -2
  16. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +3 -0
  17. data/sub/eac_cli/Gemfile +2 -2
  18. data/sub/eac_cli/eac_cli.gemspec +5 -3
  19. data/sub/eac_cli/lib/eac_cli/config.rb +0 -4
  20. data/sub/eac_cli/lib/eac_cli/core_ext.rb +1 -1
  21. data/sub/eac_cli/lib/eac_cli/definition/alternative.rb +24 -3
  22. data/sub/eac_cli/lib/eac_cli/definition.rb +1 -1
  23. data/sub/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb +1 -1
  24. data/sub/eac_cli/lib/eac_cli/parser/alternative/any_options.rb +19 -0
  25. data/sub/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +1 -1
  26. data/sub/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +1 -3
  27. data/sub/eac_cli/lib/eac_cli/parser/alternative.rb +0 -9
  28. data/sub/eac_cli/lib/eac_cli/parser.rb +1 -1
  29. data/sub/eac_cli/lib/eac_cli/patches/object.rb +1 -1
  30. data/sub/eac_cli/lib/eac_cli/patches.rb +1 -1
  31. data/sub/eac_cli/lib/eac_cli/runner/class_runner.rb +1 -1
  32. data/sub/eac_cli/lib/eac_cli/runner/context_responders/set.rb +2 -2
  33. data/sub/eac_cli/lib/eac_cli/runner/exit.rb +2 -1
  34. data/sub/eac_cli/lib/eac_cli/runner/instance_methods.rb +1 -1
  35. data/sub/eac_cli/lib/eac_cli/runner_with/help/builder/alternative.rb +1 -1
  36. data/sub/eac_cli/lib/eac_cli/runner_with/help/builder.rb +2 -2
  37. data/sub/eac_cli/lib/eac_cli/runner_with/help.rb +1 -0
  38. data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +1 -1
  39. data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +1 -1
  40. data/sub/eac_cli/lib/eac_cli/speaker/list.rb +4 -4
  41. data/sub/eac_cli/lib/eac_cli/speaker/options.rb +3 -3
  42. data/sub/eac_cli/lib/eac_cli/speaker.rb +2 -1
  43. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  44. data/sub/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +2 -2
  45. data/sub/eac_cli/spec/lib/eac_cli/old_configs_spec.rb +1 -1
  46. data/sub/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +10 -10
  47. data/sub/eac_cli/spec/lib/eac_cli/runner/for_context_spec.rb +13 -13
  48. data/sub/eac_cli/spec/lib/eac_cli/runner_spec.rb +10 -10
  49. data/sub/eac_cli/spec/lib/eac_cli/runner_with/confirmation_spec.rb +3 -3
  50. data/sub/eac_cli/spec/lib/eac_cli/runner_with/help/layout_spec.rb +1 -1
  51. data/sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb +3 -2
  52. data/sub/eac_cli/spec/lib/eac_cli/runner_with/output_spec.rb +6 -6
  53. data/sub/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +6 -6
  54. data/sub/eac_cli/spec/lib/eac_cli/speaker_spec.rb +1 -1
  55. data/sub/eac_cli/spec/rubocop_spec.rb +1 -1
  56. data/sub/eac_cli/spec/spec_helper.rb +1 -1
  57. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  58. data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable.rb +1 -1
  59. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  60. metadata +10 -179
  61. data/sub/eac_envs-http/Gemfile +0 -8
  62. data/sub/eac_envs-http/eac_envs-http.gemspec +0 -25
  63. data/sub/eac_envs-http/lib/eac_envs/http/error.rb +0 -8
  64. data/sub/eac_envs-http/lib/eac_envs/http/request/body_field.rb +0 -51
  65. data/sub/eac_envs-http/lib/eac_envs/http/request/body_field_value.rb +0 -32
  66. data/sub/eac_envs-http/lib/eac_envs/http/request/body_fields.rb +0 -39
  67. data/sub/eac_envs-http/lib/eac_envs/http/request/faraday_connection.rb +0 -75
  68. data/sub/eac_envs-http/lib/eac_envs/http/request.rb +0 -58
  69. data/sub/eac_envs-http/lib/eac_envs/http/response/body.rb +0 -62
  70. data/sub/eac_envs-http/lib/eac_envs/http/response/headers.rb +0 -41
  71. data/sub/eac_envs-http/lib/eac_envs/http/response/links.rb +0 -28
  72. data/sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb +0 -21
  73. data/sub/eac_envs-http/lib/eac_envs/http/response.rb +0 -30
  74. data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/request_processor.rb +0 -42
  75. data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/webrick_servlet.rb +0 -22
  76. data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server.rb +0 -63
  77. data/sub/eac_envs-http/lib/eac_envs/http/rspec.rb +0 -11
  78. data/sub/eac_envs-http/lib/eac_envs/http/version.rb +0 -7
  79. data/sub/eac_envs-http/lib/eac_envs/http.rb +0 -9
  80. data/sub/eac_envs-http/spec/lib/eac_envs/http/request/body_fields_spec.rb +0 -47
  81. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec.rb +0 -68
  82. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.source.yaml +0 -5
  83. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.target.yaml +0 -9
  84. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.source.yaml +0 -8
  85. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.target.yaml +0 -10
  86. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.source.yaml +0 -10
  87. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.target.yaml +0 -11
  88. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.source.yaml +0 -4
  89. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.target.yaml +0 -11
  90. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.source.yaml +0 -6
  91. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.target.yaml +0 -11
  92. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.source.yaml +0 -5
  93. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.target.yaml +0 -13
  94. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.source.yaml +0 -2
  95. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.target.yaml +0 -9
  96. data/sub/eac_envs-http/spec/rubocop_spec.rb +0 -3
  97. data/sub/eac_envs-http/spec/spec_helper/request_builder.rb +0 -62
  98. data/sub/eac_envs-http/spec/spec_helper.rb +0 -7
  99. data/sub/eac_fs/Gemfile +0 -8
  100. data/sub/eac_fs/eac_fs.gemspec +0 -20
  101. data/sub/eac_fs/lib/eac_fs/cached_download.rb +0 -40
  102. data/sub/eac_fs/lib/eac_fs/comparator/build.rb +0 -57
  103. data/sub/eac_fs/lib/eac_fs/comparator/rename_file.rb +0 -15
  104. data/sub/eac_fs/lib/eac_fs/comparator.rb +0 -18
  105. data/sub/eac_fs/lib/eac_fs/contexts.rb +0 -21
  106. data/sub/eac_fs/lib/eac_fs/core_ext.rb +0 -4
  107. data/sub/eac_fs/lib/eac_fs/file_info.rb +0 -29
  108. data/sub/eac_fs/lib/eac_fs/logs/file.rb +0 -56
  109. data/sub/eac_fs/lib/eac_fs/logs.rb +0 -64
  110. data/sub/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +0 -15
  111. data/sub/eac_fs/lib/eac_fs/patches/module.rb +0 -4
  112. data/sub/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +0 -32
  113. data/sub/eac_fs/lib/eac_fs/patches/object.rb +0 -4
  114. data/sub/eac_fs/lib/eac_fs/patches/pathname/info.rb +0 -12
  115. data/sub/eac_fs/lib/eac_fs/patches/pathname.rb +0 -4
  116. data/sub/eac_fs/lib/eac_fs/patches.rb +0 -4
  117. data/sub/eac_fs/lib/eac_fs/rspec/setup.rb +0 -25
  118. data/sub/eac_fs/lib/eac_fs/rspec.rb +0 -9
  119. data/sub/eac_fs/lib/eac_fs/storage_tree.rb +0 -81
  120. data/sub/eac_fs/lib/eac_fs/traversable.rb +0 -45
  121. data/sub/eac_fs/lib/eac_fs/traverser.rb +0 -76
  122. data/sub/eac_fs/lib/eac_fs/version.rb +0 -5
  123. data/sub/eac_fs/lib/eac_fs.rb +0 -7
  124. data/sub/eac_fs/spec/lib/eac_fs/storage_tree_spec.rb +0 -32
  125. data/sub/eac_fs/spec/rubocop_spec.rb +0 -3
  126. data/sub/eac_fs/spec/spec_helper.rb +0 -4
  127. data/sub/eac_rest/Gemfile +0 -8
  128. data/sub/eac_rest/eac_rest.gemspec +0 -21
  129. data/sub/eac_rest/lib/eac_rest/api.rb +0 -57
  130. data/sub/eac_rest/lib/eac_rest/entity/data.rb +0 -44
  131. data/sub/eac_rest/lib/eac_rest/entity/fetching.rb +0 -20
  132. data/sub/eac_rest/lib/eac_rest/entity.rb +0 -35
  133. data/sub/eac_rest/lib/eac_rest/error.rb +0 -6
  134. data/sub/eac_rest/lib/eac_rest/helper.rb +0 -34
  135. data/sub/eac_rest/lib/eac_rest/request.rb +0 -48
  136. data/sub/eac_rest/lib/eac_rest/response.rb +0 -27
  137. data/sub/eac_rest/lib/eac_rest/version.rb +0 -5
  138. data/sub/eac_rest/lib/eac_rest.rb +0 -7
  139. data/sub/eac_rest/spec/lib/eac_rest/api_spec.rb +0 -71
  140. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.source.yaml +0 -5
  141. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.target.yaml +0 -9
  142. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.source.yaml +0 -8
  143. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.target.yaml +0 -10
  144. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.source.yaml +0 -10
  145. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.target.yaml +0 -11
  146. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.source.yaml +0 -4
  147. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.target.yaml +0 -11
  148. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.source.yaml +0 -6
  149. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.target.yaml +0 -11
  150. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.source.yaml +0 -5
  151. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.target.yaml +0 -13
  152. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.source.yaml +0 -2
  153. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.target.yaml +0 -9
  154. data/sub/eac_rest/spec/rubocop_spec.rb +0 -3
  155. data/sub/eac_rest/spec/spec_helper/request_builder.rb +0 -51
  156. data/sub/eac_rest/spec/spec_helper.rb +0 -7
  157. data/sub/eac_templates/Gemfile +0 -8
  158. data/sub/eac_templates/eac_templates.gemspec +0 -19
  159. data/sub/eac_templates/lib/eac_templates/abstract/directory.rb +0 -42
  160. data/sub/eac_templates/lib/eac_templates/abstract/file.rb +0 -25
  161. data/sub/eac_templates/lib/eac_templates/abstract/fs_object.rb +0 -94
  162. data/sub/eac_templates/lib/eac_templates/abstract/fs_object_by_pathname.rb +0 -13
  163. data/sub/eac_templates/lib/eac_templates/abstract/not_found_error.rb +0 -8
  164. data/sub/eac_templates/lib/eac_templates/core_ext.rb +0 -4
  165. data/sub/eac_templates/lib/eac_templates/interface_methods.rb +0 -12
  166. data/sub/eac_templates/lib/eac_templates/modules/ancestor/directory.rb +0 -17
  167. data/sub/eac_templates/lib/eac_templates/modules/ancestor/file.rb +0 -16
  168. data/sub/eac_templates/lib/eac_templates/modules/ancestor/fs_object.rb +0 -25
  169. data/sub/eac_templates/lib/eac_templates/modules/ancestor.rb +0 -51
  170. data/sub/eac_templates/lib/eac_templates/modules/base.rb +0 -35
  171. data/sub/eac_templates/lib/eac_templates/modules.rb +0 -9
  172. data/sub/eac_templates/lib/eac_templates/patches/module/erb_template.rb +0 -9
  173. data/sub/eac_templates/lib/eac_templates/patches/module/template.rb +0 -9
  174. data/sub/eac_templates/lib/eac_templates/patches/module.rb +0 -4
  175. data/sub/eac_templates/lib/eac_templates/patches/object/erb_template.rb +0 -9
  176. data/sub/eac_templates/lib/eac_templates/patches/object/template.rb +0 -9
  177. data/sub/eac_templates/lib/eac_templates/patches/object.rb +0 -4
  178. data/sub/eac_templates/lib/eac_templates/patches.rb +0 -4
  179. data/sub/eac_templates/lib/eac_templates/sources/directory.rb +0 -37
  180. data/sub/eac_templates/lib/eac_templates/sources/file.rb +0 -13
  181. data/sub/eac_templates/lib/eac_templates/sources/from_all_gems.rb +0 -4
  182. data/sub/eac_templates/lib/eac_templates/sources/from_gem.rb +0 -37
  183. data/sub/eac_templates/lib/eac_templates/sources/fs_object.rb +0 -53
  184. data/sub/eac_templates/lib/eac_templates/sources/internal_set.rb +0 -22
  185. data/sub/eac_templates/lib/eac_templates/sources/set.rb +0 -55
  186. data/sub/eac_templates/lib/eac_templates/sources/single.rb +0 -29
  187. data/sub/eac_templates/lib/eac_templates/sources.rb +0 -9
  188. data/sub/eac_templates/lib/eac_templates/variables/content.rb +0 -52
  189. data/sub/eac_templates/lib/eac_templates/variables/directory.rb +0 -49
  190. data/sub/eac_templates/lib/eac_templates/variables/file.rb +0 -26
  191. data/sub/eac_templates/lib/eac_templates/variables/fs_object.rb +0 -65
  192. data/sub/eac_templates/lib/eac_templates/variables/not_found_error.rb +0 -7
  193. data/sub/eac_templates/lib/eac_templates/variables/providers/base.rb +0 -23
  194. data/sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb +0 -29
  195. data/sub/eac_templates/lib/eac_templates/variables/providers/entries_reader.rb +0 -25
  196. data/sub/eac_templates/lib/eac_templates/variables/providers/generic.rb +0 -25
  197. data/sub/eac_templates/lib/eac_templates/variables/providers/hash.rb +0 -29
  198. data/sub/eac_templates/lib/eac_templates/variables/providers.rb +0 -25
  199. data/sub/eac_templates/lib/eac_templates/variables.rb +0 -9
  200. data/sub/eac_templates/lib/eac_templates/version.rb +0 -5
  201. data/sub/eac_templates/lib/eac_templates.rb +0 -7
  202. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec.rb +0 -141
  203. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/a/a_a +0 -1
  204. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/b +0 -1
  205. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/a/a_b +0 -1
  206. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/b +0 -1
  207. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/a/a_b +0 -1
  208. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/b +0 -1
  209. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/c +0 -1
  210. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/prepended_module/c +0 -1
  211. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/sub_class/b +0 -1
  212. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/a/a_b +0 -1
  213. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/b +0 -1
  214. data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec.rb +0 -26
  215. data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec_files/path/my_stub_with_template +0 -1
  216. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec.rb +0 -42
  217. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file1.template +0 -1
  218. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file2 +0 -1
  219. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path2/subdir1/file3.template +0 -1
  220. data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec.rb +0 -35
  221. data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/expected_content +0 -2
  222. data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/source.template +0 -2
  223. data/sub/eac_templates/spec/rubocop_spec.rb +0 -3
  224. data/sub/eac_templates/spec/spec_helper.rb +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2737e40d7375352c3fb09bd0fcfc745906f8427668e2f177a80857f1bab7d38a
4
- data.tar.gz: c01891031e2b448dcc9ace257025494c45478841a3a95782ce8707c896a4582f
3
+ metadata.gz: 243403803692489258ccec3dc01aaa6f73effcd4764c3c6fa4f251cd94990c02
4
+ data.tar.gz: fb4250adf052f9aa3377f6b921875cc04db1dd260f766bf97de30054b1c91a73
5
5
  SHA512:
6
- metadata.gz: 5b4def0b984b7cdb226780d1f4bf195ffc49bf35806254d8d586de94cf1911312934c426ef9bf9ae8e10d0ea23d39b1401472486a73c7c84961dac01ed9c6cc9
7
- data.tar.gz: 58df3ac9441b4b19a843dbd589a60f997b85c97ab5ac3074ea5504e7de9d1d10eb65a83e3083ea4867dd69b0338911ac7ad9119f4f2fd76459088c618ea7d4ec
6
+ metadata.gz: 2cec5914255d449c07faf6c718fc73e1763b41d1780c2c47f4f7c5207c4a0b8908503f368e602726d34ac85a852ec8d67f8642d66bd6caa8deb2a2852be6563e
7
+ data.tar.gz: d72e9d339979ceb273bea144a33d527a9f34fdd8e4505bf1348c0adddfc6c529aba878010552e632edac47c60ad29885f3d59756f97b13846b535fece2f5c1e3
data/Gemfile CHANGED
@@ -4,11 +4,11 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- ::Dir["#{::File.join(__dir__, 'sub')}/*"].each do |dir|
8
- next unless ::File.exist?(::File.join(dir, "#{::File.basename(dir)}.gemspec"))
7
+ Dir["#{File.join(__dir__, 'sub')}/*"].each do |dir|
8
+ next unless File.exist?(File.join(dir, "#{File.basename(dir)}.gemspec"))
9
9
 
10
- gem ::File.basename(dir), path: dir, require: false
10
+ gem File.basename(dir), path: dir, require: false
11
11
  end
12
12
 
13
- local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
14
- eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
13
+ local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
14
+ eval_gemfile local_gemfile if File.exist?(local_gemfile)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.75.2)
4
+ eac_tools (0.76.1)
5
5
  avm (~> 0.79)
6
6
  avm-eac_asciidoctor_base0 (~> 0.19)
7
7
  avm-eac_generic_base0 (~> 0.12)
@@ -11,14 +11,14 @@ PATH
11
11
  avm-eac_python_base0 (~> 0.2, >= 0.2.1)
12
12
  avm-eac_rails_base0 (~> 0.10, >= 0.10.3)
13
13
  avm-eac_rails_base1 (~> 0.9, >= 0.9.3)
14
- avm-eac_redmine_base0 (~> 0.20, >= 0.20.1)
14
+ avm-eac_redmine_base0 (~> 0.21)
15
15
  avm-eac_redmine_plugin_base0 (~> 0.4)
16
16
  avm-eac_ruby_base1 (~> 0.31, >= 0.31.2)
17
17
  avm-eac_webapp_base0 (~> 0.18, >= 0.18.2)
18
18
  avm-eac_wordpress_base0 (~> 0.3, >= 0.3.1)
19
19
  avm-git (~> 0.13, >= 0.13.4)
20
20
  avm-tools (~> 0.154)
21
- eac_ruby_utils (~> 0.119, >= 0.119.1)
21
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
22
22
 
23
23
  PATH
24
24
  remote: sub/avm-eac_asciidoctor_base0
@@ -86,15 +86,15 @@ PATH
86
86
  PATH
87
87
  remote: sub/avm-eac_redmine_base0
88
88
  specs:
89
- avm-eac_redmine_base0 (0.20.1)
90
- avm (~> 0.68)
89
+ avm-eac_redmine_base0 (0.21.0)
90
+ avm (~> 0.79)
91
91
  avm-eac_generic_base0 (~> 0.12)
92
- avm-eac_rails_base1 (~> 0.8, >= 0.8.4)
93
- avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.2)
92
+ avm-eac_rails_base1 (~> 0.9, >= 0.9.3)
93
+ avm-eac_ubuntu_base0 (~> 0.5)
94
94
  curb (~> 0.9, >= 0.9.11)
95
95
  eac_fs (~> 0.16)
96
- eac_rest (~> 0.9)
97
- eac_ruby_utils (~> 0.112)
96
+ eac_rest (~> 0.10)
97
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
98
98
 
99
99
  PATH
100
100
  remote: sub/avm-eac_redmine_plugin_base0
@@ -197,10 +197,10 @@ PATH
197
197
  PATH
198
198
  remote: sub/eac_cli
199
199
  specs:
200
- eac_cli (0.37.0)
200
+ eac_cli (0.38.0)
201
201
  colorize (~> 0.8, >= 0.8.1)
202
202
  eac_config (~> 0.14)
203
- eac_ruby_utils (~> 0.119, >= 0.119.1)
203
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
204
204
 
205
205
  PATH
206
206
  remote: sub/eac_config
@@ -216,26 +216,6 @@ PATH
216
216
  eac_ruby_utils (~> 0.112)
217
217
  eac_templates (~> 0.3, >= 0.3.2)
218
218
 
219
- PATH
220
- remote: sub/eac_envs-http
221
- specs:
222
- eac_envs-http (0.4.1)
223
- eac_fs (~> 0.16)
224
- eac_ruby_utils (~> 0.119, >= 0.119.1)
225
- faraday (~> 2.7, >= 2.7.10)
226
- faraday-follow_redirects (~> 0.3)
227
- faraday-gzip (~> 0.1)
228
- faraday-multipart (~> 1.0, >= 1.0.4)
229
- faraday-retry (~> 2.2)
230
-
231
- PATH
232
- remote: sub/eac_fs
233
- specs:
234
- eac_fs (0.16.0)
235
- content-type (~> 0.0, >= 0.0.2)
236
- eac_ruby_utils (~> 0.107, >= 0.107.1)
237
- ruby-filemagic (~> 0.7, >= 0.7.3)
238
-
239
219
  PATH
240
220
  remote: sub/eac_git
241
221
  specs:
@@ -243,14 +223,6 @@ PATH
243
223
  eac_ruby_utils (~> 0.112)
244
224
  parseconfig (~> 1.1, >= 1.1.2)
245
225
 
246
- PATH
247
- remote: sub/eac_rest
248
- specs:
249
- eac_rest (0.10.0)
250
- eac_envs-http (~> 0.4, >= 0.4.1)
251
- eac_fs (~> 0.16)
252
- eac_ruby_utils (~> 0.119, >= 0.119.1)
253
-
254
226
  PATH
255
227
  remote: sub/eac_ruby_base0
256
228
  specs:
@@ -263,20 +235,13 @@ PATH
263
235
  PATH
264
236
  remote: sub/eac_ruby_utils
265
237
  specs:
266
- eac_ruby_utils (0.119.1)
238
+ eac_ruby_utils (0.119.2)
267
239
  activesupport (>= 4, < 7)
268
- addressable (~> 2.8, >= 2.8.4)
240
+ addressable (~> 2.8, >= 2.8.5)
269
241
  bundler
270
242
  filesize (~> 0.2)
271
243
  net-ssh (~> 4.2)
272
244
 
273
- PATH
274
- remote: sub/eac_templates
275
- specs:
276
- eac_templates (0.5.0)
277
- eac_config (~> 0.12)
278
- eac_ruby_utils (~> 0.112)
279
-
280
245
  GEM
281
246
  remote: https://rubygems.org/
282
247
  specs:
@@ -297,6 +262,7 @@ GEM
297
262
  ofx-parser (~> 1.1)
298
263
  asciidoctor (2.0.20)
299
264
  ast (2.4.2)
265
+ base64 (0.1.1)
300
266
  clipboard (1.3.6)
301
267
  colorize (0.8.1)
302
268
  concurrent-ruby (1.2.2)
@@ -304,13 +270,33 @@ GEM
304
270
  parslet (~> 2.0)
305
271
  curb (0.9.11)
306
272
  diff-lcs (1.5.0)
307
- eac_ruby_gem_support (0.6.0)
308
- eac_ruby_utils (~> 0.119)
273
+ eac_envs-http (0.4.1)
274
+ eac_fs (~> 0.16)
275
+ eac_ruby_utils (~> 0.119, >= 0.119.1)
276
+ faraday (~> 2.7, >= 2.7.10)
277
+ faraday-follow_redirects (~> 0.3)
278
+ faraday-gzip (~> 0.1)
279
+ faraday-multipart (~> 1.0, >= 1.0.4)
280
+ faraday-retry (~> 2.2)
281
+ eac_fs (0.16.0)
282
+ content-type (~> 0.0, >= 0.0.2)
283
+ eac_ruby_utils (~> 0.107, >= 0.107.1)
284
+ ruby-filemagic (~> 0.7, >= 0.7.3)
285
+ eac_rest (0.10.0)
286
+ eac_envs-http (~> 0.4, >= 0.4.1)
287
+ eac_fs (~> 0.16)
288
+ eac_ruby_utils (~> 0.119, >= 0.119.1)
289
+ eac_ruby_gem_support (0.8.1)
290
+ eac_ruby_utils (~> 0.119, >= 0.119.2)
309
291
  rspec (~> 3.12)
310
- rubocop (~> 0.83.0)
311
- rubocop-rails (>= 2.5.2)
312
- rubocop-rspec (>= 1.41.0)
313
- faraday (2.7.10)
292
+ rubocop (~> 1.56, >= 1.56.4)
293
+ rubocop-rails (~> 2.21, >= 2.21.2)
294
+ rubocop-rspec (~> 2.24, >= 2.24.1)
295
+ eac_templates (0.5.0)
296
+ eac_config (~> 0.12)
297
+ eac_ruby_utils (~> 0.112)
298
+ faraday (2.7.11)
299
+ base64
314
300
  faraday-net_http (>= 2.0, < 3.1)
315
301
  ruby2_keywords (>= 0.0.4)
316
302
  faraday-follow_redirects (0.3.0)
@@ -331,8 +317,10 @@ GEM
331
317
  htmlbeautifier (1.4.2)
332
318
  i18n (1.14.1)
333
319
  concurrent-ruby (~> 1.0)
320
+ json (2.6.3)
321
+ language_server-protocol (3.17.0.3)
334
322
  minitar (0.9)
335
- minitest (5.19.0)
323
+ minitest (5.20.0)
336
324
  multipart-post (2.3.0)
337
325
  net-ssh (4.2.0)
338
326
  nokogiri (1.15.4-x86_64-linux)
@@ -342,7 +330,7 @@ GEM
342
330
  os (1.1.4)
343
331
  parallel (1.23.0)
344
332
  parseconfig (1.1.2)
345
- parser (3.2.2.3)
333
+ parser (3.2.2.4)
346
334
  ast (~> 2.4.1)
347
335
  racc
348
336
  parslet (2.0.0)
@@ -351,6 +339,7 @@ GEM
351
339
  rack (3.0.8)
352
340
  rainbow (3.1.1)
353
341
  rchardet (1.8.0)
342
+ regexp_parser (2.8.2)
354
343
  rexml (3.2.6)
355
344
  rouge (3.30.0)
356
345
  rspec (3.12.0)
@@ -366,26 +355,39 @@ GEM
366
355
  diff-lcs (>= 1.2.0, < 2.0)
367
356
  rspec-support (~> 3.12.0)
368
357
  rspec-support (3.12.1)
369
- rubocop (0.83.0)
358
+ rubocop (1.57.1)
359
+ base64 (~> 0.1.1)
360
+ json (~> 2.3)
361
+ language_server-protocol (>= 3.17.0)
370
362
  parallel (~> 1.10)
371
- parser (>= 2.7.0.1)
363
+ parser (>= 3.2.2.4)
372
364
  rainbow (>= 2.2.2, < 4.0)
373
- rexml
365
+ regexp_parser (>= 1.8, < 3.0)
366
+ rexml (>= 3.2.5, < 4.0)
367
+ rubocop-ast (>= 1.28.1, < 2.0)
374
368
  ruby-progressbar (~> 1.7)
375
- unicode-display_width (>= 1.4.0, < 2.0)
376
- rubocop-rails (2.6.0)
369
+ unicode-display_width (>= 2.4.0, < 3.0)
370
+ rubocop-ast (1.29.0)
371
+ parser (>= 3.2.1.0)
372
+ rubocop-capybara (2.19.0)
373
+ rubocop (~> 1.41)
374
+ rubocop-factory_bot (2.24.0)
375
+ rubocop (~> 1.33)
376
+ rubocop-rails (2.21.2)
377
377
  activesupport (>= 4.2.0)
378
378
  rack (>= 1.1)
379
- rubocop (>= 0.82.0)
380
- rubocop-rspec (1.41.0)
381
- rubocop (>= 0.68.1)
379
+ rubocop (>= 1.33.0, < 2.0)
380
+ rubocop-rspec (2.24.1)
381
+ rubocop (~> 1.33)
382
+ rubocop-capybara (~> 2.17)
383
+ rubocop-factory_bot (~> 2.22)
382
384
  ruby-filemagic (0.7.3)
383
385
  ruby-progressbar (1.13.0)
384
386
  ruby2_keywords (0.0.5)
385
387
  tzinfo (2.0.6)
386
388
  concurrent-ruby (~> 1.0)
387
- unicode-display_width (1.8.0)
388
- zeitwerk (2.6.11)
389
+ unicode-display_width (2.5.0)
390
+ zeitwerk (2.6.12)
389
391
  zlib (2.1.1)
390
392
 
391
393
  PLATFORMS
@@ -413,14 +415,10 @@ DEPENDENCIES
413
415
  eac_cli!
414
416
  eac_config!
415
417
  eac_docker!
416
- eac_envs-http!
417
- eac_fs!
418
418
  eac_git!
419
- eac_rest!
420
419
  eac_ruby_base0!
421
- eac_ruby_gem_support (~> 0.6.0)
420
+ eac_ruby_gem_support (~> 0.8.0)
422
421
  eac_ruby_utils!
423
- eac_templates!
424
422
  eac_tools!
425
423
 
426
424
  BUNDLED WITH
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.75.2'
4
+ VERSION = '0.76.1'
5
5
  end
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
- eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
7
+ local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if File.exist?(local_gemfile)
@@ -12,14 +12,16 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.68'
15
+ s.required_ruby_version = '>= 2.7.0'
16
+
17
+ s.add_dependency 'avm', '~> 0.79'
16
18
  s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
17
- s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.4'
18
- s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.2'
19
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.9', '>= 0.9.3'
20
+ s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.5'
19
21
  s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
20
22
  s.add_dependency 'eac_fs', '~> 0.16'
21
- s.add_dependency 'eac_rest', '~> 0.9'
22
- s.add_dependency 'eac_ruby_utils', '~> 0.112'
23
+ s.add_dependency 'eac_rest', '~> 0.10'
24
+ s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.2'
23
25
 
24
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
26
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.8.0'
25
27
  end
@@ -8,6 +8,15 @@ module Avm
8
8
  module Instances
9
9
  class Base < ::Avm::EacRailsBase1::Instances::Base
10
10
  module Install
11
+ INSTALL_EXTRA_KEY = 'install.extra'
12
+ DEFAULT_INSTALL_EXTRA = ''
13
+
14
+ # @return [String]
15
+ def auto_install_extra
16
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, INSTALL_EXTRA_KEY) ||
17
+ DEFAULT_INSTALL_EXTRA
18
+ end
19
+
11
20
  def run_installer
12
21
  ::EacRubyUtils::Ruby.on_clean_environment do
13
22
  installer_command.system!
@@ -58,7 +58,7 @@ module Avm
58
58
  end
59
59
 
60
60
  def skip_database
61
- ENV['SKIP_DATABASE']
61
+ ENV.fetch('SKIP_DATABASE', nil)
62
62
  end
63
63
 
64
64
  def start_path
@@ -21,8 +21,8 @@ module Avm
21
21
 
22
22
  response.body_data
23
23
  rescue ::JSON::ParserError
24
- raise "\"#{response.url}\" returned invalid JSON: \"#{response.body_str}\"" \
25
- " (Status: #{response.status})"
24
+ raise "\"#{response.url}\" returned invalid JSON: \"#{response.body_str}\" " \
25
+ "(Status: #{response.status})"
26
26
  end
27
27
 
28
28
  def fetch_data(url_suffix)
@@ -96,7 +96,7 @@ module Avm
96
96
  if source_path.children.empty?
97
97
  infom 'No content left in source directory'
98
98
  else
99
- fatal_error 'Found entries in source directory: ' +
99
+ fatal_error 'Found entries in source directory: ' + # rubocop:disable Style/StringConcatenation
100
100
  source_path.children.map { |c| c.basename.to_path }.join(', ')
101
101
  end
102
102
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.20.1'
5
+ VERSION = '0.21.0'
6
6
  end
7
7
  end
@@ -3,11 +3,11 @@
3
3
  require 'avm/eac_redmine_base0/instances/apache_host'
4
4
  require 'avm/eac_redmine_base0/instances/base'
5
5
 
6
- RSpec.describe ::Avm::EacRedmineBase0::Instances::ApacheHost do
6
+ RSpec.describe Avm::EacRedmineBase0::Instances::ApacheHost do
7
7
  describe '#no_ssl_site_content' do
8
- let(:instance) { ::Avm::EacRedmineBase0::Instances::Base.by_id('stub-app_0') }
8
+ let(:instance) { Avm::EacRedmineBase0::Instances::Base.by_id('stub-app_0') }
9
9
  let(:apache_host) { described_class.new(instance) }
10
- let(:fixtures_dir) { ::Pathname.new('apache_host_spec_files').expand_path(__dir__) }
10
+ let(:fixtures_dir) { Pathname.new('apache_host_spec_files').expand_path(__dir__) }
11
11
  let(:expected_content) { fixtures_dir.join('apache_host_spec_no_ssl_content.conf').read }
12
12
 
13
13
  before do
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'avm/eac_redmine_base0/instances/base'
4
4
 
5
- RSpec.describe ::Avm::EacRedmineBase0::Instances::Base do
5
+ RSpec.describe Avm::EacRedmineBase0::Instances::Base, '#gitolite' do
6
6
  include_examples 'entries_values', __FILE__, {
7
7
  'app_0' => {
8
8
  'gitolite.username' => 'git',
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::EacRubyUtils::Rspec.default_setup.describe_rubocop
3
+ EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/rspec/default_setup'
4
- ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
5
- ::EacRubyUtils::Rspec.default_setup.stub_eac_config_node
4
+ EacRubyUtils::Rspec.default_setup_create(File.expand_path('..', __dir__))
5
+ EacRubyUtils::Rspec.default_setup.stub_eac_config_node
@@ -40,3 +40,6 @@ export smtp_authentication='%%MAILER.SMTP.AUTHENTICATION%%'
40
40
  export smtp_username='%%MAILER.SMTP.USERNAME%%'
41
41
  export smtp_password='%%MAILER.SMTP.PASSWORD%%'
42
42
  export mail_from='%%MAILER.FROM%%'
43
+
44
+ # Extra
45
+ %%INSTALL.EXTRA%%
data/sub/eac_cli/Gemfile CHANGED
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
- eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
7
+ local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if File.exist?(local_gemfile)
@@ -6,15 +6,17 @@ require 'eac_cli/version'
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = 'eac_cli'
9
- s.version = ::EacCli::VERSION
9
+ s.version = EacCli::VERSION
10
10
  s.authors = ['Esquilo Azul Company']
11
11
  s.summary = 'Utilities to build CLI applications with Ruby.'
12
12
 
13
13
  s.files = Dir['{lib}/**/*', 'Gemfile']
14
14
 
15
+ s.required_ruby_version = '>= 2.7.0'
16
+
15
17
  s.add_dependency 'colorize', '~> 0.8', '>= 0.8.1'
16
18
  s.add_dependency 'eac_config', '~> 0.14'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.1'
19
+ s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.2'
18
20
 
19
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
21
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.8.1'
20
22
  end
@@ -6,10 +6,6 @@ module EacCli
6
6
  class Config < ::SimpleDelegator
7
7
  require_sub __FILE__
8
8
 
9
- def initialize(sub_node)
10
- super(sub_node)
11
- end
12
-
13
9
  def entry(path, options = {})
14
10
  ::EacCli::Config::Entry.new(self, path, options)
15
11
  end
@@ -3,4 +3,4 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'eac_cli/patches'
5
5
 
6
- ::EacCli::RunnerWithSet.default.add_from_gems_registry
6
+ EacCli::RunnerWithSet.default.add_from_gems_registry
@@ -7,9 +7,30 @@ require 'eac_cli/definition/positional_argument'
7
7
  module EacCli
8
8
  class Definition
9
9
  class Alternative
10
+ ANY_OPTION_DESCRIPTION = 'ANY_OPTION'
11
+ ANY_OPTION_LONG = '__'
12
+ ANY_OPTION_SHORT = '_'
10
13
  SUBCOMMAND_NAME_ARG = :subcommand
11
14
  SUBCOMMAND_ARGS_ARG = :subcommand_args
12
15
 
16
+ # @return [Boolean]
17
+ def any_opt
18
+ @any_opt = true
19
+ end
20
+
21
+ # @return [Boolean]
22
+ def any_option?
23
+ @any_opt ? true : false
24
+ end
25
+
26
+ # @return [EacCli::Definition::BooleanOption]
27
+ def any_options_option
28
+ @any_options_option ||= ::EacCli::Definition::BooleanOption.new(
29
+ ANY_OPTION_SHORT, ANY_OPTION_LONG, ANY_OPTION_DESCRIPTION,
30
+ optional: true, repeat: true, usage: false
31
+ )
32
+ end
33
+
13
34
  def arg_opt(*args)
14
35
  options_set << ::EacCli::Definition::ArgumentOption.from_args(args)
15
36
  end
@@ -48,7 +69,7 @@ module EacCli
48
69
  return 'there are subcommands' if subcommands?
49
70
  return 'last argument repeats' if last.repeat?
50
71
  return 'new argument is required and last is optional' if
51
- last.optional? && new_pos_arg.if_present(&:required?)
72
+ last.optional? && new_pos_arg.if_present(&:required?)
52
73
 
53
74
  nil
54
75
  end
@@ -67,8 +88,8 @@ module EacCli
67
88
 
68
89
  def check_positional_blocked(new_pos_arg)
69
90
  positional_arguments_blocked_reason(new_pos_arg).if_present do |v|
70
- raise ::EacCli::Definition::Error, "Positional arguments are blocked: #{v}" \
71
- " (New argument: #{new_pos_arg})"
91
+ raise ::EacCli::Definition::Error, "Positional arguments are blocked: #{v} " \
92
+ "(New argument: #{new_pos_arg})"
72
93
  end
73
94
  end
74
95
 
@@ -66,7 +66,7 @@ module EacCli
66
66
  alternatives.any?(&:subcommands?)
67
67
  end
68
68
 
69
- def options_first(enable = true)
69
+ def options_first(enable = true) # rubocop:disable Style/OptionalBooleanParameter
70
70
  @options_first = enable
71
71
  end
72
72
 
@@ -17,7 +17,7 @@ module EacCli
17
17
  def banner
18
18
  infom 'Do you wanna to store passwords?'
19
19
  infom 'Warning: the passwords will be store in clear text in ' \
20
- "\"#{console_configs.configs.storage_path}\""
20
+ "\"#{console_configs.configs.storage_path}\""
21
21
  infom 'Enter "yes" or "no"'
22
22
  end
23
23
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacCli
6
+ class Parser
7
+ class Alternative
8
+ module AnyOptions
9
+ delegate :any_option?, to: :alternative
10
+
11
+ # @return [EacCli::Definition::BooleanOption] if #any_option? is true.
12
+ # @raise [EacCli::Parser::Error] if #any_option? is false.
13
+ def any_option_collect_option
14
+ any_option? ? alternative.any_options_option : raise_argv_current_invalid_option
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -24,7 +24,7 @@ module EacCli
24
24
  else
25
25
  option_argument_collect(option, value)
26
26
  end
27
- end || raise_argv_current_invalid_option
27
+ end || any_option_collect_option
28
28
  end
29
29
 
30
30
  def parse_option_current_argv
@@ -33,9 +33,7 @@ module EacCli
33
33
  # @return [EacCli::Definition::BaseOption] The option collected.
34
34
  def short_option_collect_char(char)
35
35
  option = find_short_option(char)
36
- raise_argv_current_invalid_option unless option
37
-
38
- option_collect_option(option)
36
+ option ? option_collect_option(option) : any_option_collect_option
39
37
  end
40
38
 
41
39
  def short_without_prefix(short)
@@ -62,15 +62,6 @@ module EacCli
62
62
  argv_enum.next
63
63
  end
64
64
 
65
- def collect_option_argv_value
66
- alternative.options.each do |option|
67
- end
68
-
69
- raise ::EacCli::Parser::Error.new(
70
- alternative, argv, "Invalid option: #{argv_enum.current}"
71
- )
72
- end
73
-
74
65
  def raise_error(message)
75
66
  raise ::EacCli::Parser::Error.new(alternative, argv, message)
76
67
  end
@@ -12,7 +12,7 @@ module EacCli
12
12
 
13
13
  def parsed_uncached
14
14
  raise 'Definition has no alternatives' if alternatives.empty?
15
- raise first_error unless alternatives.select(&:success?).any?
15
+ raise first_error unless alternatives.any?(&:success?)
16
16
 
17
17
  alternatives_parsed(true).merge(alternatives_parsed(false))
18
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Dir["#{File.dirname(__FILE__)}/#{::File.basename(__FILE__, '.*')}/*.rb"].sort.each do |path|
3
+ Dir["#{File.dirname(__FILE__)}/#{File.basename(__FILE__, '.*')}/*.rb"].sort.each do |path|
4
4
  require path
5
5
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub(__FILE__)
4
+ EacRubyUtils.require_sub(__FILE__)
@@ -29,7 +29,7 @@ module EacCli
29
29
 
30
30
  def run_parser_error(runner_instance, error)
31
31
  $stderr.write("#{runner_instance.program_name}: #{error}\n")
32
- ::Kernel.exit(PARSER_ERROR_EXIT_CODE)
32
+ ::Kernel.exit(PARSER_ERROR_EXIT_CODE) # rubocop:disable Rails/Exit
33
33
  end
34
34
  end
35
35
  end