diff options
author | Adam Jacob <adam@opscode.com> | 2009-08-17 15:56:14 -0700 |
---|---|---|
committer | Adam Jacob <adam@opscode.com> | 2009-08-20 13:31:59 -0700 |
commit | db58b8ab27b75a6de4539a4c5d47a491abf88ba3 (patch) | |
tree | 0916e50a489f4b39aa2c29e05542fa90d2c9c329 /chef/lib | |
parent | 5def5cda4fed0a5e0078b4b7afd98767bfce0fb0 (diff) | |
download | chef-db58b8ab27b75a6de4539a4c5d47a491abf88ba3.tar.gz |
Catching a load error on Chef::CouchDB and Chef::Nanite (when used in the client) and updating the deps in the Rakefile
Diffstat (limited to 'chef/lib')
-rw-r--r-- | chef/lib/chef/couchdb.rb | 7 | ||||
-rw-r--r-- | chef/lib/chef/nanite.rb | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/chef/lib/chef/couchdb.rb b/chef/lib/chef/couchdb.rb index d4f6aa5448..3030492e30 100644 --- a/chef/lib/chef/couchdb.rb +++ b/chef/lib/chef/couchdb.rb @@ -21,9 +21,14 @@ require 'chef/rest' require 'chef/log' require 'digest/sha2' require 'json' -require 'uuidtools' require 'chef/nanite' +# We want to fail on create if uuidtools isn't installed +begin + require 'uuidtools' +rescue LoadError +end + class Chef class CouchDB include Chef::Mixin::ParamsValidate diff --git a/chef/lib/chef/nanite.rb b/chef/lib/chef/nanite.rb index a0f4827a68..0a3c37b912 100644 --- a/chef/lib/chef/nanite.rb +++ b/chef/lib/chef/nanite.rb @@ -19,9 +19,14 @@ require 'chef' require 'chef/config' require 'chef/mixin/params_validate' -require 'nanite' require 'json' +# The client doesn't use this class, so we are cool without having it +begin + require 'nanite' +rescue LoadError +end + class Chef class Nanite |