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
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/runner'
|
4
4
|
|
5
|
-
|
5
|
+
RSpec.describe EacCli::Runner, '#for_context' do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
6
6
|
let(:parent_runner_class) do
|
7
7
|
example = self
|
8
|
-
|
8
|
+
Class.new do
|
9
9
|
include example.described_class
|
10
10
|
|
11
11
|
def self.name
|
@@ -22,9 +22,9 @@ require 'eac_cli/runner'
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
let(:
|
25
|
+
let(:child_runner_class1) do # rubocop:disable RSpec/IndexedLet
|
26
26
|
example = self
|
27
|
-
|
27
|
+
Class.new do
|
28
28
|
include example.described_class
|
29
29
|
|
30
30
|
def self.name
|
@@ -39,9 +39,9 @@ require 'eac_cli/runner'
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
let(:
|
42
|
+
let(:child_runner_class2) do # rubocop:disable RSpec/IndexedLet
|
43
43
|
example = self
|
44
|
-
|
44
|
+
Class.new do
|
45
45
|
include example.described_class
|
46
46
|
|
47
47
|
def self.name
|
@@ -58,22 +58,22 @@ require 'eac_cli/runner'
|
|
58
58
|
let(:context_args) { [{ argv: [], parent: parent_runner }] }
|
59
59
|
let(:child_runner) { child_runner_class.create(*context_args) }
|
60
60
|
|
61
|
-
it { expect(parent_runner.for_context?(:method_for_context)).to
|
62
|
-
it { expect(parent_runner.for_context?(:method_not_for_context)).to
|
61
|
+
it { expect(parent_runner.for_context?(:method_for_context)).to be(true) }
|
62
|
+
it { expect(parent_runner.for_context?(:method_not_for_context)).to be(false) }
|
63
63
|
|
64
|
-
context 'when method is for context' do
|
65
|
-
let(:child_runner_class) {
|
64
|
+
context 'when method is for context' do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
65
|
+
let(:child_runner_class) { child_runner_class1 }
|
66
66
|
|
67
67
|
it do
|
68
68
|
expect { child_runner.run }.not_to raise_error
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
context 'when method is not for context' do
|
73
|
-
let(:child_runner_class) {
|
72
|
+
context 'when method is not for context' do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
73
|
+
let(:child_runner_class) { child_runner_class2 }
|
74
74
|
|
75
75
|
it do
|
76
|
-
expect { child_runner.run }.to raise_error(
|
76
|
+
expect { child_runner.run }.to raise_error(NameError)
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/runner'
|
4
4
|
|
5
|
-
RSpec.describe
|
5
|
+
RSpec.describe EacCli::Runner do
|
6
6
|
let(:runner_class) do
|
7
7
|
the_module = described_class
|
8
|
-
|
8
|
+
Class.new do
|
9
9
|
include the_module
|
10
10
|
|
11
11
|
runner_definition do
|
@@ -37,7 +37,7 @@ RSpec.describe ::EacCli::Runner do
|
|
37
37
|
|
38
38
|
it { expect(parsed_actual).to eq(parsed_expected) }
|
39
39
|
it { expect(instance.parsed.opt1).to eq('aaa') }
|
40
|
-
it { expect(instance.parsed.opt2?).to
|
40
|
+
it { expect(instance.parsed.opt2?).to be(true) }
|
41
41
|
it { expect(instance.parsed.pos1).to eq('bbb') }
|
42
42
|
it { expect(instance.parsed.pos2).to eq(%w[ccc ddd]) }
|
43
43
|
end
|
@@ -52,14 +52,14 @@ RSpec.describe ::EacCli::Runner do
|
|
52
52
|
let(:argv) { %w[-po aaa pos1] }
|
53
53
|
|
54
54
|
it { expect(instance.parsed.opt1).to eq('aaa') }
|
55
|
-
it { expect(instance.parsed.opt2?).to
|
55
|
+
it { expect(instance.parsed.opt2?).to be(true) }
|
56
56
|
end
|
57
57
|
|
58
58
|
context 'with invalid grouped short options' do
|
59
59
|
let(:argv) { %w[-op aaa pos1] }
|
60
60
|
|
61
61
|
it do
|
62
|
-
expect { instance.parsed }.to raise_error(
|
62
|
+
expect { instance.parsed }.to raise_error(EacCli::Parser::Error)
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -72,7 +72,7 @@ RSpec.describe ::EacCli::Runner do
|
|
72
72
|
|
73
73
|
it { expect(parsed_actual).to eq(parsed_expected) }
|
74
74
|
it { expect(instance.parsed.opt1).to be_nil }
|
75
|
-
it { expect(instance.parsed.opt2?).to
|
75
|
+
it { expect(instance.parsed.opt2?).to be(false) }
|
76
76
|
it { expect(instance.parsed.pos1).to eq('bbb') }
|
77
77
|
it { expect(instance.parsed.pos2).to eq([]) }
|
78
78
|
end
|
@@ -81,7 +81,7 @@ RSpec.describe ::EacCli::Runner do
|
|
81
81
|
let(:argv) { %w[] }
|
82
82
|
|
83
83
|
it do
|
84
|
-
expect { instance.parsed }.to raise_error(
|
84
|
+
expect { instance.parsed }.to raise_error(EacCli::Parser::Error)
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
@@ -93,7 +93,7 @@ RSpec.describe ::EacCli::Runner do
|
|
93
93
|
end
|
94
94
|
|
95
95
|
it { expect(parsed_actual).to eq(parsed_expected) }
|
96
|
-
it { expect(instance.parsed.opt3?).to
|
96
|
+
it { expect(instance.parsed.opt3?).to be(true) }
|
97
97
|
end
|
98
98
|
|
99
99
|
context 'when repeated options are supplied' do
|
@@ -109,7 +109,7 @@ RSpec.describe ::EacCli::Runner do
|
|
109
109
|
context 'when extra args are not supplied' do
|
110
110
|
let(:runner_class) do
|
111
111
|
the_module = described_class
|
112
|
-
|
112
|
+
Class.new do
|
113
113
|
include the_module
|
114
114
|
|
115
115
|
runner_definition do
|
@@ -123,7 +123,7 @@ RSpec.describe ::EacCli::Runner do
|
|
123
123
|
let(:argv) { %w[aaa bbb] }
|
124
124
|
|
125
125
|
it do
|
126
|
-
expect { instance.parsed }.to raise_error(
|
126
|
+
expect { instance.parsed }.to raise_error(EacCli::Parser::Error)
|
127
127
|
end
|
128
128
|
end
|
129
129
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/runner_with/confirmation'
|
4
4
|
|
5
|
-
|
5
|
+
RSpec.describe EacCli::RunnerWith::Confirmation do
|
6
6
|
let(:runner) do
|
7
7
|
the_module = described_class
|
8
8
|
Class.new do
|
@@ -14,9 +14,9 @@ require 'eac_cli/runner_with/confirmation'
|
|
14
14
|
|
15
15
|
def run
|
16
16
|
if confirm?
|
17
|
-
|
17
|
+
Kernel.puts 'Accepted'
|
18
18
|
else
|
19
|
-
|
19
|
+
Kernel.puts 'Denied'
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'eac_cli/runner_with/help'
|
4
4
|
require 'eac_ruby_utils/fs/temp'
|
5
5
|
|
6
|
-
RSpec.describe
|
6
|
+
RSpec.describe EacCli::RunnerWith::Help do
|
7
7
|
let(:runner) do
|
8
8
|
the_module = described_class
|
9
9
|
Class.new do
|
@@ -22,7 +22,8 @@ RSpec.describe ::EacCli::RunnerWith::Help do
|
|
22
22
|
|
23
23
|
[
|
24
24
|
['--help'],
|
25
|
-
['trash-pos-arg-before', '--help', 'trash-pos-arg-after'
|
25
|
+
['trash-pos-arg-before', '--help', 'trash-pos-arg-after', '--any-option', '-XYZ',
|
26
|
+
'other-trash-arg']
|
26
27
|
].each do |runner_argv|
|
27
28
|
context "when runner ARGV is #{runner_argv}" do
|
28
29
|
let(:instance) { runner.create(argv: runner_argv) }
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'eac_cli/runner_with/output'
|
4
4
|
require 'eac_ruby_utils/fs/temp'
|
5
5
|
|
6
|
-
RSpec.describe
|
6
|
+
RSpec.describe EacCli::RunnerWith::Output do
|
7
7
|
let(:runner) do
|
8
8
|
the_module = described_class
|
9
9
|
Class.new do
|
@@ -36,7 +36,7 @@ RSpec.describe ::EacCli::RunnerWith::Output do
|
|
36
36
|
r.temp_dir = temp_dir
|
37
37
|
r
|
38
38
|
end
|
39
|
-
let(:temp_dir) {
|
39
|
+
let(:temp_dir) { EacRubyUtils::Fs::Temp.directory }
|
40
40
|
|
41
41
|
after { temp_dir.remove }
|
42
42
|
|
@@ -49,17 +49,17 @@ RSpec.describe ::EacCli::RunnerWith::Output do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
context 'without --output option as to stdout' do
|
52
|
-
let(:runner_argv) { ['--output',
|
52
|
+
let(:runner_argv) { ['--output', EacCli::RunnerWith::Output::STDOUT_OPTION, stub_text] }
|
53
53
|
|
54
54
|
it do
|
55
55
|
expect { instance.run }.to output(stub_text).to_stdout_from_any_process
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
context 'without --output option as to default file' do
|
59
|
+
context 'without --output option as to default file' do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
60
60
|
let(:output_file) { temp_dir.join('default_file') }
|
61
61
|
let(:runner_argv) do
|
62
|
-
['--output',
|
62
|
+
['--output', EacCli::RunnerWith::Output::DEFAULT_FILE_OPTION,
|
63
63
|
stub_text]
|
64
64
|
end
|
65
65
|
|
@@ -69,7 +69,7 @@ RSpec.describe ::EacCli::RunnerWith::Output do
|
|
69
69
|
it { expect(output_file.read).to eq(stub_text) }
|
70
70
|
end
|
71
71
|
|
72
|
-
context 'with --output option' do
|
72
|
+
context 'with --output option' do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
73
73
|
let(:output_file) { temp_dir.join('a output file') }
|
74
74
|
let(:runner_argv) { ['--output', output_file.to_path, stub_text] }
|
75
75
|
|
@@ -4,7 +4,7 @@ require 'eac_cli/runner'
|
|
4
4
|
require 'eac_cli/runner_with/help'
|
5
5
|
require 'eac_cli/runner_with/subcommands'
|
6
6
|
|
7
|
-
RSpec.describe
|
7
|
+
RSpec.describe EacCli::RunnerWith::Subcommands do
|
8
8
|
let(:parent_runner) do
|
9
9
|
the_module = described_class
|
10
10
|
the_child = child_runner
|
@@ -26,8 +26,8 @@ RSpec.describe ::EacCli::RunnerWith::Subcommands do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
let(:child_runner) do
|
29
|
-
|
30
|
-
include
|
29
|
+
Class.new do
|
30
|
+
include EacCli::Runner
|
31
31
|
|
32
32
|
runner_definition do
|
33
33
|
bool_opt '-c', '--child-opt', 'A boolean option.'
|
@@ -49,7 +49,7 @@ RSpec.describe ::EacCli::RunnerWith::Subcommands do
|
|
49
49
|
it { expect(instance.parsed.root_var).to eq('123') }
|
50
50
|
it { expect(instance.parsed.subcommand).to eq('child-cmd') }
|
51
51
|
it { expect(instance.parsed.subcommand_args).to eq(%w[--child-opt 456]) }
|
52
|
-
it { expect(instance.subcommand_runner.parsed.child_opt).to
|
52
|
+
it { expect(instance.subcommand_runner.parsed.child_opt).to be(true) }
|
53
53
|
it { expect(instance.subcommand_runner.parsed.child_var).to eq('456') }
|
54
54
|
|
55
55
|
it do
|
@@ -61,7 +61,7 @@ RSpec.describe ::EacCli::RunnerWith::Subcommands do
|
|
61
61
|
let(:instance) { parent_runner.create(%w[456]) }
|
62
62
|
|
63
63
|
it do
|
64
|
-
expect { instance.run }.to raise_error(
|
64
|
+
expect { instance.run }.to raise_error(EacCli::Parser::Error)
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
@@ -88,7 +88,7 @@ RSpec.describe ::EacCli::RunnerWith::Subcommands do
|
|
88
88
|
end
|
89
89
|
|
90
90
|
before do
|
91
|
-
parent_runner.include(
|
91
|
+
parent_runner.include(EacCli::RunnerWith::Help)
|
92
92
|
end
|
93
93
|
|
94
94
|
it 'show help text' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.76.
|
4
|
+
version: 0.76.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -1336,6 +1336,7 @@ files:
|
|
1336
1336
|
- sub/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb
|
1337
1337
|
- sub/eac_cli/lib/eac_cli/parser.rb
|
1338
1338
|
- sub/eac_cli/lib/eac_cli/parser/alternative.rb
|
1339
|
+
- sub/eac_cli/lib/eac_cli/parser/alternative/any_options.rb
|
1339
1340
|
- sub/eac_cli/lib/eac_cli/parser/alternative/argv.rb
|
1340
1341
|
- sub/eac_cli/lib/eac_cli/parser/alternative/double_dash.rb
|
1341
1342
|
- sub/eac_cli/lib/eac_cli/parser/alternative/long_options.rb
|
@@ -1467,72 +1468,6 @@ files:
|
|
1467
1468
|
- sub/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile
|
1468
1469
|
- sub/eac_docker/spec/rubocop_spec.rb
|
1469
1470
|
- sub/eac_docker/spec/spec_helper.rb
|
1470
|
-
- sub/eac_envs-http/Gemfile
|
1471
|
-
- sub/eac_envs-http/eac_envs-http.gemspec
|
1472
|
-
- sub/eac_envs-http/lib/eac_envs/http.rb
|
1473
|
-
- sub/eac_envs-http/lib/eac_envs/http/error.rb
|
1474
|
-
- sub/eac_envs-http/lib/eac_envs/http/request.rb
|
1475
|
-
- sub/eac_envs-http/lib/eac_envs/http/request/body_field.rb
|
1476
|
-
- sub/eac_envs-http/lib/eac_envs/http/request/body_field_value.rb
|
1477
|
-
- sub/eac_envs-http/lib/eac_envs/http/request/body_fields.rb
|
1478
|
-
- sub/eac_envs-http/lib/eac_envs/http/request/faraday_connection.rb
|
1479
|
-
- sub/eac_envs-http/lib/eac_envs/http/response.rb
|
1480
|
-
- sub/eac_envs-http/lib/eac_envs/http/response/body.rb
|
1481
|
-
- sub/eac_envs-http/lib/eac_envs/http/response/headers.rb
|
1482
|
-
- sub/eac_envs-http/lib/eac_envs/http/response/links.rb
|
1483
|
-
- sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
|
1484
|
-
- sub/eac_envs-http/lib/eac_envs/http/rspec.rb
|
1485
|
-
- sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server.rb
|
1486
|
-
- sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/request_processor.rb
|
1487
|
-
- sub/eac_envs-http/lib/eac_envs/http/rspec/echo_server/webrick_servlet.rb
|
1488
|
-
- sub/eac_envs-http/lib/eac_envs/http/version.rb
|
1489
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request/body_fields_spec.rb
|
1490
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec.rb
|
1491
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.source.yaml
|
1492
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get.target.yaml
|
1493
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.source.yaml
|
1494
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/get_with_auth.target.yaml
|
1495
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.source.yaml
|
1496
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_array_body.target.yaml
|
1497
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.source.yaml
|
1498
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/post_string_body.target.yaml
|
1499
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.source.yaml
|
1500
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_hash_body.target.yaml
|
1501
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.source.yaml
|
1502
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/put_with_file.target.yaml
|
1503
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.source.yaml
|
1504
|
-
- sub/eac_envs-http/spec/lib/eac_envs/http/request_spec_files/root.target.yaml
|
1505
|
-
- sub/eac_envs-http/spec/rubocop_spec.rb
|
1506
|
-
- sub/eac_envs-http/spec/spec_helper.rb
|
1507
|
-
- sub/eac_envs-http/spec/spec_helper/request_builder.rb
|
1508
|
-
- sub/eac_fs/Gemfile
|
1509
|
-
- sub/eac_fs/eac_fs.gemspec
|
1510
|
-
- sub/eac_fs/lib/eac_fs.rb
|
1511
|
-
- sub/eac_fs/lib/eac_fs/cached_download.rb
|
1512
|
-
- sub/eac_fs/lib/eac_fs/comparator.rb
|
1513
|
-
- sub/eac_fs/lib/eac_fs/comparator/build.rb
|
1514
|
-
- sub/eac_fs/lib/eac_fs/comparator/rename_file.rb
|
1515
|
-
- sub/eac_fs/lib/eac_fs/contexts.rb
|
1516
|
-
- sub/eac_fs/lib/eac_fs/core_ext.rb
|
1517
|
-
- sub/eac_fs/lib/eac_fs/file_info.rb
|
1518
|
-
- sub/eac_fs/lib/eac_fs/logs.rb
|
1519
|
-
- sub/eac_fs/lib/eac_fs/logs/file.rb
|
1520
|
-
- sub/eac_fs/lib/eac_fs/patches.rb
|
1521
|
-
- sub/eac_fs/lib/eac_fs/patches/module.rb
|
1522
|
-
- sub/eac_fs/lib/eac_fs/patches/module/fs_cache.rb
|
1523
|
-
- sub/eac_fs/lib/eac_fs/patches/object.rb
|
1524
|
-
- sub/eac_fs/lib/eac_fs/patches/object/fs_cache.rb
|
1525
|
-
- sub/eac_fs/lib/eac_fs/patches/pathname.rb
|
1526
|
-
- sub/eac_fs/lib/eac_fs/patches/pathname/info.rb
|
1527
|
-
- sub/eac_fs/lib/eac_fs/rspec.rb
|
1528
|
-
- sub/eac_fs/lib/eac_fs/rspec/setup.rb
|
1529
|
-
- sub/eac_fs/lib/eac_fs/storage_tree.rb
|
1530
|
-
- sub/eac_fs/lib/eac_fs/traversable.rb
|
1531
|
-
- sub/eac_fs/lib/eac_fs/traverser.rb
|
1532
|
-
- sub/eac_fs/lib/eac_fs/version.rb
|
1533
|
-
- sub/eac_fs/spec/lib/eac_fs/storage_tree_spec.rb
|
1534
|
-
- sub/eac_fs/spec/rubocop_spec.rb
|
1535
|
-
- sub/eac_fs/spec/spec_helper.rb
|
1536
1471
|
- sub/eac_git/Gemfile
|
1537
1472
|
- sub/eac_git/eac_git.gemspec
|
1538
1473
|
- sub/eac_git/lib/eac_git.rb
|
@@ -1756,36 +1691,6 @@ files:
|
|
1756
1691
|
- sub/eac_git/vendor/git-subrepo/test/setup
|
1757
1692
|
- sub/eac_git/vendor/git-subrepo/test/status.t
|
1758
1693
|
- sub/eac_git/vendor/git-subrepo/test/submodule.t
|
1759
|
-
- sub/eac_rest/Gemfile
|
1760
|
-
- sub/eac_rest/eac_rest.gemspec
|
1761
|
-
- sub/eac_rest/lib/eac_rest.rb
|
1762
|
-
- sub/eac_rest/lib/eac_rest/api.rb
|
1763
|
-
- sub/eac_rest/lib/eac_rest/entity.rb
|
1764
|
-
- sub/eac_rest/lib/eac_rest/entity/data.rb
|
1765
|
-
- sub/eac_rest/lib/eac_rest/entity/fetching.rb
|
1766
|
-
- sub/eac_rest/lib/eac_rest/error.rb
|
1767
|
-
- sub/eac_rest/lib/eac_rest/helper.rb
|
1768
|
-
- sub/eac_rest/lib/eac_rest/request.rb
|
1769
|
-
- sub/eac_rest/lib/eac_rest/response.rb
|
1770
|
-
- sub/eac_rest/lib/eac_rest/version.rb
|
1771
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec.rb
|
1772
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.source.yaml
|
1773
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/get.target.yaml
|
1774
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.source.yaml
|
1775
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/get_with_auth.target.yaml
|
1776
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.source.yaml
|
1777
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_array_body.target.yaml
|
1778
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.source.yaml
|
1779
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/post_string_body.target.yaml
|
1780
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.source.yaml
|
1781
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_hash_body.target.yaml
|
1782
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.source.yaml
|
1783
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/put_with_file.target.yaml
|
1784
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.source.yaml
|
1785
|
-
- sub/eac_rest/spec/lib/eac_rest/api_spec_files/root.target.yaml
|
1786
|
-
- sub/eac_rest/spec/rubocop_spec.rb
|
1787
|
-
- sub/eac_rest/spec/spec_helper.rb
|
1788
|
-
- sub/eac_rest/spec/spec_helper/request_builder.rb
|
1789
1694
|
- sub/eac_ruby_base0/Gemfile
|
1790
1695
|
- sub/eac_ruby_base0/eac_ruby_base0.gemspec
|
1791
1696
|
- sub/eac_ruby_base0/lib/eac_ruby_base0.rb
|
@@ -2070,74 +1975,6 @@ files:
|
|
2070
1975
|
- sub/eac_ruby_utils/spec/locales/pt-BR.yml
|
2071
1976
|
- sub/eac_ruby_utils/spec/rubocop_check_spec.rb
|
2072
1977
|
- sub/eac_ruby_utils/spec/spec_helper.rb
|
2073
|
-
- sub/eac_templates/Gemfile
|
2074
|
-
- sub/eac_templates/eac_templates.gemspec
|
2075
|
-
- sub/eac_templates/lib/eac_templates.rb
|
2076
|
-
- sub/eac_templates/lib/eac_templates/abstract/directory.rb
|
2077
|
-
- sub/eac_templates/lib/eac_templates/abstract/file.rb
|
2078
|
-
- sub/eac_templates/lib/eac_templates/abstract/fs_object.rb
|
2079
|
-
- sub/eac_templates/lib/eac_templates/abstract/fs_object_by_pathname.rb
|
2080
|
-
- sub/eac_templates/lib/eac_templates/abstract/not_found_error.rb
|
2081
|
-
- sub/eac_templates/lib/eac_templates/core_ext.rb
|
2082
|
-
- sub/eac_templates/lib/eac_templates/interface_methods.rb
|
2083
|
-
- sub/eac_templates/lib/eac_templates/modules.rb
|
2084
|
-
- sub/eac_templates/lib/eac_templates/modules/ancestor.rb
|
2085
|
-
- sub/eac_templates/lib/eac_templates/modules/ancestor/directory.rb
|
2086
|
-
- sub/eac_templates/lib/eac_templates/modules/ancestor/file.rb
|
2087
|
-
- sub/eac_templates/lib/eac_templates/modules/ancestor/fs_object.rb
|
2088
|
-
- sub/eac_templates/lib/eac_templates/modules/base.rb
|
2089
|
-
- sub/eac_templates/lib/eac_templates/patches.rb
|
2090
|
-
- sub/eac_templates/lib/eac_templates/patches/module.rb
|
2091
|
-
- sub/eac_templates/lib/eac_templates/patches/module/erb_template.rb
|
2092
|
-
- sub/eac_templates/lib/eac_templates/patches/module/template.rb
|
2093
|
-
- sub/eac_templates/lib/eac_templates/patches/object.rb
|
2094
|
-
- sub/eac_templates/lib/eac_templates/patches/object/erb_template.rb
|
2095
|
-
- sub/eac_templates/lib/eac_templates/patches/object/template.rb
|
2096
|
-
- sub/eac_templates/lib/eac_templates/sources.rb
|
2097
|
-
- sub/eac_templates/lib/eac_templates/sources/directory.rb
|
2098
|
-
- sub/eac_templates/lib/eac_templates/sources/file.rb
|
2099
|
-
- sub/eac_templates/lib/eac_templates/sources/from_all_gems.rb
|
2100
|
-
- sub/eac_templates/lib/eac_templates/sources/from_gem.rb
|
2101
|
-
- sub/eac_templates/lib/eac_templates/sources/fs_object.rb
|
2102
|
-
- sub/eac_templates/lib/eac_templates/sources/internal_set.rb
|
2103
|
-
- sub/eac_templates/lib/eac_templates/sources/set.rb
|
2104
|
-
- sub/eac_templates/lib/eac_templates/sources/single.rb
|
2105
|
-
- sub/eac_templates/lib/eac_templates/variables.rb
|
2106
|
-
- sub/eac_templates/lib/eac_templates/variables/content.rb
|
2107
|
-
- sub/eac_templates/lib/eac_templates/variables/directory.rb
|
2108
|
-
- sub/eac_templates/lib/eac_templates/variables/file.rb
|
2109
|
-
- sub/eac_templates/lib/eac_templates/variables/fs_object.rb
|
2110
|
-
- sub/eac_templates/lib/eac_templates/variables/not_found_error.rb
|
2111
|
-
- sub/eac_templates/lib/eac_templates/variables/providers.rb
|
2112
|
-
- sub/eac_templates/lib/eac_templates/variables/providers/base.rb
|
2113
|
-
- sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
|
2114
|
-
- sub/eac_templates/lib/eac_templates/variables/providers/entries_reader.rb
|
2115
|
-
- sub/eac_templates/lib/eac_templates/variables/providers/generic.rb
|
2116
|
-
- sub/eac_templates/lib/eac_templates/variables/providers/hash.rb
|
2117
|
-
- sub/eac_templates/lib/eac_templates/version.rb
|
2118
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec.rb
|
2119
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/a/a_a
|
2120
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/b
|
2121
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/a/a_b
|
2122
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/b
|
2123
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/a/a_b
|
2124
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/b
|
2125
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/c
|
2126
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/prepended_module/c
|
2127
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/sub_class/b
|
2128
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/a/a_b
|
2129
|
-
- sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/b
|
2130
|
-
- sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec.rb
|
2131
|
-
- sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec_files/path/my_stub_with_template
|
2132
|
-
- sub/eac_templates/spec/lib/eac_templates/sources/set_spec.rb
|
2133
|
-
- sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file1.template
|
2134
|
-
- sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file2
|
2135
|
-
- sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path2/subdir1/file3.template
|
2136
|
-
- sub/eac_templates/spec/lib/eac_templates/variables/content_spec.rb
|
2137
|
-
- sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/expected_content
|
2138
|
-
- sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/source.template
|
2139
|
-
- sub/eac_templates/spec/rubocop_spec.rb
|
2140
|
-
- sub/eac_templates/spec/spec_helper.rb
|
2141
1978
|
homepage:
|
2142
1979
|
licenses: []
|
2143
1980
|
metadata: {}
|
data/sub/eac_envs-http/Gemfile
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
-
|
5
|
-
require 'eac_envs/http/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = 'eac_envs-http'
|
9
|
-
s.version = EacEnvs::Http::VERSION
|
10
|
-
s.authors = ['Put here the authors']
|
11
|
-
s.summary = 'Put here de description.'
|
12
|
-
|
13
|
-
s.files = Dir['{lib}/**/*']
|
14
|
-
|
15
|
-
s.add_dependency 'eac_fs', '~> 0.16'
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.1'
|
17
|
-
s.add_dependency 'faraday', '~> 2.7', '>= 2.7.10'
|
18
|
-
s.add_dependency 'faraday-follow_redirects', '~> 0.3'
|
19
|
-
s.add_dependency 'faraday-gzip', '~> 0.1'
|
20
|
-
s.add_dependency 'faraday-multipart', '~> 1.0', '>= 1.0.4'
|
21
|
-
s.add_dependency 'faraday-retry', '~> 2.2'
|
22
|
-
|
23
|
-
s.add_development_dependency 'aranha-parsers', '~> 0.17'
|
24
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
|
25
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_envs/http/request/body_field_value'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
require 'faraday/multipart/file_part'
|
6
|
-
|
7
|
-
module EacEnvs
|
8
|
-
module Http
|
9
|
-
class Request
|
10
|
-
class BodyField
|
11
|
-
class << self
|
12
|
-
# @return [Array<EacEnvs::Http::Request::BodyField>]
|
13
|
-
def list_from_enumerable(enum)
|
14
|
-
hash = {}
|
15
|
-
enum.each do |v|
|
16
|
-
hash[v[0]] ||= []
|
17
|
-
hash[v[0]] << v[1]
|
18
|
-
end
|
19
|
-
list_from_hash(hash)
|
20
|
-
end
|
21
|
-
|
22
|
-
# @return [Array<EacEnvs::Http::Request::BodyField>]
|
23
|
-
def list_from_hash(hash)
|
24
|
-
hash.map { |k, v| new(k, v) }
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
common_constructor :key, :values do
|
29
|
-
self.key = key.to_s
|
30
|
-
self.values = (values.is_a?(::Array) ? values.to_a : [values])
|
31
|
-
.map { |v| ::EacEnvs::Http::Request::BodyFieldValue.new(v) }
|
32
|
-
end
|
33
|
-
|
34
|
-
# @return [String]
|
35
|
-
def hash_key
|
36
|
-
key
|
37
|
-
end
|
38
|
-
|
39
|
-
# @return [Array]
|
40
|
-
def hash_value
|
41
|
-
values.map(&:to_faraday)
|
42
|
-
end
|
43
|
-
|
44
|
-
# @return [Boolean]
|
45
|
-
def with_file?
|
46
|
-
values.any?(&:file?)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_fs/file_info'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
require 'faraday'
|
6
|
-
require 'faraday/multipart'
|
7
|
-
|
8
|
-
module EacEnvs
|
9
|
-
module Http
|
10
|
-
class Request
|
11
|
-
class BodyFieldValue
|
12
|
-
common_constructor :value
|
13
|
-
|
14
|
-
def to_faraday
|
15
|
-
return value unless file?
|
16
|
-
|
17
|
-
::Faraday::Multipart::FilePart.new(value, file_mime_type)
|
18
|
-
end
|
19
|
-
|
20
|
-
# @return [Boolean]
|
21
|
-
def file?
|
22
|
-
value.is_a?(::File)
|
23
|
-
end
|
24
|
-
|
25
|
-
# @return [String]
|
26
|
-
def file_mime_type
|
27
|
-
::EacFs::FileInfo.new(value.path).mime_type
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|