From 322eaf62464f306e2e3b3fec5b9fed15d17fc50b Mon Sep 17 00:00:00 2001 From: tyler-ball Date: Mon, 13 Oct 2014 10:57:52 -0500 Subject: Removing all traces of 'created_as_type' since that fix is no longer necessary --- lib/chef/resource/freebsd_package.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib/chef/resource') 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 -- cgit v1.2.1