chef 16.0.257-universal-mingw32 → 16.0.275-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +30 -16
  3. data/chef.gemspec +1 -1
  4. data/lib/chef/knife/environment_compare.rb +1 -1
  5. data/lib/chef/knife/list.rb +1 -1
  6. data/lib/chef/knife/supermarket_install.rb +1 -1
  7. data/lib/chef/knife/yaml_convert.rb +2 -2
  8. data/lib/chef/provider/execute.rb +1 -1
  9. data/lib/chef/provider/package/freebsd/base.rb +2 -1
  10. data/lib/chef/provider/package/homebrew.rb +1 -1
  11. data/lib/chef/provider/package/macports.rb +0 -2
  12. data/lib/chef/provider/package/windows.rb +26 -51
  13. data/lib/chef/provider/user/dscl.rb +1 -1
  14. data/lib/chef/resource/alternatives.rb +65 -4
  15. data/lib/chef/resource/apt_package.rb +31 -2
  16. data/lib/chef/resource/apt_preference.rb +34 -5
  17. data/lib/chef/resource/apt_repository.rb +22 -15
  18. data/lib/chef/resource/apt_update.rb +6 -4
  19. data/lib/chef/resource/archive_file.rb +5 -4
  20. data/lib/chef/resource/bash.rb +1 -1
  21. data/lib/chef/resource/batch.rb +1 -1
  22. data/lib/chef/resource/bff_package.rb +1 -1
  23. data/lib/chef/resource/breakpoint.rb +1 -1
  24. data/lib/chef/resource/build_essential.rb +8 -4
  25. data/lib/chef/resource/cab_package.rb +1 -1
  26. data/lib/chef/resource/chef_client_cron.rb +12 -9
  27. data/lib/chef/resource/chef_client_scheduled_task.rb +9 -6
  28. data/lib/chef/resource/chef_client_systemd_timer.rb +10 -7
  29. data/lib/chef/resource/chef_gem.rb +6 -2
  30. data/lib/chef/resource/chef_handler.rb +1 -1
  31. data/lib/chef/resource/chef_sleep.rb +7 -4
  32. data/lib/chef/resource/chef_vault_secret.rb +3 -3
  33. data/lib/chef/resource/chocolatey_config.rb +5 -3
  34. data/lib/chef/resource/chocolatey_feature.rb +5 -3
  35. data/lib/chef/resource/chocolatey_package.rb +5 -3
  36. data/lib/chef/resource/chocolatey_source.rb +5 -3
  37. data/lib/chef/resource/cookbook_file.rb +3 -2
  38. data/lib/chef/resource/cron.rb +15 -15
  39. data/lib/chef/resource/cron_access.rb +7 -4
  40. data/lib/chef/resource/cron_d.rb +37 -23
  41. data/lib/chef/resource/csh.rb +1 -1
  42. data/lib/chef/resource/directory.rb +1 -1
  43. data/lib/chef/resource/dmg_package.rb +18 -15
  44. data/lib/chef/resource/dnf_package.rb +1 -1
  45. data/lib/chef/resource/dpkg_package.rb +1 -1
  46. data/lib/chef/resource/execute.rb +2 -2
  47. data/lib/chef/resource/file.rb +5 -4
  48. data/lib/chef/resource/freebsd_package.rb +1 -1
  49. data/lib/chef/resource/gem_package.rb +6 -6
  50. data/lib/chef/resource/group.rb +1 -1
  51. data/lib/chef/resource/homebrew_cask.rb +1 -1
  52. data/lib/chef/resource/homebrew_package.rb +1 -1
  53. data/lib/chef/resource/homebrew_tap.rb +1 -1
  54. data/lib/chef/resource/hostname.rb +4 -4
  55. data/lib/chef/resource/http_request.rb +1 -1
  56. data/lib/chef/resource/ifconfig.rb +7 -7
  57. data/lib/chef/resource/ips_package.rb +1 -1
  58. data/lib/chef/resource/kernel_module.rb +1 -1
  59. data/lib/chef/resource/ksh.rb +1 -1
  60. data/lib/chef/resource/launchd.rb +1 -1
  61. data/lib/chef/resource/link.rb +4 -4
  62. data/lib/chef/resource/locale.rb +1 -1
  63. data/lib/chef/resource/log.rb +1 -1
  64. data/lib/chef/resource/macos_userdefaults.rb +1 -1
  65. data/lib/chef/resource/macosx_service.rb +1 -1
  66. data/lib/chef/resource/macports_package.rb +1 -1
  67. data/lib/chef/resource/mdadm.rb +1 -1
  68. data/lib/chef/resource/mount.rb +1 -1
  69. data/lib/chef/resource/msu_package.rb +1 -1
  70. data/lib/chef/resource/ohai.rb +1 -1
  71. data/lib/chef/resource/ohai_hint.rb +1 -1
  72. data/lib/chef/resource/openbsd_package.rb +1 -1
  73. data/lib/chef/resource/openssl_dhparam.rb +1 -1
  74. data/lib/chef/resource/openssl_ec_private_key.rb +1 -1
  75. data/lib/chef/resource/openssl_ec_public_key.rb +1 -1
  76. data/lib/chef/resource/openssl_rsa_private_key.rb +1 -1
  77. data/lib/chef/resource/openssl_rsa_public_key.rb +1 -1
  78. data/lib/chef/resource/openssl_x509_certificate.rb +1 -1
  79. data/lib/chef/resource/openssl_x509_crl.rb +1 -1
  80. data/lib/chef/resource/openssl_x509_request.rb +1 -1
  81. data/lib/chef/resource/osx_profile.rb +1 -1
  82. data/lib/chef/resource/package.rb +1 -1
  83. data/lib/chef/resource/pacman_package.rb +1 -1
  84. data/lib/chef/resource/paludis_package.rb +1 -1
  85. data/lib/chef/resource/perl.rb +1 -1
  86. data/lib/chef/resource/plist.rb +1 -1
  87. data/lib/chef/resource/portage_package.rb +1 -1
  88. data/lib/chef/resource/powershell_package.rb +1 -1
  89. data/lib/chef/resource/powershell_package_source.rb +1 -1
  90. data/lib/chef/resource/powershell_script.rb +1 -1
  91. data/lib/chef/resource/python.rb +1 -1
  92. data/lib/chef/resource/reboot.rb +1 -1
  93. data/lib/chef/resource/registry_key.rb +1 -1
  94. data/lib/chef/resource/remote_directory.rb +1 -1
  95. data/lib/chef/resource/remote_file.rb +1 -2
  96. data/lib/chef/resource/rhsm_errata.rb +1 -3
  97. data/lib/chef/resource/rhsm_errata_level.rb +1 -1
  98. data/lib/chef/resource/rhsm_register.rb +1 -2
  99. data/lib/chef/resource/rhsm_repo.rb +1 -2
  100. data/lib/chef/resource/rhsm_subscription.rb +1 -3
  101. data/lib/chef/resource/route.rb +1 -1
  102. data/lib/chef/resource/rpm_package.rb +5 -2
  103. data/lib/chef/resource/ruby.rb +1 -1
  104. data/lib/chef/resource/ruby_block.rb +1 -4
  105. data/lib/chef/resource/scm/_scm.rb +4 -3
  106. data/lib/chef/resource/scm/git.rb +1 -1
  107. data/lib/chef/resource/scm/subversion.rb +2 -2
  108. data/lib/chef/resource/script.rb +1 -1
  109. data/lib/chef/resource/service.rb +1 -1
  110. data/lib/chef/resource/smartos_package.rb +1 -1
  111. data/lib/chef/resource/snap_package.rb +1 -1
  112. data/lib/chef/resource/solaris_package.rb +1 -1
  113. data/lib/chef/resource/ssh_known_hosts_entry.rb +1 -1
  114. data/lib/chef/resource/sudo.rb +4 -4
  115. data/lib/chef/resource/swap_file.rb +2 -2
  116. data/lib/chef/resource/sysctl.rb +61 -2
  117. data/lib/chef/resource/systemd_unit.rb +2 -2
  118. data/lib/chef/resource/timezone.rb +1 -1
  119. data/lib/chef/resource/user.rb +2 -2
  120. data/lib/chef/resource/user_ulimit.rb +24 -22
  121. data/lib/chef/resource/windows_ad_join.rb +1 -1
  122. data/lib/chef/resource/windows_auto_run.rb +2 -2
  123. data/lib/chef/resource/windows_certificate.rb +1 -1
  124. data/lib/chef/resource/windows_dfs_folder.rb +1 -1
  125. data/lib/chef/resource/windows_dfs_namespace.rb +1 -1
  126. data/lib/chef/resource/windows_dfs_server.rb +1 -1
  127. data/lib/chef/resource/windows_env.rb +10 -1
  128. data/lib/chef/resource/windows_feature.rb +57 -2
  129. data/lib/chef/resource/windows_feature_dism.rb +15 -2
  130. data/lib/chef/resource/windows_feature_powershell.rb +29 -2
  131. data/lib/chef/resource/windows_firewall_rule.rb +9 -5
  132. data/lib/chef/resource/windows_font.rb +10 -1
  133. data/lib/chef/resource/windows_package.rb +63 -3
  134. data/lib/chef/resource/windows_pagefile.rb +30 -2
  135. data/lib/chef/resource/windows_path.rb +18 -1
  136. data/lib/chef/resource/windows_printer.rb +25 -5
  137. data/lib/chef/resource/windows_printer_port.rb +29 -1
  138. data/lib/chef/resource/windows_security_policy.rb +1 -1
  139. data/lib/chef/resource/windows_service.rb +1 -1
  140. data/lib/chef/resource/windows_share.rb +21 -1
  141. data/lib/chef/resource/windows_shortcut.rb +13 -2
  142. data/lib/chef/resource/windows_task.rb +122 -8
  143. data/lib/chef/resource/windows_uac.rb +20 -1
  144. data/lib/chef/resource/windows_workgroup.rb +19 -3
  145. data/lib/chef/resource/yum_package.rb +88 -6
  146. data/lib/chef/resource/yum_repository.rb +28 -11
  147. data/lib/chef/resource/zypper_package.rb +29 -3
  148. data/lib/chef/resource/zypper_repository.rb +17 -5
  149. data/lib/chef/resource_inspector.rb +1 -1
  150. data/lib/chef/scan_access_control.rb +1 -1
  151. data/lib/chef/version.rb +1 -1
  152. data/spec/functional/resource/link_spec.rb +3 -3
  153. data/spec/functional/resource/remote_file_spec.rb +1 -1
  154. data/spec/integration/knife/raw_spec.rb +4 -4
  155. data/spec/integration/knife/redirection_spec.rb +2 -2
  156. data/spec/support/platform_helpers.rb +0 -13
  157. data/spec/support/shared/functional/http.rb +2 -2
  158. data/spec/support/shared/unit/mock_shellout.rb +1 -1
  159. data/spec/unit/file_access_control_spec.rb +1 -1
  160. data/spec/unit/mixin/shell_out_spec.rb +25 -31
  161. data/spec/unit/provider/apt_repository_spec.rb +27 -27
  162. data/spec/unit/provider/zypper_repository_spec.rb +17 -17
  163. data/spec/unit/provider_resolver_spec.rb +2 -2
  164. metadata +10 -10
@@ -25,8 +25,8 @@ describe "redirection", :workstation do
25
25
  include IntegrationSupport
26
26
  include KnifeSupport
27
27
 
28
- def start_tiny_server(real_chef_server_url, server_opts = {})
29
- @server = TinyServer::Manager.new(server_opts)
28
+ def start_tiny_server(real_chef_server_url, **server_opts)
29
+ @server = TinyServer::Manager.new(**server_opts)
30
30
  @server.start
31
31
  @api = TinyServer::API.instance
32
32
  @api.clear
@@ -95,19 +95,6 @@ def windows_user_right?(right)
95
95
  Chef::ReservedNames::Win32::Security.get_account_right(ENV["USERNAME"]).include?(right)
96
96
  end
97
97
 
98
- def mac_osx_106?
99
- if File.exists? "/usr/bin/sw_vers"
100
- result = ShellHelpers.shell_out("/usr/bin/sw_vers")
101
- result.stdout.each_line do |line|
102
- if line =~ /^ProductVersion:\s10.6.*$/
103
- return true
104
- end
105
- end
106
- end
107
-
108
- false
109
- end
110
-
111
98
  def mac_osx_1014?
112
99
  if mac_osx?
113
100
  ver = Chef::Version.new(ohai[:platform_version])
@@ -35,11 +35,11 @@ module ChefHTTPShared
35
35
  content
36
36
  end
37
37
 
38
- def start_tiny_server(server_opts = {})
38
+ def start_tiny_server(**server_opts)
39
39
  nyan_uncompressed_size = File::Stat.new(nyan_uncompressed_filename).size
40
40
  nyan_compressed_size = File::Stat.new(nyan_compressed_filename).size
41
41
 
42
- @server = TinyServer::Manager.new(server_opts)
42
+ @server = TinyServer::Manager.new(**server_opts)
43
43
  @server.start
44
44
  @api = TinyServer::API.instance
45
45
  @api.clear
@@ -23,7 +23,7 @@
23
23
  class MockShellout
24
24
  module RSpec
25
25
  def mock_shellout_command(command, **result)
26
- allow(::Mixlib::ShellOut).to receive(:new).with(command, anything).and_return MockShellout.new(result)
26
+ allow(::Mixlib::ShellOut).to receive(:new).with(command, anything).and_return MockShellout.new(**result)
27
27
  end
28
28
  end
29
29
 
@@ -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
@@ -57,42 +57,40 @@ describe Chef::Mixin::ShellOut do
57
57
  describe "and environment is an option" do
58
58
  it "should not change environment language settings when they are set to nil" do
59
59
  options = { environment: { "LC_ALL" => nil, "LANGUAGE" => nil, "LANG" => nil, env_path => nil } }
60
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, options).and_return(retobj)
61
- shell_out_obj.send(method, cmd, options)
60
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, **options).and_return(retobj)
61
+ shell_out_obj.send(method, cmd, **options)
62
62
  end
63
63
 
64
64
  it "should not change environment language settings when they are set to non-nil" do
65
65
  options = { environment: { "LC_ALL" => "en_US.UTF-8", "LANGUAGE" => "en_US.UTF-8", "LANG" => "en_US.UTF-8", env_path => "foo:bar:baz" } }
66
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, options).and_return(retobj)
67
- shell_out_obj.send(method, cmd, options)
66
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, **options).and_return(retobj)
67
+ shell_out_obj.send(method, cmd, **options)
68
68
  end
69
69
 
70
70
  it "should set environment language settings to the configured internal locale when they are not present" do
71
71
  options = { environment: { "HOME" => "/Users/morty" } }
72
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
72
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd,
73
73
  environment: {
74
74
  "HOME" => "/Users/morty",
75
75
  "LC_ALL" => Chef::Config[:internal_locale],
76
76
  "LANG" => Chef::Config[:internal_locale],
77
77
  "LANGUAGE" => Chef::Config[:internal_locale],
78
78
  env_path => sanitized_path,
79
- },
80
- }).and_return(retobj)
81
- shell_out_obj.send(method, cmd, options)
79
+ }).and_return(retobj)
80
+ shell_out_obj.send(method, cmd, **options)
82
81
  end
83
82
 
84
83
  it "should not mutate the options hash when it adds language settings" do
85
84
  options = { environment: { "HOME" => "/Users/morty" } }
86
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
85
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd,
87
86
  environment: {
88
87
  "HOME" => "/Users/morty",
89
88
  "LC_ALL" => Chef::Config[:internal_locale],
90
89
  "LANG" => Chef::Config[:internal_locale],
91
90
  "LANGUAGE" => Chef::Config[:internal_locale],
92
91
  env_path => sanitized_path,
93
- },
94
- }).and_return(retobj)
95
- shell_out_obj.send(method, cmd, options)
92
+ }).and_return(retobj)
93
+ shell_out_obj.send(method, cmd, **options)
96
94
  expect(options[:environment].key?("LC_ALL")).to be false
97
95
  end
98
96
  end
@@ -100,42 +98,40 @@ describe Chef::Mixin::ShellOut do
100
98
  describe "and env is an option" do
101
99
  it "should not change env when langauge options are set to nil" do
102
100
  options = { env: { "LC_ALL" => nil, "LANG" => nil, "LANGUAGE" => nil, env_path => nil } }
103
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, options).and_return(retobj)
104
- shell_out_obj.send(method, cmd, options)
101
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, **options).and_return(retobj)
102
+ shell_out_obj.send(method, cmd, **options)
105
103
  end
106
104
 
107
105
  it "should not change env when language options are set to non-nil" do
108
106
  options = { env: { "LC_ALL" => "de_DE.UTF-8", "LANG" => "de_DE.UTF-8", "LANGUAGE" => "de_DE.UTF-8", env_path => "foo:bar:baz" } }
109
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, options).and_return(retobj)
110
- shell_out_obj.send(method, cmd, options)
107
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, **options).and_return(retobj)
108
+ shell_out_obj.send(method, cmd, **options)
111
109
  end
112
110
 
113
111
  it "should set environment language settings to the configured internal locale when they are not present" do
114
112
  options = { env: { "HOME" => "/Users/morty" } }
115
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
113
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd,
116
114
  env: {
117
115
  "HOME" => "/Users/morty",
118
116
  "LC_ALL" => Chef::Config[:internal_locale],
119
117
  "LANG" => Chef::Config[:internal_locale],
120
118
  "LANGUAGE" => Chef::Config[:internal_locale],
121
119
  env_path => sanitized_path,
122
- },
123
- }).and_return(retobj)
124
- shell_out_obj.send(method, cmd, options)
120
+ }).and_return(retobj)
121
+ shell_out_obj.send(method, cmd, **options)
125
122
  end
126
123
 
127
124
  it "should not mutate the options hash when it adds language settings" do
128
125
  options = { env: { "HOME" => "/Users/morty" } }
129
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
126
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd,
130
127
  env: {
131
128
  "HOME" => "/Users/morty",
132
129
  "LC_ALL" => Chef::Config[:internal_locale],
133
130
  "LANG" => Chef::Config[:internal_locale],
134
131
  "LANGUAGE" => Chef::Config[:internal_locale],
135
132
  env_path => sanitized_path,
136
- },
137
- }).and_return(retobj)
138
- shell_out_obj.send(method, cmd, options)
133
+ }).and_return(retobj)
134
+ shell_out_obj.send(method, cmd, **options)
139
135
  expect(options[:env].key?("LC_ALL")).to be false
140
136
  end
141
137
  end
@@ -143,30 +139,28 @@ describe Chef::Mixin::ShellOut do
143
139
  describe "and no env/environment option is present" do
144
140
  it "should set environment language settings to the configured internal locale" do
145
141
  options = { user: "morty" }
146
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
142
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd,
147
143
  user: "morty",
148
144
  environment: {
149
145
  "LC_ALL" => Chef::Config[:internal_locale],
150
146
  "LANG" => Chef::Config[:internal_locale],
151
147
  "LANGUAGE" => Chef::Config[:internal_locale],
152
148
  env_path => sanitized_path,
153
- },
154
- }).and_return(retobj)
155
- shell_out_obj.send(method, cmd, options)
149
+ }).and_return(retobj)
150
+ shell_out_obj.send(method, cmd, **options)
156
151
  end
157
152
  end
158
153
  end
159
154
 
160
155
  describe "when the last argument is not a Hash" do
161
156
  it "should set environment language settings to the configured internal locale" do
162
- expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
157
+ expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd,
163
158
  environment: {
164
159
  "LC_ALL" => Chef::Config[:internal_locale],
165
160
  "LANG" => Chef::Config[:internal_locale],
166
161
  "LANGUAGE" => Chef::Config[:internal_locale],
167
162
  env_path => sanitized_path,
168
- },
169
- }).and_return(retobj)
163
+ }).and_return(retobj)
170
164
  shell_out_obj.send(method, cmd)
171
165
  end
172
166
  end
@@ -18,33 +18,33 @@
18
18
 
19
19
  require "spec_helper"
20
20
 
21
- # Now we are using the option --with-colons that works across old os versions
22
- # as well as the latest (16.10). This for both `apt-key` and `gpg` commands
23
- #
24
- # Output of the command:
25
- # => apt-key adv --list-public-keys --with-fingerprint --with-colons
26
- APT_KEY_FINGER = <<~EOF.freeze
27
- tru:t:1:1488924856:0:3:1:5
28
- pub:-:1024:17:40976EAF437D05B5:2004-09-12:::-:Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>::scESC:
29
- fpr:::::::::630239CC130E1A7FD81A27B140976EAF437D05B5:
30
- sub:-:2048:16:251BEFF479164387:2004-09-12::::::e:
31
- pub:-:1024:17:46181433FBB75451:2004-12-30:::-:Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>::scSC:
32
- fpr:::::::::C5986B4F1257FFA86632CBA746181433FBB75451:
33
- pub:-:4096:1:3B4FE6ACC0B21F32:2012-05-11:::-:Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>::scSC:
34
- fpr:::::::::790BC7277767219C42C86F933B4FE6ACC0B21F32:
35
- pub:-:4096:1:D94AA3F0EFE21092:2012-05-11:::-:Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>::scSC:
36
- fpr:::::::::843938DF228D22F7B3742BC0D94AA3F0EFE21092:
37
- EOF
38
-
39
- # Output of the command:
40
- # => gpg --with-fingerprint --with-colons [FILE]
41
- GPG_FINGER = <<~EOF.freeze
42
- pub:-:1024:17:327574EE02A818DD:2009-04-22:::-:Cloudera Apt Repository:
43
- fpr:::::::::F36A89E33CC1BD0F71079007327574EE02A818DD:
44
- sub:-:2048:16:84080586D1CA74A1:2009-04-22::::
45
- EOF
46
-
47
21
  describe "Chef::Provider::AptRepository" do
22
+ # Now we are using the option --with-colons that works across old os versions
23
+ # as well as the latest (16.10). This for both `apt-key` and `gpg` commands
24
+ #
25
+ # Output of the command:
26
+ # => apt-key adv --list-public-keys --with-fingerprint --with-colons
27
+ APT_KEY_FINGER = <<~EOF.freeze
28
+ tru:t:1:1488924856:0:3:1:5
29
+ pub:-:1024:17:40976EAF437D05B5:2004-09-12:::-:Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>::scESC:
30
+ fpr:::::::::630239CC130E1A7FD81A27B140976EAF437D05B5:
31
+ sub:-:2048:16:251BEFF479164387:2004-09-12::::::e:
32
+ pub:-:1024:17:46181433FBB75451:2004-12-30:::-:Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>::scSC:
33
+ fpr:::::::::C5986B4F1257FFA86632CBA746181433FBB75451:
34
+ pub:-:4096:1:3B4FE6ACC0B21F32:2012-05-11:::-:Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>::scSC:
35
+ fpr:::::::::790BC7277767219C42C86F933B4FE6ACC0B21F32:
36
+ pub:-:4096:1:D94AA3F0EFE21092:2012-05-11:::-:Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>::scSC:
37
+ fpr:::::::::843938DF228D22F7B3742BC0D94AA3F0EFE21092:
38
+ EOF
39
+
40
+ # Output of the command:
41
+ # => gpg --with-fingerprint --with-colons [FILE]
42
+ APG_GPG_FINGER = <<~EOF.freeze
43
+ pub:-:1024:17:327574EE02A818DD:2009-04-22:::-:Cloudera Apt Repository:
44
+ fpr:::::::::F36A89E33CC1BD0F71079007327574EE02A818DD:
45
+ sub:-:2048:16:84080586D1CA74A1:2009-04-22::::
46
+ EOF
47
+
48
48
  let(:node) { Chef::Node.new }
49
49
  let(:events) { Chef::EventDispatch::Dispatcher.new }
50
50
  let(:run_context) { Chef::RunContext.new(node, {}, events) }
@@ -61,7 +61,7 @@ describe "Chef::Provider::AptRepository" do
61
61
  end
62
62
 
63
63
  let(:gpg_finger) do
64
- double("shell_out", stdout: GPG_FINGER, exitstatus: 0, error?: false)
64
+ double("shell_out", stdout: APG_GPG_FINGER, exitstatus: 0, error?: false)
65
65
  end
66
66
 
67
67
  let(:gpg_shell_out_success) do
@@ -18,22 +18,22 @@
18
18
 
19
19
  require "spec_helper"
20
20
 
21
- # Output of the command:
22
- # => rpm -qa gpg-pubkey*
23
- RPM_KEYS = <<~EOF.freeze
24
- gpg-pubkey-307e3d54-4be01a65
25
- gpg-pubkey-3dbdc284-53674dd4
26
- EOF
27
-
28
- # Output of the command:
29
- # => gpg --with-fingerprint [FILE]
30
- GPG_FINGER = <<~EOF.freeze
31
- pub 2048R/3DBDC284 2011-08-19 [expires: 2024-06-14]
32
- Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
33
- uid nginx signing key <signing-key@nginx.com>
34
- EOF
35
-
36
21
  describe Chef::Provider::ZypperRepository do
22
+ # Output of the command:
23
+ # => rpm -qa gpg-pubkey*
24
+ ZYPPER_RPM_KEYS = <<~EOF.freeze
25
+ gpg-pubkey-307e3d54-4be01a65
26
+ gpg-pubkey-3dbdc284-53674dd4
27
+ EOF
28
+
29
+ # Output of the command:
30
+ # => gpg --with-fingerprint [FILE]
31
+ ZYPPER_GPG_FINGER = <<~EOF.freeze
32
+ pub 2048R/3DBDC284 2011-08-19 [expires: 2024-06-14]
33
+ Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
34
+ uid nginx signing key <signing-key@nginx.com>
35
+ EOF
36
+
37
37
  let(:new_resource) { Chef::Resource::ZypperRepository.new("Nginx Repository") }
38
38
  let(:logger) { double("Mixlib::Log::Child").as_null_object }
39
39
  let(:provider) do
@@ -45,11 +45,11 @@ describe Chef::Provider::ZypperRepository do
45
45
  end
46
46
 
47
47
  let(:rpm_key_finger) do
48
- double("shell_out", stdout: RPM_KEYS, exitstatus: 0, error?: false)
48
+ double("shell_out", stdout: ZYPPER_RPM_KEYS, exitstatus: 0, error?: false)
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
@@ -874,8 +874,8 @@ describe Chef::ProviderResolver do
874
874
  end
875
875
  # If there is no filter, we're as deep as we need to go
876
876
  unless filter
877
- on_platform test.delete(:platform), test do
878
- expect_providers(expected)
877
+ on_platform test.delete(:platform), **test do
878
+ expect_providers(**expected)
879
879
  end
880
880
  end
881
881
  end
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: 16.0.257
4
+ version: 16.0.275
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-04-27 00:00:00.000000000 Z
11
+ date: 2020-05-05 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: 16.0.257
19
+ version: 16.0.275
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: 16.0.257
26
+ version: 16.0.275
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: 16.0.257
33
+ version: 16.0.275
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: 16.0.257
40
+ version: 16.0.275
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -318,16 +318,16 @@ dependencies:
318
318
  name: bcrypt_pbkdf
319
319
  requirement: !ruby/object:Gem::Requirement
320
320
  requirements:
321
- - - "~>"
321
+ - - '='
322
322
  - !ruby/object:Gem::Version
323
- version: '1.0'
323
+ version: 1.1.0.rc1
324
324
  type: :runtime
325
325
  prerelease: false
326
326
  version_requirements: !ruby/object:Gem::Requirement
327
327
  requirements:
328
- - - "~>"
328
+ - - '='
329
329
  - !ruby/object:Gem::Version
330
- version: '1.0'
330
+ version: 1.1.0.rc1
331
331
  - !ruby/object:Gem::Dependency
332
332
  name: highline
333
333
  requirement: !ruby/object:Gem::Requirement