plntr-fakes3 1.0.0.pre.10alpha50 → 1.0.0.pre.10alpha51
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 +5 -18
- data/lib/fakes3/version.rb +1 -1
- 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: 5b9a048200800c684851b93b22deabd3e748d7fe7d925f3c4537a7201561faa7
|
4
|
+
data.tar.gz: 5c9a6ed3fa2d5cdf0bdad830b78e27e7171335025a5aae4ad95459faacadec38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff61518e938419500ec1872dd98fb8a236475d3c9d368857a12b1f565e53d32494b54353349320f50e54f61a844f0f611d05c8105adb96759025b0cde689d03a
|
7
|
+
data.tar.gz: 214d3cfe1c41d5546d4f8592177ca27e8da2a0b0578eb272af2322aebe885f546c681b0c1d1ecbc36df8836936bd610df945aa0a7c1641672e76392bc3682038
|
data/lib/fakes3/server.rb
CHANGED
@@ -321,8 +321,6 @@ module FakeS3
|
|
321
321
|
end
|
322
322
|
|
323
323
|
def do_DELETE(request, response)
|
324
|
-
warn 'do_DELETE'
|
325
|
-
dump_request request
|
326
324
|
s_req = normalize_request(request)
|
327
325
|
|
328
326
|
case s_req.type
|
@@ -336,12 +334,9 @@ module FakeS3
|
|
336
334
|
response.status = 204
|
337
335
|
response.body = ""
|
338
336
|
when Request::DELETE_OBJECTS
|
339
|
-
warn 'Request::DELETE_OBJECTS'
|
340
|
-
warn "bucket: #{s_req.bucket}"
|
341
337
|
objects = parse_delete_objects s_req.webrick_request
|
342
338
|
bucket_obj = @store.get_bucket(s_req.bucket)
|
343
339
|
results = objects.collect do |obj|
|
344
|
-
warn "process key=#{obj[:key]} version_id=#{obj[:version_id]}"
|
345
340
|
if not obj[:version_id].nil?
|
346
341
|
{
|
347
342
|
key: obj[:key],
|
@@ -355,10 +350,6 @@ module FakeS3
|
|
355
350
|
end
|
356
351
|
response.status = 200
|
357
352
|
response.body = XmlAdapter.delete_objects_result(results)
|
358
|
-
warn '--- RESPONSE ---'
|
359
|
-
warn response.body
|
360
|
-
warn '--- RESPONSE END ---'
|
361
|
-
warn ''
|
362
353
|
end
|
363
354
|
|
364
355
|
end
|
@@ -563,9 +554,6 @@ module FakeS3
|
|
563
554
|
def parse_delete_objects(request)
|
564
555
|
objects_xml = ""
|
565
556
|
request.body { |chunk| objects_xml << chunk }
|
566
|
-
warn " ::: BODY ::: (type=#{objects_xml.class})"
|
567
|
-
warn objects_xml
|
568
|
-
warn " ::: END BODY :::"
|
569
557
|
|
570
558
|
# TODO: improve parsing xml
|
571
559
|
objects_xml = objects_xml.scan(/<Object>.*?<\/Object>/)
|
@@ -579,14 +567,13 @@ module FakeS3
|
|
579
567
|
end
|
580
568
|
|
581
569
|
def dump_request(request)
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
warn request.query_string
|
570
|
+
puts "----------Dump Request-------------"
|
571
|
+
puts request.request_method
|
572
|
+
puts request.path
|
586
573
|
request.each do |k,v|
|
587
|
-
|
574
|
+
puts "#{k}:#{v}"
|
588
575
|
end
|
589
|
-
|
576
|
+
puts "----------End Dump -------------"
|
590
577
|
end
|
591
578
|
end
|
592
579
|
|
data/lib/fakes3/version.rb
CHANGED