summaryrefslogtreecommitdiff
path: root/lib/chef/resource/homebrew_package.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/homebrew_package.rb')
-rw-r--r--lib/chef/resource/homebrew_package.rb31
1 files changed, 30 insertions, 1 deletions
diff --git a/lib/chef/resource/homebrew_package.rb b/lib/chef/resource/homebrew_package.rb
index 71a9ffde38..c3b34395f6 100644
--- a/lib/chef/resource/homebrew_package.rb
+++ b/lib/chef/resource/homebrew_package.rb
@@ -29,8 +29,37 @@ class Chef
provides :homebrew_package
provides :package, os: "darwin"
- description "Use the **homebrew_package** resource to manage packages for the macOS platform."
+ description "Use the **homebrew_package** resource to manage packages for the macOS platform. Note: Starting with #{Chef::Dist::PRODUCT} 16 the homebrew resource now accepts an array of packages for isntalling multiple packages at once."
introduced "12.0"
+ examples <<~DOC
+ **Install a package**:
+
+ ```ruby
+ homebrew_package 'git'
+ ```
+
+ **Install multiple packages at once**:
+
+ ```ruby
+ homebrew_package %w(git fish ruby)
+ ```
+
+ **Specify the Homebrew user with a UUID**
+
+ ```ruby
+ homebrew_package 'git' do
+ homebrew_user 1001
+ end
+ ```
+
+ **Specify the Homebrew user with a string**:
+
+ ```ruby
+ homebrew_package 'vim' do
+ homebrew_user 'user1'
+ end
+ ```
+ DOC
property :homebrew_user, [ String, Integer ],
description: "The name or uid of the Homebrew owner to be used by #{Chef::Dist::PRODUCT} when executing a command."