s33r 0.4.1 → 0.4.2
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/examples/cli/simple.rb +17 -0
- data/examples/fores33r/app/controllers/browser_controller.rb +32 -8
- data/examples/fores33r/app/views/browser/_create_bucket.rhtml +6 -0
- data/examples/fores33r/app/views/browser/_upload.rhtml +5 -0
- data/examples/fores33r/app/views/browser/index.rhtml +1 -8
- data/examples/fores33r/app/views/browser/plain_bucket.rhtml +3 -0
- data/examples/fores33r/app/views/browser/s3_index.rhtml +9 -0
- data/examples/fores33r/app/views/browser/show_bucket.rhtml +6 -8
- data/examples/fores33r/app/views/layouts/application.rhtml +2 -0
- data/examples/fores33r/app/views/layouts/s3_layout.rhtml +14 -0
- data/examples/fores33r/config/environment.rb +1 -1
- data/examples/fores33r/config/routes.rb +2 -0
- data/examples/fores33r/public/stylesheets/core.css +2 -2
- data/html/classes/Net/HTTPResponse.html +3 -0
- data/html/classes/S33r.html +127 -116
- data/html/classes/S33r/BucketListing.html +119 -94
- data/html/classes/S33r/Client.html +602 -536
- data/html/classes/S33r/LoggingResource.html +3 -3
- data/html/classes/S33r/NamedBucket.html +235 -191
- data/html/classes/S33r/OrderlyXmlMarkup.html +7 -7
- data/html/classes/S33r/S33rException.html +1 -0
- data/html/classes/S33r/S33rException/TryingToPutEmptyResource.html +117 -0
- data/html/classes/S33r/S3ACL/ACLDoc.html +94 -94
- data/html/classes/S33r/S3ACL/AmazonCustomer.html +5 -5
- data/html/classes/S33r/S3ACL/CanonicalUser.html +12 -12
- data/html/classes/S33r/S3ACL/Grant.html +64 -64
- data/html/classes/S33r/S3ACL/Grantee.html +36 -36
- data/html/classes/S33r/S3ACL/Group.html +8 -8
- data/html/classes/S33r/S3Object.html +387 -79
- data/html/classes/XML.html +15 -15
- data/html/created.rid +1 -1
- data/html/files/CHANGELOG.html +7 -1
- data/html/files/MIT-LICENSE.html +1 -1
- data/html/files/README_txt.html +3 -7
- data/html/files/lib/s33r/bucket_listing_rb.html +1 -9
- data/html/files/lib/s33r/builder_rb.html +1 -1
- data/html/files/lib/s33r/client_rb.html +1 -1
- data/html/files/lib/s33r/core_rb.html +1 -2
- data/html/files/lib/s33r/libxml_extensions_rb.html +1 -7
- data/html/files/lib/s33r/libxml_loader_rb.html +109 -0
- data/html/files/lib/s33r/logging_rb.html +1 -2
- data/html/files/lib/s33r/mimetypes_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/s3_acl_rb.html +1 -2
- data/html/files/lib/s33r/s3_obj_rb.html +108 -0
- data/html/files/lib/s33r/sync_rb.html +1 -1
- data/html/files/lib/s33r_rb.html +1 -1
- data/html/fr_class_index.html +1 -0
- data/html/fr_file_index.html +2 -0
- data/html/fr_method_index.html +80 -71
- data/lib/s33r/bucket_listing.rb +30 -55
- data/lib/s33r/client.rb +70 -28
- data/lib/s33r/core.rb +9 -4
- data/lib/s33r/libxml_extensions.rb +2 -0
- data/lib/s33r/libxml_loader.rb +6 -0
- data/lib/s33r/logging.rb +3 -3
- data/lib/s33r/named_bucket.rb +33 -15
- data/lib/s33r/s33r_exception.rb +4 -0
- data/lib/s33r/s33r_http.rb +1 -1
- data/lib/s33r/s3_acl.rb +3 -2
- data/lib/s33r/s3_obj.rb +186 -0
- data/test/cases/spec_bucket_listing.rb +9 -33
- data/test/cases/spec_s3_object.rb +35 -0
- data/test/files/suspect_bucket_listing.xml +19 -0
- metadata +94 -89
- data/examples/fores33r/log/development.log +0 -5960
- data/examples/fores33r/log/production.log +0 -0
- data/examples/fores33r/log/server.log +0 -0
- data/examples/fores33r/log/test.log +0 -0
- data/examples/fores33r/tmp/sessions/ruby_sess.2ea325f604aa5fb9 +0 -0
- data/examples/fores33r/tmp/sessions/ruby_sess.39d37e054d21d545 +0 -0
- data/examples/fores33r/tmp/sessions/ruby_sess.acf71fc73aa74983 +0 -0
- data/examples/fores33r/tmp/sessions/ruby_sess.c1697b7d6670f3cd +0 -0
data/html/classes/XML.html
CHANGED
@@ -134,12 +134,12 @@ href="XML/Document.html">XML::Document</a> instance.
|
|
134
134
|
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
135
135
|
<div class="method-source-code" id="M000002-source">
|
136
136
|
<pre>
|
137
|
-
<span class="ruby-comment cmt"># File lib/s33r/libxml_extensions.rb, line
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
137
|
+
<span class="ruby-comment cmt"># File lib/s33r/libxml_extensions.rb, line 21</span>
|
138
|
+
21: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">XML</span>.<span class="ruby-identifier">get_xml_doc</span>(<span class="ruby-identifier">xml_str</span>)
|
139
|
+
22: <span class="ruby-identifier">parser</span> = <span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span>.<span class="ruby-identifier">new</span>
|
140
|
+
23: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">string</span> = <span class="ruby-identifier">xml_str</span>
|
141
|
+
24: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">parse</span>
|
142
|
+
25: <span class="ruby-keyword kw">end</span>
|
143
143
|
</pre>
|
144
144
|
</div>
|
145
145
|
</div>
|
@@ -173,15 +173,15 @@ Returns nil if no element matches <tt>xpath</tt>.
|
|
173
173
|
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
174
174
|
<div class="method-source-code" id="M000001-source">
|
175
175
|
<pre>
|
176
|
-
<span class="ruby-comment cmt"># File lib/s33r/libxml_extensions.rb, line
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
176
|
+
<span class="ruby-comment cmt"># File lib/s33r/libxml_extensions.rb, line 11</span>
|
177
|
+
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xget</span>(<span class="ruby-identifier">xpath</span>)
|
178
|
+
12: <span class="ruby-identifier">nodes</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">xpath</span>).<span class="ruby-identifier">to_a</span>
|
179
|
+
13: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">empty?</span>
|
180
|
+
14: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
181
|
+
15: <span class="ruby-keyword kw">else</span>
|
182
|
+
16: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">content</span>
|
183
|
+
17: <span class="ruby-keyword kw">end</span>
|
184
|
+
18: <span class="ruby-keyword kw">end</span>
|
185
185
|
</pre>
|
186
186
|
</div>
|
187
187
|
</div>
|
data/html/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Wed Jan 03 12:25:30 GMT 2007
|
data/html/files/CHANGELOG.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Jan 03 11:35:17 GMT 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -68,6 +68,12 @@
|
|
68
68
|
|
69
69
|
<div id="contextContent">
|
70
70
|
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
Commit test
|
74
|
+
</p>
|
75
|
+
|
76
|
+
</div>
|
71
77
|
|
72
78
|
|
73
79
|
</div>
|
data/html/files/MIT-LICENSE.html
CHANGED
data/html/files/README_txt.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Jan 03 11:28:02 GMT 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -194,9 +194,7 @@ to pass the bucket name to every method call, and parses bucket listings
|
|
194
194
|
into an object representation.
|
195
195
|
</p>
|
196
196
|
<h1>Examples</h1>
|
197
|
-
<
|
198
|
-
_Command line client_
|
199
|
-
</p>
|
197
|
+
<h2>Command line client</h2>
|
200
198
|
<p>
|
201
199
|
If you want to see a full example program which uses the library, have a
|
202
200
|
look at examples/cli/s3cli.rb. This is a simple command line client which
|
@@ -205,9 +203,7 @@ Useful for sending big files to people without clogging their email inbox
|
|
205
203
|
with enormous files. It is also intended as a demonstration of how to use
|
206
204
|
the library. Full instructions are included at the top of the file.
|
207
205
|
</p>
|
208
|
-
<
|
209
|
-
_Rails application_
|
210
|
-
</p>
|
206
|
+
<h2>Rails application</h2>
|
211
207
|
<p>
|
212
208
|
examples/fores33r contains a Rails application which makes use of the <a
|
213
209
|
href="../classes/S33r.html">S33r</a> library. It will display a bucket list
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Jan 03 11:35:17 GMT 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -69,14 +69,6 @@
|
|
69
69
|
<div id="contextContent">
|
70
70
|
|
71
71
|
|
72
|
-
<div id="requires-list">
|
73
|
-
<h3 class="section-bar">Required files</h3>
|
74
|
-
|
75
|
-
<div class="name-list">
|
76
|
-
date
|
77
|
-
xml/libxml
|
78
|
-
</div>
|
79
|
-
</div>
|
80
72
|
|
81
73
|
</div>
|
82
74
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Jan 03 11:35:17 GMT 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -78,7 +78,6 @@
|
|
78
78
|
net/http
|
79
79
|
net/https
|
80
80
|
openssl
|
81
|
-
xml/libxml
|
82
81
|
parsedate
|
83
82
|
</div>
|
84
83
|
</div>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Jan 03 11:27:57 GMT 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -68,12 +68,6 @@
|
|
68
68
|
|
69
69
|
<div id="contextContent">
|
70
70
|
|
71
|
-
<div id="description">
|
72
|
-
<p>
|
73
|
-
Convenience methods for libxml classes.
|
74
|
-
</p>
|
75
|
-
|
76
|
-
</div>
|
77
71
|
|
78
72
|
|
79
73
|
</div>
|
@@ -0,0 +1,109 @@
|
|
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>File: libxml_loader.rb</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="fileHeader">
|
50
|
+
<h1>libxml_loader.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/s33r/libxml_loader.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Jan 03 11:27:57 GMT 2007</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
xml/libxml
|
77
|
+
rubygems
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
<!-- if includes -->
|
88
|
+
|
89
|
+
<div id="section">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if method_list -->
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<div id="validator-badges">
|
105
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</body>
|
109
|
+
</html>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Jan 03 11:27:57 GMT 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -74,7 +74,6 @@
|
|
74
74
|
|
75
75
|
<div class="name-list">
|
76
76
|
rubygems
|
77
|
-
xml/libxml
|
78
77
|
</div>
|
79
78
|
</div>
|
80
79
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Jan 03 11:27:57 GMT 2007</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -74,7 +74,6 @@
|
|
74
74
|
|
75
75
|
<div class="name-list">
|
76
76
|
rubygems
|
77
|
-
xml/libxml
|
78
77
|
</div>
|
79
78
|
</div>
|
80
79
|
|
@@ -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>File: s3_obj.rb</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="fileHeader">
|
50
|
+
<h1>s3_obj.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/s33r/s3_obj.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Jan 03 11:35:17 GMT 2007</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
date
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
<!-- if includes -->
|
87
|
+
|
88
|
+
<div id="section">
|
89
|
+
|
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>
|