s33r 0.3.1 → 0.4
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/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,239 @@
|
|
|
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: S33r::S3ACL::Grantee</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">S33r::S3ACL::Grantee</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../../files/lib/s33r/s3_acl_rb.html">
|
|
59
|
+
lib/s33r/s3_acl.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
|
+
Abstract representation of an S3 <a href="Grantee.html">Grantee</a>.
|
|
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="#M000074">==</a>
|
|
96
|
+
<a href="#M000076">from_xml</a>
|
|
97
|
+
<a href="#M000075">method_missing</a>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
<!-- if includes -->
|
|
105
|
+
|
|
106
|
+
<div id="section">
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<div id="attribute-list">
|
|
113
|
+
<h3 class="section-bar">Attributes</h3>
|
|
114
|
+
|
|
115
|
+
<div class="name-list">
|
|
116
|
+
<table>
|
|
117
|
+
<tr class="top-aligned-row context-row">
|
|
118
|
+
<td class="context-item-name">grantee_type</td>
|
|
119
|
+
<td class="context-item-value"> [R] </td>
|
|
120
|
+
<td class="context-item-desc"></td>
|
|
121
|
+
</tr>
|
|
122
|
+
</table>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<!-- if method_list -->
|
|
129
|
+
<div id="methods">
|
|
130
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
131
|
+
|
|
132
|
+
<div id="method-M000076" class="method-detail">
|
|
133
|
+
<a name="M000076"></a>
|
|
134
|
+
|
|
135
|
+
<div class="method-heading">
|
|
136
|
+
<a href="#M000076" class="method-signature">
|
|
137
|
+
<span class="method-name">from_xml</span><span class="method-args">(grantee_xml)</span>
|
|
138
|
+
</a>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div class="method-description">
|
|
142
|
+
<p><a class="source-toggle" href="#"
|
|
143
|
+
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
|
144
|
+
<div class="method-source-code" id="M000076-source">
|
|
145
|
+
<pre>
|
|
146
|
+
<span class="ruby-comment cmt"># File lib/s33r/s3_acl.rb, line 264</span>
|
|
147
|
+
264: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">grantee_xml</span>)
|
|
148
|
+
265: <span class="ruby-identifier">grantee_type</span> = <span class="ruby-identifier">grantee_xml</span>[<span class="ruby-value str">'type'</span>]
|
|
149
|
+
266:
|
|
150
|
+
267: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">grantee_type</span>
|
|
151
|
+
268: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">GRANTEE_TYPES</span>[<span class="ruby-identifier">:amazon_customer</span>]
|
|
152
|
+
269: <span class="ruby-constant">AmazonCustomer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">grantee_xml</span>.<span class="ruby-identifier">xget</span>(<span class="ruby-value str">'EmailAddress'</span>))
|
|
153
|
+
270: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">GRANTEE_TYPES</span>[<span class="ruby-identifier">:canonical_user</span>]
|
|
154
|
+
271: <span class="ruby-constant">CanonicalUser</span>.<span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">grantee_xml</span>)
|
|
155
|
+
272: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">GRANTEE_TYPES</span>[<span class="ruby-identifier">:group</span>]
|
|
156
|
+
273: <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">grantee_xml</span>.<span class="ruby-identifier">xget</span>(<span class="ruby-value str">'URI'</span>)
|
|
157
|
+
274: <span class="ruby-comment cmt"># last part of the path is the group type</span>
|
|
158
|
+
275: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/#{GROUP_ACL_URI_BASE}/</span>, <span class="ruby-value str">''</span>)
|
|
159
|
+
276:
|
|
160
|
+
277: <span class="ruby-identifier">group_type</span> = <span class="ruby-identifier">:all_users</span>
|
|
161
|
+
278: <span class="ruby-constant">S3_GROUP_TYPES</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">group_type</span> = <span class="ruby-identifier">k</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">path</span> }
|
|
162
|
+
279: <span class="ruby-constant">Group</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">group_type</span>)
|
|
163
|
+
280: <span class="ruby-keyword kw">end</span>
|
|
164
|
+
281: <span class="ruby-keyword kw">end</span>
|
|
165
|
+
</pre>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
171
|
+
|
|
172
|
+
<div id="method-M000074" class="method-detail">
|
|
173
|
+
<a name="M000074"></a>
|
|
174
|
+
|
|
175
|
+
<div class="method-heading">
|
|
176
|
+
<a href="#M000074" class="method-signature">
|
|
177
|
+
<span class="method-name">==</span><span class="method-args">(obj)</span>
|
|
178
|
+
</a>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div class="method-description">
|
|
182
|
+
<p><a class="source-toggle" href="#"
|
|
183
|
+
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
|
184
|
+
<div class="method-source-code" id="M000074-source">
|
|
185
|
+
<pre>
|
|
186
|
+
<span class="ruby-comment cmt"># File lib/s33r/s3_acl.rb, line 247</span>
|
|
187
|
+
247: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">obj</span>)
|
|
188
|
+
248: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Grantee</span>)
|
|
189
|
+
249: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
190
|
+
250: <span class="ruby-keyword kw">end</span>
|
|
191
|
+
251: <span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">var</span><span class="ruby-operator">|</span>
|
|
192
|
+
252: <span class="ruby-identifier">method_name</span> = <span class="ruby-identifier">var</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^@/</span>, <span class="ruby-value str">''</span>)
|
|
193
|
+
253: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method_name</span>) <span class="ruby-operator">!=</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method_name</span>)
|
|
194
|
+
254: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
195
|
+
255: <span class="ruby-keyword kw">end</span>
|
|
196
|
+
256: <span class="ruby-keyword kw">end</span>
|
|
197
|
+
257: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
|
198
|
+
258: <span class="ruby-keyword kw">end</span>
|
|
199
|
+
</pre>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
<div id="method-M000075" class="method-detail">
|
|
205
|
+
<a name="M000075"></a>
|
|
206
|
+
|
|
207
|
+
<div class="method-heading">
|
|
208
|
+
<a href="#M000075" class="method-signature">
|
|
209
|
+
<span class="method-name">method_missing</span><span class="method-args">(*args)</span>
|
|
210
|
+
</a>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<div class="method-description">
|
|
214
|
+
<p><a class="source-toggle" href="#"
|
|
215
|
+
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
|
216
|
+
<div class="method-source-code" id="M000075-source">
|
|
217
|
+
<pre>
|
|
218
|
+
<span class="ruby-comment cmt"># File lib/s33r/s3_acl.rb, line 260</span>
|
|
219
|
+
260: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
220
|
+
261: <span class="ruby-keyword kw">nil</span>
|
|
221
|
+
262: <span class="ruby-keyword kw">end</span>
|
|
222
|
+
</pre>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<div id="validator-badges">
|
|
235
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
</body>
|
|
239
|
+
</html>
|
|
@@ -0,0 +1,178 @@
|
|
|
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: S33r::S3ACL::Group</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">S33r::S3ACL::Group</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../../files/lib/s33r/s3_acl_rb.html">
|
|
59
|
+
lib/s33r/s3_acl.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
|
+
<a href="Grantee.html">
|
|
69
|
+
Grantee
|
|
70
|
+
</a>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
<!-- banner header -->
|
|
76
|
+
|
|
77
|
+
<div id="bodyContent">
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<div id="contextContent">
|
|
82
|
+
|
|
83
|
+
<div id="description">
|
|
84
|
+
<p>
|
|
85
|
+
One of the predefined S3 groups.
|
|
86
|
+
</p>
|
|
87
|
+
<p>
|
|
88
|
+
A group must have a type (AllUsers or AuthenticatedUsers).
|
|
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="#M000060">new</a>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<!-- if includes -->
|
|
108
|
+
|
|
109
|
+
<div id="section">
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<div id="attribute-list">
|
|
116
|
+
<h3 class="section-bar">Attributes</h3>
|
|
117
|
+
|
|
118
|
+
<div class="name-list">
|
|
119
|
+
<table>
|
|
120
|
+
<tr class="top-aligned-row context-row">
|
|
121
|
+
<td class="context-item-name">group_type</td>
|
|
122
|
+
<td class="context-item-value"> [RW] </td>
|
|
123
|
+
<td class="context-item-desc"></td>
|
|
124
|
+
</tr>
|
|
125
|
+
</table>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<!-- if method_list -->
|
|
132
|
+
<div id="methods">
|
|
133
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
134
|
+
|
|
135
|
+
<div id="method-M000060" class="method-detail">
|
|
136
|
+
<a name="M000060"></a>
|
|
137
|
+
|
|
138
|
+
<div class="method-heading">
|
|
139
|
+
<a href="#M000060" class="method-signature">
|
|
140
|
+
<span class="method-name">new</span><span class="method-args">(group_type)</span>
|
|
141
|
+
</a>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="method-description">
|
|
145
|
+
<p>
|
|
146
|
+
The type of group. A key from S3_GROUP_TYPES to one of the pre-defined
|
|
147
|
+
Amazon group types.
|
|
148
|
+
</p>
|
|
149
|
+
<p><a class="source-toggle" href="#"
|
|
150
|
+
onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
|
|
151
|
+
<div class="method-source-code" id="M000060-source">
|
|
152
|
+
<pre>
|
|
153
|
+
<span class="ruby-comment cmt"># File lib/s33r/s3_acl.rb, line 327</span>
|
|
154
|
+
327: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">group_type</span>)
|
|
155
|
+
328: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">S3_GROUP_TYPES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">group_type</span>)
|
|
156
|
+
329: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidS3GroupType</span>, <span class="ruby-value str">'No such group type #{group_type}'</span>
|
|
157
|
+
330: <span class="ruby-keyword kw">end</span>
|
|
158
|
+
331: <span class="ruby-ivar">@group_type</span> = <span class="ruby-constant">S3_GROUP_TYPES</span>[<span class="ruby-identifier">group_type</span>]
|
|
159
|
+
332: <span class="ruby-ivar">@grantee_type</span> = <span class="ruby-constant">GRANTEE_TYPES</span>[<span class="ruby-identifier">:group</span>]
|
|
160
|
+
333: <span class="ruby-keyword kw">end</span>
|
|
161
|
+
</pre>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div id="validator-badges">
|
|
174
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
</body>
|
|
178
|
+
</html>
|
|
@@ -92,10 +92,10 @@ Representation of an object stored in a bucket.
|
|
|
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="#
|
|
98
|
-
<a href="#
|
|
95
|
+
<a href="#M000088">delete</a>
|
|
96
|
+
<a href="#M000087">new</a>
|
|
97
|
+
<a href="#M000090">set_from_node</a>
|
|
98
|
+
<a href="#M000089">set_from_xml_string</a>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
101
101
|
|
|
@@ -165,11 +165,11 @@ Representation of an object stored in a bucket.
|
|
|
165
165
|
<div id="methods">
|
|
166
166
|
<h3 class="section-bar">Public Class methods</h3>
|
|
167
167
|
|
|
168
|
-
<div id="method-
|
|
169
|
-
<a name="
|
|
168
|
+
<div id="method-M000087" class="method-detail">
|
|
169
|
+
<a name="M000087"></a>
|
|
170
170
|
|
|
171
171
|
<div class="method-heading">
|
|
172
|
-
<a href="#
|
|
172
|
+
<a href="#M000087" class="method-signature">
|
|
173
173
|
<span class="method-name">new</span><span class="method-args">(node=nil, named_bucket=nil)</span>
|
|
174
174
|
</a>
|
|
175
175
|
</div>
|
|
@@ -179,14 +179,14 @@ Representation of an object stored in a bucket.
|
|
|
179
179
|
Create from a node.
|
|
180
180
|
</p>
|
|
181
181
|
<p><a class="source-toggle" href="#"
|
|
182
|
-
onclick="toggleCode('
|
|
183
|
-
<div class="method-source-code" id="
|
|
182
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
|
183
|
+
<div class="method-source-code" id="M000087-source">
|
|
184
184
|
<pre>
|
|
185
|
-
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
185
|
+
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line 112</span>
|
|
186
|
+
112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">node</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">named_bucket</span>=<span class="ruby-keyword kw">nil</span>)
|
|
187
|
+
113: <span class="ruby-ivar">@named_bucket</span> = <span class="ruby-identifier">named_bucket</span>
|
|
188
|
+
114: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set_from_node</span>(<span class="ruby-identifier">node</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">nil?</span>
|
|
189
|
+
115: <span class="ruby-keyword kw">end</span>
|
|
190
190
|
</pre>
|
|
191
191
|
</div>
|
|
192
192
|
</div>
|
|
@@ -194,11 +194,11 @@ Create from a node.
|
|
|
194
194
|
|
|
195
195
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
196
196
|
|
|
197
|
-
<div id="method-
|
|
198
|
-
<a name="
|
|
197
|
+
<div id="method-M000088" class="method-detail">
|
|
198
|
+
<a name="M000088"></a>
|
|
199
199
|
|
|
200
200
|
<div class="method-heading">
|
|
201
|
-
<a href="#
|
|
201
|
+
<a href="#M000088" class="method-signature">
|
|
202
202
|
<span class="method-name">delete</span><span class="method-args">()</span>
|
|
203
203
|
</a>
|
|
204
204
|
</div>
|
|
@@ -209,23 +209,23 @@ Remove this object from associated <a
|
|
|
209
209
|
href="NamedBucket.html">NamedBucket</a>.
|
|
210
210
|
</p>
|
|
211
211
|
<p><a class="source-toggle" href="#"
|
|
212
|
-
onclick="toggleCode('
|
|
213
|
-
<div class="method-source-code" id="
|
|
212
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
|
213
|
+
<div class="method-source-code" id="M000088-source">
|
|
214
214
|
<pre>
|
|
215
|
-
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line 118</span>
|
|
216
|
+
118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>
|
|
217
|
+
119: <span class="ruby-ivar">@named_bucket</span>.<span class="ruby-identifier">delete_key</span>(<span class="ruby-ivar">@key</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@named_bucket</span>.<span class="ruby-identifier">nil?</span>
|
|
218
|
+
120: <span class="ruby-keyword kw">end</span>
|
|
219
219
|
</pre>
|
|
220
220
|
</div>
|
|
221
221
|
</div>
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
|
-
<div id="method-
|
|
225
|
-
<a name="
|
|
224
|
+
<div id="method-M000090" class="method-detail">
|
|
225
|
+
<a name="M000090"></a>
|
|
226
226
|
|
|
227
227
|
<div class="method-heading">
|
|
228
|
-
<a href="#
|
|
228
|
+
<a href="#M000090" class="method-signature">
|
|
229
229
|
<span class="method-name">set_from_node</span><span class="method-args">(doc)</span>
|
|
230
230
|
</a>
|
|
231
231
|
</div>
|
|
@@ -240,32 +240,35 @@ document.
|
|
|
240
240
|
parse to get properties for this object.
|
|
241
241
|
</p>
|
|
242
242
|
<p><a class="source-toggle" href="#"
|
|
243
|
-
onclick="toggleCode('
|
|
244
|
-
<div class="method-source-code" id="
|
|
243
|
+
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
|
244
|
+
<div class="method-source-code" id="M000090-source">
|
|
245
245
|
<pre>
|
|
246
|
-
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
246
|
+
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line 133</span>
|
|
247
|
+
133: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_from_node</span>(<span class="ruby-identifier">doc</span>)
|
|
248
|
+
134: <span class="ruby-ivar">@key</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xget</span>(<span class="ruby-value str">'Key'</span>)
|
|
249
|
+
135: <span class="ruby-ivar">@last_modified</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xget</span>(<span class="ruby-value str">'LastModified'</span>))
|
|
250
|
+
136: <span class="ruby-ivar">@etag</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xget</span>(<span class="ruby-value str">'ETag'</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">"\""</span>, <span class="ruby-value str">""</span>)
|
|
251
|
+
137: <span class="ruby-ivar">@size</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">xget</span>(<span class="ruby-value str">'Size'</span>).<span class="ruby-identifier">to_i</span>
|
|
252
|
+
138:
|
|
253
|
+
139: <span class="ruby-comment cmt"># Build representation of the owner.</span>
|
|
254
|
+
140: <span class="ruby-identifier">user_xml_doc</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value str">'Owner'</span>).<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">first</span>
|
|
255
|
+
141: <span class="ruby-ivar">@owner</span> = <span class="ruby-constant">S3ACL</span><span class="ruby-operator">::</span><span class="ruby-constant">CanonicalUser</span>.<span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">user_xml_doc</span>)
|
|
256
|
+
142:
|
|
257
|
+
143: <span class="ruby-comment cmt"># TODO: if setting from a full object listing (GET on a resource key),</span>
|
|
258
|
+
144: <span class="ruby-comment cmt"># do additional field setting here (e.g. x-amz-meta- headers)</span>
|
|
259
|
+
145: <span class="ruby-comment cmt"># and assign the response body to some data field; detect whether</span>
|
|
260
|
+
146: <span class="ruby-comment cmt"># these fields exist before attempting to set properties</span>
|
|
261
|
+
147: <span class="ruby-keyword kw">end</span>
|
|
259
262
|
</pre>
|
|
260
263
|
</div>
|
|
261
264
|
</div>
|
|
262
265
|
</div>
|
|
263
266
|
|
|
264
|
-
<div id="method-
|
|
265
|
-
<a name="
|
|
267
|
+
<div id="method-M000089" class="method-detail">
|
|
268
|
+
<a name="M000089"></a>
|
|
266
269
|
|
|
267
270
|
<div class="method-heading">
|
|
268
|
-
<a href="#
|
|
271
|
+
<a href="#M000089" class="method-signature">
|
|
269
272
|
<span class="method-name">set_from_xml_string</span><span class="method-args">(xml_str)</span>
|
|
270
273
|
</a>
|
|
271
274
|
</div>
|
|
@@ -280,13 +283,13 @@ href="../XML.html">XML</a> document, containing a <Contents> element
|
|
|
280
283
|
as its root element.
|
|
281
284
|
</p>
|
|
282
285
|
<p><a class="source-toggle" href="#"
|
|
283
|
-
onclick="toggleCode('
|
|
284
|
-
<div class="method-source-code" id="
|
|
286
|
+
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
|
287
|
+
<div class="method-source-code" id="M000089-source">
|
|
285
288
|
<pre>
|
|
286
|
-
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
289
|
+
<span class="ruby-comment cmt"># File lib/s33r/bucket_listing.rb, line 126</span>
|
|
290
|
+
126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_from_xml_string</span>(<span class="ruby-identifier">xml_str</span>)
|
|
291
|
+
127: <span class="ruby-identifier">set_from_node</span>(<span class="ruby-constant">XML</span>.<span class="ruby-identifier">get_xml_doc</span>(<span class="ruby-identifier">xml_str</span>))
|
|
292
|
+
128: <span class="ruby-keyword kw">end</span>
|
|
290
293
|
</pre>
|
|
291
294
|
</div>
|
|
292
295
|
</div>
|