chef 13.0.118-universal-mingw32 → 13.1.31-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -27
  3. data/VERSION +1 -1
  4. data/acceptance/.bundle/config +2 -0
  5. data/acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb +1 -1
  6. data/acceptance/bin/aws.rb +17 -0
  7. data/acceptance/bin/berks +17 -0
  8. data/acceptance/bin/bundler +17 -0
  9. data/acceptance/bin/chef-acceptance +17 -0
  10. data/acceptance/bin/coderay +17 -0
  11. data/acceptance/bin/erubis +17 -0
  12. data/acceptance/bin/htmldiff +17 -0
  13. data/acceptance/bin/httpclient +17 -0
  14. data/acceptance/bin/inspec +17 -0
  15. data/acceptance/bin/kitchen +17 -0
  16. data/acceptance/bin/ldiff +17 -0
  17. data/acceptance/bin/nokogiri +17 -0
  18. data/acceptance/bin/pry +17 -0
  19. data/acceptance/bin/rake +17 -0
  20. data/acceptance/bin/rspec +17 -0
  21. data/acceptance/bin/rwinrm +17 -0
  22. data/acceptance/bin/rwinrmcp +17 -0
  23. data/acceptance/bin/safe_yaml +17 -0
  24. data/acceptance/bin/thor +17 -0
  25. data/acceptance/fips/.kitchen/fips-unit-functional-centos-6.yml +7 -0
  26. data/acceptance/fips/.kitchen/kitchen-vagrant/kitchen-fips-fips-unit-functional-centos-6/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  27. data/acceptance/fips/.kitchen/kitchen-vagrant/kitchen-fips-fips-unit-functional-centos-6/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  28. data/acceptance/fips/.kitchen/kitchen-vagrant/kitchen-fips-fips-unit-functional-centos-6/.vagrant/machines/default/virtualbox/id +1 -0
  29. data/acceptance/fips/.kitchen/kitchen-vagrant/kitchen-fips-fips-unit-functional-centos-6/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  30. data/acceptance/fips/.kitchen/kitchen-vagrant/kitchen-fips-fips-unit-functional-centos-6/.vagrant/machines/default/virtualbox/private_key +27 -0
  31. data/acceptance/fips/.kitchen/kitchen-vagrant/kitchen-fips-fips-unit-functional-centos-6/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  32. data/acceptance/fips/.kitchen/kitchen-vagrant/kitchen-fips-fips-unit-functional-centos-6/Vagrantfile +11 -0
  33. data/acceptance/fips/.kitchen/logs/fips-integration-centos-6.log +0 -0
  34. data/acceptance/fips/.kitchen/logs/fips-integration-windows-2012r2.log +0 -0
  35. data/acceptance/fips/.kitchen/logs/fips-unit-functional-centos-6.log +80 -0
  36. data/acceptance/fips/.kitchen/logs/kitchen.log +4 -0
  37. data/chef.gemspec +1 -1
  38. data/lib/chef/application/client.rb +1 -1
  39. data/lib/chef/application/knife.rb +1 -1
  40. data/lib/chef/application/solo.rb +1 -0
  41. data/lib/chef/cookbook/remote_file_vendor.rb +1 -1
  42. data/lib/chef/cookbook/synchronizer.rb +20 -7
  43. data/lib/chef/cookbook_manifest.rb +8 -0
  44. data/lib/chef/deprecated.rb +10 -0
  45. data/lib/chef/knife/client_key_create.rb +3 -0
  46. data/lib/chef/knife/client_key_delete.rb +1 -0
  47. data/lib/chef/knife/client_key_edit.rb +1 -0
  48. data/lib/chef/knife/client_key_list.rb +1 -0
  49. data/lib/chef/knife/client_key_show.rb +1 -0
  50. data/lib/chef/knife/user_key_create.rb +1 -0
  51. data/lib/chef/knife/user_key_delete.rb +1 -0
  52. data/lib/chef/knife/user_key_edit.rb +1 -0
  53. data/lib/chef/knife/user_key_list.rb +1 -0
  54. data/lib/chef/knife/user_key_show.rb +1 -0
  55. data/lib/chef/local_mode.rb +1 -0
  56. data/lib/chef/mixin/which.rb +1 -1
  57. data/lib/chef/platform/service_helpers.rb +1 -1
  58. data/lib/chef/provider/apt_repository.rb +7 -4
  59. data/lib/chef/provider/execute.rb +1 -1
  60. data/lib/chef/provider/package/cab.rb +18 -13
  61. data/lib/chef/provider/package/msu.rb +2 -2
  62. data/lib/chef/provider/package/rubygems.rb +3 -5
  63. data/lib/chef/provider/user/aix.rb +1 -1
  64. data/lib/chef/provider/user/windows.rb +1 -1
  65. data/lib/chef/providers.rb +0 -1
  66. data/lib/chef/resource/breakpoint.rb +12 -0
  67. data/lib/chef/resource/env.rb +3 -35
  68. data/lib/chef/resource/route.rb +13 -107
  69. data/lib/chef/resource/service.rb +5 -5
  70. data/lib/chef/resource/user.rb +6 -4
  71. data/lib/chef/resource/windows_task.rb +3 -3
  72. data/lib/chef/run_context.rb +7 -0
  73. data/lib/chef/runner.rb +2 -1
  74. data/lib/chef/version.rb +1 -1
  75. data/spec/functional/resource/chocolatey_package_spec.rb +1 -8
  76. data/spec/functional/resource/registry_spec.rb +1 -1
  77. data/spec/functional/resource/user/useradd_spec.rb +1 -1
  78. data/spec/functional/resource/windows_task_spec.rb +459 -0
  79. data/spec/integration/client/client_spec.rb +32 -0
  80. data/spec/spec_helper.rb +2 -0
  81. data/spec/support/platform_helpers.rb +7 -0
  82. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +3 -3
  83. data/spec/unit/cookbook/synchronizer_spec.rb +5 -4
  84. data/spec/unit/cookbook_manifest_spec.rb +17 -2
  85. data/spec/unit/provider/env_spec.rb +2 -2
  86. data/spec/unit/provider/group/dscl_spec.rb +2 -2
  87. data/spec/unit/provider/group/pw_spec.rb +3 -3
  88. data/spec/unit/provider/group/usermod_spec.rb +6 -6
  89. data/spec/unit/provider/group/windows_spec.rb +3 -3
  90. data/spec/unit/provider/group_spec.rb +4 -4
  91. data/spec/unit/provider/http_request_spec.rb +1 -1
  92. data/spec/unit/provider/package/aix_spec.rb +2 -2
  93. data/spec/unit/provider/package/apt_spec.rb +2 -2
  94. data/spec/unit/provider/package/ips_spec.rb +2 -2
  95. data/spec/unit/provider/package/macports_spec.rb +4 -4
  96. data/spec/unit/provider/package/pacman_spec.rb +2 -2
  97. data/spec/unit/provider/package/rubygems_spec.rb +14 -11
  98. data/spec/unit/provider/package/yum_spec.rb +10 -10
  99. data/spec/unit/provider/route_spec.rb +7 -7
  100. data/spec/unit/provider/service/arch_service_spec.rb +6 -6
  101. data/spec/unit/provider/service/init_service_spec.rb +2 -2
  102. data/spec/unit/provider/service/invokercd_service_spec.rb +1 -1
  103. data/spec/unit/provider/service/simple_service_spec.rb +1 -1
  104. data/spec/unit/provider/service/upstart_service_spec.rb +5 -5
  105. data/spec/unit/provider/service_spec.rb +1 -1
  106. data/spec/unit/provider/user/aix_spec.rb +97 -0
  107. data/spec/unit/provider/user/pw_spec.rb +5 -5
  108. data/spec/unit/provider/user_spec.rb +1 -1
  109. data/spec/unit/provider_resolver_spec.rb +11 -11
  110. data/spec/unit/resource/breakpoint_spec.rb +28 -11
  111. data/spec/unit/resource/windows_task_spec.rb +2 -2
  112. data/spec/unit/runner_spec.rb +4 -0
  113. data/tasks/bin/run_external_test +20 -42
  114. data/tasks/bundle.rb +0 -8
  115. data/tasks/changelog.rb +5 -1
  116. data/tasks/dependencies.rb +4 -2
  117. metadata +80 -19
  118. data/acceptance/fips/.acceptance/acceptance-cookbook/.gitignore +0 -2
  119. data/acceptance/fips/.acceptance/acceptance-cookbook/metadata.rb +0 -2
  120. data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  121. data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  122. data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  123. data/acceptance/fips/.kitchen.yml +0 -8
  124. data/acceptance/fips/test/integration/fips-integration/serverspec/Gemfile +0 -9
  125. data/acceptance/fips/test/integration/fips-integration/serverspec/fips-integration_spec.rb +0 -52
  126. data/acceptance/fips/test/integration/fips-unit-functional/serverspec/Gemfile +0 -7
  127. data/acceptance/fips/test/integration/fips-unit-functional/serverspec/fips-unit-functional_spec.rb +0 -56
  128. data/lib/chef/provider/breakpoint.rb +0 -38
  129. data/spec/unit/provider/breakpoint_spec.rb +0 -53
  130. data/tasks/bin/create-override-gemfile +0 -110
  131. data/tasks/gemfile_util.rb +0 -390
@@ -37,7 +37,7 @@ class Chef
37
37
  def define_resource_requirements
38
38
  if creates && creates_relative? && !cwd
39
39
  # FIXME? move this onto the resource?
40
- raise Chef::Exceptions::Execute, "Please either specify a full path for the creates attribute, or specify a cwd propoerty to the #{new_resource} resource"
40
+ raise Chef::Exceptions::Execute, "Please either specify a full path for the creates attribute, or specify a cwd property to the #{new_resource} resource"
41
41
  end
42
42
  end
43
43
 
@@ -81,34 +81,39 @@ class Chef
81
81
  end
82
82
 
83
83
  def installed_version
84
- stdout = dism_command("/Get-PackageInfo /PackagePath:\"#{cab_file_source}\"").stdout
85
- package_info = parse_dism_get_package_info(stdout)
86
84
  # e.g. Package_for_KB2975719~31bf3856ad364e35~amd64~~6.3.1.8
87
- package = split_package_identity(package_info["package_information"]["package_identity"])
85
+ package = new_cab_identity
88
86
  # Search for just the package name to catch a different version being installed
89
87
  Chef::Log.debug("#{new_resource} searching for installed package #{package['name']}")
90
- found_packages = installed_packages.select { |p| p["package_identity"] =~ /^#{package['name']}~/ }
88
+ existing_package_identities = installed_packages.map do |p|
89
+ split_package_identity(p["package_identity"])
90
+ end
91
+ found_packages = existing_package_identities.select do |existing_package_ident|
92
+ existing_package_ident["name"] == package["name"]
93
+ end
91
94
  if found_packages.empty?
92
95
  nil
93
96
  elsif found_packages.length == 1
94
- stdout = dism_command("/Get-PackageInfo /PackageName:\"#{found_packages.first['package_identity']}\"").stdout
95
- find_version(stdout)
97
+ found_packages.first["version"]
96
98
  else
97
99
  # Presuming this won't happen, otherwise we need to handle it
98
100
  raise Chef::Exceptions::Package, "Found multiple packages installed matching name #{package['name']}, found: #{found_packages.length} matches"
99
101
  end
100
102
  end
101
103
 
102
- def package_version
103
- Chef::Log.debug("#{new_resource} getting product version for package at #{cab_file_source}")
104
+ def cab_identity_from_cab_file
104
105
  stdout = dism_command("/Get-PackageInfo /PackagePath:\"#{cab_file_source}\"").stdout
105
- find_version(stdout)
106
+ package_info = parse_dism_get_package_info(stdout)
107
+ split_package_identity(package_info["package_information"]["package_identity"])
106
108
  end
107
109
 
108
- def find_version(stdout)
109
- package_info = parse_dism_get_package_info(stdout)
110
- package = split_package_identity(package_info["package_information"]["package_identity"])
111
- package["version"]
110
+ def new_cab_identity
111
+ Chef::Log.debug("#{new_resource} getting product version for package at #{cab_file_source}")
112
+ @new_cab_identity ||= cab_identity_from_cab_file
113
+ end
114
+
115
+ def package_version
116
+ new_cab_identity["version"].chomp
112
117
  end
113
118
 
114
119
  # returns a hash of package state information given the output of dism /get-packages
@@ -78,7 +78,7 @@ class Chef
78
78
  def get_cab_package(cab_file)
79
79
  cab_resource = new_resource
80
80
  cab_resource.source = cab_file
81
- cab_pkg = Chef::Provider::Package::Cab.new(cab_resource, nil)
81
+ Chef::Provider::Package::Cab.new(cab_resource, nil)
82
82
  end
83
83
 
84
84
  def download_source_file
@@ -141,7 +141,7 @@ class Chef
141
141
  else
142
142
  # msu package contains only single xml file. So using xml_files.first is sufficient
143
143
  doc = ::File.open(xml_files.first.to_s) { |f| REXML::Document.new f }
144
- locations = doc.elements.each("unattend/servicing/package/source") { |element| puts element.attributes["location"] }
144
+ locations = doc.elements.each("unattend/servicing/package/source") { |element| element.attributes["location"] }
145
145
  locations.each do |loc|
146
146
  cab_files << msu_dir + "/" + loc.attribute("location").value.split("\\")[1]
147
147
  end
@@ -21,6 +21,7 @@ require "uri"
21
21
  require "chef/provider/package"
22
22
  require "chef/resource/package"
23
23
  require "chef/mixin/get_source_from_package"
24
+ require "chef/mixin/which"
24
25
 
25
26
  # Class methods on Gem are defined in rubygems
26
27
  require "rubygems"
@@ -359,6 +360,7 @@ class Chef
359
360
  provides :gem_package
360
361
 
361
362
  include Chef::Mixin::GetSourceFromPackage
363
+ include Chef::Mixin::Which
362
364
 
363
365
  def initialize(new_resource, run_context = nil)
364
366
  super
@@ -410,11 +412,7 @@ class Chef
410
412
  end
411
413
 
412
414
  def find_gem_by_path
413
- Chef::Log.debug("#{new_resource} searching for 'gem' binary in path: #{ENV['PATH']}")
414
- separator = ::File::ALT_SEPARATOR ? ::File::ALT_SEPARATOR : ::File::SEPARATOR
415
- path_to_first_gem = ENV["PATH"].split(::File::PATH_SEPARATOR).find { |path| ::File.exist?(path + separator + "gem") }
416
- raise Chef::Exceptions::FileNotFound, "Unable to find 'gem' binary in path: #{ENV['PATH']}" if path_to_first_gem.nil?
417
- path_to_first_gem + separator + "gem"
415
+ which("gem", extra_path: RbConfig::CONFIG["bindir"])
418
416
  end
419
417
 
420
418
  def gem_dependency
@@ -81,7 +81,7 @@ class Chef
81
81
 
82
82
  # Aix specific handling to update users home directory.
83
83
  def manage_home
84
- return unless updating_home? && managing_home_dir?
84
+ return unless updating_home? && new_resource.manage_home
85
85
  # -m option does not work on aix, so move dir.
86
86
  universal_options.delete("-m")
87
87
  if ::File.directory?(current_resource.home)
@@ -36,7 +36,7 @@ class Chef
36
36
 
37
37
  def load_current_resource
38
38
  if new_resource.gid
39
- Chef::Log.warn("The 'gid' attribute is not implemented by the Windows platform. Please use the 'group' resource to assign a user to a group.")
39
+ Chef::Log.warn("The 'gid' (or 'group') property is not implemented on the Windows platform. Please use the `members` property of the 'group' resource to assign a user to a group.")
40
40
  end
41
41
 
42
42
  @current_resource = Chef::Resource::User.new(new_resource.name)
@@ -19,7 +19,6 @@
19
19
  require "chef/provider/apt_update"
20
20
  require "chef/provider/apt_repository"
21
21
  require "chef/provider/batch"
22
- require "chef/provider/breakpoint"
23
22
  require "chef/provider/cookbook_file"
24
23
  require "chef/provider/cron"
25
24
  require "chef/provider/cron/solaris"
@@ -21,12 +21,24 @@ require "chef/resource"
21
21
  class Chef
22
22
  class Resource
23
23
  class Breakpoint < Chef::Resource
24
+ provides :breakpoint
25
+ resource_name :breakpoinst
26
+
24
27
  default_action :break
25
28
 
26
29
  def initialize(action = "break", *args)
27
30
  super(caller.first, *args)
28
31
  end
29
32
 
33
+ action :break do
34
+ if defined?(Shell) && Shell.running?
35
+ with_run_context :parent do
36
+ run_context.resource_collection.iterator.pause
37
+ new_resource.updated_by_last_action(true)
38
+ run_context.resource_collection.iterator
39
+ end
40
+ end
41
+ end
30
42
  end
31
43
  end
32
44
  end
@@ -20,46 +20,14 @@
20
20
  class Chef
21
21
  class Resource
22
22
  class Env < Chef::Resource
23
-
24
- identity_attr :key_name
25
-
26
- state_attrs :value
27
-
28
23
  provides :env, os: "windows"
29
24
 
30
25
  default_action :create
31
26
  allowed_actions :create, :delete, :modify
32
27
 
33
- def initialize(name, run_context = nil)
34
- super
35
- @key_name = name
36
- @value = nil
37
- @delim = nil
38
- end
39
-
40
- def key_name(arg = nil)
41
- set_or_return(
42
- :key_name,
43
- arg,
44
- :kind_of => [ String ]
45
- )
46
- end
47
-
48
- def value(arg = nil)
49
- set_or_return(
50
- :value,
51
- arg,
52
- :kind_of => [ String ]
53
- )
54
- end
55
-
56
- def delim(arg = nil)
57
- set_or_return(
58
- :delim,
59
- arg,
60
- :kind_of => [ String ]
61
- )
62
- end
28
+ property :key_name, String, identity: true, name_property: true
29
+ property :value, String, required: true
30
+ property :delim, [ String, nil, false ], desired_state: false
63
31
  end
64
32
  end
65
33
  end
@@ -22,116 +22,22 @@ require "chef/resource"
22
22
  class Chef
23
23
  class Resource
24
24
  class Route < Chef::Resource
25
- identity_attr :target
26
-
27
- state_attrs :netmask, :gateway
28
-
29
25
  default_action :add
30
26
  allowed_actions :add, :delete
31
27
 
32
- def initialize(name, run_context = nil)
33
- super
34
- @target = name
35
- @netmask = nil
36
- @gateway = nil
37
- @metric = nil
38
- @device = nil
39
- @route_type = :host
40
- @networking = nil
41
- @networking_ipv6 = nil
42
- @hostname = nil
43
- @domainname = nil
44
- @domain = nil
45
- end
46
-
47
- def networking(arg = nil)
48
- set_or_return(
49
- :networking,
50
- arg,
51
- :kind_of => String
52
- )
53
- end
54
-
55
- def networking_ipv6(arg = nil)
56
- set_or_return(
57
- :networking_ipv6,
58
- arg,
59
- :kind_of => String
60
- )
61
- end
62
-
63
- def hostname(arg = nil)
64
- set_or_return(
65
- :hostname,
66
- arg,
67
- :kind_of => String
68
- )
69
- end
70
-
71
- def domainname(arg = nil)
72
- set_or_return(
73
- :domainname,
74
- arg,
75
- :kind_of => String
76
- )
77
- end
78
-
79
- def domain(arg = nil)
80
- set_or_return(
81
- :domain,
82
- arg,
83
- :kind_of => String
84
- )
85
- end
86
-
87
- def target(arg = nil)
88
- set_or_return(
89
- :target,
90
- arg,
91
- :kind_of => String
92
- )
93
- end
94
-
95
- def netmask(arg = nil)
96
- set_or_return(
97
- :netmask,
98
- arg,
99
- :kind_of => String
100
- )
101
- end
102
-
103
- def gateway(arg = nil)
104
- set_or_return(
105
- :gateway,
106
- arg,
107
- :kind_of => String
108
- )
109
- end
110
-
111
- def metric(arg = nil)
112
- set_or_return(
113
- :metric,
114
- arg,
115
- :kind_of => Integer
116
- )
117
- end
118
-
119
- def device(arg = nil)
120
- set_or_return(
121
- :device,
122
- arg,
123
- :kind_of => String
124
- )
125
- end
126
-
127
- def route_type(arg = nil)
128
- real_arg = arg.kind_of?(String) ? arg.to_sym : arg
129
- set_or_return(
130
- :route_type,
131
- real_arg,
132
- :equal_to => [ :host, :net ]
133
- )
134
- end
28
+ property :target, String, identity: true, name_property: true
29
+ property :netmask, [String, nil]
30
+ property :gateway, [String, nil]
31
+ property :device, [String, nil], desired_state: false # Has a partial default in the provider of eth0.
32
+ property :route_type, [:host, :net], default: :host, coerce: proc { |x| x.to_sym }, desired_state: false
33
+
34
+ # I can find no evidence of these properties actually being used by Chef. NK 2017-04-11
35
+ property :networking, [String, nil], desired_state: false
36
+ property :networking_ipv6, [String, nil], desired_state: false
37
+ property :hostname, [String, nil], desired_state: false
38
+ property :domainname, [String, nil], desired_state: false
39
+ property :domain, [String, nil], desired_state: false
40
+ property :metric, [Integer, nil], desired_state: false
135
41
  end
136
42
  end
137
43
  end
@@ -78,7 +78,7 @@ class Chef
78
78
  set_or_return(
79
79
  :start_command,
80
80
  arg,
81
- :kind_of => [ String ]
81
+ :kind_of => [ String, NilClass, FalseClass ]
82
82
  )
83
83
  end
84
84
 
@@ -87,7 +87,7 @@ class Chef
87
87
  set_or_return(
88
88
  :stop_command,
89
89
  arg,
90
- :kind_of => [ String ]
90
+ :kind_of => [ String, NilClass, FalseClass ]
91
91
  )
92
92
  end
93
93
 
@@ -96,7 +96,7 @@ class Chef
96
96
  set_or_return(
97
97
  :status_command,
98
98
  arg,
99
- :kind_of => [ String ]
99
+ :kind_of => [ String, NilClass, FalseClass ]
100
100
  )
101
101
  end
102
102
 
@@ -105,7 +105,7 @@ class Chef
105
105
  set_or_return(
106
106
  :restart_command,
107
107
  arg,
108
- :kind_of => [ String ]
108
+ :kind_of => [ String, NilClass, FalseClass ]
109
109
  )
110
110
  end
111
111
 
@@ -113,7 +113,7 @@ class Chef
113
113
  set_or_return(
114
114
  :reload_command,
115
115
  arg,
116
- :kind_of => [ String ]
116
+ :kind_of => [ String, NilClass, FalseClass ]
117
117
  )
118
118
  end
119
119
 
@@ -62,19 +62,21 @@ class Chef
62
62
  )
63
63
  end
64
64
 
65
- def uid(arg = nil)
65
+ def uid(arg = Chef::NOT_PASSED)
66
66
  set_or_return(
67
67
  :uid,
68
68
  arg,
69
- :kind_of => [ String, Integer ]
69
+ :kind_of => [ String, Integer, NilClass ],
70
+ :coerce => proc { |x| x || nil }
70
71
  )
71
72
  end
72
73
 
73
- def gid(arg = nil)
74
+ def gid(arg = Chef::NOT_PASSED)
74
75
  set_or_return(
75
76
  :gid,
76
77
  arg,
77
- :kind_of => [ String, Integer ]
78
+ :kind_of => [ String, Integer, NilClass ],
79
+ :coerce => proc { |x| x || nil }
78
80
  )
79
81
  end
80
82
 
@@ -24,7 +24,7 @@ class Chef
24
24
 
25
25
  provides :windows_task, os: "windows"
26
26
 
27
- allowed_actions :create, :delete, :run, :end, :change, :enable, :disable
27
+ allowed_actions :create, :delete, :run, :end, :enable, :disable
28
28
  default_action :create
29
29
 
30
30
  def initialize(name, run_context = nil)
@@ -161,8 +161,8 @@ class Chef
161
161
  end
162
162
 
163
163
  def validate_create_day(day, frequency)
164
- unless [:weekly].include?(frequency)
165
- raise "day attribute is only valid for tasks that run weekly"
164
+ unless [:weekly, :monthly].include?(frequency)
165
+ raise "day attribute is only valid for tasks that run monthly or weekly"
166
166
  end
167
167
  if day.is_a?(String) && day.to_i.to_s != day
168
168
  days = day.split(",")
@@ -110,6 +110,11 @@ class Chef
110
110
  #
111
111
  attr_reader :audits
112
112
 
113
+ #
114
+ # Pointer back to the Chef::Runner that created this
115
+ #
116
+ attr_accessor :runner
117
+
113
118
  #
114
119
  # Notification handling
115
120
  #
@@ -646,6 +651,8 @@ ERROR_MESSAGE
646
651
  root_run_context
647
652
  resource_collection
648
653
  resource_collection=
654
+ runner
655
+ runner=
649
656
  }.map { |x| x.to_sym }
650
657
 
651
658
  # Verify that we didn't miss any methods