rspec-puppet 2.7.5 → 2.7.10

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: e33fa5eda2bf9349af429c677c62cd0c3456bbb81c77cf8ecaf03a1a4af31a14
4
- data.tar.gz: b7693cd9f85ba31b5c952d75c0afd04fdfe1f9670221d9379eadcb16870b4bc3
3
+ metadata.gz: 38af21b6f0c4e9fcfeb90c063d299c725fd80d63e6d74b44d0a6e6f937f6d955
4
+ data.tar.gz: 977523988ad9525e31c461040c33894e1cbd79c9180252f9521f8b8172ac111b
5
5
  SHA512:
6
- metadata.gz: c277a6e3f6c6271e0d7e301a8dc973d77d7c8805101f64487e875bbb60e47ce791948c567a72dd57fc837ef8467fc9c043d14980f848a7d561772ece677c1115
7
- data.tar.gz: 386013fdab15bb3299e83d0a22504cf3d80c7dc5c0c1bc74233a5e8b3973f8f70f60d7f813405fb2013d1077297cb10cf4f23bdfd632f503e8b9380fb4144b2b
6
+ metadata.gz: e8145ad0c55a4c52f7032f67ea2f73dc7fb72f162c32214e8b3e5aa5bd69efe1bd0ded6c2e36cff165e2e8f51734e0f94017c74f07ad0ce3b1bbeca90463ad34
7
+ data.tar.gz: 149c839eb092309b0e3bb1be2c0887aed4dc0ebe8fb9ea2b4b5b562a797df8b39800486e24e181dc7d44abdddbe94bc9938978e0d5862e35fa73581203475545
@@ -2,6 +2,35 @@
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.7.10]
6
+
7
+ ### Fixed
8
+ * Fix issues with removal of `default_env` method in Puppet 6.17.0.
9
+
10
+ ## [2.7.9]
11
+
12
+ This release had unintended breaking changes and was withdrawn.
13
+
14
+ ## [2.7.8]
15
+
16
+ ### Fixed
17
+ * Fix cross-platform testing for Puppet >= 6.9.0 when there is no `ipaddress6`
18
+ fact defined.
19
+
20
+ ## [2.7.7]
21
+
22
+ ### Fixed
23
+ * Fix the support for rspec-expectations >= 3.8.5.
24
+
25
+ ### Changed
26
+ * Remove the rspec-expectations dependency limit introduced in 2.7.6.
27
+
28
+ ## [2.7.6]
29
+
30
+ ### Changed
31
+ * Limit rspec-expectations dependency to < 3.8.5 due to an incompatible
32
+ change.
33
+
5
34
  ## [2.7.5]
6
35
 
7
36
  ### Fixed
@@ -6,3 +6,4 @@ require 'rspec-puppet/matchers/count_generic'
6
6
  require 'rspec-puppet/matchers/dynamic_matchers'
7
7
  require 'rspec-puppet/matchers/type_matchers'
8
8
  require 'rspec-puppet/matchers/allow_value'
9
+ require 'rspec-puppet/matchers/raise_error'
@@ -34,6 +34,14 @@ module RSpec::Puppet
34
34
  def failure_message_when_negated
35
35
  "expected that the type alias would not " + description + " but it does"
36
36
  end
37
+
38
+ def supports_block_expectations
39
+ true
40
+ end
41
+
42
+ def supports_value_expectations
43
+ true
44
+ end
37
45
  end
38
46
 
39
47
  def allow_value(*values)
@@ -78,6 +78,14 @@ module RSpec::Puppet
78
78
  end
79
79
  end
80
80
 
81
+ def supports_block_expectations
82
+ true
83
+ end
84
+
85
+ def supports_value_expectations
86
+ true
87
+ end
88
+
81
89
  private
82
90
  def missing_dependencies?
83
91
  retval = false
@@ -61,6 +61,14 @@ module RSpec::Puppet
61
61
  "expected that the catalogue would not " + description + " but it does"
62
62
  end
63
63
 
64
+ def supports_block_expectations
65
+ true
66
+ end
67
+
68
+ def supports_value_expectations
69
+ true
70
+ end
71
+
64
72
  private
65
73
 
66
74
  def referenced_type(type)
@@ -177,6 +177,14 @@ module RSpec::Puppet
177
177
  true
178
178
  end
179
179
 
180
+ def supports_block_expectations
181
+ true
182
+ end
183
+
184
+ def supports_value_expectations
185
+ true
186
+ end
187
+
180
188
  def expected
181
189
  @errors.map {|e| e.expected if e.respond_to?(:expected)}.compact.join("\n\n")
182
190
  end
@@ -22,6 +22,13 @@ module RSpec::Puppet
22
22
  end
23
23
  end
24
24
 
25
+ def supports_block_expectations
26
+ true
27
+ end
28
+
29
+ def supports_value_expectations
30
+ true
31
+ end
25
32
  end
26
33
 
27
34
  end
@@ -0,0 +1,23 @@
1
+ module RSpec::Puppet
2
+ module GenericMatchers
3
+ # Due to significant code base depending on the
4
+ #
5
+ # is_expected.to raise_error Puppet::Error
6
+ #
7
+ # syntax, and removal of this syntax from RSpec, extend RSpec's built-in
8
+ # `raise_error` matcher to accept a value target, e.g. a subject defined
9
+ # as a lambda, e.g.:
10
+ #
11
+ # subject(:catalogue) { lambda { load_catalogue } }
12
+ #
13
+ class RaiseError < RSpec::Matchers::BuiltIn::RaiseError
14
+ def supports_value_expectations?
15
+ true
16
+ end
17
+ end
18
+
19
+ def raise_error(*args, &block)
20
+ RaiseError.new(*args, &block)
21
+ end
22
+ end
23
+ end
@@ -104,6 +104,14 @@ module RSpec::Puppet
104
104
  end
105
105
  end
106
106
 
107
+ def supports_block_expectations
108
+ true
109
+ end
110
+
111
+ def supports_value_expectations
112
+ true
113
+ end
114
+
107
115
  private
108
116
  def func_name
109
117
  @func_obj.func_name
@@ -132,6 +132,16 @@ module Puppet
132
132
  end
133
133
 
134
134
  module Util
135
+ # Fix for removal of default_env function
136
+ # Bug: https://github.com/rodjek/rspec-puppet/issues/796
137
+ # Upstream: https://github.com/puppetlabs/puppet/commit/94df3c1a3992d89b2d7d5db8a70373c135bdd86b
138
+ if !respond_to?(:default_env)
139
+ def default_env()
140
+ DEFAULT_ENV
141
+ end
142
+ module_function :default_env
143
+ end
144
+
135
145
  if respond_to?(:get_env)
136
146
  alias :old_get_env :get_env
137
147
  module_function :old_get_env
@@ -4,6 +4,8 @@ require 'rspec-puppet/raw_string'
4
4
 
5
5
  module RSpec::Puppet
6
6
  module Support
7
+ include GenericMatchers
8
+
7
9
  @@cache = RSpec::Puppet::Cache.new
8
10
 
9
11
  def subject
@@ -224,10 +226,11 @@ module RSpec::Puppet
224
226
  }
225
227
 
226
228
  node_facts = {
227
- 'hostname' => node.split('.').first,
228
- 'fqdn' => node,
229
- 'domain' => node.split('.', 2).last,
230
- 'clientcert' => node,
229
+ 'hostname' => node.split('.').first,
230
+ 'fqdn' => node,
231
+ 'domain' => node.split('.', 2).last,
232
+ 'clientcert' => node,
233
+ 'ipaddress6' => 'FE80:0000:0000:0000:AAAA:AAAA:AAAA',
231
234
  }
232
235
 
233
236
  networking_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.7.5
4
+ version: 2.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Sharpe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-06 00:00:00.000000000 Z
11
+ date: 2020-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -57,6 +57,7 @@ files:
57
57
  - lib/rspec-puppet/matchers/dynamic_matchers.rb
58
58
  - lib/rspec-puppet/matchers/include_class.rb
59
59
  - lib/rspec-puppet/matchers/parameter_matcher.rb
60
+ - lib/rspec-puppet/matchers/raise_error.rb
60
61
  - lib/rspec-puppet/matchers/run.rb
61
62
  - lib/rspec-puppet/matchers/type_matchers.rb
62
63
  - lib/rspec-puppet/monkey_patches.rb
@@ -88,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
89
  - !ruby/object:Gem::Version
89
90
  version: '0'
90
91
  requirements: []
91
- rubyforge_project:
92
- rubygems_version: 2.7.6.2
92
+ rubygems_version: 3.0.3
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: RSpec tests for your Puppet manifests