s33r 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/s3cli.rb +1 -1
- data/html/classes/MIME/Type.html +137 -137
- data/html/classes/MIME/Types.html +56 -56
- data/html/classes/Net/HTTPGenericRequest.html +32 -32
- data/html/classes/Net/HTTPResponse.html +63 -38
- data/html/classes/S33r.html +78 -78
- data/html/classes/S33r/BucketListing.html +30 -30
- data/html/classes/S33r/Client.html +340 -286
- data/html/classes/S33r/NamedBucket.html +209 -179
- data/html/classes/S33r/S33rException.html +2 -0
- data/html/classes/S33r/S33rException/MissingBucketName.html +111 -0
- data/html/classes/S33r/S33rException/S3FallenOver.html +111 -0
- data/html/classes/S33r/S3Object.html +24 -24
- data/html/classes/S33r/S3User.html +6 -6
- data/html/classes/S33r/Sync.html +8 -7
- data/html/created.rid +1 -1
- data/html/files/README_txt.html +1 -1
- data/html/files/lib/s33r/bucket_listing_rb.html +1 -1
- data/html/files/lib/s33r/client_rb.html +1 -1
- data/html/files/lib/s33r/named_bucket_rb.html +1 -1
- data/html/files/lib/s33r/s33r_exception_rb.html +1 -1
- data/html/files/lib/s33r/s33r_http_rb.html +1 -1
- data/html/files/lib/s33r/sync_rb.html +1 -1
- data/html/fr_class_index.html +2 -0
- data/html/fr_method_index.html +100 -96
- data/lib/s33r/client.rb +15 -6
- data/lib/s33r/named_bucket.rb +30 -18
- data/lib/s33r/s33r_exception.rb +6 -0
- data/lib/s33r/s33r_http.rb +6 -0
- data/lib/s33r/sync.rb +1 -1
- data/test/cases/spec_bucket_listing.rb +1 -1
- data/test/cases/spec_client.rb +13 -4
- data/test/cases/spec_core.rb +3 -1
- data/test/cases/spec_namedbucket.rb +16 -2
- data/test/cases/spec_sync.rb +4 -0
- data/test/files/namedbucket_config2.yml +12 -0
- data/test/files/s3_object.xml +1 -0
- metadata +5 -2
@@ -166,15 +166,15 @@ href="http://www.ltsw.se/knbase/internet/mime.htp">www.ltsw.se/knbase/internet/m
|
|
166
166
|
<h3 class="section-bar">Methods</h3>
|
167
167
|
|
168
168
|
<div class="name-list">
|
169
|
-
<a href="#
|
170
|
-
<a href="#
|
171
|
-
<a href="#
|
172
|
-
<a href="#
|
173
|
-
<a href="#
|
174
|
-
<a href="#
|
175
|
-
<a href="#
|
176
|
-
<a href="#
|
177
|
-
<a href="#
|
169
|
+
<a href="#M000015">[]</a>
|
170
|
+
<a href="#M000011">[]</a>
|
171
|
+
<a href="#M000018">add</a>
|
172
|
+
<a href="#M000014">add</a>
|
173
|
+
<a href="#M000010">new</a>
|
174
|
+
<a href="#M000017">of</a>
|
175
|
+
<a href="#M000013">of</a>
|
176
|
+
<a href="#M000012">type_for</a>
|
177
|
+
<a href="#M000016">type_for</a>
|
178
178
|
</div>
|
179
179
|
</div>
|
180
180
|
|
@@ -230,11 +230,11 @@ The data version.
|
|
230
230
|
<div id="methods">
|
231
231
|
<h3 class="section-bar">Public Class methods</h3>
|
232
232
|
|
233
|
-
<div id="method-
|
234
|
-
<a name="
|
233
|
+
<div id="method-M000015" class="method-detail">
|
234
|
+
<a name="M000015"></a>
|
235
235
|
|
236
236
|
<div class="method-heading">
|
237
|
-
<a href="#
|
237
|
+
<a href="#M000015" class="method-signature">
|
238
238
|
<span class="method-name">[]</span><span class="method-args">(type_id, flags = {})</span>
|
239
239
|
</a>
|
240
240
|
</div>
|
@@ -259,8 +259,8 @@ case, and one for VMS systems.
|
|
259
259
|
end
|
260
260
|
</pre>
|
261
261
|
<p><a class="source-toggle" href="#"
|
262
|
-
onclick="toggleCode('
|
263
|
-
<div class="method-source-code" id="
|
262
|
+
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
263
|
+
<div class="method-source-code" id="M000015-source">
|
264
264
|
<pre>
|
265
265
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 641</span>
|
266
266
|
641: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">type_id</span>, <span class="ruby-identifier">flags</span> = {})
|
@@ -271,11 +271,11 @@ case, and one for VMS systems.
|
|
271
271
|
</div>
|
272
272
|
</div>
|
273
273
|
|
274
|
-
<div id="method-
|
275
|
-
<a name="
|
274
|
+
<div id="method-M000018" class="method-detail">
|
275
|
+
<a name="M000018"></a>
|
276
276
|
|
277
277
|
<div class="method-heading">
|
278
|
-
<a href="#
|
278
|
+
<a href="#M000018" class="method-signature">
|
279
279
|
<span class="method-name">add</span><span class="method-args">(*types)</span>
|
280
280
|
</a>
|
281
281
|
</div>
|
@@ -292,8 +292,8 @@ will be displayed.
|
|
292
292
|
missing.</b>
|
293
293
|
</p>
|
294
294
|
<p><a class="source-toggle" href="#"
|
295
|
-
onclick="toggleCode('
|
296
|
-
<div class="method-source-code" id="
|
295
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
296
|
+
<div class="method-source-code" id="M000018-source">
|
297
297
|
<pre>
|
298
298
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 668</span>
|
299
299
|
668: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">types</span>)
|
@@ -304,19 +304,19 @@ missing.</b>
|
|
304
304
|
</div>
|
305
305
|
</div>
|
306
306
|
|
307
|
-
<div id="method-
|
308
|
-
<a name="
|
307
|
+
<div id="method-M000010" class="method-detail">
|
308
|
+
<a name="M000010"></a>
|
309
309
|
|
310
310
|
<div class="method-heading">
|
311
|
-
<a href="#
|
311
|
+
<a href="#M000010" class="method-signature">
|
312
312
|
<span class="method-name">new</span><span class="method-args">(data_version = nil)</span>
|
313
313
|
</a>
|
314
314
|
</div>
|
315
315
|
|
316
316
|
<div class="method-description">
|
317
317
|
<p><a class="source-toggle" href="#"
|
318
|
-
onclick="toggleCode('
|
319
|
-
<div class="method-source-code" id="
|
318
|
+
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
319
|
+
<div class="method-source-code" id="M000010-source">
|
320
320
|
<pre>
|
321
321
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 533</span>
|
322
322
|
533: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">data_version</span> = <span class="ruby-keyword kw">nil</span>)
|
@@ -328,22 +328,22 @@ missing.</b>
|
|
328
328
|
</div>
|
329
329
|
</div>
|
330
330
|
|
331
|
-
<div id="method-
|
332
|
-
<a name="
|
331
|
+
<div id="method-M000017" class="method-detail">
|
332
|
+
<a name="M000017"></a>
|
333
333
|
|
334
334
|
<div class="method-heading">
|
335
|
-
<a href="#
|
335
|
+
<a href="#M000017" class="method-signature">
|
336
336
|
<span class="method-name">of</span><span class="method-args">(filename, platform = false)</span>
|
337
337
|
</a>
|
338
338
|
</div>
|
339
339
|
|
340
340
|
<div class="method-description">
|
341
341
|
<p>
|
342
|
-
A synonym for <a href="Types.html#
|
342
|
+
A synonym for <a href="Types.html#M000012">MIME::Types.type_for</a>
|
343
343
|
</p>
|
344
344
|
<p><a class="source-toggle" href="#"
|
345
|
-
onclick="toggleCode('
|
346
|
-
<div class="method-source-code" id="
|
345
|
+
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
346
|
+
<div class="method-source-code" id="M000017-source">
|
347
347
|
<pre>
|
348
348
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 658</span>
|
349
349
|
658: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">of</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">platform</span> = <span class="ruby-keyword kw">false</span>)
|
@@ -354,11 +354,11 @@ A synonym for <a href="Types.html#M000011">MIME::Types.type_for</a>
|
|
354
354
|
</div>
|
355
355
|
</div>
|
356
356
|
|
357
|
-
<div id="method-
|
358
|
-
<a name="
|
357
|
+
<div id="method-M000016" class="method-detail">
|
358
|
+
<a name="M000016"></a>
|
359
359
|
|
360
360
|
<div class="method-heading">
|
361
|
-
<a href="#
|
361
|
+
<a href="#M000016" class="method-signature">
|
362
362
|
<span class="method-name">type_for</span><span class="method-args">(filename, platform = false)</span>
|
363
363
|
</a>
|
364
364
|
</div>
|
@@ -377,8 +377,8 @@ platform will be returned.
|
|
377
377
|
=> "#{MIME::Types.type_for('citydesk.gif')}"
|
378
378
|
</pre>
|
379
379
|
<p><a class="source-toggle" href="#"
|
380
|
-
onclick="toggleCode('
|
381
|
-
<div class="method-source-code" id="
|
380
|
+
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
381
|
+
<div class="method-source-code" id="M000016-source">
|
382
382
|
<pre>
|
383
383
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 653</span>
|
384
384
|
653: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type_for</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">platform</span> = <span class="ruby-keyword kw">false</span>)
|
@@ -391,11 +391,11 @@ platform will be returned.
|
|
391
391
|
|
392
392
|
<h3 class="section-bar">Public Instance methods</h3>
|
393
393
|
|
394
|
-
<div id="method-
|
395
|
-
<a name="
|
394
|
+
<div id="method-M000011" class="method-detail">
|
395
|
+
<a name="M000011"></a>
|
396
396
|
|
397
397
|
<div class="method-heading">
|
398
|
-
<a href="#
|
398
|
+
<a href="#M000011" class="method-signature">
|
399
399
|
<span class="method-name">[]</span><span class="method-args">(type_id, flags = {})</span>
|
400
400
|
</a>
|
401
401
|
</div>
|
@@ -420,8 +420,8 @@ case, and one for VMS systems.
|
|
420
420
|
end
|
421
421
|
</pre>
|
422
422
|
<p><a class="source-toggle" href="#"
|
423
|
-
onclick="toggleCode('
|
424
|
-
<div class="method-source-code" id="
|
423
|
+
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
424
|
+
<div class="method-source-code" id="M000011-source">
|
425
425
|
<pre>
|
426
426
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 562</span>
|
427
427
|
562: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">type_id</span>, <span class="ruby-identifier">flags</span> = {})
|
@@ -446,11 +446,11 @@ case, and one for VMS systems.
|
|
446
446
|
</div>
|
447
447
|
</div>
|
448
448
|
|
449
|
-
<div id="method-
|
450
|
-
<a name="
|
449
|
+
<div id="method-M000014" class="method-detail">
|
450
|
+
<a name="M000014"></a>
|
451
451
|
|
452
452
|
<div class="method-heading">
|
453
|
-
<a href="#
|
453
|
+
<a href="#M000014" class="method-signature">
|
454
454
|
<span class="method-name">add</span><span class="method-args">(*types)</span>
|
455
455
|
</a>
|
456
456
|
</div>
|
@@ -467,8 +467,8 @@ will be displayed.
|
|
467
467
|
missing.</b>
|
468
468
|
</p>
|
469
469
|
<p><a class="source-toggle" href="#"
|
470
|
-
onclick="toggleCode('
|
471
|
-
<div class="method-source-code" id="
|
470
|
+
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
471
|
+
<div class="method-source-code" id="M000014-source">
|
472
472
|
<pre>
|
473
473
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 606</span>
|
474
474
|
606: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">types</span>)
|
@@ -487,22 +487,22 @@ missing.</b>
|
|
487
487
|
</div>
|
488
488
|
</div>
|
489
489
|
|
490
|
-
<div id="method-
|
491
|
-
<a name="
|
490
|
+
<div id="method-M000013" class="method-detail">
|
491
|
+
<a name="M000013"></a>
|
492
492
|
|
493
493
|
<div class="method-heading">
|
494
|
-
<a href="#
|
494
|
+
<a href="#M000013" class="method-signature">
|
495
495
|
<span class="method-name">of</span><span class="method-args">(filename, platform = false)</span>
|
496
496
|
</a>
|
497
497
|
</div>
|
498
498
|
|
499
499
|
<div class="method-description">
|
500
500
|
<p>
|
501
|
-
A synonym for <a href="Types.html#
|
501
|
+
A synonym for <a href="Types.html#M000012">MIME::Types.type_for</a>
|
502
502
|
</p>
|
503
503
|
<p><a class="source-toggle" href="#"
|
504
|
-
onclick="toggleCode('
|
505
|
-
<div class="method-source-code" id="
|
504
|
+
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
505
|
+
<div class="method-source-code" id="M000013-source">
|
506
506
|
<pre>
|
507
507
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 596</span>
|
508
508
|
596: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">of</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">platform</span> = <span class="ruby-keyword kw">false</span>)
|
@@ -513,11 +513,11 @@ A synonym for <a href="Types.html#M000011">MIME::Types.type_for</a>
|
|
513
513
|
</div>
|
514
514
|
</div>
|
515
515
|
|
516
|
-
<div id="method-
|
517
|
-
<a name="
|
516
|
+
<div id="method-M000012" class="method-detail">
|
517
|
+
<a name="M000012"></a>
|
518
518
|
|
519
519
|
<div class="method-heading">
|
520
|
-
<a href="#
|
520
|
+
<a href="#M000012" class="method-signature">
|
521
521
|
<span class="method-name">type_for</span><span class="method-args">(filename, platform = false)</span>
|
522
522
|
</a>
|
523
523
|
</div>
|
@@ -536,8 +536,8 @@ platform will be returned.
|
|
536
536
|
=> "#{MIME::Types.type_for('citydesk.gif')}"
|
537
537
|
</pre>
|
538
538
|
<p><a class="source-toggle" href="#"
|
539
|
-
onclick="toggleCode('
|
540
|
-
<div class="method-source-code" id="
|
539
|
+
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
540
|
+
<div class="method-source-code" id="M000012-source">
|
541
541
|
<pre>
|
542
542
|
<span class="ruby-comment cmt"># File lib/s33r/mimetypes.rb, line 588</span>
|
543
543
|
588: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type_for</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">platform</span> = <span class="ruby-keyword kw">false</span>)
|
@@ -157,18 +157,18 @@ to <a href="../S33r/Client.html">S33r::Client</a> constructor.
|
|
157
157
|
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
158
158
|
<div class="method-source-code" id="M000003-source">
|
159
159
|
<pre>
|
160
|
-
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
160
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 46</span>
|
161
|
+
46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
162
|
+
47: <span class="ruby-identifier">str</span> = <span class="ruby-value str">"*******\n"</span> <span class="ruby-operator">+</span>
|
163
|
+
48: <span class="ruby-node">"#{self.class::METHOD} #{@path} HTTP/1.1\n"</span> <span class="ruby-operator">+</span>
|
164
|
+
49: <span class="ruby-node">"Host: #{S33r::HOST}\n"</span>
|
165
|
+
50:
|
166
|
+
51: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_capitalized</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
167
|
+
52: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"#{key}: #{value}\n"</span>
|
168
|
+
53: <span class="ruby-keyword kw">end</span>
|
169
|
+
54: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"*******\n\n"</span>
|
170
|
+
55: <span class="ruby-identifier">str</span>
|
171
|
+
56: <span class="ruby-keyword kw">end</span>
|
172
172
|
</pre>
|
173
173
|
</div>
|
174
174
|
</div>
|
@@ -193,26 +193,26 @@ Minor alterations to original source to enable variable chunk sizes.
|
|
193
193
|
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
194
194
|
<div class="method-source-code" id="M000004-source">
|
195
195
|
<pre>
|
196
|
-
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
196
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 60</span>
|
197
|
+
60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_request_with_body_stream</span>(<span class="ruby-identifier">sock</span>, <span class="ruby-identifier">ver</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">f</span>) <span class="ruby-comment cmt"># :doc:</span>
|
198
|
+
61: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Content-Length not given and Transfer-Encoding is not `chunked'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">content_length</span>() <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">chunked?</span>
|
199
|
+
62: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">content_type</span>()
|
200
|
+
63: <span class="ruby-identifier">warn</span> <span class="ruby-value str">'net/http: warning: Content-Type did not set; using application/x-www-form-urlencoded'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$VERBOSE</span>
|
201
|
+
64: <span class="ruby-identifier">set_content_type</span> <span class="ruby-value str">'application/x-www-form-urlencoded'</span>
|
202
|
+
65: <span class="ruby-keyword kw">end</span>
|
203
|
+
66: <span class="ruby-ivar">@chunk_size</span> <span class="ruby-operator">||=</span> <span class="ruby-value">1024</span>
|
204
|
+
67: <span class="ruby-identifier">write_header</span> <span class="ruby-identifier">sock</span>, <span class="ruby-identifier">ver</span>, <span class="ruby-identifier">path</span>
|
205
|
+
68: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">chunked?</span>
|
206
|
+
69: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">s</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@chunk_size</span>)
|
207
|
+
70: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"%x\r\n"</span>, <span class="ruby-identifier">s</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\r\n"</span>)
|
208
|
+
71: <span class="ruby-keyword kw">end</span>
|
209
|
+
72: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">write</span> <span class="ruby-value str">"0\r\n\r\n"</span>
|
210
|
+
73: <span class="ruby-keyword kw">else</span>
|
211
|
+
74: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">s</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@chunk_size</span>)
|
212
|
+
75: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">s</span>
|
213
|
+
76: <span class="ruby-keyword kw">end</span>
|
214
|
+
77: <span class="ruby-keyword kw">end</span>
|
215
|
+
78: <span class="ruby-keyword kw">end</span>
|
216
216
|
</pre>
|
217
217
|
</div>
|
218
218
|
</div>
|
@@ -92,10 +92,11 @@ Adds some convenience functions for checking response status.
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#M000006">
|
98
|
-
<a href="#
|
95
|
+
<a href="#M000005">check_s3_availability</a>
|
96
|
+
<a href="#M000008">not_found</a>
|
97
|
+
<a href="#M000006">ok?</a>
|
98
|
+
<a href="#M000007">success</a>
|
99
|
+
<a href="#M000009">to_s</a>
|
99
100
|
</div>
|
100
101
|
</div>
|
101
102
|
|
@@ -135,47 +136,48 @@ Adds some convenience functions for checking response status.
|
|
135
136
|
<div id="methods">
|
136
137
|
<h3 class="section-bar">Public Instance methods</h3>
|
137
138
|
|
138
|
-
<div id="method-
|
139
|
-
<a name="
|
139
|
+
<div id="method-M000005" class="method-detail">
|
140
|
+
<a name="M000005"></a>
|
140
141
|
|
141
142
|
<div class="method-heading">
|
142
|
-
<a href="#
|
143
|
-
<span class="method-name">
|
143
|
+
<a href="#M000005" class="method-signature">
|
144
|
+
<span class="method-name">check_s3_availability</span><span class="method-args">()</span>
|
144
145
|
</a>
|
145
146
|
</div>
|
146
147
|
|
147
148
|
<div class="method-description">
|
148
149
|
<p><a class="source-toggle" href="#"
|
149
|
-
onclick="toggleCode('
|
150
|
-
<div class="method-source-code" id="
|
150
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
151
|
+
<div class="method-source-code" id="M000005-source">
|
151
152
|
<pre>
|
152
|
-
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line
|
153
|
-
|
154
|
-
|
155
|
-
|
153
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 11</span>
|
154
|
+
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check_s3_availability</span>
|
155
|
+
12: <span class="ruby-identifier">raise</span> <span class="ruby-constant">S33rException</span><span class="ruby-operator">::</span><span class="ruby-constant">S3FallenOver</span>, <span class="ruby-node">"S3 has fallen over! (got a #{code} code in response)"</span> \
|
156
|
+
13: <span class="ruby-keyword kw">if</span> (<span class="ruby-value">500</span><span class="ruby-operator">..</span><span class="ruby-value">503</span>).<span class="ruby-identifier">include?</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">to_i</span>
|
157
|
+
14: <span class="ruby-keyword kw">end</span>
|
156
158
|
</pre>
|
157
159
|
</div>
|
158
160
|
</div>
|
159
161
|
</div>
|
160
162
|
|
161
|
-
<div id="method-
|
162
|
-
<a name="
|
163
|
+
<div id="method-M000008" class="method-detail">
|
164
|
+
<a name="M000008"></a>
|
163
165
|
|
164
166
|
<div class="method-heading">
|
165
|
-
<a href="#
|
166
|
-
<span class="method-name">
|
167
|
+
<a href="#M000008" class="method-signature">
|
168
|
+
<span class="method-name">not_found</span><span class="method-args">()</span>
|
167
169
|
</a>
|
168
170
|
</div>
|
169
171
|
|
170
172
|
<div class="method-description">
|
171
173
|
<p><a class="source-toggle" href="#"
|
172
|
-
onclick="toggleCode('
|
173
|
-
<div class="method-source-code" id="
|
174
|
+
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
175
|
+
<div class="method-source-code" id="M000008-source">
|
174
176
|
<pre>
|
175
|
-
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line
|
176
|
-
|
177
|
-
|
178
|
-
|
177
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 24</span>
|
178
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">not_found</span>
|
179
|
+
25: <span class="ruby-identifier">code</span> = <span class="ruby-value str">'404'</span>
|
180
|
+
26: <span class="ruby-keyword kw">end</span>
|
179
181
|
</pre>
|
180
182
|
</div>
|
181
183
|
</div>
|
@@ -186,7 +188,7 @@ Adds some convenience functions for checking response status.
|
|
186
188
|
|
187
189
|
<div class="method-heading">
|
188
190
|
<a href="#M000006" class="method-signature">
|
189
|
-
<span class="method-name">
|
191
|
+
<span class="method-name">ok?</span><span class="method-args">()</span>
|
190
192
|
</a>
|
191
193
|
</div>
|
192
194
|
|
@@ -195,33 +197,56 @@ Adds some convenience functions for checking response status.
|
|
195
197
|
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
196
198
|
<div class="method-source-code" id="M000006-source">
|
197
199
|
<pre>
|
198
|
-
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line
|
199
|
-
|
200
|
-
|
201
|
-
|
200
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 16</span>
|
201
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ok?</span>
|
202
|
+
17: <span class="ruby-identifier">success</span>
|
203
|
+
18: <span class="ruby-keyword kw">end</span>
|
202
204
|
</pre>
|
203
205
|
</div>
|
204
206
|
</div>
|
205
207
|
</div>
|
206
208
|
|
207
|
-
<div id="method-
|
208
|
-
<a name="
|
209
|
+
<div id="method-M000007" class="method-detail">
|
210
|
+
<a name="M000007"></a>
|
209
211
|
|
210
212
|
<div class="method-heading">
|
211
|
-
<a href="#
|
213
|
+
<a href="#M000007" class="method-signature">
|
214
|
+
<span class="method-name">success</span><span class="method-args">()</span>
|
215
|
+
</a>
|
216
|
+
</div>
|
217
|
+
|
218
|
+
<div class="method-description">
|
219
|
+
<p><a class="source-toggle" href="#"
|
220
|
+
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
221
|
+
<div class="method-source-code" id="M000007-source">
|
222
|
+
<pre>
|
223
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 20</span>
|
224
|
+
20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">success</span>
|
225
|
+
21: <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'200'</span>
|
226
|
+
22: <span class="ruby-keyword kw">end</span>
|
227
|
+
</pre>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
<div id="method-M000009" class="method-detail">
|
233
|
+
<a name="M000009"></a>
|
234
|
+
|
235
|
+
<div class="method-heading">
|
236
|
+
<a href="#M000009" class="method-signature">
|
212
237
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
213
238
|
</a>
|
214
239
|
</div>
|
215
240
|
|
216
241
|
<div class="method-description">
|
217
242
|
<p><a class="source-toggle" href="#"
|
218
|
-
onclick="toggleCode('
|
219
|
-
<div class="method-source-code" id="
|
243
|
+
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
244
|
+
<div class="method-source-code" id="M000009-source">
|
220
245
|
<pre>
|
221
|
-
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line
|
222
|
-
|
223
|
-
|
224
|
-
|
246
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 28</span>
|
247
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
248
|
+
29: <span class="ruby-identifier">body</span>
|
249
|
+
30: <span class="ruby-keyword kw">end</span>
|
225
250
|
</pre>
|
226
251
|
</div>
|
227
252
|
</div>
|