chef 15.7.32-universal-mingw32 → 15.8.23-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/chef-universal-mingw32.gemspec +1 -1
  3. data/lib/chef/dsl/declare_resource.rb +9 -9
  4. data/lib/chef/knife/client_key_create.rb +4 -1
  5. data/lib/chef/knife/client_key_delete.rb +4 -1
  6. data/lib/chef/knife/client_key_edit.rb +4 -1
  7. data/lib/chef/knife/client_key_list.rb +4 -1
  8. data/lib/chef/knife/client_key_show.rb +4 -1
  9. data/lib/chef/knife/config_list_profiles.rb +4 -1
  10. data/lib/chef/knife/config_use_profile.rb +4 -2
  11. data/lib/chef/knife/configure.rb +1 -1
  12. data/lib/chef/knife/cookbook_upload.rb +3 -6
  13. data/lib/chef/knife/data_bag_from_file.rb +1 -1
  14. data/lib/chef/knife/exec.rb +4 -1
  15. data/lib/chef/knife/raw.rb +0 -1
  16. data/lib/chef/knife/rehash.rb +4 -1
  17. data/lib/chef/knife/search.rb +1 -1
  18. data/lib/chef/knife/ssh.rb +3 -3
  19. data/lib/chef/knife/ssl_check.rb +1 -1
  20. data/lib/chef/knife/ssl_fetch.rb +1 -1
  21. data/lib/chef/knife/supermarket_install.rb +1 -1
  22. data/lib/chef/knife/user_key_create.rb +4 -1
  23. data/lib/chef/knife/user_key_delete.rb +4 -1
  24. data/lib/chef/knife/user_key_edit.rb +4 -1
  25. data/lib/chef/knife/user_key_list.rb +4 -1
  26. data/lib/chef/knife/user_key_show.rb +4 -1
  27. data/lib/chef/node/attribute.rb +3 -1
  28. data/lib/chef/node/common_api.rb +3 -1
  29. data/lib/chef/provider/ifconfig.rb +13 -4
  30. data/lib/chef/provider/user/mac.rb +53 -9
  31. data/lib/chef/resource/notify_group.rb +70 -0
  32. data/lib/chef/resource/sysctl.rb +26 -2
  33. data/lib/chef/resource/user/mac_user.rb +4 -1
  34. data/lib/chef/resource/windows_task.rb +2 -1
  35. data/lib/chef/resources.rb +2 -1
  36. data/lib/chef/search/query.rb +1 -1
  37. data/lib/chef/shell.rb +4 -5
  38. data/lib/chef/shell/ext.rb +3 -5
  39. data/lib/chef/version.rb +1 -1
  40. data/spec/unit/cookbook_uploader_spec.rb +1 -0
  41. data/spec/unit/knife/cookbook_upload_spec.rb +2 -2
  42. data/spec/unit/provider/ifconfig_spec.rb +43 -14
  43. data/spec/unit/resource/notify_group_spec.rb +34 -0
  44. data/spec/unit/resource/sysctl_spec.rb +23 -1
  45. data/spec/unit/search/query_spec.rb +8 -1
  46. metadata +10 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a01732ccd6ccd4ee0e24d13d7c4d498ef806753f0c1678dea6675a16157dc695
4
- data.tar.gz: cd86a925bab8bd09c3baf8e5164fe449602aeeb733e1456f85b877de80f29580
3
+ metadata.gz: e39ae27c2d7728c9088a216d1c3ce11575a6d2e02a77a2a489fee40fb2d728bf
4
+ data.tar.gz: 8dcf877fc5b474c19a1ed509b9f281beee9a78d89aca9baae5c57811e19355ed
5
5
  SHA512:
6
- metadata.gz: 2ac015160f9c4c567e42166fb441e3ace747cc8490a47b16d54b523f600525641f2e3bf24b6d85a4351a4dcc3ecccd17e70f1301312393067ea079e57af7ff2c
7
- data.tar.gz: e1123f5fc5ba3f2b459cafe2f829aac2d7220896c04674324a8015837b615a722c87c0862ac52f8947d7c17376db741ea0e110fb4f6793f9526c8312a821487d
6
+ metadata.gz: 000e1c6d1f52160ce6bffa144e2f2ae94aabbe7d72aa189222ee7c5e7be2e445bad02765d919eaa7eca55ff957782b11b24844952cdcf74e0ad1538ac561c80f
7
+ data.tar.gz: 7721fae6454f09db2fdcc5e8c1de0cb86a1041e3b33789e81bcf4dfd54bb20fdbd4988d3974114a070ca01eaefcb993fdf08f20bb741230662efb6ab086d55e9
@@ -11,7 +11,7 @@ gemspec.add_dependency "win32-eventlog", "0.6.3"
11
11
  gemspec.add_dependency "win32-mmap", "~> 0.4.1"
12
12
  gemspec.add_dependency "win32-mutex", "~> 0.4.2"
13
13
  gemspec.add_dependency "win32-process", "~> 0.8.2"
14
- gemspec.add_dependency "win32-service", ">= 2.1.2", "< 3.0"
14
+ gemspec.add_dependency "win32-service", ">= 2.1.5", "< 3.0"
15
15
  gemspec.add_dependency "wmi-lite", "~> 1.0"
16
16
  gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
17
17
  gemspec.add_dependency "iso8601", "~> 0.12.1"
@@ -69,7 +69,7 @@ class Chef
69
69
  # @return [Chef::Resource] The resource
70
70
  #
71
71
  # @example
72
- # delete_resource!(:template, '/x/y.txy')
72
+ # delete_resource!(:template, '/x/y.txt')
73
73
  #
74
74
  def delete_resource!(type, name, run_context: self.run_context)
75
75
  run_context.resource_collection.delete("#{type}[#{name}]").tap do |resource|
@@ -93,7 +93,7 @@ class Chef
93
93
  # @return [Chef::Resource] The resource
94
94
  #
95
95
  # @example
96
- # delete_resource(:template, '/x/y.txy')
96
+ # delete_resource(:template, '/x/y.txt')
97
97
  #
98
98
  def delete_resource(type, name, run_context: self.run_context)
99
99
  delete_resource!(type, name, run_context: run_context)
@@ -114,7 +114,7 @@ class Chef
114
114
  # @return [Chef::Resource] The updated resource
115
115
  #
116
116
  # @example
117
- # edit_resource!(:template, '/x/y.txy') do
117
+ # edit_resource!(:template, '/x/y.txt') do
118
118
  # cookbook_name: cookbook_name
119
119
  # end
120
120
  #
@@ -147,8 +147,8 @@ class Chef
147
147
  # @return [Chef::Resource] The updated or created resource
148
148
  #
149
149
  # @example
150
- # resource = edit_resource(:template, '/x/y.txy') do
151
- # source "y.txy.erb"
150
+ # resource = edit_resource(:template, '/x/y.txt') do
151
+ # source "y.txt.erb"
152
152
  # variables {}
153
153
  # end
154
154
  # resource.variables.merge!({ home: "/home/klowns" })
@@ -199,7 +199,7 @@ class Chef
199
199
  # @return [Chef::Resource] The updated resource
200
200
  #
201
201
  # @example
202
- # resource = find_resource!(:template, '/x/y.txy')
202
+ # resource = find_resource!(:template, '/x/y.txt')
203
203
  #
204
204
  def find_resource!(type, name, run_context: self.run_context)
205
205
  raise ArgumentError, "find_resource! does not take a block" if block_given?
@@ -219,7 +219,7 @@ class Chef
219
219
  # @return [Chef::Resource] The updated resource
220
220
  #
221
221
  # @example
222
- # if ( find_resource(:template, '/x/y.txy') )
222
+ # if ( find_resource(:template, '/x/y.txt') )
223
223
  # # do something
224
224
  # else
225
225
  # # don't worry about the error
@@ -259,7 +259,7 @@ class Chef
259
259
  # @return [Chef::Resource] The new resource.
260
260
  #
261
261
  # @example
262
- # declare_resource(:file, '/x/y.txy', caller[0]) do
262
+ # declare_resource(:file, '/x/y.txt', caller[0]) do
263
263
  # action :delete
264
264
  # end
265
265
  # # Equivalent to
@@ -293,7 +293,7 @@ class Chef
293
293
  # @return [Chef::Resource] The new resource.
294
294
  #
295
295
  # @example
296
- # build_resource(:file, '/x/y.txy', caller[0]) do
296
+ # build_resource(:file, '/x/y.txt', caller[0]) do
297
297
  # action :delete
298
298
  # end
299
299
  #
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "key_create"
21
20
  require_relative "key_create_base"
22
21
 
23
22
  class Chef
@@ -33,6 +32,10 @@ class Chef
33
32
 
34
33
  banner "knife client key create CLIENT (options)"
35
34
 
35
+ deps do
36
+ require_relative "key_create"
37
+ end
38
+
36
39
  attr_reader :actor
37
40
 
38
41
  def initialize(argv = [])
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "key_delete"
21
20
 
22
21
  class Chef
23
22
  class Knife
@@ -30,6 +29,10 @@ class Chef
30
29
  class ClientKeyDelete < Knife
31
30
  banner "knife client key delete CLIENT KEYNAME (options)"
32
31
 
32
+ deps do
33
+ require_relative "key_delete"
34
+ end
35
+
33
36
  attr_reader :actor
34
37
 
35
38
  def initialize(argv = [])
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "key_edit"
21
20
  require_relative "key_edit_base"
22
21
 
23
22
  class Chef
@@ -33,6 +32,10 @@ class Chef
33
32
 
34
33
  banner "knife client key edit CLIENT KEYNAME (options)"
35
34
 
35
+ deps do
36
+ require_relative "key_edit"
37
+ end
38
+
36
39
  attr_reader :actor
37
40
 
38
41
  def initialize(argv = [])
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "key_list"
21
20
  require_relative "key_list_base"
22
21
 
23
22
  class Chef
@@ -33,6 +32,10 @@ class Chef
33
32
 
34
33
  banner "knife client key list CLIENT (options)"
35
34
 
35
+ deps do
36
+ require_relative "key_list"
37
+ end
38
+
36
39
  attr_reader :actor
37
40
 
38
41
  def initialize(argv = [])
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "key_show"
21
20
 
22
21
  class Chef
23
22
  class Knife
@@ -30,6 +29,10 @@ class Chef
30
29
  class ClientKeyShow < Knife
31
30
  banner "knife client key show CLIENT KEYNAME (options)"
32
31
 
32
+ deps do
33
+ require_relative "key_show"
34
+ end
35
+
33
36
  attr_reader :actor
34
37
 
35
38
  def initialize(argv = [])
@@ -16,13 +16,16 @@
16
16
  #
17
17
 
18
18
  require_relative "../knife"
19
- require_relative "../workstation_config_loader"
20
19
 
21
20
  class Chef
22
21
  class Knife
23
22
  class ConfigListProfiles < Knife
24
23
  banner "knife config list-profiles (options)"
25
24
 
25
+ deps do
26
+ require_relative "../workstation_config_loader"
27
+ end
28
+
26
29
  option :ignore_knife_rb,
27
30
  short: "-i",
28
31
  long: "--ignore-knife-rb",
@@ -15,8 +15,6 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require "fileutils" unless defined?(FileUtils)
19
-
20
18
  require_relative "../knife"
21
19
 
22
20
  class Chef
@@ -24,6 +22,10 @@ class Chef
24
22
  class ConfigUseProfile < Knife
25
23
  banner "knife config use-profile PROFILE"
26
24
 
25
+ deps do
26
+ require "fileutils" unless defined?(FileUtils)
27
+ end
28
+
27
29
  # Disable normal config loading since this shouldn't fail if the profile
28
30
  # doesn't exist of the config is otherwise corrupted.
29
31
  def configure_chef
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "../util/path_helper"
21
20
  require_relative "../dist"
22
21
 
23
22
  class Chef
@@ -27,6 +26,7 @@ class Chef
27
26
  attr_reader :chef_repo, :new_client_key, :validation_client_name, :validation_key
28
27
 
29
28
  deps do
29
+ require_relative "../util/path_helper"
30
30
  require "ohai" unless defined?(Ohai::System)
31
31
  Chef::Knife::ClientCreate.load_deps
32
32
  Chef::Knife::UserCreate.load_deps
@@ -19,19 +19,16 @@
19
19
  #
20
20
 
21
21
  require_relative "../knife"
22
- require_relative "../cookbook_uploader"
23
- require_relative "../mixin/file_class"
24
22
 
25
23
  class Chef
26
24
  class Knife
27
25
  class CookbookUpload < Knife
28
-
29
- include Chef::Mixin::FileClass
30
-
31
26
  CHECKSUM = "checksum".freeze
32
27
  MATCH_CHECKSUM = /[0-9a-f]{32,}/.freeze
33
28
 
34
29
  deps do
30
+ require_relative "../mixin/file_class"
31
+ include Chef::Mixin::FileClass
35
32
  require_relative "../exceptions"
36
33
  require_relative "../cookbook_loader"
37
34
  require_relative "../cookbook_uploader"
@@ -111,7 +108,7 @@ class Chef
111
108
 
112
109
  if cookbooks.empty?
113
110
  cookbook_path = config[:cookbook_path].respond_to?(:join) ? config[:cookbook_path].join(", ") : config[:cookbook_path]
114
- ui.warn("Could not find any cookbooks in your cookbook path: #{cookbook_path}. Use --cookbook-path to specify the desired path.")
111
+ ui.warn("Could not find any cookbooks in your cookbook path: '#{File.expand_path(cookbook_path)}'. Use --cookbook-path to specify the desired path.")
115
112
  else
116
113
  begin
117
114
  tmp_cl = Chef::CookbookLoader.copy_to_tmp_dir_from_array(cookbooks)
@@ -18,7 +18,6 @@
18
18
  #
19
19
 
20
20
  require_relative "../knife"
21
- require_relative "../util/path_helper"
22
21
  require_relative "data_bag_secret_options"
23
22
 
24
23
  class Chef
@@ -27,6 +26,7 @@ class Chef
27
26
  include DataBagSecretOptions
28
27
 
29
28
  deps do
29
+ require_relative "../util/path_helper"
30
30
  require_relative "../data_bag"
31
31
  require_relative "../data_bag_item"
32
32
  require_relative "core/object_loader"
@@ -17,13 +17,16 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "../util/path_helper"
21
20
  require_relative "../dist"
22
21
 
23
22
  class Chef::Knife::Exec < Chef::Knife
24
23
 
25
24
  banner "knife exec [SCRIPT] (options)"
26
25
 
26
+ deps do
27
+ require_relative "../util/path_helper"
28
+ end
29
+
27
30
  option :exec,
28
31
  short: "-E CODE",
29
32
  long: "--exec CODE",
@@ -15,7 +15,6 @@
15
15
  #
16
16
 
17
17
  require_relative "../knife"
18
- require_relative "../http"
19
18
 
20
19
  class Chef
21
20
  class Knife
@@ -17,13 +17,16 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "core/subcommand_loader"
21
20
 
22
21
  class Chef
23
22
  class Knife
24
23
  class Rehash < Chef::Knife
25
24
  banner "knife rehash"
26
25
 
26
+ deps do
27
+ require_relative "core/subcommand_loader"
28
+ end
29
+
27
30
  def run
28
31
  if ! Chef::Knife::SubcommandLoader.autogenerated_manifest?
29
32
  ui.msg "Using knife-rehash will speed up knife's load time by caching the location of subcommands on disk."
@@ -18,7 +18,6 @@
18
18
 
19
19
  require_relative "../knife"
20
20
  require_relative "core/node_presenter"
21
- require "addressable/uri" unless defined?(Addressable::URI)
22
21
 
23
22
  class Chef
24
23
  class Knife
@@ -27,6 +26,7 @@ class Chef
27
26
  include Knife::Core::MultiAttributeReturnOption
28
27
 
29
28
  deps do
29
+ require "addressable/uri" unless defined?(Addressable::URI)
30
30
  require_relative "../node"
31
31
  require_relative "../environment"
32
32
  require_relative "../api_client"
@@ -16,7 +16,6 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require_relative "../mixin/shell_out"
20
19
  require_relative "../knife"
21
20
 
22
21
  class Chef
@@ -24,15 +23,16 @@ class Chef
24
23
  class Ssh < Knife
25
24
 
26
25
  deps do
26
+ require_relative "../mixin/shell_out"
27
27
  require "net/ssh" unless defined?(Net::SSH)
28
28
  require "net/ssh/multi"
29
29
  require "readline"
30
30
  require_relative "../exceptions"
31
31
  require_relative "../search/query"
32
32
  require_relative "../util/path_helper"
33
- end
34
33
 
35
- include Chef::Mixin::ShellOut
34
+ include Chef::Mixin::ShellOut
35
+ end
36
36
 
37
37
  attr_writer :password
38
38
 
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "../config"
21
20
  require_relative "../dist"
22
21
 
23
22
  class Chef
@@ -25,6 +24,7 @@ class Chef
25
24
  class SslCheck < Chef::Knife
26
25
 
27
26
  deps do
27
+ require_relative "../config"
28
28
  require "pp" unless defined?(PP)
29
29
  require "socket" unless defined?(Socket)
30
30
  require "uri" unless defined?(URI)
@@ -17,13 +17,13 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "../config"
21
20
 
22
21
  class Chef
23
22
  class Knife
24
23
  class SslFetch < Chef::Knife
25
24
 
26
25
  deps do
26
+ require_relative "../config"
27
27
  require "pp" unless defined?(PP)
28
28
  require "socket" unless defined?(Socket)
29
29
  require "uri" unless defined?(URI)
@@ -17,13 +17,13 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "../exceptions"
21
20
 
22
21
  class Chef
23
22
  class Knife
24
23
  class SupermarketInstall < Knife
25
24
 
26
25
  deps do
26
+ require_relative "../exceptions"
27
27
  require "shellwords" unless defined?(Shellwords)
28
28
  require "mixlib/archive" unless defined?(Mixlib::Archive)
29
29
  require_relative "core/cookbook_scm_repo"
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require_relative "../knife"
20
- require_relative "key_create"
21
20
  require_relative "key_create_base"
22
21
 
23
22
  class Chef
@@ -33,6 +32,10 @@ class Chef
33
32
 
34
33
  banner "knife user key create USER (options)"
35
34
 
35
+ deps do
36
+ require_relative "key_create"
37
+ end
38
+
36
39
  attr_reader :actor
37
40
 
38
41
  def initialize(argv = [])