~bkerensa/ubuntu/raring/puppet/new-upstream-release

« back to all changes in this revision

Viewing changes to lib/puppet/util.rb

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2010-10-21 12:52:13 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20101021125213-x5pjaatmuv0i79jv
Tags: 2.6.3~rc1-0ubuntu1
* New upstream version
* debian/control:
  - move all puppet dependencies to puppet-common since all the code is
    actually located in puppet-common. 
  - move libaugeas from a recommend to a dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
  # Create a hash to store the different sync objects.
21
21
  @@syncresources = {}
22
22
 
 
23
  def self.activerecord_version
 
24
    if (defined?(::ActiveRecord) and defined?(::ActiveRecord::VERSION) and defined?(::ActiveRecord::VERSION::MAJOR) and defined?(::ActiveRecord::VERSION::MINOR))
 
25
      ([::ActiveRecord::VERSION::MAJOR, ::ActiveRecord::VERSION::MINOR].join('.').to_f)
 
26
    else
 
27
      0
 
28
    end
 
29
  end
 
30
 
23
31
  # Return the sync object associated with a given resource.
24
32
  def self.sync(resource)
25
33
    @@syncresources[resource] ||= Sync.new