summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-08-30 17:36:24 -0700
committerTim Smith <tsmith@chef.io>2018-08-31 17:17:24 -0700
commit4cc2bf7ea0fe463aaeacd2ceb7f1873b91f12367 (patch)
tree6683dcfbf0852a5150bf83fb999549b0f7672644
parent462b8a79a750a570d234acabb9007e97f7544906 (diff)
downloadchef-4cc2bf7ea0fe463aaeacd2ceb7f1873b91f12367.tar.gz
Add descriptions to gem_package
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/gem_package.rb36
1 files changed, 17 insertions, 19 deletions
diff --git a/lib/chef/resource/gem_package.rb b/lib/chef/resource/gem_package.rb
index f2e1867322..0f6fd413ca 100644
--- a/lib/chef/resource/gem_package.rb
+++ b/lib/chef/resource/gem_package.rb
@@ -23,10 +23,7 @@ class Chef
class GemPackage < Chef::Resource::Package
resource_name :gem_package
- description "Use the gem_package resource to manage gem packages that are only"\
- " included in recipes. When a package is installed from a local file,"\
- " it must be added to the node using the remote_file or cookbook_file"\
- " resources."
+ description "Use the gem_package resource to manage gem packages that are only included in recipes. When a package is installed from a local file, it must be added to the node using the remote_file or cookbook_file resources."
# the source can either be a path to a package source like:
# source /var/tmp/mygem-1.2.3.4.gem
@@ -39,22 +36,23 @@ class Chef
#
# FIXME? the array form of installing paths most likely does not work?
#
- property :source, [ String, Array ]
- property :clear_sources, [ TrueClass, FalseClass ], default: lazy { Chef::Config[:clear_gem_sources] }, desired_state: false
- # Sets a custom gem_binary to run for gem commands.
- property :gem_binary, String, desired_state: false
-
- # set to false to avoid including Chef::Config[:rubygems_url] in the sources
- property :include_default_source, [ TrueClass, FalseClass ], default: true
-
- ##
- # Options for the gem install, either a Hash or a String. When a hash is
- # given, the options are passed to Gem::DependencyInstaller.new, and the
- # gem will be installed via the gems API. When a String is given, the gem
- # will be installed by shelling out to the gem command. Using a Hash of
- # options with an explicit gem_binary will result in undefined behavior.
- property :options, [ String, Hash, Array, nil ], desired_state: false
+ property :source, [ String, Array ],
+ description: "Optional. The URL, or list of URLs, at which the gem package is located. This list is added to the source configured in Chef::Config[:rubygems_url] (see also include_default_source) to construct the complete list of rubygems sources. Users in an 'airgapped' environment should set Chef::Config[:rubygems_url] to their local RubyGems mirror."
+ property :clear_sources, [ TrueClass, FalseClass ],
+ description: "Set to 'true' to download a gem from the path specified by the source property (and not from RubyGems).",
+ default: lazy { Chef::Config[:clear_gem_sources] }, desired_state: false
+
+ property :gem_binary, String, desired_state: false,
+ description: "The path of a gem binary to use for the installation. By default, the same version of Ruby that is used by the chef-client will be installed."
+
+ property :include_default_source, [ TrueClass, FalseClass ],
+ description: "Set to 'false' to not include 'Chef::Config[:rubygems_url]'' in the sources.",
+ default: true, introduced: "13.0"
+
+ property :options, [ String, Hash, Array, nil ],
+ description: "Options for the gem install, either a Hash or a String. When a hash is given, the options are passed to Gem::DependencyInstaller.new, and the gem will be installed via the gems API. When a String is given, the gem will be installed by shelling out to the gem command. Using a Hash of options with an explicit gem_binary will result in undefined behavior.",
+ desired_state: false
end
end
end