diff options
| author | James Turnbull <james@lovedthanlost.net> | 2010-09-14 20:10:25 +1000 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-09-22 21:37:50 -0700 |
| commit | 79d5fde2246cc20b0ace7ed3f273a5352931f6eb (patch) | |
| tree | 3227f2c022e3e32bb6043aef2199803dbc01ccc2 /lib | |
| parent | 4798df328526d08644ea40161dcd2c88799b57db (diff) | |
| download | puppet-79d5fde2246cc20b0ace7ed3f273a5352931f6eb.tar.gz puppet-79d5fde2246cc20b0ace7ed3f273a5352931f6eb.tar.xz puppet-79d5fde2246cc20b0ace7ed3f273a5352931f6eb.zip | |
Fixed #4763 - Hardcoded ActiveRecord version
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/feature/rails.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/rails.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/feature/rails.rb b/lib/puppet/feature/rails.rb index e0e14ebeb..2763b0676 100644 --- a/lib/puppet/feature/rails.rb +++ b/lib/puppet/feature/rails.rb @@ -26,7 +26,7 @@ Puppet.features.add(:rails) do 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 >= 1) + elsif ! (([::ActiveRecord::VERSION::MAJOR, ::ActiveRecord::VERSION::MINOR].join('.').to_f) >= 2.1) Puppet.info "ActiveRecord 2.1 or later required for StoreConfigs" false else diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb index 414b1bc18..6bf5d4abd 100644 --- a/lib/puppet/rails.rb +++ b/lib/puppet/rails.rb @@ -22,7 +22,7 @@ module Puppet::Rails ActiveRecord::Base.logger.level = Logger::DEBUG end - if (::ActiveRecord::VERSION::MAJOR == 2 and ::ActiveRecord::VERSION::MINOR <= 1) + if (([::ActiveRecord::VERSION::MAJOR, ::ActiveRecord::VERSION::MINOR].join('.').to_f) >= 2.1) ActiveRecord::Base.allow_concurrency = true end |
