mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
check for constant defined before trying to const get in bin tests
This commit is contained in:
parent
3e87f50421
commit
2939863efc
1 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,9 @@ require 'fog/core/credentials'
|
||||||
module Fog
|
module Fog
|
||||||
class << self
|
class << self
|
||||||
def available_providers
|
def available_providers
|
||||||
@available_providers ||= Fog.providers.values.select {|provider| Kernel.const_get(provider).try(:available?)}.sort
|
available_providers ||= Fog.providers.values.select do |provider|
|
||||||
|
Kernel.const_defined?(provider) && Kernel.const_get(provider).try(:available?)
|
||||||
|
end.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
def registered_providers
|
def registered_providers
|
||||||
|
|
Loading…
Reference in a new issue