diff options
-rw-r--r-- | lib/chef/provider/cron.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/cron/unix.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 9 | ||||
-rw-r--r-- | lib/chef/version.rb | 2 | ||||
-rw-r--r-- | spec/functional/util/powershell/cmdlet_spec.rb | 6 |
5 files changed, 14 insertions, 7 deletions
diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb index 4b7836947e..6d86e336ec 100644 --- a/lib/chef/provider/cron.rb +++ b/lib/chef/provider/cron.rb @@ -25,7 +25,7 @@ class Chef class Cron < Chef::Provider include Chef::Mixin::Command - provides :cron, os: "!aix" + provides :cron, os: ["!aix", "!solaris2"] SPECIAL_TIME_VALUES = [:reboot, :yearly, :annually, :monthly, :weekly, :daily, :midnight, :hourly] CRON_ATTRIBUTES = [:minute, :hour, :day, :month, :weekday, :time, :command, :mailto, :path, :shell, :home, :environment] diff --git a/lib/chef/provider/cron/unix.rb b/lib/chef/provider/cron/unix.rb index 350f8bda18..0750c0420b 100644 --- a/lib/chef/provider/cron/unix.rb +++ b/lib/chef/provider/cron/unix.rb @@ -27,6 +27,8 @@ class Chef class Unix < Chef::Provider::Cron include Chef::Mixin::ShellOut + provides :cron, os: 'solaris2' + private def read_crontab diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index ff1e346cd1..d715f42419 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -380,8 +380,13 @@ class Chef # Opscode Omnibus - The ruby that ships inside omnibus is only used for Chef # Default to installing somewhere more functional if new_resource.options && new_resource.options.kind_of?(Hash) - msg = "options should be a string instead of a hash\n" - msg << "in #{new_resource} from #{new_resource.source_line}" + msg = [ + "Gem options must be passed to gem_package as a string instead of a hash when", + "using this installation of Chef because it runs with its own packaged Ruby. A hash", + "may only be used when installing a gem to the same Ruby installation that Chef is", + "running under. See https://docs.chef.io/resource_gem_package.html for more information.", + "Error raised at #{new_resource} from #{new_resource.source_line}", + ].join("\n") raise ArgumentError, msg end gem_location = find_gem_by_path diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 5763f6a138..724c16d682 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '12.2.0.rc.0' + VERSION = '12.2.0.rc.1' end # diff --git a/spec/functional/util/powershell/cmdlet_spec.rb b/spec/functional/util/powershell/cmdlet_spec.rb index b240a5ec12..201fb95af8 100644 --- a/spec/functional/util/powershell/cmdlet_spec.rb +++ b/spec/functional/util/powershell/cmdlet_spec.rb @@ -19,7 +19,7 @@ require 'chef/json_compat' require File.expand_path('../../../../spec_helper', __FILE__) -describe Chef::Util::Powershell::Cmdlet, :windows_only do +describe Chef::Util::Powershell::Cmdlet, :windows_powershell_dsc_only do before(:all) do ohai = Ohai::System.new ohai.load_plugins @@ -88,7 +88,7 @@ describe Chef::Util::Powershell::Cmdlet, :windows_only do context "when returning json" do let(:cmd_output_format) { :json } - it "returns json format data", :windows_powershell_dsc_only do + it "returns json format data" do result = cmdlet_alias_requires_switch_or_argument.run({},{},'ls') expect(result.succeeded?).to eq(true) expect(lambda{Chef::JSONCompat.parse(result.return_value)}).not_to raise_error @@ -97,7 +97,7 @@ describe Chef::Util::Powershell::Cmdlet, :windows_only do context "when returning Ruby objects" do let(:cmd_output_format) { :object } - it "returns object format data", :windows_powershell_dsc_only do + it "returns object format data" do result = simple_cmdlet.run({},{:cwd => etc_directory}, 'hosts') expect(result.succeeded?).to eq(true) data = result.return_value |