~ubuntu-branches/ubuntu/lucid/puppet/lucid-security

« back to all changes in this revision

Viewing changes to lib/puppet/provider.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-23 00:48:10 UTC
  • mfrom: (1.1.10 upstream) (3.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091223004810-3i4oryds922g5n59
Tags: 0.25.1-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/rules:
    + Don't start puppet when first installing puppet.
  - debian/puppet.conf, lib/puppet/defaults.rb:
    + Move templates to /etc/puppet
  - lib/puppet/defaults.rb:
    + Fix /var/lib/puppet/state ownership.
  - man/man8/puppet.conf.8: 
    + Fix broken URL in manpage.
  - debian/control:
    + Update maintainer accordint to spec.
    + Puppetmaster Recommends -> Suggests
    + Created puppet-testsuite as a seperate. Allow the users to run puppet's 
      testsuite.
  - tests/Rakefile: Fix rakefile so that the testsuite can acutally be ran.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    # LAK 2007-05-09: Keep the model stuff around for backward compatibility
32
32
    attr_reader :model
33
33
    attr_accessor :resource
34
 
    
 
34
 
35
35
    def self.command(name)
36
36
        name = symbolize(name)
37
37
 
91
91
        end
92
92
    end
93
93
 
94
 
    def self.defaultnum
95
 
        @defaults.length
 
94
    def self.specificity
 
95
        (@defaults.length * 100) + ancestors.select { |a| a.is_a? Class }.length
96
96
    end
97
97
 
98
98
    def self.initvars
123
123
                # will catch it, if so.
124
124
                return execute(cmd)
125
125
            end
126
 
            
 
126
 
127
127
            # And then define an instance method that just calls the class method.
128
128
            # We need both, so both instances and classes can easily run the commands.
129
129
            unless method_defined? name
260
260
            # use the hash here for later events.
261
261
            @property_hash = resource
262
262
        elsif resource
263
 
            @resource = resource if resource
 
263
            @resource = resource
264
264
            # LAK 2007-05-09: Keep the model stuff around for backward compatibility
265
265
            @model = resource
266
266
            @property_hash = {}