eac_tools 0.76.0 → 0.76.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +28 -48
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/eac_cli/Gemfile +2 -2
  5. data/sub/eac_cli/eac_cli.gemspec +5 -3
  6. data/sub/eac_cli/lib/eac_cli/config.rb +0 -4
  7. data/sub/eac_cli/lib/eac_cli/core_ext.rb +1 -1
  8. data/sub/eac_cli/lib/eac_cli/definition/alternative.rb +24 -3
  9. data/sub/eac_cli/lib/eac_cli/definition.rb +1 -1
  10. data/sub/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb +1 -1
  11. data/sub/eac_cli/lib/eac_cli/parser/alternative/any_options.rb +19 -0
  12. data/sub/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +1 -1
  13. data/sub/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +1 -3
  14. data/sub/eac_cli/lib/eac_cli/parser/alternative.rb +0 -9
  15. data/sub/eac_cli/lib/eac_cli/parser.rb +1 -1
  16. data/sub/eac_cli/lib/eac_cli/patches/object.rb +1 -1
  17. data/sub/eac_cli/lib/eac_cli/patches.rb +1 -1
  18. data/sub/eac_cli/lib/eac_cli/runner/class_runner.rb +1 -1
  19. data/sub/eac_cli/lib/eac_cli/runner/context_responders/set.rb +2 -2
  20. data/sub/eac_cli/lib/eac_cli/runner/exit.rb +2 -1
  21. data/sub/eac_cli/lib/eac_cli/runner/instance_methods.rb +1 -1
  22. data/sub/eac_cli/lib/eac_cli/runner_with/help/builder/alternative.rb +1 -1
  23. data/sub/eac_cli/lib/eac_cli/runner_with/help/builder.rb +2 -2
  24. data/sub/eac_cli/lib/eac_cli/runner_with/help.rb +1 -0
  25. data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +1 -1
  26. data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +1 -1
  27. data/sub/eac_cli/lib/eac_cli/speaker/list.rb +4 -4
  28. data/sub/eac_cli/lib/eac_cli/speaker/options.rb +3 -3
  29. data/sub/eac_cli/lib/eac_cli/speaker.rb +2 -1
  30. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  31. data/sub/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +2 -2
  32. data/sub/eac_cli/spec/lib/eac_cli/old_configs_spec.rb +1 -1
  33. data/sub/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +10 -10
  34. data/sub/eac_cli/spec/lib/eac_cli/runner/for_context_spec.rb +13 -13
  35. data/sub/eac_cli/spec/lib/eac_cli/runner_spec.rb +10 -10
  36. data/sub/eac_cli/spec/lib/eac_cli/runner_with/confirmation_spec.rb +3 -3
  37. data/sub/eac_cli/spec/lib/eac_cli/runner_with/help/layout_spec.rb +1 -1
  38. data/sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb +3 -2
  39. data/sub/eac_cli/spec/lib/eac_cli/runner_with/output_spec.rb +6 -6
  40. data/sub/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +6 -6
  41. data/sub/eac_cli/spec/lib/eac_cli/speaker_spec.rb +1 -1
  42. data/sub/eac_cli/spec/rubocop_spec.rb +1 -1
  43. data/sub/eac_cli/spec/spec_helper.rb +1 -1
  44. metadata +3 -166
  45. data/sub/eac_envs-http/Gemfile +0 -8
  46. data/sub/eac_envs-http/eac_envs-http.gemspec +0 -25
  47. data/sub/eac_envs-http/lib/eac_envs/http/error.rb +0 -8
  48. data/sub/eac_envs-http/lib/eac_envs/http/request/body_field.rb +0 -51
  49. data/sub/eac_envs-http/lib/eac_envs/http/request/body_field_value.rb +0 -32
  50. data/sub/eac_envs-http/lib/eac_envs/http/request/body_fields.rb +0 -39
  51. data/sub/eac_envs-http/lib/eac_envs/http/request/faraday_connection.rb +0 -75
  52. data/sub/eac_envs-http/lib/eac_envs/http/request.rb +0 -58
  53. data/sub/eac_envs-http/lib/eac_envs/http/response/body.rb +0 -62
  54. data/sub/eac_envs-http/lib/eac_envs/http/response/headers.rb +0 -41
  55. data/sub/eac_envs-http/lib/eac_envs/http/response/links.rb +0 -28
  56. data/sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb +0 -21
  57. data/sub/eac_envs-http/lib/eac_envs/http/response.rb +0 -30
  58. data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/request_processor.rb +0 -42
  59. data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/webrick_servlet.rb +0 -22
  60. data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server.rb +0 -63
  61. data/sub/eac_envs-http/lib/eac_envs/http/rspec.rb +0 -11
  62. data/sub/eac_envs-http/lib/eac_envs/http/version.rb +0 -7
  63. data/sub/eac_envs-http/lib/eac_envs/http.rb +0 -9
  64. data/sub/eac_envs-http/spec/lib/eac_envs/http/request/body_fields_spec.rb +0 -47
  65. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec.rb +0 -68
  66. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.source.yaml +0 -5
  67. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.target.yaml +0 -9
  68. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.source.yaml +0 -8
  69. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.target.yaml +0 -10
  70. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.source.yaml +0 -10
  71. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.target.yaml +0 -11
  72. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.source.yaml +0 -4
  73. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.target.yaml +0 -11
  74. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.source.yaml +0 -6
  75. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.target.yaml +0 -11
  76. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.source.yaml +0 -5
  77. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.target.yaml +0 -13
  78. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.source.yaml +0 -2
  79. data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.target.yaml +0 -9
  80. data/sub/eac_envs-http/spec/rubocop_spec.rb +0 -3
  81. data/sub/eac_envs-http/spec/spec_helper/request_builder.rb +0 -62
  82. data/sub/eac_envs-http/spec/spec_helper.rb +0 -7
  83. data/sub/eac_fs/Gemfile +0 -8
  84. data/sub/eac_fs/eac_fs.gemspec +0 -20
  85. data/sub/eac_fs/lib/eac_fs/cached_download.rb +0 -40
  86. data/sub/eac_fs/lib/eac_fs/comparator/build.rb +0 -57
  87. data/sub/eac_fs/lib/eac_fs/comparator/rename_file.rb +0 -15
  88. data/sub/eac_fs/lib/eac_fs/comparator.rb +0 -18
  89. data/sub/eac_fs/lib/eac_fs/contexts.rb +0 -21
  90. data/sub/eac_fs/lib/eac_fs/core_ext.rb +0 -4
  91. data/sub/eac_fs/lib/eac_fs/file_info.rb +0 -29
  92. data/sub/eac_fs/lib/eac_fs/logs/file.rb +0 -56
  93. data/sub/eac_fs/lib/eac_fs/logs.rb +0 -64
  94. data/sub/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +0 -15
  95. data/sub/eac_fs/lib/eac_fs/patches/module.rb +0 -4
  96. data/sub/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +0 -32
  97. data/sub/eac_fs/lib/eac_fs/patches/object.rb +0 -4
  98. data/sub/eac_fs/lib/eac_fs/patches/pathname/info.rb +0 -12
  99. data/sub/eac_fs/lib/eac_fs/patches/pathname.rb +0 -4
  100. data/sub/eac_fs/lib/eac_fs/patches.rb +0 -4
  101. data/sub/eac_fs/lib/eac_fs/rspec/setup.rb +0 -25
  102. data/sub/eac_fs/lib/eac_fs/rspec.rb +0 -9
  103. data/sub/eac_fs/lib/eac_fs/storage_tree.rb +0 -81
  104. data/sub/eac_fs/lib/eac_fs/traversable.rb +0 -45
  105. data/sub/eac_fs/lib/eac_fs/traverser.rb +0 -76
  106. data/sub/eac_fs/lib/eac_fs/version.rb +0 -5
  107. data/sub/eac_fs/lib/eac_fs.rb +0 -7
  108. data/sub/eac_fs/spec/lib/eac_fs/storage_tree_spec.rb +0 -32
  109. data/sub/eac_fs/spec/rubocop_spec.rb +0 -3
  110. data/sub/eac_fs/spec/spec_helper.rb +0 -4
  111. data/sub/eac_rest/Gemfile +0 -8
  112. data/sub/eac_rest/eac_rest.gemspec +0 -21
  113. data/sub/eac_rest/lib/eac_rest/api.rb +0 -57
  114. data/sub/eac_rest/lib/eac_rest/entity/data.rb +0 -44
  115. data/sub/eac_rest/lib/eac_rest/entity/fetching.rb +0 -20
  116. data/sub/eac_rest/lib/eac_rest/entity.rb +0 -35
  117. data/sub/eac_rest/lib/eac_rest/error.rb +0 -6
  118. data/sub/eac_rest/lib/eac_rest/helper.rb +0 -34
  119. data/sub/eac_rest/lib/eac_rest/request.rb +0 -48
  120. data/sub/eac_rest/lib/eac_rest/response.rb +0 -27
  121. data/sub/eac_rest/lib/eac_rest/version.rb +0 -5
  122. data/sub/eac_rest/lib/eac_rest.rb +0 -7
  123. data/sub/eac_rest/spec/lib/eac_rest/api_spec.rb +0 -71
  124. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.source.yaml +0 -5
  125. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.target.yaml +0 -9
  126. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.source.yaml +0 -8
  127. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.target.yaml +0 -10
  128. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.source.yaml +0 -10
  129. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.target.yaml +0 -11
  130. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.source.yaml +0 -4
  131. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.target.yaml +0 -11
  132. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.source.yaml +0 -6
  133. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.target.yaml +0 -11
  134. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.source.yaml +0 -5
  135. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.target.yaml +0 -13
  136. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.source.yaml +0 -2
  137. data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.target.yaml +0 -9
  138. data/sub/eac_rest/spec/rubocop_spec.rb +0 -3
  139. data/sub/eac_rest/spec/spec_helper/request_builder.rb +0 -51
  140. data/sub/eac_rest/spec/spec_helper.rb +0 -7
  141. data/sub/eac_templates/Gemfile +0 -8
  142. data/sub/eac_templates/eac_templates.gemspec +0 -19
  143. data/sub/eac_templates/lib/eac_templates/abstract/directory.rb +0 -42
  144. data/sub/eac_templates/lib/eac_templates/abstract/file.rb +0 -25
  145. data/sub/eac_templates/lib/eac_templates/abstract/fs_object.rb +0 -94
  146. data/sub/eac_templates/lib/eac_templates/abstract/fs_object_by_pathname.rb +0 -13
  147. data/sub/eac_templates/lib/eac_templates/abstract/not_found_error.rb +0 -8
  148. data/sub/eac_templates/lib/eac_templates/core_ext.rb +0 -4
  149. data/sub/eac_templates/lib/eac_templates/interface_methods.rb +0 -12
  150. data/sub/eac_templates/lib/eac_templates/modules/ancestor/directory.rb +0 -17
  151. data/sub/eac_templates/lib/eac_templates/modules/ancestor/file.rb +0 -16
  152. data/sub/eac_templates/lib/eac_templates/modules/ancestor/fs_object.rb +0 -25
  153. data/sub/eac_templates/lib/eac_templates/modules/ancestor.rb +0 -51
  154. data/sub/eac_templates/lib/eac_templates/modules/base.rb +0 -35
  155. data/sub/eac_templates/lib/eac_templates/modules.rb +0 -9
  156. data/sub/eac_templates/lib/eac_templates/patches/module/erb_template.rb +0 -9
  157. data/sub/eac_templates/lib/eac_templates/patches/module/template.rb +0 -9
  158. data/sub/eac_templates/lib/eac_templates/patches/module.rb +0 -4
  159. data/sub/eac_templates/lib/eac_templates/patches/object/erb_template.rb +0 -9
  160. data/sub/eac_templates/lib/eac_templates/patches/object/template.rb +0 -9
  161. data/sub/eac_templates/lib/eac_templates/patches/object.rb +0 -4
  162. data/sub/eac_templates/lib/eac_templates/patches.rb +0 -4
  163. data/sub/eac_templates/lib/eac_templates/sources/directory.rb +0 -37
  164. data/sub/eac_templates/lib/eac_templates/sources/file.rb +0 -13
  165. data/sub/eac_templates/lib/eac_templates/sources/from_all_gems.rb +0 -4
  166. data/sub/eac_templates/lib/eac_templates/sources/from_gem.rb +0 -37
  167. data/sub/eac_templates/lib/eac_templates/sources/fs_object.rb +0 -53
  168. data/sub/eac_templates/lib/eac_templates/sources/internal_set.rb +0 -22
  169. data/sub/eac_templates/lib/eac_templates/sources/set.rb +0 -55
  170. data/sub/eac_templates/lib/eac_templates/sources/single.rb +0 -29
  171. data/sub/eac_templates/lib/eac_templates/sources.rb +0 -9
  172. data/sub/eac_templates/lib/eac_templates/variables/content.rb +0 -52
  173. data/sub/eac_templates/lib/eac_templates/variables/directory.rb +0 -49
  174. data/sub/eac_templates/lib/eac_templates/variables/file.rb +0 -26
  175. data/sub/eac_templates/lib/eac_templates/variables/fs_object.rb +0 -65
  176. data/sub/eac_templates/lib/eac_templates/variables/not_found_error.rb +0 -7
  177. data/sub/eac_templates/lib/eac_templates/variables/providers/base.rb +0 -23
  178. data/sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb +0 -29
  179. data/sub/eac_templates/lib/eac_templates/variables/providers/entries_reader.rb +0 -25
  180. data/sub/eac_templates/lib/eac_templates/variables/providers/generic.rb +0 -25
  181. data/sub/eac_templates/lib/eac_templates/variables/providers/hash.rb +0 -29
  182. data/sub/eac_templates/lib/eac_templates/variables/providers.rb +0 -25
  183. data/sub/eac_templates/lib/eac_templates/variables.rb +0 -9
  184. data/sub/eac_templates/lib/eac_templates/version.rb +0 -5
  185. data/sub/eac_templates/lib/eac_templates.rb +0 -7
  186. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec.rb +0 -141
  187. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/a/a_a +0 -1
  188. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/b +0 -1
  189. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/a/a_b +0 -1
  190. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/b +0 -1
  191. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/a/a_b +0 -1
  192. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/b +0 -1
  193. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/c +0 -1
  194. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/prepended_module/c +0 -1
  195. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/sub_class/b +0 -1
  196. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/a/a_b +0 -1
  197. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/b +0 -1
  198. data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec.rb +0 -26
  199. data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec_files/path/my_stub_with_template +0 -1
  200. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec.rb +0 -42
  201. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file1.template +0 -1
  202. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file2 +0 -1
  203. data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path2/subdir1/file3.template +0 -1
  204. data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec.rb +0 -35
  205. data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/expected_content +0 -2
  206. data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/source.template +0 -2
  207. data/sub/eac_templates/spec/rubocop_spec.rb +0 -3
  208. 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: 26c4dec02b4e9099e1e2d672dad279f190f1a1500f5a205b21602ca4597915cf
4
- data.tar.gz: 94629dc17596d2861990e246dc81e4b8e516c263eb1934a89626e6da4d041e06
3
+ metadata.gz: 243403803692489258ccec3dc01aaa6f73effcd4764c3c6fa4f251cd94990c02
4
+ data.tar.gz: fb4250adf052f9aa3377f6b921875cc04db1dd260f766bf97de30054b1c91a73
5
5
  SHA512:
6
- metadata.gz: 116efefb9e97caa1faba7e278cbf33a1aade6be6cd660b991bf98b855c7d4444eedcd76d44d87ecfb12ec6f7292a21d2f14c9c0fce21c802ce1c5ddb16508fc7
7
- data.tar.gz: b130eed3248da5569b94920e540a5bac73dd1f5855ffaf4d9a63b15d3183c2dee37ddc1e6623ed729498c5adebe6bb5a78d612b3419696747804f99a0cd71b87
6
+ metadata.gz: 2cec5914255d449c07faf6c718fc73e1763b41d1780c2c47f4f7c5207c4a0b8908503f368e602726d34ac85a852ec8d67f8642d66bd6caa8deb2a2852be6563e
7
+ data.tar.gz: d72e9d339979ceb273bea144a33d527a9f34fdd8e4505bf1348c0adddfc6c529aba878010552e632edac47c60ad29885f3d59756f97b13846b535fece2f5c1e3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.76.0)
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)
@@ -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:
@@ -270,13 +242,6 @@ PATH
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:
@@ -305,12 +270,31 @@ GEM
305
270
  parslet (~> 2.0)
306
271
  curb (0.9.11)
307
272
  diff-lcs (1.5.0)
308
- eac_ruby_gem_support (0.8.0)
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)
309
290
  eac_ruby_utils (~> 0.119, >= 0.119.2)
310
291
  rspec (~> 3.12)
311
- rubocop (~> 1.56.3)
312
- rubocop-rails
313
- rubocop-rspec
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)
314
298
  faraday (2.7.11)
315
299
  base64
316
300
  faraday-net_http (>= 2.0, < 3.1)
@@ -371,12 +355,12 @@ GEM
371
355
  diff-lcs (>= 1.2.0, < 2.0)
372
356
  rspec-support (~> 3.12.0)
373
357
  rspec-support (3.12.1)
374
- rubocop (1.56.4)
358
+ rubocop (1.57.1)
375
359
  base64 (~> 0.1.1)
376
360
  json (~> 2.3)
377
361
  language_server-protocol (>= 3.17.0)
378
362
  parallel (~> 1.10)
379
- parser (>= 3.2.2.3)
363
+ parser (>= 3.2.2.4)
380
364
  rainbow (>= 2.2.2, < 4.0)
381
365
  regexp_parser (>= 1.8, < 3.0)
382
366
  rexml (>= 3.2.5, < 4.0)
@@ -431,14 +415,10 @@ DEPENDENCIES
431
415
  eac_cli!
432
416
  eac_config!
433
417
  eac_docker!
434
- eac_envs-http!
435
- eac_fs!
436
418
  eac_git!
437
- eac_rest!
438
419
  eac_ruby_base0!
439
420
  eac_ruby_gem_support (~> 0.8.0)
440
421
  eac_ruby_utils!
441
- eac_templates!
442
422
  eac_tools!
443
423
 
444
424
  BUNDLED WITH
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.76.0'
4
+ VERSION = '0.76.1'
5
5
  end
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
@@ -18,9 +18,9 @@ module EacCli
18
18
  responders_instances.any?(&:callable?)
19
19
  end
20
20
 
21
- def call(*args, &block)
21
+ def call(...)
22
22
  caller = responder_to_call
23
- return caller.call(*args, &block) if caller
23
+ return caller.call(...) if caller
24
24
 
25
25
  raise ::NameError, "No method \"#{method_name}\" found in #{runner} or in its ancestors"
26
26
  end
@@ -5,7 +5,8 @@ module EacCli
5
5
  class Exit < ::StandardError
6
6
  attr_reader :status
7
7
 
8
- def initialize(status = true)
8
+ def initialize(status = true) # rubocop:disable Style/OptionalBooleanParameter
9
+ super
9
10
  @status = status
10
11
  end
11
12
  end
@@ -6,7 +6,7 @@ module EacCli
6
6
  def run_run
7
7
  parsed
8
8
  run_callbacks(:run) { run }
9
- rescue ::EacCli::Runner::Exit # rubocop:disable Lint/SuppressedException
9
+ rescue ::EacCli::Runner::Exit
10
10
  # Do nothing
11
11
  end
12
12
 
@@ -35,7 +35,7 @@ module EacCli
35
35
  end
36
36
 
37
37
  def positionals
38
- alternative.positional.map { |p| positional(p) }.reject(&:blank?)
38
+ alternative.positional.map { |p| positional(p) }.compact_blank
39
39
  end
40
40
 
41
41
  def positional(positional)
@@ -26,7 +26,7 @@ module EacCli
26
26
 
27
27
  def option_usage_full(option)
28
28
  if option.long.present?
29
- [option.short, option_long(option)].reject(&:blank?).join(word_separator)
29
+ [option.short, option_long(option)].compact_blank.join(word_separator)
30
30
  else
31
31
  option_short(option)
32
32
  end
@@ -53,7 +53,7 @@ module EacCli
53
53
  def option_definition(option)
54
54
  [self.class.option_usage_full(option), option.description,
55
55
  option.default_value? ? "[Default: \"#{option.default_value}\"]" : nil]
56
- .reject(&:blank?).join(OPTION_DESCRIPTION_SEPARATOR)
56
+ .compact_blank.join(OPTION_DESCRIPTION_SEPARATOR)
57
57
  end
58
58
 
59
59
  # @return [String]
@@ -12,6 +12,7 @@ module EacCli
12
12
 
13
13
  runner_definition.alt do
14
14
  bool_opt '-h', '--help', 'Show help.', usage: true, required: true
15
+ any_opt
15
16
  pos_arg :any_arg_with_help, repeat: true, optional: true, visible: false
16
17
  end
17
18
 
@@ -105,7 +105,7 @@ module EacCli
105
105
  raise(::EacCli::Parser::Error.new(
106
106
  self.class.runner_definition, runner_context.argv,
107
107
  "Subcommand \"#{subcommand_name}\" not found " \
108
- "(Available: #{available_subcommands_to_s})"
108
+ "(Available: #{available_subcommands_to_s})"
109
109
  ))
110
110
  end
111
111
 
@@ -33,7 +33,7 @@ module EacCli
33
33
  private
34
34
 
35
35
  def namespace_set
36
- @namespace_set ||= ::Array.new
36
+ @namespace_set ||= []
37
37
  end
38
38
 
39
39
  def key_to_module(key)
@@ -17,11 +17,11 @@ module EacCli
17
17
  private
18
18
 
19
19
  def hash_to_values(list)
20
- list.map { |key, value| ::OpenStruct.new(key: key, label: key, value: value) }
20
+ list.map { |key, value| ::OpenStruct.new(key: key, label: key, value: value) } # rubocop:disable Style/OpenStructUse
21
21
  end
22
22
 
23
23
  def array_to_values(list)
24
- list.map { |value| ::OpenStruct.new(key: value, label: value, value: value) }
24
+ list.map { |value| ::OpenStruct.new(key: value, label: value, value: value) } # rubocop:disable Style/OpenStructUse
25
25
  end
26
26
  end
27
27
 
@@ -29,7 +29,7 @@ module EacCli
29
29
 
30
30
  def initialize(values)
31
31
  @values = values.map do |v|
32
- ::OpenStruct.new(key: to_key(v.key), label: to_label(v.label), value: v.value)
32
+ ::OpenStruct.new(key: to_key(v.key), label: to_label(v.label), value: v.value) # rubocop:disable Style/OpenStructUse
33
33
  end
34
34
  end
35
35
 
@@ -51,7 +51,7 @@ module EacCli
51
51
 
52
52
  def build_value(value)
53
53
  key = to_key(value)
54
- values.each do |v| # rubocop:disable Style/HashEachMethods
54
+ values.each do |v|
55
55
  return v.value if v.key == key
56
56
  end
57
57
  raise "Value not found: \"#{value}\" (#{values})"
@@ -11,15 +11,15 @@ module EacCli
11
11
  end
12
12
 
13
13
  def err_out
14
- option(OPTION_ERR_OUT, ::EacCli::Speaker::STDERR)
14
+ option(OPTION_ERR_OUT, $stderr)
15
15
  end
16
16
 
17
17
  def out_out
18
- option(OPTION_OUT_OUT, ::EacCli::Speaker::STDOUT)
18
+ option(OPTION_OUT_OUT, $stdout)
19
19
  end
20
20
 
21
21
  def in_in
22
- option(OPTION_IN_IN, ::EacCli::Speaker::STDIN)
22
+ option(OPTION_IN_IN, $stdin)
23
23
  end
24
24
 
25
25
  def err_line_prefix
@@ -83,7 +83,8 @@ module EacCli
83
83
  def list_value(list, input)
84
84
  values = list_values(list)
85
85
  return input, true unless values
86
- return input, false unless values.include?(input)
86
+
87
+ [input, false] unless values.include?(input)
87
88
  end
88
89
 
89
90
  def list_values(list)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.37.0'
4
+ VERSION = '0.38.0'
5
5
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'eac_cli/definition/alternative'
4
4
 
5
- RSpec.describe ::EacCli::Definition::Alternative do
5
+ RSpec.describe EacCli::Definition::Alternative do
6
6
  let(:instance) { described_class.new }
7
7
 
8
8
  it { expect { instance.arg_opt '-a', '--opt2', 'A argument option' }.not_to raise_error }
@@ -10,7 +10,7 @@ RSpec.describe ::EacCli::Definition::Alternative do
10
10
  it { expect { instance.bool_opt '-b', '--no-description' }.not_to raise_error }
11
11
  it { expect { instance.bool_opt '--opt1', 'A option without short' }.not_to raise_error }
12
12
  it { expect { instance.bool_opt '-b', 'A option without long' }.not_to raise_error }
13
- it { expect { instance.bool_opt 'A option without selectors' }.to raise_error(::StandardError) }
13
+ it { expect { instance.bool_opt 'A option without selectors' }.to raise_error(StandardError) }
14
14
  it { expect { instance.options_argument(true) }.not_to raise_error }
15
15
  it { expect { instance.pos_arg :pos1 }.not_to raise_error }
16
16
  it { expect { instance.pos_arg :pos2, optional: true, repeat: true }.not_to raise_error }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'eac_cli/old_configs'
4
4
 
5
- RSpec.describe ::EacCli::OldConfigs do
5
+ RSpec.describe EacCli::OldConfigs do
6
6
  describe '#entry_key_to_envvar_name' do
7
7
  {
8
8
  'a.entry.value' => 'A_ENTRY_VALUE',
@@ -2,13 +2,13 @@
2
2
 
3
3
  require 'eac_cli/parser/alternative'
4
4
 
5
- RSpec.describe ::EacCli::Parser::Alternative do
5
+ RSpec.describe EacCli::Parser::Alternative do
6
6
  let(:instance) { described_class.new(alternative, argv) }
7
7
  let(:actual_parsed) { instance.parsed.to_h.symbolize_keys }
8
8
 
9
9
  context 'without subcommands' do
10
10
  let(:alternative) do
11
- r = ::EacCli::Definition::Alternative.new
11
+ r = EacCli::Definition::Alternative.new
12
12
  r.bool_opt '-b', '--opt1', 'A boolean option'
13
13
  r.arg_opt '-a', '--opt2', 'A argument option'
14
14
  r.bool_opt '-c', '--opt3', 'A required boolean option', required: true
@@ -73,7 +73,7 @@ RSpec.describe ::EacCli::Parser::Alternative do
73
73
 
74
74
  context 'with excedent positional' do
75
75
  let(:alternative) do
76
- r = ::EacCli::Definition::Alternative.new
76
+ r = EacCli::Definition::Alternative.new
77
77
  r.pos_arg :pos1
78
78
  r
79
79
  end
@@ -88,7 +88,7 @@ RSpec.describe ::EacCli::Parser::Alternative do
88
88
 
89
89
  context 'with subcommands' do
90
90
  let(:alternative) do
91
- r = ::EacCli::Definition::Alternative.new
91
+ r = EacCli::Definition::Alternative.new
92
92
  r.bool_opt '-b', '--opt1', 'A boolean option'
93
93
  r.arg_opt '-a', '--opt2', 'A argument option'
94
94
  r.subcommands
@@ -100,8 +100,8 @@ RSpec.describe ::EacCli::Parser::Alternative do
100
100
  let(:parsed_expected) do
101
101
  {
102
102
  opt1: true, opt2: 'OPT2',
103
- ::EacCli::Definition::Alternative::SUBCOMMAND_NAME_ARG => 'CMD',
104
- ::EacCli::Definition::Alternative::SUBCOMMAND_ARGS_ARG => %w[CMD_ARG_1 --CMD_ARG_2]
103
+ EacCli::Definition::Alternative::SUBCOMMAND_NAME_ARG => 'CMD',
104
+ EacCli::Definition::Alternative::SUBCOMMAND_ARGS_ARG => %w[CMD_ARG_1 --CMD_ARG_2]
105
105
  }
106
106
  end
107
107
 
@@ -114,8 +114,8 @@ RSpec.describe ::EacCli::Parser::Alternative do
114
114
  let(:parsed_expected) do
115
115
  {
116
116
  opt1: false, opt2: nil,
117
- ::EacCli::Definition::Alternative::SUBCOMMAND_NAME_ARG => 'CMD',
118
- ::EacCli::Definition::Alternative::SUBCOMMAND_ARGS_ARG => []
117
+ EacCli::Definition::Alternative::SUBCOMMAND_NAME_ARG => 'CMD',
118
+ EacCli::Definition::Alternative::SUBCOMMAND_ARGS_ARG => []
119
119
  }
120
120
  end
121
121
 
@@ -128,8 +128,8 @@ RSpec.describe ::EacCli::Parser::Alternative do
128
128
  let(:parsed_expected) do
129
129
  {
130
130
  opt1: true, opt2: nil,
131
- ::EacCli::Definition::Alternative::SUBCOMMAND_NAME_ARG => nil,
132
- ::EacCli::Definition::Alternative::SUBCOMMAND_ARGS_ARG => []
131
+ EacCli::Definition::Alternative::SUBCOMMAND_NAME_ARG => nil,
132
+ EacCli::Definition::Alternative::SUBCOMMAND_ARGS_ARG => []
133
133
  }
134
134
  end
135
135