netdnarws 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/netdnarws/version.rb +1 -1
- data/lib/netdnarws.rb +6 -4
- metadata +1 -1
data/lib/netdnarws/version.rb
CHANGED
data/lib/netdnarws.rb
CHANGED
@@ -101,15 +101,16 @@ module NetDNARWS
|
|
101
101
|
self._response_as_json 'delete', uri, options, data
|
102
102
|
end
|
103
103
|
|
104
|
-
def purge zone_id, file_or_files=nil
|
104
|
+
def purge zone_id, file_or_files=nil, options={}
|
105
105
|
if file_or_files.respond_to? :each
|
106
|
+
options[:debug_json] = true if options[:debug_json].nil?
|
106
107
|
responses = Hash.new
|
107
108
|
|
108
109
|
file_or_files.each { |e|
|
109
110
|
responses[e] = self.delete(
|
110
111
|
"/zones/pull.json/#{zone_id}/cache",
|
111
112
|
{'file' => e},
|
112
|
-
|
113
|
+
options
|
113
114
|
)
|
114
115
|
}
|
115
116
|
return responses
|
@@ -119,11 +120,12 @@ module NetDNARWS
|
|
119
120
|
unless file_or_files.nil?
|
120
121
|
return self.delete(
|
121
122
|
"/zones/pull.json/#{zone_id}/cache",
|
122
|
-
{'file' => file_or_files}
|
123
|
+
{'file' => file_or_files},
|
124
|
+
options
|
123
125
|
)
|
124
126
|
end
|
125
127
|
|
126
|
-
self.delete("/zones/pull.json/#{zone_id}/cache")
|
128
|
+
self.delete("/zones/pull.json/#{zone_id}/cache", {}, options)
|
127
129
|
end
|
128
130
|
end
|
129
131
|
end
|