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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ac2dc8e897b518ae3ff7c683d486380fa6cf76ad835a718e01436f4dbc4571d
4
- data.tar.gz: 7dbefbb66b1912343c4e2e5b529828dea1f1d5165fea20e390ede6de4d7ea3d7
3
+ metadata.gz: f42b32f6fdf720e0c6896de2e624ea4072b9bd5f25ae4f9bedcd9cbae53c466e
4
+ data.tar.gz: a626301154320dec9a1fa48bf1b3f7e8ac69886eb1df02328209090d78d0a93c
5
5
  SHA512:
6
- metadata.gz: 5048086be008f75628f187fc588a804a41ac6903f97d8ea60f3ca07e930d823e24d5193a14fbccde27b6a8ff2e328417e2a8cc2bd45960f268031557ac5cd566
7
- data.tar.gz: 9fe7946dcb40890a213fba6fab0af3bda15456e00b277f1eb578f69ec6f62d45c0fced3139ea61afadfe491b8bf504ed526ab36ff5298aac29ec75c2798280a4
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
- ::EacRubyUtils::Fs::Temp.on_file do |file|
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacConfig
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
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.6.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 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable