summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-02-22 20:46:24 -0800
committerTim Smith <tsmith@chef.io>2018-02-22 20:46:24 -0800
commit85de2cf18b100b5ac1f23ddbfa7e70ca0aab172b (patch)
tree91ecba7ee436e3abc912b282c9f8bfc0395b09c3
parentb3a3fbaab35da9e7927a0cb1ae5e379f28ecc000 (diff)
downloadchef-powershell_package_name.tar.gz
Simplify how we define the powershell_package resource_namepowershell_package_name
Use our DSL Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/powershell_package.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/chef/resource/powershell_package.rb b/lib/chef/resource/powershell_package.rb
index 829db5f4f8..441ad76f01 100644
--- a/lib/chef/resource/powershell_package.rb
+++ b/lib/chef/resource/powershell_package.rb
@@ -28,19 +28,13 @@ class Chef
class PowershellPackage < Chef::Resource::Package
include Chef::Mixin::Uris
+ resource_name :powershell_package
provides :powershell_package, os: "windows"
allowed_actions :install, :remove
- def initialize(name, run_context = nil)
- super
- @resource_name = :powershell_package
- end
-
property :package_name, [String, Array], coerce: proc { |x| [x].flatten }
-
property :version, [String, Array], coerce: proc { |x| [x].flatten }
-
property :source, [String]
end
end