summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorTyler Ball <tyleraball@gmail.com>2014-10-17 16:15:12 -0500
committerTyler Ball <tyleraball@gmail.com>2014-10-17 16:15:12 -0500
commit9b3e925188a41bbea954429ac81ffdf65e936eda (patch)
tree4080102aa81bd9f94da69fa4d1ae44472536dd99 /lib/chef/resource
parent901e8eff95c953b91f597e4d83932d5b8803d31a (diff)
parented7a6d2dead738a99ebcb1782d29ca89924093cc (diff)
downloadchef-9b3e925188a41bbea954429ac81ffdf65e936eda.tar.gz
Merge pull request #2216 from opscode/tball/bsd_package_name
Notify a resource by the `resource[name]` key it was written as
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/freebsd_package.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/chef/resource/freebsd_package.rb b/lib/chef/resource/freebsd_package.rb
index 40cc63fc55..957c25caf1 100644
--- a/lib/chef/resource/freebsd_package.rb
+++ b/lib/chef/resource/freebsd_package.rb
@@ -31,27 +31,15 @@ class Chef
provides :package, :on_platforms => ["freebsd"]
- attr_accessor :created_as_type
-
def initialize(name, run_context=nil)
super
@resource_name = :freebsd_package
- @created_as_type = "freebsd_package"
end
def after_created
assign_provider
end
- # This resource can be invoked with multiple names package & freebsd_package.
- # We override the to_s method to ensure the key in resource collection
- # matches the type resource is declared as using created_as_type. This
- # logic can be removed once Chef does this for all resource in Chef 12:
- # https://github.com/opscode/chef/issues/1817
- def to_s
- "#{created_as_type}[#{name}]"
- end
-
def supports_pkgng?
ships_with_pkgng? || !!shell_out!("make -V WITH_PKGNG", :env => nil).stdout.match(/yes/i)
end