s33r 0.2 → 0.3
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/bin/s3cli.rb +25 -16
- data/html/classes/MIME.html +120 -0
- data/html/classes/MIME/InvalidContentType.html +119 -0
- data/html/classes/MIME/Type.html +1173 -0
- data/html/classes/MIME/Types.html +566 -0
- data/html/classes/Net.html +108 -0
- data/html/classes/Net/HTTPGenericRequest.html +233 -0
- data/html/classes/Net/HTTPResponse.html +242 -0
- data/html/classes/S33r.html +743 -0
- data/html/classes/S33r/BucketListing.html +372 -0
- data/html/classes/S33r/Client.html +981 -0
- data/html/classes/S33r/NamedBucket.html +620 -0
- data/html/classes/S33r/S33rException.html +118 -0
- data/html/classes/S33r/S33rException/BucketListingMaxKeysError.html +111 -0
- data/html/classes/S33r/S33rException/InvalidBucketListing.html +111 -0
- data/html/classes/S33r/S33rException/MalformedBucketName.html +111 -0
- data/html/classes/S33r/S33rException/MethodNotAvailable.html +111 -0
- data/html/classes/S33r/S33rException/MissingRequiredHeaders.html +111 -0
- data/html/classes/S33r/S33rException/MissingResource.html +111 -0
- data/html/classes/S33r/S33rException/UnsupportedCannedACL.html +111 -0
- data/html/classes/S33r/S33rException/UnsupportedHTTPMethod.html +111 -0
- data/html/classes/S33r/S3Object.html +307 -0
- data/html/classes/S33r/S3User.html +171 -0
- data/html/classes/S33r/Sync.html +151 -0
- data/html/classes/XML.html +200 -0
- data/html/classes/XML/Document.html +125 -0
- data/html/classes/XML/Node.html +124 -0
- data/html/created.rid +1 -0
- data/html/files/CHANGELOG.html +101 -0
- data/html/files/MIT-LICENSE.html +129 -0
- data/html/files/README_txt.html +209 -0
- data/html/files/lib/s33r/bucket_listing_rb.html +116 -0
- data/html/files/lib/s33r/client_rb.html +110 -0
- data/html/files/lib/s33r/core_rb.html +113 -0
- data/html/files/lib/s33r/libxml_extensions_rb.html +107 -0
- data/html/files/lib/s33r/mimetypes_rb.html +120 -0
- data/html/files/lib/s33r/named_bucket_rb.html +101 -0
- data/html/files/lib/s33r/s33r_exception_rb.html +101 -0
- data/html/files/lib/s33r/s33r_http_rb.html +108 -0
- data/html/files/lib/s33r/sync_rb.html +101 -0
- data/html/files/lib/s33r_rb.html +101 -0
- data/html/fr_class_index.html +52 -0
- data/html/fr_file_index.html +39 -0
- data/html/fr_method_index.html +126 -0
- data/html/index.html +24 -0
- data/html/rdoc-style.css +208 -0
- data/lib/s33r/bucket_listing.rb +69 -60
- data/lib/s33r/client.rb +150 -73
- data/lib/s33r/core.rb +56 -44
- data/lib/s33r/libxml_extensions.rb +10 -5
- data/lib/s33r/mimetypes.rb +3 -2
- data/lib/s33r/named_bucket.rb +89 -24
- data/lib/s33r/{s3_exception.rb → s33r_exception.rb} +2 -2
- data/lib/s33r/{net_http_overrides.rb → s33r_http.rb} +29 -21
- data/lib/s33r/sync.rb +4 -2
- data/test/cases/spec_bucket_listing.rb +10 -13
- data/test/cases/spec_client.rb +65 -0
- data/test/cases/spec_core.rb +16 -11
- data/test/cases/spec_namedbucket.rb +32 -0
- data/test/cases/spec_sync.rb +6 -5
- data/test/cases/spec_xml.rb +1 -1
- data/test/files/client_config.yml +6 -0
- data/test/files/namedbucket_config.yml +12 -0
- data/test/{s3_test_constants.rb → test_setup.rb} +7 -6
- metadata +63 -11
- data/LICENSE.txt +0 -22
- data/MIT-LICENSE +0 -21
- data/README.txt +0 -19
- data/bin/config.yml +0 -5
- data/test/cases/unit_client.rb +0 -40
- data/test/cases/unit_named_bucket.rb +0 -12
@@ -0,0 +1,108 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Net</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Net</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
</td>
|
59
|
+
</tr>
|
60
|
+
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
<div id="class-list">
|
84
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
85
|
+
|
86
|
+
Class <a href="Net/HTTPGenericRequest.html" class="link">Net::HTTPGenericRequest</a><br />
|
87
|
+
Class <a href="Net/HTTPResponse.html" class="link">Net::HTTPResponse</a><br />
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<!-- if method_list -->
|
98
|
+
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<div id="validator-badges">
|
104
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
</body>
|
108
|
+
</html>
|
@@ -0,0 +1,233 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Net::HTTPGenericRequest</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Net::HTTPGenericRequest</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/s33r/s33r_http_rb.html">
|
59
|
+
lib/s33r/s33r_http.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Modification of Net::HTTP base class to enable larger chunk sizes to be
|
84
|
+
used when streaming data from large files.
|
85
|
+
</p>
|
86
|
+
<p>
|
87
|
+
N.B. does <em>not</em> alter the behaviour of this class unless you set
|
88
|
+
chunk_size using the accessor.
|
89
|
+
</p>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
<div id="method-list">
|
97
|
+
<h3 class="section-bar">Methods</h3>
|
98
|
+
|
99
|
+
<div class="name-list">
|
100
|
+
<a href="#M000004">send_request_with_body_stream</a>
|
101
|
+
<a href="#M000003">to_s</a>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<!-- if includes -->
|
109
|
+
|
110
|
+
<div id="section">
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<div id="attribute-list">
|
117
|
+
<h3 class="section-bar">Attributes</h3>
|
118
|
+
|
119
|
+
<div class="name-list">
|
120
|
+
<table>
|
121
|
+
<tr class="top-aligned-row context-row">
|
122
|
+
<td class="context-item-name">chunk_size</td>
|
123
|
+
<td class="context-item-value"> [RW] </td>
|
124
|
+
<td class="context-item-desc">
|
125
|
+
Size of chunks (in bytes) to send when streaming body data.
|
126
|
+
|
127
|
+
</td>
|
128
|
+
</tr>
|
129
|
+
</table>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<!-- if method_list -->
|
136
|
+
<div id="methods">
|
137
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
138
|
+
|
139
|
+
<div id="method-M000003" class="method-detail">
|
140
|
+
<a name="M000003"></a>
|
141
|
+
|
142
|
+
<div class="method-heading">
|
143
|
+
<a href="#M000003" class="method-signature">
|
144
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
145
|
+
</a>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div class="method-description">
|
149
|
+
<p>
|
150
|
+
Dump initial line and raw request headers (useful for visual debugging).
|
151
|
+
</p>
|
152
|
+
<p>
|
153
|
+
Switch on request debugging by passing <tt>:dump_requests => true</tt>
|
154
|
+
to <a href="../S33r/Client.html">S33r::Client</a> constructor.
|
155
|
+
</p>
|
156
|
+
<p><a class="source-toggle" href="#"
|
157
|
+
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
158
|
+
<div class="method-source-code" id="M000003-source">
|
159
|
+
<pre>
|
160
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 40</span>
|
161
|
+
40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
162
|
+
41: <span class="ruby-identifier">str</span> = <span class="ruby-value str">"*******\n"</span> <span class="ruby-operator">+</span>
|
163
|
+
42: <span class="ruby-node">"#{self.class::METHOD} #{@path} HTTP/1.1\n"</span> <span class="ruby-operator">+</span>
|
164
|
+
43: <span class="ruby-node">"Host: #{S33r::HOST}\n"</span>
|
165
|
+
44:
|
166
|
+
45: <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
|
+
46: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"#{key}: #{value}\n"</span>
|
168
|
+
47: <span class="ruby-keyword kw">end</span>
|
169
|
+
48: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"*******\n\n"</span>
|
170
|
+
49: <span class="ruby-identifier">str</span>
|
171
|
+
50: <span class="ruby-keyword kw">end</span>
|
172
|
+
</pre>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
<h3 class="section-bar">Private Instance methods</h3>
|
178
|
+
|
179
|
+
<div id="method-M000004" class="method-detail">
|
180
|
+
<a name="M000004"></a>
|
181
|
+
|
182
|
+
<div class="method-heading">
|
183
|
+
<a href="#M000004" class="method-signature">
|
184
|
+
<span class="method-name">send_request_with_body_stream</span><span class="method-args">(sock, ver, path, f)</span>
|
185
|
+
</a>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
<div class="method-description">
|
189
|
+
<p>
|
190
|
+
Minor alterations to original source to enable variable chunk sizes.
|
191
|
+
</p>
|
192
|
+
<p><a class="source-toggle" href="#"
|
193
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
194
|
+
<div class="method-source-code" id="M000004-source">
|
195
|
+
<pre>
|
196
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 54</span>
|
197
|
+
54: <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
|
+
55: <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
|
+
56: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">content_type</span>()
|
200
|
+
57: <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
|
+
58: <span class="ruby-identifier">set_content_type</span> <span class="ruby-value str">'application/x-www-form-urlencoded'</span>
|
202
|
+
59: <span class="ruby-keyword kw">end</span>
|
203
|
+
60: <span class="ruby-ivar">@chunk_size</span> <span class="ruby-operator">||=</span> <span class="ruby-value">1024</span>
|
204
|
+
61: <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
|
+
62: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">chunked?</span>
|
206
|
+
63: <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
|
+
64: <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
|
+
65: <span class="ruby-keyword kw">end</span>
|
209
|
+
66: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">write</span> <span class="ruby-value str">"0\r\n\r\n"</span>
|
210
|
+
67: <span class="ruby-keyword kw">else</span>
|
211
|
+
68: <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
|
+
69: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">s</span>
|
213
|
+
70: <span class="ruby-keyword kw">end</span>
|
214
|
+
71: <span class="ruby-keyword kw">end</span>
|
215
|
+
72: <span class="ruby-keyword kw">end</span>
|
216
|
+
</pre>
|
217
|
+
</div>
|
218
|
+
</div>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
</div>
|
226
|
+
|
227
|
+
|
228
|
+
<div id="validator-badges">
|
229
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
</body>
|
233
|
+
</html>
|
@@ -0,0 +1,242 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Net::HTTPResponse</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Net::HTTPResponse</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/s33r/s33r_http_rb.html">
|
59
|
+
lib/s33r/s33r_http.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Adds some convenience functions for checking response status.
|
84
|
+
</p>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div id="method-list">
|
92
|
+
<h3 class="section-bar">Methods</h3>
|
93
|
+
|
94
|
+
<div class="name-list">
|
95
|
+
<a href="#M000007">not_found</a>
|
96
|
+
<a href="#M000005">ok?</a>
|
97
|
+
<a href="#M000006">success</a>
|
98
|
+
<a href="#M000008">to_s</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<!-- if includes -->
|
106
|
+
|
107
|
+
<div id="section">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
<div id="attribute-list">
|
114
|
+
<h3 class="section-bar">Attributes</h3>
|
115
|
+
|
116
|
+
<div class="name-list">
|
117
|
+
<table>
|
118
|
+
<tr class="top-aligned-row context-row">
|
119
|
+
<td class="context-item-name">body</td>
|
120
|
+
<td class="context-item-value"> [W] </td>
|
121
|
+
<td class="context-item-desc"></td>
|
122
|
+
</tr>
|
123
|
+
<tr class="top-aligned-row context-row">
|
124
|
+
<td class="context-item-name">success</td>
|
125
|
+
<td class="context-item-value"> [RW] </td>
|
126
|
+
<td class="context-item-desc"></td>
|
127
|
+
</tr>
|
128
|
+
</table>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<!-- if method_list -->
|
135
|
+
<div id="methods">
|
136
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
137
|
+
|
138
|
+
<div id="method-M000007" class="method-detail">
|
139
|
+
<a name="M000007"></a>
|
140
|
+
|
141
|
+
<div class="method-heading">
|
142
|
+
<a href="#M000007" class="method-signature">
|
143
|
+
<span class="method-name">not_found</span><span class="method-args">()</span>
|
144
|
+
</a>
|
145
|
+
</div>
|
146
|
+
|
147
|
+
<div class="method-description">
|
148
|
+
<p><a class="source-toggle" href="#"
|
149
|
+
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
150
|
+
<div class="method-source-code" id="M000007-source">
|
151
|
+
<pre>
|
152
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 18</span>
|
153
|
+
18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">not_found</span>
|
154
|
+
19: <span class="ruby-identifier">code</span> = <span class="ruby-value str">'404'</span>
|
155
|
+
20: <span class="ruby-keyword kw">end</span>
|
156
|
+
</pre>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div id="method-M000005" class="method-detail">
|
162
|
+
<a name="M000005"></a>
|
163
|
+
|
164
|
+
<div class="method-heading">
|
165
|
+
<a href="#M000005" class="method-signature">
|
166
|
+
<span class="method-name">ok?</span><span class="method-args">()</span>
|
167
|
+
</a>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
<div class="method-description">
|
171
|
+
<p><a class="source-toggle" href="#"
|
172
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
173
|
+
<div class="method-source-code" id="M000005-source">
|
174
|
+
<pre>
|
175
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 10</span>
|
176
|
+
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ok?</span>
|
177
|
+
11: <span class="ruby-identifier">success</span>
|
178
|
+
12: <span class="ruby-keyword kw">end</span>
|
179
|
+
</pre>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<div id="method-M000006" class="method-detail">
|
185
|
+
<a name="M000006"></a>
|
186
|
+
|
187
|
+
<div class="method-heading">
|
188
|
+
<a href="#M000006" class="method-signature">
|
189
|
+
<span class="method-name">success</span><span class="method-args">()</span>
|
190
|
+
</a>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
<div class="method-description">
|
194
|
+
<p><a class="source-toggle" href="#"
|
195
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
196
|
+
<div class="method-source-code" id="M000006-source">
|
197
|
+
<pre>
|
198
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 14</span>
|
199
|
+
14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">success</span>
|
200
|
+
15: <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'200'</span>
|
201
|
+
16: <span class="ruby-keyword kw">end</span>
|
202
|
+
</pre>
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div id="method-M000008" class="method-detail">
|
208
|
+
<a name="M000008"></a>
|
209
|
+
|
210
|
+
<div class="method-heading">
|
211
|
+
<a href="#M000008" class="method-signature">
|
212
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
213
|
+
</a>
|
214
|
+
</div>
|
215
|
+
|
216
|
+
<div class="method-description">
|
217
|
+
<p><a class="source-toggle" href="#"
|
218
|
+
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
219
|
+
<div class="method-source-code" id="M000008-source">
|
220
|
+
<pre>
|
221
|
+
<span class="ruby-comment cmt"># File lib/s33r/s33r_http.rb, line 22</span>
|
222
|
+
22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
223
|
+
23: <span class="ruby-identifier">body</span>
|
224
|
+
24: <span class="ruby-keyword kw">end</span>
|
225
|
+
</pre>
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
</div>
|
229
|
+
|
230
|
+
|
231
|
+
</div>
|
232
|
+
|
233
|
+
|
234
|
+
</div>
|
235
|
+
|
236
|
+
|
237
|
+
<div id="validator-badges">
|
238
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
</body>
|
242
|
+
</html>
|