diff options
author | Tor Magnus Rakvåg <tm@intility.no> | 2018-06-14 11:19:51 +0200 |
---|---|---|
committer | Tor Magnus Rakvåg <tm@intility.no> | 2018-06-14 11:19:51 +0200 |
commit | 3d9f9731fcb6c5d02c57e0dffd9df21f168ef8fc (patch) | |
tree | b074722a1fa5e33346c58cf0461882315a2bdd87 /lib | |
parent | 355eb2261997423b0137ff77695f12b0086892e9 (diff) | |
download | chef-3d9f9731fcb6c5d02c57e0dffd9df21f168ef8fc.tar.gz |
add descriptions to actions, require chef/resource
Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/resource/powershell_package_source.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/resource/powershell_package_source.rb b/lib/chef/resource/powershell_package_source.rb index 85ce8dd415..9fa4bc8497 100644 --- a/lib/chef/resource/powershell_package_source.rb +++ b/lib/chef/resource/powershell_package_source.rb @@ -15,6 +15,7 @@ # limitations under the License. # +require "chef/resource" require "chef/json_compat" class Chef @@ -41,8 +42,7 @@ class Chef property :provider_name, String, equal_to: %w{ Programs msi NuGet msu PowerShellGet psl chocolatey }, validation_message: "The following providers are supported: 'Programs', 'msi', 'NuGet', 'msu', 'PowerShellGet', 'psl' or 'chocolatey'", - description: "The package management provider for the source. It supports the following providers: "\ - "'Programs', 'msi', 'NuGet', 'msu', 'PowerShellGet', 'psl' and 'chocolatey'.", + description: "The package management provider for the source. It supports the following providers: 'Programs', 'msi', 'NuGet', 'msu', 'PowerShellGet', 'psl' and 'chocolatey'.", default: "NuGet" property :publish_location, String, @@ -67,6 +67,7 @@ class Chef end action :register do + description "Registers and updates the powershell package source." # TODO: Ensure package provider is installed? if psrepository_cmdlet_appropriate? if package_source_exists? @@ -100,6 +101,7 @@ class Chef end action :unregister do + description "Unregisters the powershell package source." if package_source_exists? unregister_cmd = "Get-PackageSource -Name '#{new_resource.source_name}' | Unregister-PackageSource" converge_by("unregister source: #{new_resource.source_name}") do |