diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-06-22 13:06:09 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-06-22 13:07:37 -0700 |
commit | e364715e0e805ffbe5650e54b747b72dda3253ed (patch) | |
tree | 7a5a2e1c9c123711f39b22b8ee1f43619b965c84 | |
parent | d84e7c6be3529055ebd5bb06a59e1339e6a9d4aa (diff) | |
download | chef-e364715e0e805ffbe5650e54b747b72dda3253ed.tar.gz |
Replace hardcoded references to the product with the obfuscated versions.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | lib/chef/resource/chef_gem.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/resource/chef_gem.rb b/lib/chef/resource/chef_gem.rb index 5e86507387..b44f9e1771 100644 --- a/lib/chef/resource/chef_gem.rb +++ b/lib/chef/resource/chef_gem.rb @@ -27,27 +27,27 @@ class Chef provides :chef_gem description <<~DESC - Use the **chef_gem** resource to install a gem only for the instance of Ruby that is dedicated to the chef-client. + Use the **chef_gem** resource to install a gem only for the instance of Ruby that is dedicated to the #{Chef::Dist::CLIENT}. When a gem is installed from a local file, it must be added to the node using the **remote_file** or **cookbook_file** resources. The **chef_gem** resource works with all of the same properties and options as the **gem_package** resource, but does not - accept the `gem_binary` property because it always uses the `CurrentGemEnvironment` under which the `chef-client` is + accept the `gem_binary` property because it always uses the `CurrentGemEnvironment` under which the `#{Chef::Dist::CLIENT}` is running. In addition to performing actions similar to the **gem_package** resource, the **chef_gem** resource does the following: - Runs its actions immediately, before convergence, allowing a gem to be used in a recipe immediately after it is installed. - Runs `Gem.clear_paths` after the action, ensuring that gem is aware of changes so that it can be required immediately after it is installed. - Warning: The **chef_gem** and **gem_package** resources are both used to install Ruby gems. For any machine on which Chef Infra Client is + Warning: The **chef_gem** and **gem_package** resources are both used to install Ruby gems. For any machine on which #{Chef::Dist::PRODUCT} is installed, there are two instances of Ruby. One is the standard, system-wide instance of Ruby and the other is a dedicated instance that is - available only to Chef Infra Client. - Use the **chef_gem** resource to install gems into the instance of Ruby that is dedicated to Chef Infra Client. + available only to #{Chef::Dist::PRODUCT}. + Use the **chef_gem** resource to install gems into the instance of Ruby that is dedicated to #{Chef::Dist::PRODUCT}. Use the **gem_package** resource to install all other gems (i.e. install gems system-wide). DESC examples <<~EXAMPLES **Compile time vs. converge time installation of gems** - To install a gem while Chef Infra Client is configuring the node (the converge phase), set the `compile_time` property to `false`: + To install a gem while #{Chef::Dist::PRODUCT} is configuring the node (the converge phase), set the `compile_time` property to `false`: ```ruby chef_gem 'right_aws' do compile_time false @@ -85,7 +85,7 @@ class Chef property :gem_binary, String, default: "#{RbConfig::CONFIG["bindir"]}/gem", default_description: "The `gem` binary included with #{Chef::Dist::PRODUCT}.", - description: "The path of a gem binary to use for the installation. By default, the same version of Ruby that is used by #{Chef::Dist::PRODUCT} will be installed.", + description: "The path of a gem binary to use for the installation. By default, the same version of Ruby that is used by #{Chef::Dist::PRODUCT} will be used.", callbacks: { "The `chef_gem` resource is restricted to the current gem environment, use `gem_package` to install to other environments." => proc { |v| v == "#{RbConfig::CONFIG["bindir"]}/gem" }, |