1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[google|compute] reraise LoadError when google-api-client missing

This commit is contained in:
geemus 2014-02-12 09:54:00 -06:00
parent e759687e03
commit be97df4ef7

View file

@ -854,8 +854,9 @@ module Fog
# NOTE: loaded here to avoid requiring this as a core Fog dependency
begin
require 'google/api_client'
rescue LoadError
rescue LoadError => error
Fog::Logger.warning("Please install the google-api-client gem before using this provider.")
raise error
end
key = ::Google::APIClient::KeyUtils.load_from_pkcs12(File.expand_path(options[:google_key_location]), 'notasecret')