summaryrefslogtreecommitdiffstats
path: root/lib/puppet/feature
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-24 19:48:22 +0000
committerLuke Kanies <luke@madstop.com>2009-04-24 14:51:34 -0500
commitbf46db7452ae72d3a40ecc5cf14ae62692c47e84 (patch)
tree20a9a9dc1ceb72b120e975329aed0ff8c5061dc4 /lib/puppet/feature
parent5f6b5c0efe5210583a1040f902af2ff0709f3ca9 (diff)
downloadpuppet-bf46db7452ae72d3a40ecc5cf14ae62692c47e84.tar.gz
puppet-bf46db7452ae72d3a40ecc5cf14ae62692c47e84.tar.xz
puppet-bf46db7452ae72d3a40ecc5cf14ae62692c47e84.zip
Fixing rails feature test
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/feature')
-rw-r--r--lib/puppet/feature/rails.rb12
1 files changed, 7 insertions, 5 deletions
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