eac_config 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_config/rspec/setup.rb +11 -3
- data/lib/eac_config/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42b32f6fdf720e0c6896de2e624ea4072b9bd5f25ae4f9bedcd9cbae53c466e
|
4
|
+
data.tar.gz: a626301154320dec9a1fa48bf1b3f7e8ac69886eb1df02328209090d78d0a93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fd767d65396eb954b750d919a47da556d6e99983a306b18d01ee51c19c94bd04c0ff508ffea69a03163919695e55f05a32108a794114352304c113b1e05c051
|
7
|
+
data.tar.gz: 6081fa3c82b0713fc21674512522092e0e13c2eb8c7c0d9a6546476b0acab476cf004a65a61866156099218fd8c4b1a62b8f74c2b8c08ce51f647ae59e1d192e
|
@@ -29,10 +29,10 @@ module EacConfig
|
|
29
29
|
::EacConfig::EnvvarsNode.new.load_path.entry
|
30
30
|
end
|
31
31
|
|
32
|
-
def stub_eac_config_node(&node_builder)
|
32
|
+
def stub_eac_config_node(target_example = nil, target_file = nil, &node_builder)
|
33
33
|
parent_self = self
|
34
|
-
rspec_config.around do |example|
|
35
|
-
|
34
|
+
(target_example || rspec_config).around do |example|
|
35
|
+
parent_self.stub_eac_config_node_on_file(target_file) do |file|
|
36
36
|
::EacConfig::Node
|
37
37
|
.context.on(parent_self.stub_eac_config_node_build(file, &node_builder)) do
|
38
38
|
example.run
|
@@ -44,6 +44,14 @@ module EacConfig
|
|
44
44
|
def stub_eac_config_node_build(file, &node_builder)
|
45
45
|
node_builder.present? ? node_builder.call(file) : ::EacConfig::YamlFileNode.new(file)
|
46
46
|
end
|
47
|
+
|
48
|
+
def stub_eac_config_node_on_file(target_file)
|
49
|
+
if target_file
|
50
|
+
yield(target_file.to_pathname)
|
51
|
+
else
|
52
|
+
::EacRubyUtils::Fs::Temp.on_file { |file| yield(file) }
|
53
|
+
end
|
54
|
+
end
|
47
55
|
end
|
48
56
|
end
|
49
57
|
end
|
data/lib/eac_config/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
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: 2021-12-
|
11
|
+
date: 2021-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|