diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2010-09-22 15:27:54 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-09-22 21:37:50 -0700 |
| commit | 6468f4ede9d96b8d83f107a8533a4ad6eb88c954 (patch) | |
| tree | 7a50588737141e2361d166fa5e102089f3834f0e /lib/puppet/feature | |
| parent | 79d5fde2246cc20b0ace7ed3f273a5352931f6eb (diff) | |
| download | puppet-6468f4ede9d96b8d83f107a8533a4ad6eb88c954.tar.gz puppet-6468f4ede9d96b8d83f107a8533a4ad6eb88c954.tar.xz puppet-6468f4ede9d96b8d83f107a8533a4ad6eb88c954.zip | |
(#4763) Don't call a method that was removed in Rails 3 activerecord
Calling this method caused storeconfigs not to run.
ActiveRecord::Base.allow_concurrency was deprecated in Rails 2.2. We
support activerecord 2.1 and higher, so we still need to call this
method for 2.1. I factored out the code that determines our
activerecord version to a method in util so that the code was easier to
read and test.
Diffstat (limited to 'lib/puppet/feature')
| -rw-r--r-- | lib/puppet/feature/rails.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/feature/rails.rb b/lib/puppet/feature/rails.rb index 2763b0676..74ed09aa6 100644 --- a/lib/puppet/feature/rails.rb +++ b/lib/puppet/feature/rails.rb @@ -24,9 +24,7 @@ Puppet.features.add(:rails) do end end - if ! (defined?(::ActiveRecord) and defined?(::ActiveRecord::VERSION) and defined?(::ActiveRecord::VERSION::MAJOR) and defined?(::ActiveRecord::VERSION::MINOR)) - false - elsif ! (([::ActiveRecord::VERSION::MAJOR, ::ActiveRecord::VERSION::MINOR].join('.').to_f) >= 2.1) + unless (Puppet::Util.activerecord_version >= 2.1) Puppet.info "ActiveRecord 2.1 or later required for StoreConfigs" false else |
