summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-29 13:30:30 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-29 13:30:30 -0700
commit7b208669bf442e26e9ff3280aae4418253cb2cab (patch)
treeadbfa9b9fbf48eab69b6fd859e876129725d7e40
parentdfd878390cbce6f26048a24ca4e48d3ce70a9d17 (diff)
downloadchef-7b208669bf442e26e9ff3280aae4418253cb2cab.tar.gz
Tweak resource formatting
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/chef_client_cron.rb2
-rw-r--r--lib/chef/resource/chef_client_systemd_timer.rb2
-rw-r--r--lib/chef/resource/chocolatey_package.rb2
-rw-r--r--lib/chef/resource/yum_repository.rb10
-rwxr-xr-xtasks/docs.rb2
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/resource/chef_client_cron.rb b/lib/chef/resource/chef_client_cron.rb
index 48655f1a92..5ef68e5b55 100644
--- a/lib/chef/resource/chef_client_cron.rb
+++ b/lib/chef/resource/chef_client_cron.rb
@@ -133,7 +133,7 @@ class Chef
property :environment, Hash,
default: lazy { {} },
- description: "A Hash containing additional arbitrary environment variables under which the cron job will be run in the form of ``({'ENV_VARIABLE' => 'VALUE'})``."
+ description: "A Hash containing additional arbitrary environment variables under which the cron job will be run in the form of `({'ENV_VARIABLE' => 'VALUE'})`."
action :add do
# TODO: Replace this with a :create_if_missing action on directory when that exists
diff --git a/lib/chef/resource/chef_client_systemd_timer.rb b/lib/chef/resource/chef_client_systemd_timer.rb
index 988ec01364..b174faef14 100644
--- a/lib/chef/resource/chef_client_systemd_timer.rb
+++ b/lib/chef/resource/chef_client_systemd_timer.rb
@@ -92,7 +92,7 @@ class Chef
default: lazy { [] }
property :environment, Hash,
- description: "A Hash containing additional arbitrary environment variables under which the systemd timer will be run in the form of ``({'ENV_VARIABLE' => 'VALUE'})``.",
+ description: "A Hash containing additional arbitrary environment variables under which the systemd timer will be run in the form of `({'ENV_VARIABLE' => 'VALUE'})`.",
default: lazy { {} }
action :add do
diff --git a/lib/chef/resource/chocolatey_package.rb b/lib/chef/resource/chocolatey_package.rb
index 9dc3d2d7a5..7beefb5ef5 100644
--- a/lib/chef/resource/chocolatey_package.rb
+++ b/lib/chef/resource/chocolatey_package.rb
@@ -35,7 +35,7 @@ class Chef
end
```
- Install a package with options with Chocolatey's ``--checksum`` option
+ Install a package with options with Chocolatey's `--checksum` option
```ruby
chocolatey_package 'name of package' do
options '--checksum 1234567890'
diff --git a/lib/chef/resource/yum_repository.rb b/lib/chef/resource/yum_repository.rb
index 90cb08b681..206b511ec0 100644
--- a/lib/chef/resource/yum_repository.rb
+++ b/lib/chef/resource/yum_repository.rb
@@ -64,7 +64,7 @@ class Chef
description: "List of packages to exclude from updates or installs. This should be a space separated list. Shell globs using wildcards (eg. * and ?) are allowed."
property :failovermethod, String,
- description: "Method to determine how to switch to a new server if the current one fails, which can either be ``roundrobin`` or ``priority``. ``roundrobin`` randomly selects a URL out of the list of URLs to start with and proceeds through each of them as it encounters a failure contacting the host. ``priority`` starts from the first ``baseurl`` listed and reads through them sequentially.",
+ description: "Method to determine how to switch to a new server if the current one fails, which can either be `roundrobin` or `priority`. `roundrobin` randomly selects a URL out of the list of URLs to start with and proceeds through each of them as it encounters a failure contacting the host. `priority` starts from the first `baseurl` listed and reads through them sequentially.",
equal_to: %w{priority roundrobin}
property :fastestmirror_enabled, [TrueClass, FalseClass],
@@ -81,23 +81,23 @@ class Chef
description: "Determines how upstream HTTP caches are instructed to handle any HTTP downloads that Yum does. This option can take the following values: all (all HTTP downloads should be cached), packages (only RPM package downloads should be cached, but not repository metadata downloads), or none (no HTTP downloads should be cached)"
property :include_config, String,
- description: "An external configuration file using the format 'url://to/some/location'."
+ description: "An external configuration file using the format `url://to/some/location`."
property :includepkgs, String,
description: "Inverse of exclude property. This is a list of packages you want to use from a repository. If this option lists only one package then that is all Yum will ever see from the repository."
property :keepalive, [TrueClass, FalseClass],
- description: "Determines whether or not HTTP/1.1 ``keep-alive`` should be used with this repository."
+ description: "Determines whether or not HTTP/1.1 `keep-alive` should be used with this repository."
property :make_cache, [TrueClass, FalseClass],
description: "Determines whether package files downloaded by Yum stay in cache directories. By using cached data, you can carry out certain operations without a network connection.",
default: true
property :max_retries, [String, Integer],
- description: "Number of times any attempt to retrieve a file should retry before returning an error. Setting this to '0' makes Yum try forever."
+ description: "Number of times any attempt to retrieve a file should retry before returning an error. Setting this to `0` makes Yum try forever."
property :metadata_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/, /never/],
- description: "Time (in seconds) after which the metadata will expire. If the current metadata downloaded is less than the value specified, then Yum will not update the metadata against the repository. If you find that Yum is not downloading information on updates as often as you would like lower the value of this option. You can also change from the default of using seconds to using days, hours or minutes by appending a 'd', 'h' or 'm' respectively. The default is six hours to compliment yum-updates running once per hour. It is also possible to use the word ``never``, meaning that the metadata will never expire. Note: When using a metalink file, the metalink must always be newer than the metadata for the repository due to the validation, so this timeout also applies to the metalink file.",
+ description: "Time (in seconds) after which the metadata will expire. If the current metadata downloaded is less than the value specified, then Yum will not update the metadata against the repository. If you find that Yum is not downloading information on updates as often as you would like lower the value of this option. You can also change from the default of using seconds to using days, hours or minutes by appending a 'd', 'h' or 'm' respectively. The default is six hours to compliment yum-updates running once per hour. It is also possible to use the word `never`, meaning that the metadata will never expire. Note: When using a metalink file, the metalink must always be newer than the metadata for the repository due to the validation, so this timeout also applies to the metalink file.",
validation_message: "The metadata_expire property must be a numeric value for time in seconds, the string 'never', or a numeric value appended with with 'd', 'h', or 'm'!"
property :metalink, String,
diff --git a/tasks/docs.rb b/tasks/docs.rb
index 6e139406b2..4ef56d56ce 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -70,7 +70,7 @@ namespace :docs_site do
def friendly_property_list(arr)
return nil if arr.empty? # resources w/o properties
- props = arr.map { |x| "``#{x["name"]}``" }
+ props = arr.map { |x| "`#{x["name"]}`" }
# build the text string containing all properties bolded w/ punctuation
if props.size > 1