rspec-puppet 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fedfa152ac9857ea6c8546a70342cf148c3f89e9
4
- data.tar.gz: ed8fbef4a778aae5e62f2726333013b6a7ebdcf9
3
+ metadata.gz: 1b281ece69d4cace3c52f168407b4908346ba8a0
4
+ data.tar.gz: 9283c5b26b51922083be60949279b67b5596e4b4
5
5
  SHA512:
6
- metadata.gz: ab88d6b0992c638114272cdfd820a0be3a50e5cfa118ec07b5f39f52a5d4c4b657b9bf9c40a83d1a7cb805bf7d5241e95c1e5dfe3e12910709b5144824ad97f9
7
- data.tar.gz: a5a51096595b4074a91626363e01158f14724e9907e2569a5a801e1acfde5d21de9a1be06d6c664d80dbfb1ec87fba0193f0a541f7e49e91fec880dc4c4a390a
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
@@ -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
- (result_facts['networking'] ||= {}).merge!(networking_facts)
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.2
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-03 00:00:00.000000000 Z
11
+ date: 2017-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec