plntr-fakes3 1.0.0.pre.10alpha49 → 1.0.0.pre.10alpha50
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fakes3/server.rb +0 -1
- data/lib/fakes3/version.rb +1 -1
- data/lib/fakes3/xml_adapter.rb +19 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a37030f2a9da099254e322336fc0ade9e6d3e72ded482e94b620bfc08031b9c6
|
4
|
+
data.tar.gz: dd30c0eec9b1786c5924f97cb464e95e6fdcbaa661d9efb99a69bbec4f5da28b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a31c4061372e27fb2a4ba8b3edcd40a68ced6ba2d4957d97564671312b05565cf2b84f2fc4884b9382269c43570c04bbe2830a9ad170391eb3acd7fbdd943d9
|
7
|
+
data.tar.gz: 3df418546dc89c0d33a0b8fd645a62e4dd09b4b8e499002602d4f87d140c75cf0b1262c375a72dabf2bd686926f0aaabc989e73dca464190292c43a0148bbab5
|
data/lib/fakes3/server.rb
CHANGED
data/lib/fakes3/version.rb
CHANGED
data/lib/fakes3/xml_adapter.rb
CHANGED
@@ -219,27 +219,31 @@ module FakeS3
|
|
219
219
|
output
|
220
220
|
end
|
221
221
|
|
222
|
-
# <
|
223
|
-
# <
|
224
|
-
#
|
225
|
-
#
|
226
|
-
# <
|
227
|
-
#
|
228
|
-
|
222
|
+
# <DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
223
|
+
# <Deleted>
|
224
|
+
# <Key>sample1.txt</Key>
|
225
|
+
# </Deleted>
|
226
|
+
# <Error>
|
227
|
+
# <Key>sample2.txt</Key>
|
228
|
+
# <Code>AccessDenied</Code>
|
229
|
+
# <Message>Access Denied</Message>
|
230
|
+
# </Error>
|
231
|
+
# </DeleteResult>
|
232
|
+
def self.delete_objects_result(result_objects)
|
229
233
|
output = ""
|
230
234
|
xml = Builder::XmlMarkup.new(:target => output)
|
231
235
|
xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
|
232
|
-
xml.DeleteResult { |
|
233
|
-
|
236
|
+
xml.DeleteResult(:xmlns => "http://s3.amazonaws.com/doc/2006-03-01/") { |result|
|
237
|
+
result_objects.each do |res|
|
234
238
|
if not res[:code].nil?
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
+
result.Error { |error|
|
240
|
+
error.Key(res[:key])
|
241
|
+
error.Code(res[:code])
|
242
|
+
error.Message(res[:message])
|
239
243
|
}
|
240
244
|
else
|
241
|
-
|
242
|
-
|
245
|
+
result.Deleted { |deleted|
|
246
|
+
deleted.Key(res[:key])
|
243
247
|
}
|
244
248
|
end
|
245
249
|
end
|