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)
|
||||
end
|
||||
|
||||
alias :each_distribution_this_page :each
|
||||
alias_method :each_distribution_this_page, :each
|
||||
alias_method :each, :each_distribution
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ module Fog
|
|||
class AWS
|
||||
|
||||
module DistributionsHelper
|
||||
|
||||
def all(options = {})
|
||||
merge_attributes(options)
|
||||
data = list_distributions(options).body
|
||||
|
@ -24,7 +25,7 @@ module Fog
|
|||
nil
|
||||
end
|
||||
|
||||
def each
|
||||
def each_distribution
|
||||
if !block_given?
|
||||
self
|
||||
else
|
||||
|
|
|
@ -23,7 +23,8 @@ module Fog
|
|||
service.get_streaming_distribution_list(options)
|
||||
end
|
||||
|
||||
alias :each_distribution_this_page :each
|
||||
alias_method :each_distribution_this_page, :each
|
||||
alias_method :each, :each_distribution
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue