avm-tools 0.121.2 → 0.122.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/lib/avm/tools/runner/app_src/info.rb +19 -0
- data/lib/avm/tools/version.rb +1 -1
- metadata +2 -38
- data/sub/eac_config/Gemfile +0 -5
- data/sub/eac_config/eac_config.gemspec +0 -19
- data/sub/eac_config/lib/eac_config/entry.rb +0 -53
- data/sub/eac_config/lib/eac_config/entry_path.rb +0 -41
- data/sub/eac_config/lib/eac_config/envvars_node/entry.rb +0 -54
- data/sub/eac_config/lib/eac_config/envvars_node.rb +0 -25
- data/sub/eac_config/lib/eac_config/load_nodes_search.rb +0 -39
- data/sub/eac_config/lib/eac_config/load_path.rb +0 -28
- data/sub/eac_config/lib/eac_config/node.rb +0 -67
- data/sub/eac_config/lib/eac_config/node_entry.rb +0 -22
- data/sub/eac_config/lib/eac_config/node_uri.rb +0 -38
- data/sub/eac_config/lib/eac_config/old_configs/base.rb +0 -43
- data/sub/eac_config/lib/eac_config/old_configs/file.rb +0 -47
- data/sub/eac_config/lib/eac_config/old_configs.rb +0 -75
- data/sub/eac_config/lib/eac_config/paths_hash/entry_key_error.rb +0 -8
- data/sub/eac_config/lib/eac_config/paths_hash/node.rb +0 -67
- data/sub/eac_config/lib/eac_config/paths_hash/path_search.rb +0 -39
- data/sub/eac_config/lib/eac_config/paths_hash.rb +0 -63
- data/sub/eac_config/lib/eac_config/rspec/setup.rb +0 -65
- data/sub/eac_config/lib/eac_config/rspec.rb +0 -9
- data/sub/eac_config/lib/eac_config/version.rb +0 -5
- data/sub/eac_config/lib/eac_config/yaml_file_node/entry.rb +0 -36
- data/sub/eac_config/lib/eac_config/yaml_file_node.rb +0 -47
- data/sub/eac_config/lib/eac_config.rb +0 -7
- data/sub/eac_config/spec/lib/eac_config/entry_path_spec.rb +0 -30
- data/sub/eac_config/spec/lib/eac_config/envvars_node/entry_spec.rb +0 -14
- data/sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb +0 -40
- data/sub/eac_config/spec/lib/eac_config/old_configs_spec.rb +0 -46
- data/sub/eac_config/spec/lib/eac_config/paths_hash_spec.rb +0 -88
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec.rb +0 -52
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml +0 -6
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml +0 -2
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml +0 -2
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml +0 -4
- data/sub/eac_config/spec/rubocop_spec.rb +0 -3
- data/sub/eac_config/spec/spec_helper.rb +0 -4
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/struct'
|
4
|
-
require 'eac_config/yaml_file_node'
|
5
|
-
|
6
|
-
RSpec.describe ::EacConfig::YamlFileNode do
|
7
|
-
storages = %w[1 1_1 1_2 1_2_1].map do |suffix|
|
8
|
-
key = "storage#{suffix}"
|
9
|
-
subpath = "#{key}.yaml"
|
10
|
-
subpath = "storage1_2/#{subpath}" if suffix == '1_2_1'
|
11
|
-
::EacRubyUtils::Struct.new(suffix: suffix, key: key, subpath: subpath.to_pathname)
|
12
|
-
end
|
13
|
-
|
14
|
-
let(:fixtures_dir) { ::Pathname.new(__dir__).join('yaml_file_node_spec_files') }
|
15
|
-
let(:target_dir) { temp_copy(fixtures_dir) }
|
16
|
-
let(:yaml_file_path) do
|
17
|
-
r = target_dir.join('storage1.yaml')
|
18
|
-
r.write(r.read.gsub('%%STORAGE1_2_ABSOLUTE_PATH%%',
|
19
|
-
target_dir.join('storage1_2.yaml').expand_path.to_path))
|
20
|
-
r
|
21
|
-
end
|
22
|
-
let(:instance) { described_class.new(yaml_file_path) }
|
23
|
-
|
24
|
-
context 'with common entry' do
|
25
|
-
let(:entry) { instance.entry('common') }
|
26
|
-
|
27
|
-
it { expect(entry.value).to eq('AAA') }
|
28
|
-
it { expect(entry.found_node).to eq(instance) }
|
29
|
-
it { expect(entry).to be_found }
|
30
|
-
end
|
31
|
-
|
32
|
-
storages.each do |storage|
|
33
|
-
context "with entry in loaded path \"#{storage.subpath}\"" do
|
34
|
-
let(:entry) { instance.entry(storage.key) }
|
35
|
-
let(:storage_node) { described_class.new(target_dir.join(storage.subpath)) }
|
36
|
-
|
37
|
-
it { expect(entry).to be_a(::EacConfig::Entry) }
|
38
|
-
it { expect(entry).to be_found }
|
39
|
-
it { expect(entry.value).to eq(storage.key) }
|
40
|
-
it { expect(entry.found_node.url).to eq(storage_node.url) }
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
context 'with not existing entry' do
|
45
|
-
let(:entry) { instance.entry('no_exist') }
|
46
|
-
|
47
|
-
it { expect(entry).to be_a(::EacConfig::Entry) }
|
48
|
-
it { expect(entry.value).to eq(nil) }
|
49
|
-
it { expect(entry.found_node).to eq(nil) }
|
50
|
-
it { expect(entry).not_to be_found }
|
51
|
-
end
|
52
|
-
end
|