diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-10-04 12:22:44 -0700 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2010-10-04 12:22:47 -0700 |
commit | 1a00c07971c4297bce1b3e0edee3b6b3399e17bb (patch) | |
tree | 0a8b1f1be1eddcb31e1b0ff7d69dbb60bd1c7e81 /lib/puppet/util.rb | |
parent | d43f7996b93c394df0bd0994ae7298fb35ad2c5e (diff) | |
parent | 66cf3a925b4b6d9b40cbdf95f2be6575bb05a881 (diff) | |
download | puppet-1a00c07971c4297bce1b3e0edee3b6b3399e17bb.tar.gz puppet-1a00c07971c4297bce1b3e0edee3b6b3399e17bb.tar.xz puppet-1a00c07971c4297bce1b3e0edee3b6b3399e17bb.zip |
Partial merge to 2.6.2rc1 : Merge commit '66cf3a9' into next
There are test failures in commits following this one.
Diffstat (limited to 'lib/puppet/util.rb')
-rw-r--r-- | lib/puppet/util.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb index bb4127089..f2eaf0d06 100644 --- a/lib/puppet/util.rb +++ b/lib/puppet/util.rb @@ -20,6 +20,14 @@ module Util # Create a hash to store the different sync objects. @@syncresources = {} + def self.activerecord_version + if (defined?(::ActiveRecord) and defined?(::ActiveRecord::VERSION) and defined?(::ActiveRecord::VERSION::MAJOR) and defined?(::ActiveRecord::VERSION::MINOR)) + ([::ActiveRecord::VERSION::MAJOR, ::ActiveRecord::VERSION::MINOR].join('.').to_f) + else + 0 + end + end + # Return the sync object associated with a given resource. def self.sync(resource) @@syncresources[resource] ||= Sync.new |