mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
fixed infinite loop in each method of AWS Distributions
This commit is contained in:
parent
d954a16354
commit
1d45d1fbe2
3 changed files with 6 additions and 3 deletions
|
@ -23,7 +23,8 @@ module Fog
|
||||||
service.get_distribution_list(options)
|
service.get_distribution_list(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
alias :each_distribution_this_page :each
|
alias_method :each_distribution_this_page, :each
|
||||||
|
alias_method :each, :each_distribution
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ module Fog
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
module DistributionsHelper
|
module DistributionsHelper
|
||||||
|
|
||||||
def all(options = {})
|
def all(options = {})
|
||||||
merge_attributes(options)
|
merge_attributes(options)
|
||||||
data = list_distributions(options).body
|
data = list_distributions(options).body
|
||||||
|
@ -24,7 +25,7 @@ module Fog
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def each
|
def each_distribution
|
||||||
if !block_given?
|
if !block_given?
|
||||||
self
|
self
|
||||||
else
|
else
|
||||||
|
|
|
@ -23,7 +23,8 @@ module Fog
|
||||||
service.get_streaming_distribution_list(options)
|
service.get_streaming_distribution_list(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
alias :each_distribution_this_page :each
|
alias_method :each_distribution_this_page, :each
|
||||||
|
alias_method :each, :each_distribution
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue