s33r 0.3.1 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/cli/acl_x.rb +41 -0
- data/examples/cli/logging_x.rb +20 -0
- data/{bin → examples/cli}/s3cli.rb +13 -20
- data/examples/fores33r/README +183 -0
- data/examples/fores33r/Rakefile +10 -0
- data/examples/fores33r/app/controllers/application.rb +4 -0
- data/examples/fores33r/app/controllers/browser_controller.rb +68 -0
- data/examples/fores33r/app/helpers/application_helper.rb +8 -0
- data/examples/fores33r/app/views/browser/index.rhtml +14 -0
- data/examples/fores33r/app/views/browser/show_bucket.rhtml +14 -0
- data/examples/fores33r/app/views/layouts/application.rhtml +29 -0
- data/examples/fores33r/config/boot.rb +44 -0
- data/examples/fores33r/config/database.yml +35 -0
- data/examples/fores33r/config/environment.rb +64 -0
- data/examples/fores33r/config/environments/development.rb +21 -0
- data/examples/fores33r/config/environments/production.rb +18 -0
- data/examples/fores33r/config/environments/test.rb +19 -0
- data/examples/fores33r/config/routes.rb +23 -0
- data/examples/fores33r/doc/README_FOR_APP +2 -0
- data/examples/fores33r/log/development.log +5507 -0
- 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/public/404.html +8 -0
- data/examples/fores33r/public/500.html +8 -0
- data/examples/fores33r/public/dispatch.cgi +10 -0
- data/examples/fores33r/public/dispatch.fcgi +24 -0
- data/examples/fores33r/public/dispatch.rb +10 -0
- data/examples/fores33r/public/favicon.ico +0 -0
- data/examples/fores33r/public/images/rails.png +0 -0
- data/examples/fores33r/public/javascripts/application.js +2 -0
- data/examples/fores33r/public/javascripts/controls.js +815 -0
- data/examples/fores33r/public/javascripts/dragdrop.js +913 -0
- data/examples/fores33r/public/javascripts/effects.js +958 -0
- data/examples/fores33r/public/javascripts/prototype.js +2006 -0
- data/examples/fores33r/public/robots.txt +1 -0
- data/examples/fores33r/public/stylesheets/core.css +37 -0
- data/examples/fores33r/script/about +3 -0
- data/examples/fores33r/script/breakpointer +3 -0
- data/examples/fores33r/script/console +3 -0
- data/examples/fores33r/script/destroy +3 -0
- data/examples/fores33r/script/generate +3 -0
- data/examples/fores33r/script/performance/benchmarker +3 -0
- data/examples/fores33r/script/performance/profiler +3 -0
- data/examples/fores33r/script/plugin +3 -0
- data/examples/fores33r/script/process/reaper +3 -0
- data/examples/fores33r/script/process/spawner +3 -0
- data/examples/fores33r/script/runner +3 -0
- data/examples/fores33r/script/server +3 -0
- data/examples/fores33r/test/test_helper.rb +28 -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/examples/s3.yaml +11 -0
- data/html/classes/Net/HTTPGenericRequest.html +32 -32
- data/html/classes/Net/HTTPResponse.html +20 -19
- data/html/classes/S33r.html +422 -190
- data/html/classes/S33r/BucketListing.html +107 -70
- data/html/classes/S33r/Client.html +888 -414
- data/html/classes/S33r/LoggingResource.html +222 -0
- data/html/classes/S33r/NamedBucket.html +149 -150
- data/html/classes/S33r/OrderlyXmlMarkup.html +165 -0
- data/html/classes/S33r/S33rException.html +3 -0
- data/html/classes/S33r/S33rException/BucketNotLogTargetable.html +119 -0
- data/html/classes/S33r/S33rException/InvalidPermission.html +111 -0
- data/html/classes/S33r/S33rException/InvalidS3GroupType.html +111 -0
- data/html/classes/S33r/S3ACL.html +125 -0
- data/html/classes/S33r/S3ACL/ACLDoc.html +521 -0
- data/html/classes/S33r/{S3User.html → S3ACL/AmazonCustomer.html} +27 -30
- data/html/classes/S33r/S3ACL/CanonicalUser.html +212 -0
- data/html/classes/S33r/S3ACL/Grant.html +403 -0
- data/html/classes/S33r/S3ACL/Grantee.html +239 -0
- data/html/classes/S33r/S3ACL/Group.html +178 -0
- data/html/classes/S33r/S3Object.html +53 -50
- data/html/classes/S33r/Sync.html +6 -6
- data/html/classes/XML.html +4 -2
- data/html/created.rid +1 -1
- data/html/files/README_txt.html +82 -28
- data/html/files/lib/s33r/bucket_listing_rb.html +1 -8
- data/html/files/lib/s33r/builder_rb.html +108 -0
- data/html/files/lib/s33r/client_rb.html +2 -1
- data/html/files/lib/s33r/core_rb.html +2 -1
- data/html/files/lib/s33r/libxml_extensions_rb.html +1 -1
- data/html/files/lib/s33r/logging_rb.html +109 -0
- 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 +109 -0
- data/html/fr_class_index.html +12 -1
- data/html/fr_file_index.html +3 -0
- data/html/fr_method_index.html +101 -57
- data/lib/s33r/bucket_listing.rb +21 -22
- data/lib/s33r/builder.rb +20 -0
- data/lib/s33r/client.rb +240 -42
- data/lib/s33r/core.rb +106 -36
- data/lib/s33r/libxml_extensions.rb +2 -2
- data/lib/s33r/logging.rb +43 -0
- data/lib/s33r/named_bucket.rb +16 -17
- data/lib/s33r/s33r_exception.rb +11 -0
- data/lib/s33r/s33r_http.rb +2 -1
- data/lib/s33r/s3_acl.rb +337 -0
- data/test/cases/spec_acl.rb +146 -0
- data/test/cases/spec_all_buckets.rb +28 -0
- data/test/cases/spec_bucket_listing.rb +2 -2
- data/test/cases/spec_client.rb +45 -18
- data/test/cases/spec_core.rb +0 -9
- data/test/cases/spec_namedbucket.rb +3 -3
- data/test/files/acl.xml +47 -0
- data/test/files/acl_grant1.xml +7 -0
- data/test/files/acl_grant2.xml +6 -0
- data/test/files/acl_grant3.xml +6 -0
- data/test/files/acl_grant4.xml +6 -0
- data/test/files/all_buckets.xml +21 -0
- data/test/files/bucket_listing.xml +138 -1
- data/test/files/client_config.yml +0 -1
- data/test/files/logging_acl.xml +34 -0
- data/test/files/namedbucket_config.yml +1 -5
- data/test/files/namedbucket_config2.yml +1 -5
- data/test/test_setup.rb +1 -0
- metadata +132 -7
@@ -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: s3_acl.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_acl.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/s33r/s3_acl.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Mon Oct 23 15:47:24 BST 2006</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
|
+
rubygems
|
77
|
+
xml/libxml
|
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>
|
data/html/fr_class_index.html
CHANGED
@@ -30,10 +30,15 @@
|
|
30
30
|
<a href="classes/S33r.html">S33r</a><br />
|
31
31
|
<a href="classes/S33r/BucketListing.html">S33r::BucketListing</a><br />
|
32
32
|
<a href="classes/S33r/Client.html">S33r::Client</a><br />
|
33
|
+
<a href="classes/S33r/LoggingResource.html">S33r::LoggingResource</a><br />
|
33
34
|
<a href="classes/S33r/NamedBucket.html">S33r::NamedBucket</a><br />
|
35
|
+
<a href="classes/S33r/OrderlyXmlMarkup.html">S33r::OrderlyXmlMarkup</a><br />
|
34
36
|
<a href="classes/S33r/S33rException.html">S33r::S33rException</a><br />
|
35
37
|
<a href="classes/S33r/S33rException/BucketListingMaxKeysError.html">S33r::S33rException::BucketListingMaxKeysError</a><br />
|
38
|
+
<a href="classes/S33r/S33rException/BucketNotLogTargetable.html">S33r::S33rException::BucketNotLogTargetable</a><br />
|
36
39
|
<a href="classes/S33r/S33rException/InvalidBucketListing.html">S33r::S33rException::InvalidBucketListing</a><br />
|
40
|
+
<a href="classes/S33r/S33rException/InvalidPermission.html">S33r::S33rException::InvalidPermission</a><br />
|
41
|
+
<a href="classes/S33r/S33rException/InvalidS3GroupType.html">S33r::S33rException::InvalidS3GroupType</a><br />
|
37
42
|
<a href="classes/S33r/S33rException/MalformedBucketName.html">S33r::S33rException::MalformedBucketName</a><br />
|
38
43
|
<a href="classes/S33r/S33rException/MethodNotAvailable.html">S33r::S33rException::MethodNotAvailable</a><br />
|
39
44
|
<a href="classes/S33r/S33rException/MissingBucketName.html">S33r::S33rException::MissingBucketName</a><br />
|
@@ -42,8 +47,14 @@
|
|
42
47
|
<a href="classes/S33r/S33rException/S3FallenOver.html">S33r::S33rException::S3FallenOver</a><br />
|
43
48
|
<a href="classes/S33r/S33rException/UnsupportedCannedACL.html">S33r::S33rException::UnsupportedCannedACL</a><br />
|
44
49
|
<a href="classes/S33r/S33rException/UnsupportedHTTPMethod.html">S33r::S33rException::UnsupportedHTTPMethod</a><br />
|
50
|
+
<a href="classes/S33r/S3ACL.html">S33r::S3ACL</a><br />
|
51
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html">S33r::S3ACL::ACLDoc</a><br />
|
52
|
+
<a href="classes/S33r/S3ACL/AmazonCustomer.html">S33r::S3ACL::AmazonCustomer</a><br />
|
53
|
+
<a href="classes/S33r/S3ACL/CanonicalUser.html">S33r::S3ACL::CanonicalUser</a><br />
|
54
|
+
<a href="classes/S33r/S3ACL/Grant.html">S33r::S3ACL::Grant</a><br />
|
55
|
+
<a href="classes/S33r/S3ACL/Grantee.html">S33r::S3ACL::Grantee</a><br />
|
56
|
+
<a href="classes/S33r/S3ACL/Group.html">S33r::S3ACL::Group</a><br />
|
45
57
|
<a href="classes/S33r/S3Object.html">S33r::S3Object</a><br />
|
46
|
-
<a href="classes/S33r/S3User.html">S33r::S3User</a><br />
|
47
58
|
<a href="classes/S33r/Sync.html">S33r::Sync</a><br />
|
48
59
|
<a href="classes/XML.html">XML</a><br />
|
49
60
|
<a href="classes/XML/Document.html">XML::Document</a><br />
|
data/html/fr_file_index.html
CHANGED
@@ -25,13 +25,16 @@
|
|
25
25
|
<a href="files/README_txt.html">README.txt</a><br />
|
26
26
|
<a href="files/lib/s33r_rb.html">lib/s33r.rb</a><br />
|
27
27
|
<a href="files/lib/s33r/bucket_listing_rb.html">lib/s33r/bucket_listing.rb</a><br />
|
28
|
+
<a href="files/lib/s33r/builder_rb.html">lib/s33r/builder.rb</a><br />
|
28
29
|
<a href="files/lib/s33r/client_rb.html">lib/s33r/client.rb</a><br />
|
29
30
|
<a href="files/lib/s33r/core_rb.html">lib/s33r/core.rb</a><br />
|
30
31
|
<a href="files/lib/s33r/libxml_extensions_rb.html">lib/s33r/libxml_extensions.rb</a><br />
|
32
|
+
<a href="files/lib/s33r/logging_rb.html">lib/s33r/logging.rb</a><br />
|
31
33
|
<a href="files/lib/s33r/mimetypes_rb.html">lib/s33r/mimetypes.rb</a><br />
|
32
34
|
<a href="files/lib/s33r/named_bucket_rb.html">lib/s33r/named_bucket.rb</a><br />
|
33
35
|
<a href="files/lib/s33r/s33r_exception_rb.html">lib/s33r/s33r_exception.rb</a><br />
|
34
36
|
<a href="files/lib/s33r/s33r_http_rb.html">lib/s33r/s33r_http.rb</a><br />
|
37
|
+
<a href="files/lib/s33r/s3_acl_rb.html">lib/s33r/s3_acl.rb</a><br />
|
35
38
|
<a href="files/lib/s33r/sync_rb.html">lib/s33r/sync.rb</a><br />
|
36
39
|
</div>
|
37
40
|
</div>
|
data/html/fr_method_index.html
CHANGED
@@ -20,109 +20,153 @@
|
|
20
20
|
<div id="index">
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000084">== (S33r::S3ACL::Grant)</a><br />
|
24
|
+
<a href="classes/S33r/S3ACL/Grantee.html#M000074">== (S33r::S3ACL::Grantee)</a><br />
|
25
|
+
<a href="classes/S33r/NamedBucket.html#M000095">[] (S33r::NamedBucket)</a><br />
|
23
26
|
<a href="classes/MIME/Types.html#M000011">[] (MIME::Types)</a><br />
|
27
|
+
<a href="classes/S33r/BucketListing.html#M000111">[] (S33r::BucketListing)</a><br />
|
24
28
|
<a href="classes/MIME/Types.html#M000015">[] (MIME::Types)</a><br />
|
25
|
-
<a href="classes/S33r/
|
26
|
-
<a href="classes/S33r/BucketListing.html#M000079">[] (S33r::BucketListing)</a><br />
|
29
|
+
<a href="classes/S33r/OrderlyXmlMarkup.html#M000148">_insert_attributes (S33r::OrderlyXmlMarkup)</a><br />
|
27
30
|
<a href="classes/MIME/Types.html#M000014">add (MIME::Types)</a><br />
|
28
31
|
<a href="classes/MIME/Types.html#M000018">add (MIME::Types)</a><br />
|
29
|
-
<a href="classes/S33r/Client.html#
|
32
|
+
<a href="classes/S33r/Client.html#M000142">add_client_headers (S33r::Client)</a><br />
|
30
33
|
<a href="classes/S33r.html#M000044">add_default_headers (S33r)</a><br />
|
34
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000067">add_grant (S33r::S3ACL::ACLDoc)</a><br />
|
35
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000072">add_log_target_grants (S33r::S3ACL::ACLDoc)</a><br />
|
36
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000070">add_public_read_grants (S33r::S3ACL::ACLDoc)</a><br />
|
31
37
|
<a href="classes/MIME/Type.html#M000032">ascii? (MIME::Type)</a><br />
|
32
38
|
<a href="classes/MIME/Type.html#M000031">binary? (MIME::Type)</a><br />
|
33
|
-
<a href="classes/S33r/Client.html#
|
39
|
+
<a href="classes/S33r/Client.html#M000124">bucket_exists? (S33r::Client)</a><br />
|
34
40
|
<a href="classes/S33r.html#M000048">bucket_name_valid? (S33r)</a><br />
|
35
41
|
<a href="classes/S33r.html#M000046">canned_acl_header (S33r)</a><br />
|
36
42
|
<a href="classes/Net/HTTPResponse.html#M000005">check_s3_availability (Net::HTTPResponse)</a><br />
|
37
43
|
<a href="classes/MIME/Type.html#M000036">complete? (MIME::Type)</a><br />
|
38
|
-
<a href="classes/S33r/Client.html#
|
44
|
+
<a href="classes/S33r/Client.html#M000122">create_bucket (S33r::Client)</a><br />
|
39
45
|
<a href="classes/MIME/Type.html#M000020">default_encoding (MIME::Type)</a><br />
|
40
|
-
<a href="classes/S33r/S3Object.html#
|
41
|
-
<a href="classes/S33r/Client.html#
|
42
|
-
<a href="classes/S33r/
|
43
|
-
<a href="classes/S33r/
|
44
|
-
<a href="classes/S33r/NamedBucket.html#
|
45
|
-
<a href="classes/S33r/Client.html#
|
46
|
-
<a href="classes/S33r/Client.html#
|
47
|
-
<a href="classes/S33r/Client.html#
|
48
|
-
<a href="classes/S33r/Client.html#
|
49
|
-
<a href="classes/S33r/Client.html#
|
50
|
-
<a href="classes/S33r/Client.html#
|
46
|
+
<a href="classes/S33r/S3Object.html#M000088">delete (S33r::S3Object)</a><br />
|
47
|
+
<a href="classes/S33r/Client.html#M000123">delete_bucket (S33r::Client)</a><br />
|
48
|
+
<a href="classes/S33r/NamedBucket.html#M000105">delete_resource (S33r::NamedBucket)</a><br />
|
49
|
+
<a href="classes/S33r/Client.html#M000141">delete_resource (S33r::Client)</a><br />
|
50
|
+
<a href="classes/S33r/NamedBucket.html#M000098">destroy (S33r::NamedBucket)</a><br />
|
51
|
+
<a href="classes/S33r/Client.html#M000134">disable_log_target (S33r::Client)</a><br />
|
52
|
+
<a href="classes/S33r/Client.html#M000136">disable_logging (S33r::Client)</a><br />
|
53
|
+
<a href="classes/S33r/Client.html#M000147">do_delete (S33r::Client)</a><br />
|
54
|
+
<a href="classes/S33r/Client.html#M000143">do_get (S33r::Client)</a><br />
|
55
|
+
<a href="classes/S33r/Client.html#M000144">do_head (S33r::Client)</a><br />
|
56
|
+
<a href="classes/S33r/Client.html#M000145">do_post (S33r::Client)</a><br />
|
57
|
+
<a href="classes/S33r/Client.html#M000146">do_put (S33r::Client)</a><br />
|
58
|
+
<a href="classes/S33r/Client.html#M000117">do_request (S33r::Client)</a><br />
|
51
59
|
<a href="classes/MIME/Type.html#M000023">docs= (MIME::Type)</a><br />
|
52
|
-
<a href="classes/S33r/NamedBucket.html#
|
53
|
-
<a href="classes/S33r/
|
60
|
+
<a href="classes/S33r/NamedBucket.html#M000100">each_item (S33r::NamedBucket)</a><br />
|
61
|
+
<a href="classes/S33r/Client.html#M000133">enable_log_target (S33r::Client)</a><br />
|
62
|
+
<a href="classes/S33r/Client.html#M000135">enable_logging (S33r::Client)</a><br />
|
63
|
+
<a href="classes/S33r/NamedBucket.html#M000097">exists? (S33r::NamedBucket)</a><br />
|
64
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000078">for_amazon_customer (S33r::S3ACL::Grant)</a><br />
|
65
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000079">for_canonical_user (S33r::S3ACL::Grant)</a><br />
|
66
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000080">for_group (S33r::S3ACL::Grant)</a><br />
|
54
67
|
<a href="classes/MIME/Type.html#M000026">from_array (MIME::Type)</a><br />
|
55
68
|
<a href="classes/MIME/Type.html#M000027">from_hash (MIME::Type)</a><br />
|
56
69
|
<a href="classes/MIME/Type.html#M000028">from_mime_type (MIME::Type)</a><br />
|
70
|
+
<a href="classes/S33r/S3ACL/CanonicalUser.html#M000062">from_xml (S33r::S3ACL::CanonicalUser)</a><br />
|
71
|
+
<a href="classes/S33r/S3ACL/Grantee.html#M000076">from_xml (S33r::S3ACL::Grantee)</a><br />
|
72
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000065">from_xml (S33r::S3ACL::ACLDoc)</a><br />
|
57
73
|
<a href="classes/S33r.html#M000042">generate_auth_header_value (S33r)</a><br />
|
58
74
|
<a href="classes/S33r.html#M000041">generate_canonical_string (S33r)</a><br />
|
59
75
|
<a href="classes/S33r.html#M000049">generate_querystring (S33r)</a><br />
|
60
76
|
<a href="classes/S33r.html#M000043">generate_signature (S33r)</a><br />
|
61
|
-
<a href="classes/S33r/Client.html#
|
62
|
-
<a href="classes/S33r/Client.html#
|
63
|
-
<a href="classes/S33r/Client.html#
|
77
|
+
<a href="classes/S33r/Client.html#M000128">get_acl (S33r::Client)</a><br />
|
78
|
+
<a href="classes/S33r/Client.html#M000114">get_client (S33r::Client)</a><br />
|
79
|
+
<a href="classes/S33r/Client.html#M000137">get_logging (S33r::Client)</a><br />
|
80
|
+
<a href="classes/S33r/Client.html#M000127">get_object (S33r::Client)</a><br />
|
81
|
+
<a href="classes/S33r/Client.html#M000118">get_requester (S33r::Client)</a><br />
|
82
|
+
<a href="classes/S33r/Client.html#M000125">get_resource (S33r::Client)</a><br />
|
64
83
|
<a href="classes/XML.html#M000002">get_xml_doc (XML)</a><br />
|
65
84
|
<a href="classes/S33r.html#M000047">guess_mime_type (S33r)</a><br />
|
66
|
-
<a href="classes/S33r/Client.html#
|
67
|
-
<a href="classes/S33r/
|
68
|
-
<a href="classes/S33r/NamedBucket.html#
|
69
|
-
<a href="classes/S33r/NamedBucket.html#
|
70
|
-
<a href="classes/S33r
|
71
|
-
<a href="classes/S33r.html#
|
85
|
+
<a href="classes/S33r/Client.html#M000115">init (S33r::Client)</a><br />
|
86
|
+
<a href="classes/S33r/NamedBucket.html#M000091">init (S33r::NamedBucket)</a><br />
|
87
|
+
<a href="classes/S33r/NamedBucket.html#M000101">key_exists? (S33r::NamedBucket)</a><br />
|
88
|
+
<a href="classes/S33r/NamedBucket.html#M000099">keys (S33r::NamedBucket)</a><br />
|
89
|
+
<a href="classes/S33r.html#M000056">keys_to_symbols (S33r)</a><br />
|
90
|
+
<a href="classes/S33r/BucketListing.html#M000110">last_key (S33r::BucketListing)</a><br />
|
72
91
|
<a href="classes/MIME/Type.html#M000019">like? (MIME::Type)</a><br />
|
73
|
-
<a href="classes/S33r/Client.html#
|
74
|
-
<a href="classes/S33r/Client.html#
|
75
|
-
<a href="classes/S33r/
|
76
|
-
<a href="classes/S33r/
|
77
|
-
<a href="classes/S33r/
|
92
|
+
<a href="classes/S33r/Client.html#M000120">list (S33r::Client)</a><br />
|
93
|
+
<a href="classes/S33r/Client.html#M000121">list_bucket (S33r::Client)</a><br />
|
94
|
+
<a href="classes/S33r/Client.html#M000119">list_buckets (S33r::Client)</a><br />
|
95
|
+
<a href="classes/S33r/NamedBucket.html#M000096">listing (S33r::NamedBucket)</a><br />
|
96
|
+
<a href="classes/S33r/Client.html#M000116">load_config (S33r::Client)</a><br />
|
97
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000082">log_target_grants (S33r::S3ACL::Grant)</a><br />
|
98
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000071">log_targetable? (S33r::S3ACL::ACLDoc)</a><br />
|
99
|
+
<a href="classes/S33r/Client.html#M000132">make_private (S33r::Client)</a><br />
|
100
|
+
<a href="classes/S33r/Client.html#M000131">make_public (S33r::Client)</a><br />
|
101
|
+
<a href="classes/S33r/Sync.html#M000059">md5sum (S33r::Sync)</a><br />
|
78
102
|
<a href="classes/S33r.html#M000045">metadata_headers (S33r)</a><br />
|
79
|
-
<a href="classes/S33r/
|
80
|
-
<a href="classes/S33r/
|
81
|
-
<a href="classes/S33r/
|
103
|
+
<a href="classes/S33r/S3ACL/Grantee.html#M000075">method_missing (S33r::S3ACL::Grantee)</a><br />
|
104
|
+
<a href="classes/S33r/S3ACL/AmazonCustomer.html#M000063">new (S33r::S3ACL::AmazonCustomer)</a><br />
|
105
|
+
<a href="classes/S33r/Client.html#M000113">new (S33r::Client)</a><br />
|
82
106
|
<a href="classes/MIME/Type.html#M000029">new (MIME::Type)</a><br />
|
83
|
-
<a href="classes/S33r/
|
84
|
-
<a href="classes/S33r/
|
107
|
+
<a href="classes/S33r/LoggingResource.html#M000085">new (S33r::LoggingResource)</a><br />
|
108
|
+
<a href="classes/S33r/S3ACL/Group.html#M000060">new (S33r::S3ACL::Group)</a><br />
|
109
|
+
<a href="classes/S33r/S3Object.html#M000087">new (S33r::S3Object)</a><br />
|
110
|
+
<a href="classes/S33r/S3ACL/CanonicalUser.html#M000061">new (S33r::S3ACL::CanonicalUser)</a><br />
|
85
111
|
<a href="classes/MIME/Types.html#M000010">new (MIME::Types)</a><br />
|
112
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000064">new (S33r::S3ACL::ACLDoc)</a><br />
|
113
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000077">new (S33r::S3ACL::Grant)</a><br />
|
114
|
+
<a href="classes/S33r/BucketListing.html#M000107">new (S33r::BucketListing)</a><br />
|
115
|
+
<a href="classes/S33r/NamedBucket.html#M000092">new (S33r::NamedBucket)</a><br />
|
86
116
|
<a href="classes/Net/HTTPResponse.html#M000008">not_found (Net::HTTPResponse)</a><br />
|
87
117
|
<a href="classes/MIME/Type.html#M000022">obsolete? (MIME::Type)</a><br />
|
88
118
|
<a href="classes/MIME/Types.html#M000013">of (MIME::Types)</a><br />
|
89
119
|
<a href="classes/MIME/Types.html#M000017">of (MIME::Types)</a><br />
|
90
120
|
<a href="classes/Net/HTTPResponse.html#M000006">ok? (Net::HTTPResponse)</a><br />
|
91
|
-
<a href="classes/S33r
|
121
|
+
<a href="classes/S33r.html#M000057">parse_expiry (S33r)</a><br />
|
122
|
+
<a href="classes/S33r/BucketListing.html#M000109">parse_listing (S33r::BucketListing)</a><br />
|
92
123
|
<a href="classes/MIME/Type.html#M000035">platform? (MIME::Type)</a><br />
|
93
|
-
<a href="classes/S33r/BucketListing.html#
|
94
|
-
<a href="classes/S33r/NamedBucket.html#
|
95
|
-
<a href="classes/S33r/
|
96
|
-
<a href="classes/S33r/
|
97
|
-
<a href="classes/S33r/
|
98
|
-
<a href="classes/S33r/
|
99
|
-
<a href="classes/S33r/Client.html#
|
100
|
-
<a href="classes/S33r/NamedBucket.html#
|
124
|
+
<a href="classes/S33r/BucketListing.html#M000112">pretty (S33r::BucketListing)</a><br />
|
125
|
+
<a href="classes/S33r/NamedBucket.html#M000093">public_contents? (S33r::NamedBucket)</a><br />
|
126
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000081">public_read_grant (S33r::S3ACL::Grant)</a><br />
|
127
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000069">public_readable? (S33r::S3ACL::ACLDoc)</a><br />
|
128
|
+
<a href="classes/S33r/NamedBucket.html#M000103">put_file (S33r::NamedBucket)</a><br />
|
129
|
+
<a href="classes/S33r/Client.html#M000140">put_file (S33r::Client)</a><br />
|
130
|
+
<a href="classes/S33r/Client.html#M000138">put_resource (S33r::Client)</a><br />
|
131
|
+
<a href="classes/S33r/NamedBucket.html#M000104">put_stream (S33r::NamedBucket)</a><br />
|
132
|
+
<a href="classes/S33r/Client.html#M000139">put_text (S33r::Client)</a><br />
|
133
|
+
<a href="classes/S33r/NamedBucket.html#M000102">put_text (S33r::NamedBucket)</a><br />
|
101
134
|
<a href="classes/MIME/Type.html#M000030">registered? (MIME::Type)</a><br />
|
102
|
-
<a href="classes/S33r/
|
103
|
-
<a href="classes/S33r.html#
|
104
|
-
<a href="classes/S33r.html#
|
135
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000068">remove_grant (S33r::S3ACL::ACLDoc)</a><br />
|
136
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000073">remove_log_target_grants (S33r::S3ACL::ACLDoc)</a><br />
|
137
|
+
<a href="classes/S33r.html#M000058">remove_namespace (S33r)</a><br />
|
138
|
+
<a href="classes/S33r/Client.html#M000126">resource_exists? (S33r::Client)</a><br />
|
139
|
+
<a href="classes/S33r.html#M000050">s3_acl_path (S33r)</a><br />
|
140
|
+
<a href="classes/S33r/NamedBucket.html#M000106">s3_authenticated_url (S33r::NamedBucket)</a><br />
|
141
|
+
<a href="classes/S33r.html#M000055">s3_authenticated_url (S33r)</a><br />
|
142
|
+
<a href="classes/S33r.html#M000051">s3_logging_path (S33r)</a><br />
|
143
|
+
<a href="classes/S33r.html#M000054">s3_path (S33r)</a><br />
|
144
|
+
<a href="classes/S33r.html#M000053">s3_public_url (S33r)</a><br />
|
145
|
+
<a href="classes/S33r.html#M000052">s3_url (S33r)</a><br />
|
105
146
|
<a href="classes/Net/HTTPGenericRequest.html#M000004">send_request_with_body_stream (Net::HTTPGenericRequest)</a><br />
|
106
|
-
<a href="classes/S33r/
|
107
|
-
<a href="classes/S33r/S3Object.html#
|
108
|
-
<a href="classes/S33r/
|
147
|
+
<a href="classes/S33r/Client.html#M000129">set_acl (S33r::Client)</a><br />
|
148
|
+
<a href="classes/S33r/S3Object.html#M000090">set_from_node (S33r::S3Object)</a><br />
|
149
|
+
<a href="classes/S33r/S3Object.html#M000089">set_from_xml_string (S33r::S3Object)</a><br />
|
150
|
+
<a href="classes/S33r/BucketListing.html#M000108">set_listing_xml (S33r::BucketListing)</a><br />
|
151
|
+
<a href="classes/S33r/Client.html#M000130">set_logging (S33r::Client)</a><br />
|
109
152
|
<a href="classes/MIME/Type.html#M000033">signature? (MIME::Type)</a><br />
|
110
153
|
<a href="classes/MIME/Type.html#M000025">simplified (MIME::Type)</a><br />
|
111
|
-
<a href="classes/S33r/NamedBucket.html#
|
154
|
+
<a href="classes/S33r/NamedBucket.html#M000094">strict? (S33r::NamedBucket)</a><br />
|
112
155
|
<a href="classes/Net/HTTPResponse.html#M000007">success (Net::HTTPResponse)</a><br />
|
113
156
|
<a href="classes/MIME/Type.html#M000034">system? (MIME::Type)</a><br />
|
114
157
|
<a href="classes/MIME/Type.html#M000039">to_a (MIME::Type)</a><br />
|
115
158
|
<a href="classes/MIME/Type.html#M000040">to_hash (MIME::Type)</a><br />
|
116
|
-
<a href="classes/MIME/Type.html#M000037">to_s (MIME::Type)</a><br />
|
117
159
|
<a href="classes/Net/HTTPResponse.html#M000009">to_s (Net::HTTPResponse)</a><br />
|
118
160
|
<a href="classes/Net/HTTPGenericRequest.html#M000003">to_s (Net::HTTPGenericRequest)</a><br />
|
161
|
+
<a href="classes/MIME/Type.html#M000037">to_s (MIME::Type)</a><br />
|
119
162
|
<a href="classes/MIME/Type.html#M000038">to_str (MIME::Type)</a><br />
|
120
|
-
<a href="classes/
|
163
|
+
<a href="classes/S33r/S3ACL/Grant.html#M000083">to_xml (S33r::S3ACL::Grant)</a><br />
|
164
|
+
<a href="classes/S33r/LoggingResource.html#M000086">to_xml (S33r::LoggingResource)</a><br />
|
165
|
+
<a href="classes/S33r/S3ACL/ACLDoc.html#M000066">to_xml (S33r::S3ACL::ACLDoc)</a><br />
|
121
166
|
<a href="classes/MIME/Types.html#M000012">type_for (MIME::Types)</a><br />
|
122
|
-
<a href="classes/
|
167
|
+
<a href="classes/MIME/Types.html#M000016">type_for (MIME::Types)</a><br />
|
123
168
|
<a href="classes/MIME/Type.html#M000024">urls (MIME::Type)</a><br />
|
124
169
|
<a href="classes/MIME/Type.html#M000021">use_instead (MIME::Type)</a><br />
|
125
|
-
<a href="classes/S33r/Client.html#M000084">use_ssl? (S33r::Client)</a><br />
|
126
170
|
<a href="classes/XML.html#M000001">xget (XML)</a><br />
|
127
171
|
</div>
|
128
172
|
</div>
|
data/lib/s33r/bucket_listing.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
# TODO: use prefix to limit keys to some subset of all available keys;
|
2
|
-
# TODO: use delimiter to group keys
|
3
|
-
|
4
1
|
require 'date'
|
5
2
|
require 'xml/libxml'
|
3
|
+
require File.join(File.dirname(__FILE__), 's3_acl')
|
6
4
|
|
7
5
|
module S33r
|
8
6
|
# Object representation of the content of a bucket.
|
@@ -15,6 +13,8 @@ module S33r
|
|
15
13
|
attr_reader :contents
|
16
14
|
# A NamedBucket instance associated with this listing.
|
17
15
|
attr_accessor :named_bucket
|
16
|
+
# The last key listed in this BucketListing.
|
17
|
+
attr_reader :last_key
|
18
18
|
|
19
19
|
# Create a new object representing a ListBucketResult.
|
20
20
|
#
|
@@ -34,13 +34,15 @@ module S33r
|
|
34
34
|
|
35
35
|
# Convert a ListBucketResult XML document into an object representation.
|
36
36
|
def set_listing_xml(bucket_listing_xml)
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
begin
|
38
|
+
# remove the namespace declaration: libxml doesn't like it
|
39
|
+
bucket_listing_xml = S33r.remove_namespace(bucket_listing_xml)
|
40
|
+
parse_listing(bucket_listing_xml)
|
41
|
+
rescue
|
42
|
+
message = "Cannot create bucket listing from supplied XML"
|
43
|
+
message += " (was nil)" if bucket_listing_xml.nil?
|
44
|
+
raise S33rException::InvalidBucketListing, message
|
45
|
+
end
|
44
46
|
end
|
45
47
|
|
46
48
|
# Parse raw XML ListBucketResponse from S3 into object instances.
|
@@ -68,6 +70,11 @@ module S33r
|
|
68
70
|
end
|
69
71
|
end
|
70
72
|
|
73
|
+
# Get the last key in the contents hash.
|
74
|
+
def last_key
|
75
|
+
@contents.keys.last
|
76
|
+
end
|
77
|
+
|
71
78
|
# Return an object in this bucket by key.
|
72
79
|
def [](key)
|
73
80
|
@contents[key]
|
@@ -128,7 +135,10 @@ module S33r
|
|
128
135
|
@last_modified = DateTime.parse(doc.xget('LastModified'))
|
129
136
|
@etag = doc.xget('ETag').gsub("\"", "")
|
130
137
|
@size = doc.xget('Size').to_i
|
131
|
-
|
138
|
+
|
139
|
+
# Build representation of the owner.
|
140
|
+
user_xml_doc = doc.find('Owner').to_a.first
|
141
|
+
@owner = S3ACL::CanonicalUser.from_xml(user_xml_doc)
|
132
142
|
|
133
143
|
# TODO: if setting from a full object listing (GET on a resource key),
|
134
144
|
# do additional field setting here (e.g. x-amz-meta- headers)
|
@@ -136,15 +146,4 @@ module S33r
|
|
136
146
|
# these fields exist before attempting to set properties
|
137
147
|
end
|
138
148
|
end
|
139
|
-
|
140
|
-
class S3User
|
141
|
-
attr_accessor :id, :display_name
|
142
|
-
|
143
|
-
# +owner_xml_doc+: XML::Document instance, representing an <Owner> node from
|
144
|
-
# inside a ListBucketResult <Contents> element (see http://docs.amazonwebservices.com/AmazonS3/2006-03-01/).
|
145
|
-
def initialize(owner_xml_doc)
|
146
|
-
@id = owner_xml_doc.xget('//ID')
|
147
|
-
@display_name = owner_xml_doc.xget('//DisplayName')
|
148
|
-
end
|
149
|
-
end
|
150
149
|
end
|