eac_config 0.5.3 → 0.6.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: 7f130e01595ad39a2e0b0f6fb1ece9f21f8d61eaaa434746837478d60e825dc5
4
- data.tar.gz: 660bed3f2ed1991fba8be9818e05f0263df90190c6c857695ba02b2283630e60
3
+ metadata.gz: 8ac2dc8e897b518ae3ff7c683d486380fa6cf76ad835a718e01436f4dbc4571d
4
+ data.tar.gz: 7dbefbb66b1912343c4e2e5b529828dea1f1d5165fea20e390ede6de4d7ea3d7
5
5
  SHA512:
6
- metadata.gz: f0cdc6364af4f758d3cb3c94b10bdadbc2124cfc1a0c2990e119be4df95b90c70ffd1d09fb17bc5ee4f5726b09499361b3f8f82d4f6b6544f7d8f58e8e38ff45
7
- data.tar.gz: 58c59eecee35069c78de153071a281f6e04914a12b3948b67b35e57b861cb101f8f419126c5c3c27432ef4ca055a8b509ec7d96bc9c030cfc08cf80bd8cd9a54
6
+ metadata.gz: 5048086be008f75628f187fc588a804a41ac6903f97d8ea60f3ca07e930d823e24d5193a14fbccde27b6a8ff2e328417e2a8cc2bd45960f268031557ac5cd566
7
+ data.tar.gz: 9fe7946dcb40890a213fba6fab0af3bda15456e00b277f1eb578f69ec6f62d45c0fced3139ea61afadfe491b8bf504ed526ab36ff5298aac29ec75c2798280a4
@@ -1,7 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
+ require 'eac_ruby_utils/fs/temp'
4
5
  require 'eac_config/envvars_node'
6
+ require 'eac_config/node'
7
+ require 'eac_config/yaml_file_node'
5
8
 
6
9
  module EacConfig
7
10
  module Rspec
@@ -25,6 +28,22 @@ module EacConfig
25
28
  def envvars_load_path_entry
26
29
  ::EacConfig::EnvvarsNode.new.load_path.entry
27
30
  end
31
+
32
+ def stub_eac_config_node(&node_builder)
33
+ parent_self = self
34
+ rspec_config.around do |example|
35
+ ::EacRubyUtils::Fs::Temp.on_file do |file|
36
+ ::EacConfig::Node
37
+ .context.on(parent_self.stub_eac_config_node_build(file, &node_builder)) do
38
+ example.run
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+ def stub_eac_config_node_build(file, &node_builder)
45
+ node_builder.present? ? node_builder.call(file) : ::EacConfig::YamlFileNode.new(file)
46
+ end
28
47
  end
29
48
  end
30
49
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacConfig
4
- VERSION = '0.5.3'
4
+ VERSION = '0.6.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.5.3
4
+ version: 0.6.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-06 00:00:00.000000000 Z
11
+ date: 2021-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable