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

Merge pull request #1540 from brianhartsock/master

[rackspace|dns] fix issue with zones.find when no links are provided
This commit is contained in:
Brian Hartsock 2013-02-01 08:41:52 -08:00
commit eb72f17cce

View file

@ -32,6 +32,7 @@ module Fog
subset = dup.all subset = dup.all
subset.each_zone_this_page {|f| yield f} subset.each_zone_this_page {|f| yield f}
if body.has_key?('links')
while !body['links'].select{|l| l['rel'] == 'next'}.empty? while !body['links'].select{|l| l['rel'] == 'next'}.empty?
url = body['links'].select{|l| l['rel'] == 'next'}.first['href'] url = body['links'].select{|l| l['rel'] == 'next'}.first['href']
query = url.match(/\?(.+)/) query = url.match(/\?(.+)/)
@ -41,6 +42,7 @@ module Fog
subset = dup.all(:offset => parsed['offset'], :limit => parsed['limit']) subset = dup.all(:offset => parsed['offset'], :limit => parsed['limit'])
subset.each_zone_this_page {|f| yield f} subset.each_zone_this_page {|f| yield f}
end end
end
self self
end end
end end