plntr-fakes3 1.0.0.pre.10alpha33 → 1.0.0.pre.10alpha34
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 +22 -11
- data/lib/fakes3/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cd3f07450f60ad8274f3be51626a6d23fca5fb1a7d670043d388d7043d0e81a
|
4
|
+
data.tar.gz: 16882b3bb82e5d234edeb48307b33c72ef035dde078c681f392466a468949b9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a49c92fec6089018084146cbbac092eab2f09669aa658169fff9553763922a8469cf6b5a3125ff0f0fcdc15fbdc9b77ebe22a25965e515a2eced693c450d6f9e
|
7
|
+
data.tar.gz: '0791de0d704bf3da9cd70de1ef3253b3973b0d94b99cb5cded2993d8073660bd17ae07eaadd3fb7cbd08c3d1255f2eaa524ca642f3a62ab6bfc37444f50a2b3f'
|
data/lib/fakes3/server.rb
CHANGED
@@ -338,20 +338,31 @@ module FakeS3
|
|
338
338
|
when Request::DELETE_OBJECTS
|
339
339
|
warn 'Request::DELETE_OBJECTS'
|
340
340
|
warn "bucket: #{s_req.bucket}"
|
341
|
-
bucket_obj = @store.get_bucket(s_req.bucket)
|
342
341
|
objects = parse_delete_objects s_req.webrick_request
|
343
|
-
|
342
|
+
bucket_obj = @store.get_bucket(s_req.bucket)
|
343
|
+
response.status = 200
|
344
|
+
response.body = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
345
|
+
response.body << '<DeleteResult>'
|
346
|
+
objects.each do |obj|
|
344
347
|
warn "process key=#{obj[:key]} version_id=#{obj[:version_id]}"
|
345
|
-
|
346
|
-
|
348
|
+
if obj[:version_id].nil?
|
349
|
+
response.body <<~eos.strip
|
350
|
+
<Error>
|
351
|
+
<Key>#{obj[:key]}</Key>
|
352
|
+
<Code>XXX_Unimplmented_XXX</Code>
|
353
|
+
<Message>Deletion of verions is not implemented</Message>
|
354
|
+
</Error>
|
355
|
+
eos
|
356
|
+
else
|
357
|
+
# @store.delete_object(bucket_obj, obj.key)
|
358
|
+
response.body <<~eos.strip
|
359
|
+
<Deleted>
|
360
|
+
<Key>#{obj[:key]}</Key>
|
361
|
+
</Deleted>
|
362
|
+
eos
|
363
|
+
end
|
347
364
|
end
|
348
|
-
response.
|
349
|
-
response.body = <<-eos.strip
|
350
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
351
|
-
<DeleteResult>
|
352
|
-
#{responses.join '\n'}
|
353
|
-
</DeleteResult>
|
354
|
-
eos
|
365
|
+
response.body << "</DeleteResult>"
|
355
366
|
warn '--- RESPONSE ---'
|
356
367
|
warn response.body
|
357
368
|
warn '--- RESPONSE END ---'
|
data/lib/fakes3/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plntr-fakes3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.
|
4
|
+
version: 1.0.0.pre.10alpha34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Curtis Spencer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|