1
0
Fork 0
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:
geemus 2022-10-25 10:29:50 -05:00
parent 3e87f50421
commit 2939863efc

View file

@ -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