The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

0001-Fix-Puppet-Type.ensurable.patch

The patch - Ilya Sher, 12/11/2011 09:46 pm

Download (1.02 KB)

View differences:

lib/puppet/type.rb
107 107
  def self.ensurable?
108 108
    # If the class has all three of these methods defined, then it's
109 109
    # ensurable.
110
    ens = [:exists?, :create, :destroy].inject { |set, method|
111
      set &&= self.public_method_defined?(method)
110
    [:exists?, :create, :destroy].all? { |method|
111
      self.public_method_defined?(method)
112 112
    }
113

  
114
    ens
115 113
  end
116 114

  
117 115
  def self.apply_to_device
118
-