rspec-puppet 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/rspec-puppet/support.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b281ece69d4cace3c52f168407b4908346ba8a0
|
4
|
+
data.tar.gz: 9283c5b26b51922083be60949279b67b5596e4b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3f49d510e15dd345dc15c8cca0a7c23642f70fe6f8efef15763a1846cc46a004d65097435715086db7a65c203a6862269d4fde4bd6d9e1321ef18caa586b623
|
7
|
+
data.tar.gz: ba1bb977bf0f91a1d0478bd5631abea1b3893c5d38ba80e4b146f95c549cee704ed3cae184f38caa388f91459f9aba5d9d65410437a773bc3a9fc1732c09b952
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
All notable changes to this project will be documented in this file. This
|
3
3
|
project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [2.6.3]
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* Facts derived from the node name now only get merged on top of the facts
|
10
|
+
specified by `RSpec.configuration.default_facts` and `let(:facts)` if the
|
11
|
+
node name has been manually specified with `let(:node)`.
|
12
|
+
|
5
13
|
## [2.6.2]
|
6
14
|
|
7
15
|
### Changed
|
data/lib/rspec-puppet/support.rb
CHANGED
@@ -228,11 +228,21 @@ module RSpec::Puppet
|
|
228
228
|
{}
|
229
229
|
end
|
230
230
|
|
231
|
+
# Merge in node facts so they always exist by default, but only if they
|
232
|
+
# haven't been defined in `RSpec.configuration.default_facts`
|
233
|
+
result_facts.merge!(munge_facts(node_facts)) { |_key, old_val, new_val| old_val.nil? ? new_val : old_val }
|
234
|
+
(result_facts['networking'] ||= {}).merge!(networking_facts) { |_key, old_val, new_val| old_val.nil? ? new_val : old_val }
|
235
|
+
|
236
|
+
# Merge in `let(:facts)` facts
|
231
237
|
result_facts.merge!(munge_facts(base_facts))
|
232
238
|
result_facts.merge!(munge_facts(facts)) if self.respond_to?(:facts)
|
233
|
-
result_facts.merge!(munge_facts(node_facts))
|
234
239
|
|
235
|
-
|
240
|
+
# Merge node facts again on top of `let(:facts)` facts, but only if
|
241
|
+
# a node name is given with `let(:node)`
|
242
|
+
if respond_to?(:node)
|
243
|
+
result_facts.merge!(munge_facts(node_facts))
|
244
|
+
(result_facts['networking'] ||= {}).merge!(networking_facts)
|
245
|
+
end
|
236
246
|
|
237
247
|
# Facter currently supports lower case facts. Bug FACT-777 has been submitted to support case sensitive
|
238
248
|
# facts.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Sharpe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|