summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorMarc Chamberland <mchamberland@pbsc.com>2019-05-05 20:08:36 -0400
committerMarc Chamberland <mchamberland@pbsc.com>2019-05-23 12:30:56 -0400
commitc08d0b8789b9ad5ac8082bef370d5cc6ae5b610f (patch)
tree0f7ad457fac7e52f87e34e29ef865e5a979580e8 /lib/chef/provider
parent44aae2c29d0c4ba28b4dbfc8c638036d8a2663ec (diff)
downloadchef-c08d0b8789b9ad5ac8082bef370d5cc6ae5b610f.tar.gz
More distro constant applications
Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/file.rb2
-rw-r--r--lib/chef/provider/package/rubygems.rb5
-rw-r--r--lib/chef/provider/zypper_repository.rb3
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb
index 2e48501e33..8c7055f107 100644
--- a/lib/chef/provider/file.rb
+++ b/lib/chef/provider/file.rb
@@ -230,7 +230,7 @@ class Chef
elsif file_class.symlink?(new_resource.path) && new_resource.manage_symlink_source.nil?
logger.warn("File #{path} managed by #{new_resource} is really a symlink (to #{file_class.realpath(new_resource.path)}). Managing the source file instead.")
logger.warn("Disable this warning by setting `manage_symlink_source true` on the resource")
- logger.warn("In a future Chef release, 'manage_symlink_source' will not be enabled by default")
+ logger.warn("In a future #{Chef::Dist::PRODUCT} release, 'manage_symlink_source' will not be enabled by default")
verify_symlink_sanity(path)
elsif new_resource.force_unlink
[nil, nil, nil]
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb
index e8b88437fb..8179deceed 100644
--- a/lib/chef/provider/package/rubygems.rb
+++ b/lib/chef/provider/package/rubygems.rb
@@ -22,6 +22,7 @@ require_relative "../package"
require_relative "../../resource/package"
require_relative "../../mixin/get_source_from_package"
require_relative "../../mixin/which"
+require_relative "../../dist"
# Class methods on Gem are defined in rubygems
require "rubygems" unless defined?(Gem)
@@ -400,8 +401,8 @@ class Chef
if new_resource.options && new_resource.options.is_a?(Hash)
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",
+ "using this installation of #{Chef::Dist::PRODUCT} 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::Dist::PRODUCT} 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")
diff --git a/lib/chef/provider/zypper_repository.rb b/lib/chef/provider/zypper_repository.rb
index 8c1497b5f5..46d81430dd 100644
--- a/lib/chef/provider/zypper_repository.rb
+++ b/lib/chef/provider/zypper_repository.rb
@@ -21,6 +21,7 @@ require_relative "../dsl/declare_resource"
require_relative "noop"
require_relative "../mixin/shell_out"
require "shellwords" unless defined?(Shellwords)
+require_relative "../dist"
class Chef
class Provider
@@ -111,7 +112,7 @@ class Chef
logger.trace("Will use :cookbook_file resource to cache the gpg key locally")
:cookbook_file
else
- raise Chef::Exceptions::FileNotFound, "Cannot determine location of gpgkey. Must start with 'http' or be a file managed by Chef."
+ raise Chef::Exceptions::FileNotFound, "Cannot determine location of gpgkey. Must start with 'http' or be a file managed by #{Chef::Dist::PRODUCT}."
end
end