chef 15.11.3-universal-mingw32 → 15.11.8-universal-mingw32

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: 32721068c57f85e60f139ce990019e7b67ef0ac2f07c5affa62646d7af48a3c8
4
- data.tar.gz: 8a13f1eba9bee7cbaeee4011503fdfd15edee8c2f7e51a9f482cf5f241e886f1
3
+ metadata.gz: c2901561acd0b7abc61196f12812c177b5ac2a6c41e7b90b0261f86d72215cae
4
+ data.tar.gz: c17d27c283cc290e915b88a8ab3d4778342e03bf05a4587e4853d9432a89ec55
5
5
  SHA512:
6
- metadata.gz: 6204fdc0edf0494abbf9d85adeee887e94f95c000eefabd28e09edcca52c676279b86d1f7eed9c8b1874ff089210848354543378de2396639791a062e985d626
7
- data.tar.gz: 020463f4c2ea7a362b9f4fd4152c9d093318fd99ed0aa304873bc9ab5c7cde7b4c58a3331a59eb42fbc6a89142cd73a6e94ec8b464862c6c350353f55e212498
6
+ metadata.gz: bc360f04704971ace8f920c2c4f292cf618f197cd6203cc845f75c7f6dfa345e203937d5d603f224938ef0e91f9949f860b2a78dda5e39154d9f8f4ddc5cd096
7
+ data.tar.gz: 3e982bc5c23ad7f9a393a7b7d8cdd2188e8e3f49c9f5335c50dc85065c64289207fc0989f86ffa158b1b9174b48910d22b6a2bfdd18fc96dd1173c2fed341884
@@ -1108,7 +1108,8 @@ class Chef
1108
1108
  # These keys are available in Chef::Config, and are prefixed with the protocol name.
1109
1109
  # For example, :user CLI option will map to :winrm_user and :ssh_user Chef::Config keys,
1110
1110
  # based on the connection protocol in use.
1111
- def knife_key_for_protocol(protocol, option)
1111
+ def knife_key_for_protocol(new_option, option = nil)
1112
+ option = new_option if option.nil? # hacky compat with both old Chef-15 style and new Chef-16 style API signature
1112
1113
  "#{connection_protocol}_#{option}".to_sym
1113
1114
  end
1114
1115
 
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("../..", __FILE__)
26
- VERSION = Chef::VersionString.new("15.11.3")
26
+ VERSION = Chef::VersionString.new("15.11.8")
27
27
  end
28
28
 
29
29
  #
@@ -25,9 +25,10 @@ module Shell
25
25
  end
26
26
 
27
27
  $LOAD_PATH.unshift File.expand_path("../..", __FILE__)
28
-
28
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
29
29
  $LOAD_PATH.unshift File.expand_path("../../chef-config/lib", __FILE__)
30
30
  $LOAD_PATH.unshift File.expand_path("../../chef-utils/lib", __FILE__)
31
+ $LOAD_PATH.unshift File.dirname(__FILE__)
31
32
 
32
33
  require "rubygems"
33
34
  require "rspec/mocks"
@@ -103,6 +104,12 @@ resource_priority_map ||= nil
103
104
  provider_handler_map ||= nil
104
105
  resource_handler_map ||= nil
105
106
 
107
+ class UnexpectedSystemExit < RuntimeError
108
+ def self.from(system_exit)
109
+ new(system_exit.message).tap { |e| e.set_backtrace(system_exit.backtrace) }
110
+ end
111
+ end
112
+
106
113
  RSpec.configure do |config|
107
114
  config.include(Matchers)
108
115
  config.include(MockShellout::RSpec)
@@ -282,6 +289,15 @@ RSpec.configure do |config|
282
289
  config.before(:suite) do
283
290
  ARGV.clear
284
291
  end
292
+
293
+ # Protect Rspec from accidental exit(0) causing rspec to terminate without error
294
+ config.around(:example) do |ex|
295
+ begin
296
+ ex.run
297
+ rescue SystemExit => e
298
+ raise UnexpectedSystemExit.from(e)
299
+ end
300
+ end
285
301
  end
286
302
 
287
303
  require "webrick/utils"
@@ -27,7 +27,7 @@ Chef::Log.level(Chef::Config.log_level)
27
27
  Chef::Config.solo(false)
28
28
 
29
29
  def sha256_checksum(path)
30
- OpenSSL::Digest::SHA256.hexdigest(File.read(path))
30
+ OpenSSL::Digest.hexdigest("SHA256", File.read(path))
31
31
  end
32
32
 
33
33
  # extracted from Ruby < 2.5 to return a unique temp file name without creating it
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require File.expand_path("../../spec_helper", __FILE__)
18
+ require_relative "../spec_helper"
19
19
  require "chef/data_collector"
20
20
  require "socket"
21
21
 
@@ -93,7 +93,7 @@ describe Chef::FileAccessControl do
93
93
  end
94
94
 
95
95
  it "wraps uids to their negative complements to correctly handle negative uids" do
96
- # More: Mac OS X (at least) has negative UIDs for 'nobody' and some other
96
+ # More: macOS (at least) has negative UIDs for 'nobody' and some other
97
97
  # users. Ruby doesn't believe in negative UIDs so you get the diminished radix
98
98
  # complement (i.e., it wraps around the maximum size of C unsigned int) of these
99
99
  # uids. So we have to get ruby and negative uids to smoke the peace pipe
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path("../../spec_helper", __FILE__)
19
+ require_relative "../spec_helper"
20
20
  require "chef/json_compat"
21
21
 
22
22
  describe Chef::JSONCompat do
@@ -38,7 +38,7 @@ EOF
38
38
 
39
39
  # Output of the command:
40
40
  # => gpg --with-fingerprint --with-colons [FILE]
41
- GPG_FINGER = <<~EOF.freeze
41
+ APT_GPG_FINGER = <<~EOF.freeze
42
42
  pub:-:1024:17:327574EE02A818DD:2009-04-22:::-:Cloudera Apt Repository:
43
43
  fpr:::::::::F36A89E33CC1BD0F71079007327574EE02A818DD:
44
44
  sub:-:2048:16:84080586D1CA74A1:2009-04-22::::
@@ -63,7 +63,7 @@ describe Chef::Provider::AptRepository do
63
63
  end
64
64
 
65
65
  let(:gpg_finger) do
66
- double("shell_out", stdout: GPG_FINGER, exitstatus: 0, error?: false)
66
+ double("shell_out", stdout: APT_GPG_FINGER, exitstatus: 0, error?: false)
67
67
  end
68
68
 
69
69
  let(:gpg_shell_out_success) do
@@ -27,7 +27,7 @@ EOF
27
27
 
28
28
  # Output of the command:
29
29
  # => gpg --with-fingerprint [FILE]
30
- GPG_FINGER = <<~EOF.freeze
30
+ ZYPPER_GPG_FINGER = <<~EOF.freeze
31
31
  pub 2048R/3DBDC284 2011-08-19 [expires: 2024-06-14]
32
32
  Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
33
33
  uid nginx signing key <signing-key@nginx.com>
@@ -49,7 +49,7 @@ describe Chef::Provider::ZypperRepository do
49
49
  end
50
50
 
51
51
  let(:gpg_finger) do
52
- double("shell_out", stdout: GPG_FINGER, exitstatus: 0, error?: false)
52
+ double("shell_out", stdout: ZYPPER_GPG_FINGER, exitstatus: 0, error?: false)
53
53
  end
54
54
 
55
55
  it "responds to load_current_resource" do
@@ -19,7 +19,7 @@
19
19
  # limitations under the License.
20
20
  #
21
21
 
22
- require File.expand_path("../../spec_helper", __FILE__)
22
+ require_relative "../spec_helper"
23
23
  require "chef/resource_reporter"
24
24
  require "socket"
25
25
 
@@ -15,7 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
- require File.expand_path("../../spec_helper", __FILE__)
18
+ require_relative "../spec_helper"
19
19
  require "chef/client"
20
20
 
21
21
  describe Chef::RunLock do
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require File.expand_path("../../spec_helper", __FILE__)
18
+ require_relative "../spec_helper"
19
19
  require "chef/scan_access_control"
20
20
 
21
21
  describe Chef::ScanAccessControl do
@@ -41,39 +41,31 @@ begin
41
41
 
42
42
  task spec: :component_specs
43
43
 
44
- desc "Run standard specs (minus long running specs)"
44
+ desc "Run all specs in spec directory"
45
45
  RSpec::Core::RakeTask.new(:spec) do |t|
46
+ t.verbose = false
46
47
  t.rspec_opts = %w{--profile}
47
- # right now this just limits to functional + unit, but could also remove
48
- # individual tests marked long-running
49
48
  t.pattern = FileList["spec/**/*_spec.rb"]
50
49
  end
51
50
 
52
51
  namespace :spec do
53
- desc "Run all specs in spec directory with RCov"
54
- RSpec::Core::RakeTask.new(:rcov) do |t|
55
- t.rspec_opts = %w{--profile}
56
- t.pattern = FileList["spec/**/*_spec.rb"]
57
- t.rcov = true
58
- t.rcov_opts = lambda do
59
- IO.readlines("#{CHEF_ROOT}/spec/rcov.opts").map { |l| l.chomp.split " " }.flatten
60
- end
61
- end
62
-
63
52
  desc "Run all specs in spec directory"
64
53
  RSpec::Core::RakeTask.new(:all) do |t|
54
+ t.verbose = false
65
55
  t.rspec_opts = %w{--profile}
66
56
  t.pattern = FileList["spec/**/*_spec.rb"]
67
57
  end
68
58
 
69
59
  desc "Print Specdoc for all specs"
70
60
  RSpec::Core::RakeTask.new(:doc) do |t|
61
+ t.verbose = false
71
62
  t.rspec_opts = %w{--format specdoc --dry-run --profile}
72
63
  t.pattern = FileList["spec/**/*_spec.rb"]
73
64
  end
74
65
 
75
66
  desc "Run the specs under spec/unit with activesupport loaded"
76
67
  RSpec::Core::RakeTask.new(:activesupport) do |t|
68
+ t.verbose = false
77
69
  t.rspec_opts = %w{--require active_support/core_ext --profile}
78
70
  # Only node_spec and role_spec specifically have issues, target those tests
79
71
  t.pattern = FileList["spec/unit/node_spec.rb", "spec/unit/role_spec.rb"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.11.3
4
+ version: 15.11.8
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-22 00:00:00.000000000 Z
11
+ date: 2020-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 15.11.3
19
+ version: 15.11.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 15.11.3
26
+ version: 15.11.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chef-utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 15.11.3
33
+ version: 15.11.8
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 15.11.3
40
+ version: 15.11.8
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement