diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2011-04-09 15:15:52 -0700 |
|---|---|---|
| committer | Luke Kanies <luke@puppetlabs.com> | 2011-04-09 19:32:02 -0700 |
| commit | 50756588baad21d9b399051153274a89857433ef (patch) | |
| tree | 2f1246bb4ed4ca908880538075e062c091146bda /lib/puppet/indirector | |
| parent | 26b6b37556aea219f972235e11e5118a54ef3d27 (diff) | |
| download | puppet-50756588baad21d9b399051153274a89857433ef.tar.gz puppet-50756588baad21d9b399051153274a89857433ef.tar.xz puppet-50756588baad21d9b399051153274a89857433ef.zip | |
Fixing Indirector::Facts::Couch loading
It was previously failing to load at all if couch was missing,
but now it only fails on initialization.
This means that you can tell that the terminus is there when
you're missing couch, but you just can't use it.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
Diffstat (limited to 'lib/puppet/indirector')
| -rw-r--r-- | lib/puppet/indirector/couch.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/puppet/indirector/couch.rb b/lib/puppet/indirector/couch.rb index fae934fd8..243d33dd4 100644 --- a/lib/puppet/indirector/couch.rb +++ b/lib/puppet/indirector/couch.rb @@ -1,6 +1,3 @@ -raise "Couch terminus not supported without couchrest gem" unless Puppet.features.couchdb? - -require 'couchrest' class Puppet::Indirector::Couch < Puppet::Indirector::Terminus # The CouchRest database instance. One database instance per Puppet runtime @@ -13,6 +10,11 @@ class Puppet::Indirector::Couch < Puppet::Indirector::Terminus attributes_of get(request) end + def initialize(*args) + raise "Couch terminus not supported without couchrest gem" unless Puppet.features.couchdb? + super + end + # Create or update the couchdb document with the request's data hash. # def save(request) |
