lib/cfoundry/v2/base.rb in cfoundry-0.3.48 vs lib/cfoundry/v2/base.rb in cfoundry-0.3.49

- old
+ new

@@ -66,15 +66,12 @@ define_method(:"update_#{obj}") do |guid, payload| put(payload, "v2", plural, guid, :content => :json, :accept => :json) end define_method(plural) do |*args| - params = params_from(args) - all_pages( - params, - get("v2", plural, :accept => :json, :params => params)) + get("v2", plural, :accept => :json, :params => params_from(args))) end end def resource_match(fingerprints) put(fingerprints, "v2", "resource_match", @@ -128,16 +125,14 @@ end params end - def all_pages(params, paginated) + def all_pages(paginated) payload = paginated[:resources] while next_page = paginated[:next_url] - paginated = request_path( - Net::HTTP::Get, next_page, :accept => :json, :params => params) - + paginated = request_path(:get, next_page, nil => :json) payload += paginated[:resources] end payload end