rspec-puppet 2.3.1 → 2.3.2

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
  SHA1:
3
- metadata.gz: 37a6de12d38ce6c99a1bd99a3292d3f5d34e2724
4
- data.tar.gz: 929a90de8b45f893e3394c9cf668dfb832856b67
3
+ metadata.gz: 320021848da7cb4b21717e49b02ce505a6d507a9
4
+ data.tar.gz: 132dc40418a858f94d097a9342bfdfc108cb7976
5
5
  SHA512:
6
- metadata.gz: a080e6059982a35b4387b2be636486352091638def20248111e2fe08c606feed03a751156aa19cfd4af31054dde72f9f4d2233eab4bd03e146a3bc2cf7bd706a
7
- data.tar.gz: 21f51c2cfc8f04adc464d53660860dcb8eab1beb4d9ec250a16a0e3d7df1269f52f4dc06b39d2e7ed9c631453842307e5d7b06c9645416ba190f4ec42aa47ff7
6
+ metadata.gz: 3819322db7dbab18f6e943c21345aa26584bb7a2916aade4894b73af8e1a99a10cab204faf20ef6b31a26247845af3366872a4402d64acd89c3b3297f8ac0dac
7
+ data.tar.gz: d564f7fc7f190f224f89a4ca4496e3892dc555dc067070a9f943bfa2601d78069979f05985b876eb94cf055125cb27bd75a6bb96cc849339c1787d9eff829cf0
@@ -2,6 +2,10 @@
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.3.2]
6
+
7
+ Properly fix yesterday's issue by unsharing the cache key before passing the data to puppet. This also contains a new test matrix to avoid missing a half-baked fix like yesterday.
8
+
5
9
  ## [2.3.1]
6
10
 
7
11
  A quick workaround to re-enable testing with the recently released puppet 3.8.5 and the soon to be released puppet 4.3.2. See PUP-5743 for the gritty details. Upgrade to this version if you hit the "undefined method \`resource' for nil:NilClass" error.
@@ -92,6 +96,8 @@ Thanks to Adrien Thebo, Alex Harvey, Brian, Dan Bode, Dominic Cleal, Javier Pala
92
96
  For changelog of versions 1.0.1 and earlier, see http://rspec-puppet.com/changelog/
93
97
 
94
98
  [2.x]: https://github.com/rodjek/rspec-puppet/compare/v2.3.0...master
99
+ [2.3.2]: https://github.com/rodjek/rspec-puppet/compare/v2.3.1...v2.3.2
100
+ [2.3.1]: https://github.com/rodjek/rspec-puppet/compare/v2.3.0...v2.3.1
95
101
  [2.3.0]: https://github.com/rodjek/rspec-puppet/compare/v2.2.0...v2.3.0
96
102
  [2.2.0]: https://github.com/rodjek/rspec-puppet/compare/v2.1.0...v2.2.0
97
103
  [2.1.0]: https://github.com/rodjek/rspec-puppet/compare/v2.0.1...v2.1.0
@@ -11,13 +11,15 @@ module RSpec::Puppet
11
11
  end
12
12
 
13
13
  def get(*args, &blk)
14
- if !@cache.has_key? args
15
- @cache[args] = (blk || @default_proc).call(*args)
16
- @lra << args
14
+ # decouple the hash key from whatever the blk might do to it
15
+ key = Marshal.load(Marshal.dump(args))
16
+ if !@cache.has_key? key
17
+ @cache[key] = (blk || @default_proc).call(*args)
18
+ @lra << key
17
19
  expire!
18
20
  end
19
21
 
20
- @cache[args]
22
+ @cache[key]
21
23
  end
22
24
 
23
25
  private
@@ -9,18 +9,7 @@ module RSpec::Puppet
9
9
  end
10
10
 
11
11
  def environment
12
- # unfreeze PUPPETVERSION because of https://github.com/bundler/bundler/issues/3187
13
- ver = Gem::Version.new("#{Puppet::PUPPETVERSION}")
14
- # Since applying a fix for PUP-5522 (puppet 3.8.5 and 4.3.2) puppet symbolizes environment names
15
- # internally. The catalog cache needs to assume that the facts and other args do not change between
16
- # runs, so we have to mirror this here. Puppet versions before the change require a string as environment
17
- # name, or they fail with "Unsupported data type: 'Symbol' on node xyz"
18
- # See https://github.com/rodjek/rspec-puppet/pull/354 and PUP-5743 for discussion of this
19
- if (Gem::Version.new('3.8.5') <= ver && ver < Gem::Version.new('4.0.0')) || Gem::Version.new('4.3.2') <= ver
20
- :rp_env
21
- else
22
- 'rp_env'
23
- end
12
+ 'rp_env'
24
13
  end
25
14
 
26
15
  def load_catalogue(type)
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.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Sharpe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec