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.
- checksums.yaml +4 -4
- data/Gemfile.lock +28 -48
- data/lib/eac_tools/version.rb +1 -1
- data/sub/eac_cli/Gemfile +2 -2
- data/sub/eac_cli/eac_cli.gemspec +5 -3
- data/sub/eac_cli/lib/eac_cli/config.rb +0 -4
- data/sub/eac_cli/lib/eac_cli/core_ext.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/definition/alternative.rb +24 -3
- data/sub/eac_cli/lib/eac_cli/definition.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/parser/alternative/any_options.rb +19 -0
- data/sub/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +1 -3
- data/sub/eac_cli/lib/eac_cli/parser/alternative.rb +0 -9
- data/sub/eac_cli/lib/eac_cli/parser.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/patches/object.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/patches.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/runner/class_runner.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/set.rb +2 -2
- data/sub/eac_cli/lib/eac_cli/runner/exit.rb +2 -1
- data/sub/eac_cli/lib/eac_cli/runner/instance_methods.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/runner_with/help/builder/alternative.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/runner_with/help/builder.rb +2 -2
- data/sub/eac_cli/lib/eac_cli/runner_with/help.rb +1 -0
- data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/speaker/list.rb +4 -4
- data/sub/eac_cli/lib/eac_cli/speaker/options.rb +3 -3
- data/sub/eac_cli/lib/eac_cli/speaker.rb +2 -1
- data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
- data/sub/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +2 -2
- data/sub/eac_cli/spec/lib/eac_cli/old_configs_spec.rb +1 -1
- data/sub/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +10 -10
- data/sub/eac_cli/spec/lib/eac_cli/runner/for_context_spec.rb +13 -13
- data/sub/eac_cli/spec/lib/eac_cli/runner_spec.rb +10 -10
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/confirmation_spec.rb +3 -3
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/help/layout_spec.rb +1 -1
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb +3 -2
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/output_spec.rb +6 -6
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +6 -6
- data/sub/eac_cli/spec/lib/eac_cli/speaker_spec.rb +1 -1
- data/sub/eac_cli/spec/rubocop_spec.rb +1 -1
- data/sub/eac_cli/spec/spec_helper.rb +1 -1
- metadata +3 -166
- data/sub/eac_envs-http/Gemfile +0 -8
- data/sub/eac_envs-http/eac_envs-http.gemspec +0 -25
- data/sub/eac_envs-http/lib/eac_envs/http/error.rb +0 -8
- data/sub/eac_envs-http/lib/eac_envs/http/request/body_field.rb +0 -51
- data/sub/eac_envs-http/lib/eac_envs/http/request/body_field_value.rb +0 -32
- data/sub/eac_envs-http/lib/eac_envs/http/request/body_fields.rb +0 -39
- data/sub/eac_envs-http/lib/eac_envs/http/request/faraday_connection.rb +0 -75
- data/sub/eac_envs-http/lib/eac_envs/http/request.rb +0 -58
- data/sub/eac_envs-http/lib/eac_envs/http/response/body.rb +0 -62
- data/sub/eac_envs-http/lib/eac_envs/http/response/headers.rb +0 -41
- data/sub/eac_envs-http/lib/eac_envs/http/response/links.rb +0 -28
- data/sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb +0 -21
- data/sub/eac_envs-http/lib/eac_envs/http/response.rb +0 -30
- data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/request_processor.rb +0 -42
- data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/webrick_servlet.rb +0 -22
- data/sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server.rb +0 -63
- data/sub/eac_envs-http/lib/eac_envs/http/rspec.rb +0 -11
- data/sub/eac_envs-http/lib/eac_envs/http/version.rb +0 -7
- data/sub/eac_envs-http/lib/eac_envs/http.rb +0 -9
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request/body_fields_spec.rb +0 -47
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec.rb +0 -68
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.source.yaml +0 -5
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.target.yaml +0 -9
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.source.yaml +0 -8
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.target.yaml +0 -10
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.source.yaml +0 -10
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.target.yaml +0 -11
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.source.yaml +0 -4
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.target.yaml +0 -11
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.source.yaml +0 -6
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.target.yaml +0 -11
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.source.yaml +0 -5
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.target.yaml +0 -13
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.source.yaml +0 -2
- data/sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.target.yaml +0 -9
- data/sub/eac_envs-http/spec/rubocop_spec.rb +0 -3
- data/sub/eac_envs-http/spec/spec_helper/request_builder.rb +0 -62
- data/sub/eac_envs-http/spec/spec_helper.rb +0 -7
- data/sub/eac_fs/Gemfile +0 -8
- data/sub/eac_fs/eac_fs.gemspec +0 -20
- data/sub/eac_fs/lib/eac_fs/cached_download.rb +0 -40
- data/sub/eac_fs/lib/eac_fs/comparator/build.rb +0 -57
- data/sub/eac_fs/lib/eac_fs/comparator/rename_file.rb +0 -15
- data/sub/eac_fs/lib/eac_fs/comparator.rb +0 -18
- data/sub/eac_fs/lib/eac_fs/contexts.rb +0 -21
- data/sub/eac_fs/lib/eac_fs/core_ext.rb +0 -4
- data/sub/eac_fs/lib/eac_fs/file_info.rb +0 -29
- data/sub/eac_fs/lib/eac_fs/logs/file.rb +0 -56
- data/sub/eac_fs/lib/eac_fs/logs.rb +0 -64
- data/sub/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +0 -15
- data/sub/eac_fs/lib/eac_fs/patches/module.rb +0 -4
- data/sub/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +0 -32
- data/sub/eac_fs/lib/eac_fs/patches/object.rb +0 -4
- data/sub/eac_fs/lib/eac_fs/patches/pathname/info.rb +0 -12
- data/sub/eac_fs/lib/eac_fs/patches/pathname.rb +0 -4
- data/sub/eac_fs/lib/eac_fs/patches.rb +0 -4
- data/sub/eac_fs/lib/eac_fs/rspec/setup.rb +0 -25
- data/sub/eac_fs/lib/eac_fs/rspec.rb +0 -9
- data/sub/eac_fs/lib/eac_fs/storage_tree.rb +0 -81
- data/sub/eac_fs/lib/eac_fs/traversable.rb +0 -45
- data/sub/eac_fs/lib/eac_fs/traverser.rb +0 -76
- data/sub/eac_fs/lib/eac_fs/version.rb +0 -5
- data/sub/eac_fs/lib/eac_fs.rb +0 -7
- data/sub/eac_fs/spec/lib/eac_fs/storage_tree_spec.rb +0 -32
- data/sub/eac_fs/spec/rubocop_spec.rb +0 -3
- data/sub/eac_fs/spec/spec_helper.rb +0 -4
- data/sub/eac_rest/Gemfile +0 -8
- data/sub/eac_rest/eac_rest.gemspec +0 -21
- data/sub/eac_rest/lib/eac_rest/api.rb +0 -57
- data/sub/eac_rest/lib/eac_rest/entity/data.rb +0 -44
- data/sub/eac_rest/lib/eac_rest/entity/fetching.rb +0 -20
- data/sub/eac_rest/lib/eac_rest/entity.rb +0 -35
- data/sub/eac_rest/lib/eac_rest/error.rb +0 -6
- data/sub/eac_rest/lib/eac_rest/helper.rb +0 -34
- data/sub/eac_rest/lib/eac_rest/request.rb +0 -48
- data/sub/eac_rest/lib/eac_rest/response.rb +0 -27
- data/sub/eac_rest/lib/eac_rest/version.rb +0 -5
- data/sub/eac_rest/lib/eac_rest.rb +0 -7
- data/sub/eac_rest/spec/lib/eac_rest/api_spec.rb +0 -71
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.source.yaml +0 -5
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.target.yaml +0 -9
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.source.yaml +0 -8
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.target.yaml +0 -10
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.source.yaml +0 -10
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.target.yaml +0 -11
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.source.yaml +0 -4
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.target.yaml +0 -11
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.source.yaml +0 -6
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.target.yaml +0 -11
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.source.yaml +0 -5
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.target.yaml +0 -13
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.source.yaml +0 -2
- data/sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.target.yaml +0 -9
- data/sub/eac_rest/spec/rubocop_spec.rb +0 -3
- data/sub/eac_rest/spec/spec_helper/request_builder.rb +0 -51
- data/sub/eac_rest/spec/spec_helper.rb +0 -7
- data/sub/eac_templates/Gemfile +0 -8
- data/sub/eac_templates/eac_templates.gemspec +0 -19
- data/sub/eac_templates/lib/eac_templates/abstract/directory.rb +0 -42
- data/sub/eac_templates/lib/eac_templates/abstract/file.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/abstract/fs_object.rb +0 -94
- data/sub/eac_templates/lib/eac_templates/abstract/fs_object_by_pathname.rb +0 -13
- data/sub/eac_templates/lib/eac_templates/abstract/not_found_error.rb +0 -8
- data/sub/eac_templates/lib/eac_templates/core_ext.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/interface_methods.rb +0 -12
- data/sub/eac_templates/lib/eac_templates/modules/ancestor/directory.rb +0 -17
- data/sub/eac_templates/lib/eac_templates/modules/ancestor/file.rb +0 -16
- data/sub/eac_templates/lib/eac_templates/modules/ancestor/fs_object.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/modules/ancestor.rb +0 -51
- data/sub/eac_templates/lib/eac_templates/modules/base.rb +0 -35
- data/sub/eac_templates/lib/eac_templates/modules.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/module/erb_template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/module/template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/module.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/patches/object/erb_template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/object/template.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/patches/object.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/patches.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/sources/directory.rb +0 -37
- data/sub/eac_templates/lib/eac_templates/sources/file.rb +0 -13
- data/sub/eac_templates/lib/eac_templates/sources/from_all_gems.rb +0 -4
- data/sub/eac_templates/lib/eac_templates/sources/from_gem.rb +0 -37
- data/sub/eac_templates/lib/eac_templates/sources/fs_object.rb +0 -53
- data/sub/eac_templates/lib/eac_templates/sources/internal_set.rb +0 -22
- data/sub/eac_templates/lib/eac_templates/sources/set.rb +0 -55
- data/sub/eac_templates/lib/eac_templates/sources/single.rb +0 -29
- data/sub/eac_templates/lib/eac_templates/sources.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/variables/content.rb +0 -52
- data/sub/eac_templates/lib/eac_templates/variables/directory.rb +0 -49
- data/sub/eac_templates/lib/eac_templates/variables/file.rb +0 -26
- data/sub/eac_templates/lib/eac_templates/variables/fs_object.rb +0 -65
- data/sub/eac_templates/lib/eac_templates/variables/not_found_error.rb +0 -7
- data/sub/eac_templates/lib/eac_templates/variables/providers/base.rb +0 -23
- data/sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb +0 -29
- data/sub/eac_templates/lib/eac_templates/variables/providers/entries_reader.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/variables/providers/generic.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/variables/providers/hash.rb +0 -29
- data/sub/eac_templates/lib/eac_templates/variables/providers.rb +0 -25
- data/sub/eac_templates/lib/eac_templates/variables.rb +0 -9
- data/sub/eac_templates/lib/eac_templates/version.rb +0 -5
- data/sub/eac_templates/lib/eac_templates.rb +0 -7
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec.rb +0 -141
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/a/a_a +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/a/a_b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/a/a_b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/c +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/prepended_module/c +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/sub_class/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/a/a_b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/b +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec.rb +0 -26
- data/sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec_files/path/my_stub_with_template +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec.rb +0 -42
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file1.template +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file2 +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path2/subdir1/file3.template +0 -1
- data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec.rb +0 -35
- data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/expected_content +0 -2
- data/sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/source.template +0 -2
- data/sub/eac_templates/spec/rubocop_spec.rb +0 -3
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 243403803692489258ccec3dc01aaa6f73effcd4764c3c6fa4f251cd94990c02
|
4
|
+
data.tar.gz: fb4250adf052f9aa3377f6b921875cc04db1dd260f766bf97de30054b1c91a73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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
|
-
|
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.
|
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.
|
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.
|
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
|
data/lib/eac_tools/version.rb
CHANGED
data/sub/eac_cli/Gemfile
CHANGED
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
local_gemfile =
|
8
|
-
eval_gemfile local_gemfile if
|
7
|
+
local_gemfile = File.join(File.dirname(__FILE__), 'Gemfile.local')
|
8
|
+
eval_gemfile local_gemfile if File.exist?(local_gemfile)
|
data/sub/eac_cli/eac_cli.gemspec
CHANGED
@@ -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 =
|
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.
|
19
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.2'
|
18
20
|
|
19
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.
|
21
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.8.1'
|
20
22
|
end
|
@@ -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
|
-
|
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
|
-
|
91
|
+
raise ::EacCli::Definition::Error, "Positional arguments are blocked: #{v} " \
|
92
|
+
"(New argument: #{new_pos_arg})"
|
72
93
|
end
|
73
94
|
end
|
74
95
|
|
@@ -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
|
-
|
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
|
@@ -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
|
-
|
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.
|
15
|
+
raise first_error unless alternatives.any?(&:success?)
|
16
16
|
|
17
17
|
alternatives_parsed(true).merge(alternatives_parsed(false))
|
18
18
|
end
|
@@ -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(
|
21
|
+
def call(...)
|
22
22
|
caller = responder_to_call
|
23
|
-
return caller.call(
|
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
|
@@ -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)].
|
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
|
-
.
|
56
|
+
.compact_blank.join(OPTION_DESCRIPTION_SEPARATOR)
|
57
57
|
end
|
58
58
|
|
59
59
|
# @return [String]
|
@@ -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
|
-
|
108
|
+
"(Available: #{available_subcommands_to_s})"
|
109
109
|
))
|
110
110
|
end
|
111
111
|
|
@@ -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|
|
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,
|
14
|
+
option(OPTION_ERR_OUT, $stderr)
|
15
15
|
end
|
16
16
|
|
17
17
|
def out_out
|
18
|
-
option(OPTION_OUT_OUT,
|
18
|
+
option(OPTION_OUT_OUT, $stdout)
|
19
19
|
end
|
20
20
|
|
21
21
|
def in_in
|
22
|
-
option(OPTION_IN_IN,
|
22
|
+
option(OPTION_IN_IN, $stdin)
|
23
23
|
end
|
24
24
|
|
25
25
|
def err_line_prefix
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/definition/alternative'
|
4
4
|
|
5
|
-
RSpec.describe
|
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(
|
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,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/parser/alternative'
|
4
4
|
|
5
|
-
RSpec.describe
|
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 =
|
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 =
|
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 =
|
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
|
-
|
104
|
-
|
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
|
-
|
118
|
-
|
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
|
-
|
132
|
-
|
131
|
+
EacCli::Definition::Alternative::SUBCOMMAND_NAME_ARG => nil,
|
132
|
+
EacCli::Definition::Alternative::SUBCOMMAND_ARGS_ARG => []
|
133
133
|
}
|
134
134
|
end
|
135
135
|
|