Skip to content
Browse files

added possibility to debug

  • Loading branch information...
1 parent 3628282 commit b2d007bf2e1ae587edd36113bce1e243f94d7cdb @dlitvakb dlitvakb committed Mar 7, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/netdnarws.rb
View
10 lib/netdnarws.rb
@@ -101,15 +101,16 @@ def delete uri, data={}, options={}
self._response_as_json 'delete', uri, options, data
end
- def purge zone_id, file_or_files=nil
+ def purge zone_id, file_or_files=nil, options={}
if file_or_files.respond_to? :each
+ options[:debug_json] = true if options[:debug_json].nil?
responses = Hash.new
file_or_files.each { |e|
responses[e] = self.delete(
"/zones/pull.json/#{zone_id}/cache",
{'file' => e},
- :debug_json => true
+ options
)
}
return responses
@@ -119,11 +120,12 @@ def purge zone_id, file_or_files=nil
unless file_or_files.nil?
return self.delete(
"/zones/pull.json/#{zone_id}/cache",
- {'file' => file_or_files}
+ {'file' => file_or_files},
+ options
)
end
- self.delete("/zones/pull.json/#{zone_id}/cache")
+ self.delete("/zones/pull.json/#{zone_id}/cache", {}, options)
end
end
end

0 comments on commit b2d007b

Please sign in to comment.
Something went wrong with that request. Please try again.