mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[compute|virtualbox] backwards compatibility for gem availability check
This commit is contained in:
parent
b7f54bbd2d
commit
0716f70068
1 changed files with 5 additions and 1 deletions
|
@ -24,7 +24,11 @@ module VirtualBox # deviates from other bin stuff to accomodate gem
|
|||
end
|
||||
|
||||
def available?
|
||||
availability = !Gem::Specification.find_all_by_name('virtualbox').empty?
|
||||
availability = if Gem::Specification.respond_to?(:find_all_by_name)
|
||||
!Gem::Specification.find_all_by_name('virtualbox').empty? # newest rubygems
|
||||
else
|
||||
!Gem.source_index.find_name('virtualbox').empty? # legacy
|
||||
end
|
||||
if availability
|
||||
for service in services
|
||||
for collection in self.class_for(service).collections
|
||||
|
|
Loading…
Reference in a new issue