diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/defaults.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/feature/rails.rb | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 407d2e890..bcfa83371 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -711,7 +711,7 @@ module Puppet require 'puppet/node/facts' require 'puppet/resource/catalog' if value - raise "StoreConfigs not supported without ActiveRecord" unless Puppet.features.rails? + raise "StoreConfigs not supported without ActiveRecord 2.3" unless Puppet.features.rails? Puppet::Resource::Catalog.cache_class = :active_record unless Puppet.settings[:async_storeconfigs] Puppet::Node::Facts.cache_class = :active_record Puppet::Node.cache_class = :active_record diff --git a/lib/puppet/feature/rails.rb b/lib/puppet/feature/rails.rb index 561863c9f..bdff7893c 100644 --- a/lib/puppet/feature/rails.rb +++ b/lib/puppet/feature/rails.rb @@ -28,11 +28,13 @@ Puppet.features.add(:rails) do end end - unless defined?(::ActiveRecord) and ::ActiveRecord::VERSION::MAJOR == 2 and ::ActiveRecord::VERSION::MINOR == 3 - Puppet.err "ActiveRecord 2.3 required for StoreConfigs" - raise "ActiveRecord 2.3 required for StoreConfigs" + if ! (defined?(::ActiveRecord) and defined?(::ActiveRecord::VERSION) and defined?(::ActiveRecord::VERSION::MAJOR) and defined?(::ActiveRecord::VERSION::MINOR)) + false + elsif ! ::ActiveRecord::VERSION::MAJOR == 2 and ::ActiveRecord::VERSION::MINOR == 3 + Puppet.info "ActiveRecord 2.3 required for StoreConfigs" + false + else + true end - - true end |
