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.
Files changed (120) hide show
  1. data/examples/cli/acl_x.rb +41 -0
  2. data/examples/cli/logging_x.rb +20 -0
  3. data/{bin → examples/cli}/s3cli.rb +13 -20
  4. data/examples/fores33r/README +183 -0
  5. data/examples/fores33r/Rakefile +10 -0
  6. data/examples/fores33r/app/controllers/application.rb +4 -0
  7. data/examples/fores33r/app/controllers/browser_controller.rb +68 -0
  8. data/examples/fores33r/app/helpers/application_helper.rb +8 -0
  9. data/examples/fores33r/app/views/browser/index.rhtml +14 -0
  10. data/examples/fores33r/app/views/browser/show_bucket.rhtml +14 -0
  11. data/examples/fores33r/app/views/layouts/application.rhtml +29 -0
  12. data/examples/fores33r/config/boot.rb +44 -0
  13. data/examples/fores33r/config/database.yml +35 -0
  14. data/examples/fores33r/config/environment.rb +64 -0
  15. data/examples/fores33r/config/environments/development.rb +21 -0
  16. data/examples/fores33r/config/environments/production.rb +18 -0
  17. data/examples/fores33r/config/environments/test.rb +19 -0
  18. data/examples/fores33r/config/routes.rb +23 -0
  19. data/examples/fores33r/doc/README_FOR_APP +2 -0
  20. data/examples/fores33r/log/development.log +5507 -0
  21. data/examples/fores33r/log/production.log +0 -0
  22. data/examples/fores33r/log/server.log +0 -0
  23. data/examples/fores33r/log/test.log +0 -0
  24. data/examples/fores33r/public/404.html +8 -0
  25. data/examples/fores33r/public/500.html +8 -0
  26. data/examples/fores33r/public/dispatch.cgi +10 -0
  27. data/examples/fores33r/public/dispatch.fcgi +24 -0
  28. data/examples/fores33r/public/dispatch.rb +10 -0
  29. data/examples/fores33r/public/favicon.ico +0 -0
  30. data/examples/fores33r/public/images/rails.png +0 -0
  31. data/examples/fores33r/public/javascripts/application.js +2 -0
  32. data/examples/fores33r/public/javascripts/controls.js +815 -0
  33. data/examples/fores33r/public/javascripts/dragdrop.js +913 -0
  34. data/examples/fores33r/public/javascripts/effects.js +958 -0
  35. data/examples/fores33r/public/javascripts/prototype.js +2006 -0
  36. data/examples/fores33r/public/robots.txt +1 -0
  37. data/examples/fores33r/public/stylesheets/core.css +37 -0
  38. data/examples/fores33r/script/about +3 -0
  39. data/examples/fores33r/script/breakpointer +3 -0
  40. data/examples/fores33r/script/console +3 -0
  41. data/examples/fores33r/script/destroy +3 -0
  42. data/examples/fores33r/script/generate +3 -0
  43. data/examples/fores33r/script/performance/benchmarker +3 -0
  44. data/examples/fores33r/script/performance/profiler +3 -0
  45. data/examples/fores33r/script/plugin +3 -0
  46. data/examples/fores33r/script/process/reaper +3 -0
  47. data/examples/fores33r/script/process/spawner +3 -0
  48. data/examples/fores33r/script/runner +3 -0
  49. data/examples/fores33r/script/server +3 -0
  50. data/examples/fores33r/test/test_helper.rb +28 -0
  51. data/examples/fores33r/tmp/sessions/ruby_sess.39d37e054d21d545 +0 -0
  52. data/examples/fores33r/tmp/sessions/ruby_sess.acf71fc73aa74983 +0 -0
  53. data/examples/fores33r/tmp/sessions/ruby_sess.c1697b7d6670f3cd +0 -0
  54. data/examples/s3.yaml +11 -0
  55. data/html/classes/Net/HTTPGenericRequest.html +32 -32
  56. data/html/classes/Net/HTTPResponse.html +20 -19
  57. data/html/classes/S33r.html +422 -190
  58. data/html/classes/S33r/BucketListing.html +107 -70
  59. data/html/classes/S33r/Client.html +888 -414
  60. data/html/classes/S33r/LoggingResource.html +222 -0
  61. data/html/classes/S33r/NamedBucket.html +149 -150
  62. data/html/classes/S33r/OrderlyXmlMarkup.html +165 -0
  63. data/html/classes/S33r/S33rException.html +3 -0
  64. data/html/classes/S33r/S33rException/BucketNotLogTargetable.html +119 -0
  65. data/html/classes/S33r/S33rException/InvalidPermission.html +111 -0
  66. data/html/classes/S33r/S33rException/InvalidS3GroupType.html +111 -0
  67. data/html/classes/S33r/S3ACL.html +125 -0
  68. data/html/classes/S33r/S3ACL/ACLDoc.html +521 -0
  69. data/html/classes/S33r/{S3User.html → S3ACL/AmazonCustomer.html} +27 -30
  70. data/html/classes/S33r/S3ACL/CanonicalUser.html +212 -0
  71. data/html/classes/S33r/S3ACL/Grant.html +403 -0
  72. data/html/classes/S33r/S3ACL/Grantee.html +239 -0
  73. data/html/classes/S33r/S3ACL/Group.html +178 -0
  74. data/html/classes/S33r/S3Object.html +53 -50
  75. data/html/classes/S33r/Sync.html +6 -6
  76. data/html/classes/XML.html +4 -2
  77. data/html/created.rid +1 -1
  78. data/html/files/README_txt.html +82 -28
  79. data/html/files/lib/s33r/bucket_listing_rb.html +1 -8
  80. data/html/files/lib/s33r/builder_rb.html +108 -0
  81. data/html/files/lib/s33r/client_rb.html +2 -1
  82. data/html/files/lib/s33r/core_rb.html +2 -1
  83. data/html/files/lib/s33r/libxml_extensions_rb.html +1 -1
  84. data/html/files/lib/s33r/logging_rb.html +109 -0
  85. data/html/files/lib/s33r/named_bucket_rb.html +1 -1
  86. data/html/files/lib/s33r/s33r_exception_rb.html +1 -1
  87. data/html/files/lib/s33r/s33r_http_rb.html +1 -1
  88. data/html/files/lib/s33r/s3_acl_rb.html +109 -0
  89. data/html/fr_class_index.html +12 -1
  90. data/html/fr_file_index.html +3 -0
  91. data/html/fr_method_index.html +101 -57
  92. data/lib/s33r/bucket_listing.rb +21 -22
  93. data/lib/s33r/builder.rb +20 -0
  94. data/lib/s33r/client.rb +240 -42
  95. data/lib/s33r/core.rb +106 -36
  96. data/lib/s33r/libxml_extensions.rb +2 -2
  97. data/lib/s33r/logging.rb +43 -0
  98. data/lib/s33r/named_bucket.rb +16 -17
  99. data/lib/s33r/s33r_exception.rb +11 -0
  100. data/lib/s33r/s33r_http.rb +2 -1
  101. data/lib/s33r/s3_acl.rb +337 -0
  102. data/test/cases/spec_acl.rb +146 -0
  103. data/test/cases/spec_all_buckets.rb +28 -0
  104. data/test/cases/spec_bucket_listing.rb +2 -2
  105. data/test/cases/spec_client.rb +45 -18
  106. data/test/cases/spec_core.rb +0 -9
  107. data/test/cases/spec_namedbucket.rb +3 -3
  108. data/test/files/acl.xml +47 -0
  109. data/test/files/acl_grant1.xml +7 -0
  110. data/test/files/acl_grant2.xml +6 -0
  111. data/test/files/acl_grant3.xml +6 -0
  112. data/test/files/acl_grant4.xml +6 -0
  113. data/test/files/all_buckets.xml +21 -0
  114. data/test/files/bucket_listing.xml +138 -1
  115. data/test/files/client_config.yml +0 -1
  116. data/test/files/logging_acl.xml +34 -0
  117. data/test/files/namedbucket_config.yml +1 -5
  118. data/test/files/namedbucket_config2.yml +1 -5
  119. data/test/test_setup.rb +1 -0
  120. metadata +132 -7
@@ -0,0 +1,222 @@
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::LoggingResource</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::LoggingResource</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/s33r/logging_rb.html">
59
+ lib/s33r/logging.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
+ For manipulating logging directives on resources (see <a
84
+ href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/LoggingHowTo.html">docs.amazonwebservices.com/AmazonS3/2006-03-01/LoggingHowTo.html</a>).
85
+ </p>
86
+ <p>
87
+ Calling <a href="LoggingResource.html#M000085">LoggingResource.new</a> (no
88
+ arguments) will generate a blank instance which can be used to remove
89
+ logging from a resource.
90
+ </p>
91
+
92
+ </div>
93
+
94
+
95
+ </div>
96
+
97
+ <div id="method-list">
98
+ <h3 class="section-bar">Methods</h3>
99
+
100
+ <div class="name-list">
101
+ <a href="#M000085">new</a>&nbsp;&nbsp;
102
+ <a href="#M000086">to_xml</a>&nbsp;&nbsp;
103
+ </div>
104
+ </div>
105
+
106
+ </div>
107
+
108
+
109
+ <!-- if includes -->
110
+
111
+ <div id="section">
112
+
113
+
114
+
115
+
116
+
117
+ <div id="attribute-list">
118
+ <h3 class="section-bar">Attributes</h3>
119
+
120
+ <div class="name-list">
121
+ <table>
122
+ <tr class="top-aligned-row context-row">
123
+ <td class="context-item-name">log_prefix</td>
124
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
125
+ <td class="context-item-desc"></td>
126
+ </tr>
127
+ <tr class="top-aligned-row context-row">
128
+ <td class="context-item-name">log_target</td>
129
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
130
+ <td class="context-item-desc"></td>
131
+ </tr>
132
+ </table>
133
+ </div>
134
+ </div>
135
+
136
+
137
+
138
+ <!-- if method_list -->
139
+ <div id="methods">
140
+ <h3 class="section-bar">Public Class methods</h3>
141
+
142
+ <div id="method-M000085" class="method-detail">
143
+ <a name="M000085"></a>
144
+
145
+ <div class="method-heading">
146
+ <a href="#M000085" class="method-signature">
147
+ <span class="method-name">new</span><span class="method-args">(log_target=nil, log_prefix=nil)</span>
148
+ </a>
149
+ </div>
150
+
151
+ <div class="method-description">
152
+ <p><a class="source-toggle" href="#"
153
+ onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
154
+ <div class="method-source-code" id="M000085-source">
155
+ <pre>
156
+ <span class="ruby-comment cmt"># File lib/s33r/logging.rb, line 14</span>
157
+ 14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">log_target</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">log_prefix</span>=<span class="ruby-keyword kw">nil</span>)
158
+ 15: <span class="ruby-ivar">@log_target</span> = <span class="ruby-identifier">log_target</span>
159
+ 16: <span class="ruby-ivar">@log_prefix</span> = <span class="ruby-identifier">log_prefix</span>
160
+ 17: <span class="ruby-keyword kw">end</span>
161
+ </pre>
162
+ </div>
163
+ </div>
164
+ </div>
165
+
166
+ <h3 class="section-bar">Public Instance methods</h3>
167
+
168
+ <div id="method-M000086" class="method-detail">
169
+ <a name="M000086"></a>
170
+
171
+ <div class="method-heading">
172
+ <a href="#M000086" class="method-signature">
173
+ <span class="method-name">to_xml</span><span class="method-args">()</span>
174
+ </a>
175
+ </div>
176
+
177
+ <div class="method-description">
178
+ <p>
179
+ Generate a BucketLoggingStatus <a href="../XML.html">XML</a> document for
180
+ putting to the ?logging URL for a resource.
181
+ </p>
182
+ <p><a class="source-toggle" href="#"
183
+ onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
184
+ <div class="method-source-code" id="M000086-source">
185
+ <pre>
186
+ <span class="ruby-comment cmt"># File lib/s33r/logging.rb, line 23</span>
187
+ 23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
188
+ 24: <span class="ruby-identifier">xml_str</span> = <span class="ruby-value str">&quot;&quot;</span>
189
+ 25: <span class="ruby-identifier">xml</span> = <span class="ruby-constant">Builder</span><span class="ruby-operator">::</span><span class="ruby-constant">XmlMarkup</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:target</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">xml_str</span>, <span class="ruby-identifier">:indent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>)
190
+ 26:
191
+ 27: <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">instruct!</span>
192
+ 28:
193
+ 29: <span class="ruby-comment cmt"># BucketLoggingStatus XML.</span>
194
+ 30: <span class="ruby-identifier">xml</span>.<span class="ruby-constant">BucketLoggingStatus</span>({<span class="ruby-value str">&quot;xmlns&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">RESPONSE_NAMESPACE_URI</span>}) {
195
+ 31: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@log_target</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@log_prefix</span>.<span class="ruby-identifier">nil?</span>
196
+ 32: <span class="ruby-identifier">xml</span>.<span class="ruby-constant">LoggingEnabled</span> {
197
+ 33: <span class="ruby-identifier">xml</span>.<span class="ruby-constant">TargetBucket</span> <span class="ruby-ivar">@log_target</span>
198
+ 34: <span class="ruby-identifier">xml</span>.<span class="ruby-constant">TargetPrefix</span> <span class="ruby-ivar">@log_prefix</span>
199
+ 35: }
200
+ 36: <span class="ruby-keyword kw">end</span>
201
+ 37: }
202
+ 38:
203
+ 39: <span class="ruby-identifier">xml_str</span>
204
+ 40: <span class="ruby-keyword kw">end</span>
205
+ </pre>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+
211
+ </div>
212
+
213
+
214
+ </div>
215
+
216
+
217
+ <div id="validator-badges">
218
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
219
+ </div>
220
+
221
+ </body>
222
+ </html>
@@ -95,22 +95,22 @@ convenient for use with a single bucket.
95
95
  <h3 class="section-bar">Methods</h3>
96
96
 
97
97
  <div class="name-list">
98
- <a href="#M000064">[]</a>&nbsp;&nbsp;
99
- <a href="#M000074">delete_resource</a>&nbsp;&nbsp;
100
- <a href="#M000067">destroy</a>&nbsp;&nbsp;
101
- <a href="#M000069">each_item</a>&nbsp;&nbsp;
102
- <a href="#M000066">exists?</a>&nbsp;&nbsp;
103
- <a href="#M000060">init</a>&nbsp;&nbsp;
104
- <a href="#M000070">key_exists?</a>&nbsp;&nbsp;
105
- <a href="#M000068">keys</a>&nbsp;&nbsp;
106
- <a href="#M000065">listing</a>&nbsp;&nbsp;
107
- <a href="#M000061">new</a>&nbsp;&nbsp;
108
- <a href="#M000062">public_contents?</a>&nbsp;&nbsp;
109
- <a href="#M000072">put_file</a>&nbsp;&nbsp;
110
- <a href="#M000073">put_stream</a>&nbsp;&nbsp;
111
- <a href="#M000071">put_text</a>&nbsp;&nbsp;
112
- <a href="#M000075">s3_authenticated_url</a>&nbsp;&nbsp;
113
- <a href="#M000063">strict?</a>&nbsp;&nbsp;
98
+ <a href="#M000095">[]</a>&nbsp;&nbsp;
99
+ <a href="#M000105">delete_resource</a>&nbsp;&nbsp;
100
+ <a href="#M000098">destroy</a>&nbsp;&nbsp;
101
+ <a href="#M000100">each_item</a>&nbsp;&nbsp;
102
+ <a href="#M000097">exists?</a>&nbsp;&nbsp;
103
+ <a href="#M000091">init</a>&nbsp;&nbsp;
104
+ <a href="#M000101">key_exists?</a>&nbsp;&nbsp;
105
+ <a href="#M000099">keys</a>&nbsp;&nbsp;
106
+ <a href="#M000096">listing</a>&nbsp;&nbsp;
107
+ <a href="#M000092">new</a>&nbsp;&nbsp;
108
+ <a href="#M000093">public_contents?</a>&nbsp;&nbsp;
109
+ <a href="#M000103">put_file</a>&nbsp;&nbsp;
110
+ <a href="#M000104">put_stream</a>&nbsp;&nbsp;
111
+ <a href="#M000102">put_text</a>&nbsp;&nbsp;
112
+ <a href="#M000106">s3_authenticated_url</a>&nbsp;&nbsp;
113
+ <a href="#M000094">strict?</a>&nbsp;&nbsp;
114
114
  </div>
115
115
  </div>
116
116
 
@@ -131,12 +131,12 @@ convenient for use with a single bucket.
131
131
  <div class="name-list">
132
132
  <table>
133
133
  <tr class="top-aligned-row context-row">
134
- <td class="context-item-name">bucket_name</td>
134
+ <td class="context-item-name">dump_requests</td>
135
135
  <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
136
136
  <td class="context-item-desc"></td>
137
137
  </tr>
138
138
  <tr class="top-aligned-row context-row">
139
- <td class="context-item-name">dump_requests</td>
139
+ <td class="context-item-name">name</td>
140
140
  <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
141
141
  <td class="context-item-desc"></td>
142
142
  </tr>
@@ -160,11 +160,11 @@ convenient for use with a single bucket.
160
160
  <div id="methods">
161
161
  <h3 class="section-bar">Public Class methods</h3>
162
162
 
163
- <div id="method-M000060" class="method-detail">
164
- <a name="M000060"></a>
163
+ <div id="method-M000091" class="method-detail">
164
+ <a name="M000091"></a>
165
165
 
166
166
  <div class="method-heading">
167
- <a href="#M000060" class="method-signature">
167
+ <a href="#M000091" class="method-signature">
168
168
  <span class="method-name">init</span><span class="method-args">(config_file)</span>
169
169
  </a>
170
170
  </div>
@@ -175,15 +175,15 @@ Initialize an instance from a config_file. The config. file can include a
175
175
  separate <tt>options</tt> section specifying options specific to <a
176
176
  href="NamedBucket.html">NamedBucket</a> instances (see the initialize
177
177
  method for more details). Other options are as for <a
178
- href="Client.html#M000082">S33r::Client.init</a>.
178
+ href="Client.html#M000115">S33r::Client.init</a>.
179
179
  </p>
180
180
  <p><a class="source-toggle" href="#"
181
- onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
182
- <div class="method-source-code" id="M000060-source">
181
+ onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
182
+ <div class="method-source-code" id="M000091-source">
183
183
  <pre>
184
184
  <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 15</span>
185
185
  15: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">NamedBucket</span>.<span class="ruby-identifier">init</span>(<span class="ruby-identifier">config_file</span>)
186
- 16: <span class="ruby-identifier">aws_access_key</span>, <span class="ruby-identifier">aws_secret_access_key</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">_</span> = <span class="ruby-keyword kw">super</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">load_config</span>(<span class="ruby-identifier">config_file</span>)
186
+ 16: <span class="ruby-identifier">aws_access_key</span>, <span class="ruby-identifier">aws_secret_access_key</span>, <span class="ruby-identifier">options</span> = <span class="ruby-keyword kw">super</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">load_config</span>(<span class="ruby-identifier">config_file</span>)
187
187
  17: <span class="ruby-constant">NamedBucket</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">aws_access_key</span>, <span class="ruby-identifier">aws_secret_access_key</span>, <span class="ruby-identifier">options</span>)
188
188
  18: <span class="ruby-keyword kw">end</span>
189
189
  </pre>
@@ -191,11 +191,11 @@ href="Client.html#M000082">S33r::Client.init</a>.
191
191
  </div>
192
192
  </div>
193
193
 
194
- <div id="method-M000061" class="method-detail">
195
- <a name="M000061"></a>
194
+ <div id="method-M000092" class="method-detail">
195
+ <a name="M000092"></a>
196
196
 
197
197
  <div class="method-heading">
198
- <a href="#M000061" class="method-signature">
198
+ <a href="#M000092" class="method-signature">
199
199
  <span class="method-name">new</span><span class="method-args">(aws_access_key, aws_secret_access_key, options={}) {|self if block_given?| ...}</span>
200
200
  </a>
201
201
  </div>
@@ -223,28 +223,28 @@ exist
223
223
  </li>
224
224
  </ul>
225
225
  <p><a class="source-toggle" href="#"
226
- onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
227
- <div class="method-source-code" id="M000061-source">
226
+ onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
227
+ <div class="method-source-code" id="M000092-source">
228
228
  <pre>
229
229
  <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 27</span>
230
230
  27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">aws_access_key</span>, <span class="ruby-identifier">aws_secret_access_key</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
231
231
  28: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">aws_access_key</span>, <span class="ruby-identifier">aws_secret_access_key</span>, <span class="ruby-identifier">options</span>)
232
232
  29:
233
- 30: <span class="ruby-ivar">@bucket_name</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:default_bucket</span>]
234
- 31: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@bucket_name</span>.<span class="ruby-identifier">nil?</span>
233
+ 30: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:default_bucket</span>]
234
+ 31: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">nil?</span>
235
235
  32: <span class="ruby-identifier">raise</span> <span class="ruby-constant">S33rException</span><span class="ruby-operator">::</span><span class="ruby-constant">MissingBucketName</span>, <span class="ruby-value str">&quot;NamedBucket cannot be initialised without specifying\
236
236
  33: a :default_bucket option&quot;</span>
237
237
  34: <span class="ruby-keyword kw">end</span>
238
238
  35:
239
239
  36: <span class="ruby-comment cmt"># holds a BucketListing instance</span>
240
- 37: <span class="ruby-ivar">@bucket_listing</span> = <span class="ruby-keyword kw">nil</span>
240
+ 37: <span class="ruby-ivar">@listing</span> = <span class="ruby-keyword kw">nil</span>
241
241
  38:
242
242
  39: <span class="ruby-comment cmt"># all content should be created as public-read</span>
243
243
  40: <span class="ruby-ivar">@public_contents</span> = (<span class="ruby-keyword kw">true</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:public_contents</span>])
244
244
  41: <span class="ruby-ivar">@client_headers</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">canned_acl_header</span>(<span class="ruby-value str">'public-read'</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@public_contents</span>
245
245
  42:
246
246
  43: <span class="ruby-ivar">@strict</span> = (<span class="ruby-keyword kw">true</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:strict</span>])
247
- 44: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@strict</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">bucket_exists?</span>(<span class="ruby-ivar">@bucket_name</span>)
247
+ 44: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@strict</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">bucket_exists?</span>(<span class="ruby-ivar">@name</span>)
248
248
  45: <span class="ruby-identifier">raise</span> <span class="ruby-constant">S33rException</span><span class="ruby-operator">::</span><span class="ruby-constant">MissingResource</span>, <span class="ruby-node">&quot;Non-existent bucket #{@bucket_name} specified&quot;</span>
249
249
  46: <span class="ruby-keyword kw">end</span>
250
250
  47:
@@ -257,11 +257,11 @@ exist
257
257
 
258
258
  <h3 class="section-bar">Public Instance methods</h3>
259
259
 
260
- <div id="method-M000064" class="method-detail">
261
- <a name="M000064"></a>
260
+ <div id="method-M000095" class="method-detail">
261
+ <a name="M000095"></a>
262
262
 
263
263
  <div class="method-heading">
264
- <a href="#M000064" class="method-signature">
264
+ <a href="#M000095" class="method-signature">
265
265
  <span class="method-name">[]</span><span class="method-args">(key)</span>
266
266
  </a>
267
267
  </div>
@@ -271,23 +271,23 @@ exist
271
271
  Get a single object from a bucket as a blob.
272
272
  </p>
273
273
  <p><a class="source-toggle" href="#"
274
- onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
275
- <div class="method-source-code" id="M000064-source">
274
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
275
+ <div class="method-source-code" id="M000095-source">
276
276
  <pre>
277
277
  <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 62</span>
278
278
  62: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
279
- 63: <span class="ruby-identifier">get_resource</span>(<span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">key</span>).<span class="ruby-identifier">body</span>
279
+ 63: <span class="ruby-identifier">get_resource</span>(<span class="ruby-ivar">@name</span>, <span class="ruby-identifier">key</span>).<span class="ruby-identifier">body</span>
280
280
  64: <span class="ruby-keyword kw">end</span>
281
281
  </pre>
282
282
  </div>
283
283
  </div>
284
284
  </div>
285
285
 
286
- <div id="method-M000074" class="method-detail">
287
- <a name="M000074"></a>
286
+ <div id="method-M000105" class="method-detail">
287
+ <a name="M000105"></a>
288
288
 
289
289
  <div class="method-heading">
290
- <a href="#M000074" class="method-signature">
290
+ <a href="#M000105" class="method-signature">
291
291
  <span class="method-name">delete_resource</span><span class="method-args">(resource_key, headers={})</span>
292
292
  </a>
293
293
  </div>
@@ -297,27 +297,27 @@ Get a single object from a bucket as a blob.
297
297
  Delete an object from the bucket. NB S3 doesn&#8217;t discriminate between
298
298
  successfully deleting a key and trying to delete a non-existent key (both
299
299
  return a 204). If you want to test for existence first, use <a
300
- href="NamedBucket.html#M000070">key_exists?</a>.
300
+ href="NamedBucket.html#M000101">key_exists?</a>.
301
301
  </p>
302
302
  <p><a class="source-toggle" href="#"
303
- onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
304
- <div class="method-source-code" id="M000074-source">
303
+ onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
304
+ <div class="method-source-code" id="M000105-source">
305
305
  <pre>
306
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 118</span>
307
- 118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_resource</span>(<span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>={})
308
- 119: <span class="ruby-keyword kw">super</span>(<span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>)
309
- 120: <span class="ruby-identifier">listing</span>
310
- 121: <span class="ruby-keyword kw">end</span>
306
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 117</span>
307
+ 117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_resource</span>(<span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>={})
308
+ 118: <span class="ruby-keyword kw">super</span>(<span class="ruby-ivar">@name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>)
309
+ 119: <span class="ruby-identifier">listing</span>
310
+ 120: <span class="ruby-keyword kw">end</span>
311
311
  </pre>
312
312
  </div>
313
313
  </div>
314
314
  </div>
315
315
 
316
- <div id="method-M000067" class="method-detail">
317
- <a name="M000067"></a>
316
+ <div id="method-M000098" class="method-detail">
317
+ <a name="M000098"></a>
318
318
 
319
319
  <div class="method-heading">
320
- <a href="#M000067" class="method-signature">
320
+ <a href="#M000098" class="method-signature">
321
321
  <span class="method-name">destroy</span><span class="method-args">(headers={}, options={})</span>
322
322
  </a>
323
323
  </div>
@@ -327,23 +327,23 @@ href="NamedBucket.html#M000070">key_exists?</a>.
327
327
  Delete the bucket.
328
328
  </p>
329
329
  <p><a class="source-toggle" href="#"
330
- onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
331
- <div class="method-source-code" id="M000067-source">
330
+ onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
331
+ <div class="method-source-code" id="M000098-source">
332
332
  <pre>
333
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 79</span>
334
- 79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">headers</span>={}, <span class="ruby-identifier">options</span>={})
335
- 80: <span class="ruby-identifier">delete_bucket</span>(<span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">options</span>)
336
- 81: <span class="ruby-keyword kw">end</span>
333
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 78</span>
334
+ 78: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">headers</span>={}, <span class="ruby-identifier">options</span>={})
335
+ 79: <span class="ruby-identifier">delete_bucket</span>(<span class="ruby-ivar">@name</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">options</span>)
336
+ 80: <span class="ruby-keyword kw">end</span>
337
337
  </pre>
338
338
  </div>
339
339
  </div>
340
340
  </div>
341
341
 
342
- <div id="method-M000069" class="method-detail">
343
- <a name="M000069"></a>
342
+ <div id="method-M000100" class="method-detail">
343
+ <a name="M000100"></a>
344
344
 
345
345
  <div class="method-heading">
346
- <a href="#M000069" class="method-signature">
346
+ <a href="#M000100" class="method-signature">
347
347
  <span class="method-name">each_item</span><span class="method-args">() {|item| ...}</span>
348
348
  </a>
349
349
  </div>
@@ -354,23 +354,23 @@ List content of the bucket, and attach each item to this bucket as it is
354
354
  yielded.
355
355
  </p>
356
356
  <p><a class="source-toggle" href="#"
357
- onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
358
- <div class="method-source-code" id="M000069-source">
357
+ onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
358
+ <div class="method-source-code" id="M000100-source">
359
359
  <pre>
360
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 89</span>
361
- 89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_item</span>
362
- 90: <span class="ruby-identifier">listing</span>.<span class="ruby-identifier">contents</span>.<span class="ruby-identifier">each_value</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">named_bucket</span> = <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">item</span> }
363
- 91: <span class="ruby-keyword kw">end</span>
360
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 88</span>
361
+ 88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_item</span>
362
+ 89: <span class="ruby-identifier">listing</span>.<span class="ruby-identifier">contents</span>.<span class="ruby-identifier">each_value</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">named_bucket</span> = <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">item</span> }
363
+ 90: <span class="ruby-keyword kw">end</span>
364
364
  </pre>
365
365
  </div>
366
366
  </div>
367
367
  </div>
368
368
 
369
- <div id="method-M000066" class="method-detail">
370
- <a name="M000066"></a>
369
+ <div id="method-M000097" class="method-detail">
370
+ <a name="M000097"></a>
371
371
 
372
372
  <div class="method-heading">
373
- <a href="#M000066" class="method-signature">
373
+ <a href="#M000097" class="method-signature">
374
374
  <span class="method-name">exists?</span><span class="method-args">()</span>
375
375
  </a>
376
376
  </div>
@@ -381,23 +381,23 @@ Does this bucket exist? Returns true if the bucket this <a
381
381
  href="NamedBucket.html">NamedBucket</a> is mapped to exists.
382
382
  </p>
383
383
  <p><a class="source-toggle" href="#"
384
- onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
385
- <div class="method-source-code" id="M000066-source">
384
+ onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
385
+ <div class="method-source-code" id="M000097-source">
386
386
  <pre>
387
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 74</span>
388
- 74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>
389
- 75: <span class="ruby-identifier">bucket_exists?</span>(<span class="ruby-ivar">@bucket_name</span>)
390
- 76: <span class="ruby-keyword kw">end</span>
387
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 73</span>
388
+ 73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>
389
+ 74: <span class="ruby-identifier">bucket_exists?</span>(<span class="ruby-ivar">@name</span>)
390
+ 75: <span class="ruby-keyword kw">end</span>
391
391
  </pre>
392
392
  </div>
393
393
  </div>
394
394
  </div>
395
395
 
396
- <div id="method-M000070" class="method-detail">
397
- <a name="M000070"></a>
396
+ <div id="method-M000101" class="method-detail">
397
+ <a name="M000101"></a>
398
398
 
399
399
  <div class="method-heading">
400
- <a href="#M000070" class="method-signature">
400
+ <a href="#M000101" class="method-signature">
401
401
  <span class="method-name">key_exists?</span><span class="method-args">(key)</span>
402
402
  </a>
403
403
  </div>
@@ -407,23 +407,23 @@ href="NamedBucket.html">NamedBucket</a> is mapped to exists.
407
407
  Does the given key exist in the bucket? Returns boolean
408
408
  </p>
409
409
  <p><a class="source-toggle" href="#"
410
- onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
411
- <div class="method-source-code" id="M000070-source">
410
+ onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
411
+ <div class="method-source-code" id="M000101-source">
412
412
  <pre>
413
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 95</span>
414
- 95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">key_exists?</span>(<span class="ruby-identifier">key</span>)
415
- 96: <span class="ruby-identifier">head_resource</span>(<span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">key</span>).<span class="ruby-identifier">ok?</span>
416
- 97: <span class="ruby-keyword kw">end</span>
413
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 94</span>
414
+ 94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">key_exists?</span>(<span class="ruby-identifier">key</span>)
415
+ 95: <span class="ruby-identifier">resource_exists?</span>(<span class="ruby-ivar">@name</span>, <span class="ruby-identifier">key</span>)
416
+ 96: <span class="ruby-keyword kw">end</span>
417
417
  </pre>
418
418
  </div>
419
419
  </div>
420
420
  </div>
421
421
 
422
- <div id="method-M000068" class="method-detail">
423
- <a name="M000068"></a>
422
+ <div id="method-M000099" class="method-detail">
423
+ <a name="M000099"></a>
424
424
 
425
425
  <div class="method-heading">
426
- <a href="#M000068" class="method-signature">
426
+ <a href="#M000099" class="method-signature">
427
427
  <span class="method-name">keys</span><span class="method-args">()</span>
428
428
  </a>
429
429
  </div>
@@ -433,23 +433,23 @@ Does the given key exist in the bucket? Returns boolean
433
433
  Get a pretty list of the keys in the bucket.
434
434
  </p>
435
435
  <p><a class="source-toggle" href="#"
436
- onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
437
- <div class="method-source-code" id="M000068-source">
436
+ onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
437
+ <div class="method-source-code" id="M000099-source">
438
438
  <pre>
439
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 84</span>
440
- 84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span>
441
- 85: <span class="ruby-identifier">listing</span>.<span class="ruby-identifier">pretty</span>
442
- 86: <span class="ruby-keyword kw">end</span>
439
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 83</span>
440
+ 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span>
441
+ 84: <span class="ruby-identifier">listing</span>.<span class="ruby-identifier">pretty</span>
442
+ 85: <span class="ruby-keyword kw">end</span>
443
443
  </pre>
444
444
  </div>
445
445
  </div>
446
446
  </div>
447
447
 
448
- <div id="method-M000065" class="method-detail">
449
- <a name="M000065"></a>
448
+ <div id="method-M000096" class="method-detail">
449
+ <a name="M000096"></a>
450
450
 
451
451
  <div class="method-heading">
452
- <a href="#M000065" class="method-signature">
452
+ <a href="#M000096" class="method-signature">
453
453
  <span class="method-name">listing</span><span class="method-args">()</span>
454
454
  </a>
455
455
  </div>
@@ -460,24 +460,23 @@ Get a <a href="BucketListing.html">BucketListing</a> instance for the
460
460
  content of this bucket.
461
461
  </p>
462
462
  <p><a class="source-toggle" href="#"
463
- onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
464
- <div class="method-source-code" id="M000065-source">
463
+ onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
464
+ <div class="method-source-code" id="M000096-source">
465
465
  <pre>
466
466
  <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 67</span>
467
467
  67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listing</span>
468
- 68: <span class="ruby-identifier">_</span>, <span class="ruby-ivar">@bucket_listing</span> = <span class="ruby-identifier">list_bucket</span>(<span class="ruby-ivar">@bucket_name</span>)
469
- 69: <span class="ruby-ivar">@bucket_listing</span>
470
- 70: <span class="ruby-keyword kw">end</span>
468
+ 68: <span class="ruby-identifier">list_bucket</span>(<span class="ruby-ivar">@name</span>)
469
+ 69: <span class="ruby-keyword kw">end</span>
471
470
  </pre>
472
471
  </div>
473
472
  </div>
474
473
  </div>
475
474
 
476
- <div id="method-M000062" class="method-detail">
477
- <a name="M000062"></a>
475
+ <div id="method-M000093" class="method-detail">
476
+ <a name="M000093"></a>
478
477
 
479
478
  <div class="method-heading">
480
- <a href="#M000062" class="method-signature">
479
+ <a href="#M000093" class="method-signature">
481
480
  <span class="method-name">public_contents?</span><span class="method-args">()</span>
482
481
  </a>
483
482
  </div>
@@ -487,8 +486,8 @@ content of this bucket.
487
486
  Are all objects added to this bucket made public by default?
488
487
  </p>
489
488
  <p><a class="source-toggle" href="#"
490
- onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
491
- <div class="method-source-code" id="M000062-source">
489
+ onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
490
+ <div class="method-source-code" id="M000093-source">
492
491
  <pre>
493
492
  <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 52</span>
494
493
  52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">public_contents?</span>
@@ -499,11 +498,11 @@ Are all objects added to this bucket made public by default?
499
498
  </div>
500
499
  </div>
501
500
 
502
- <div id="method-M000072" class="method-detail">
503
- <a name="M000072"></a>
501
+ <div id="method-M000103" class="method-detail">
502
+ <a name="M000103"></a>
504
503
 
505
504
  <div class="method-heading">
506
- <a href="#M000072" class="method-signature">
505
+ <a href="#M000103" class="method-signature">
507
506
  <span class="method-name">put_file</span><span class="method-args">(filename, resource_key=nil, headers={}, options={})</span>
508
507
  </a>
509
508
  </div>
@@ -513,23 +512,23 @@ Are all objects added to this bucket made public by default?
513
512
  Put a file into the bucket.
514
513
  </p>
515
514
  <p><a class="source-toggle" href="#"
516
- onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
517
- <div class="method-source-code" id="M000072-source">
515
+ onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
516
+ <div class="method-source-code" id="M000103-source">
518
517
  <pre>
519
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 105</span>
520
- 105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_file</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">resource_key</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">headers</span>={}, <span class="ruby-identifier">options</span>={})
521
- 106: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">options</span>)
522
- 107: <span class="ruby-keyword kw">end</span>
518
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 104</span>
519
+ 104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_file</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">resource_key</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">headers</span>={}, <span class="ruby-identifier">options</span>={})
520
+ 105: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-ivar">@name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">options</span>)
521
+ 106: <span class="ruby-keyword kw">end</span>
523
522
  </pre>
524
523
  </div>
525
524
  </div>
526
525
  </div>
527
526
 
528
- <div id="method-M000073" class="method-detail">
529
- <a name="M000073"></a>
527
+ <div id="method-M000104" class="method-detail">
528
+ <a name="M000104"></a>
530
529
 
531
530
  <div class="method-heading">
532
- <a href="#M000073" class="method-signature">
531
+ <a href="#M000104" class="method-signature">
533
532
  <span class="method-name">put_stream</span><span class="method-args">(data, resource_key, headers={})</span>
534
533
  </a>
535
534
  </div>
@@ -539,23 +538,23 @@ Put a file into the bucket.
539
538
  Put a generic stream (e.g. from a file handle) into the bucket.
540
539
  </p>
541
540
  <p><a class="source-toggle" href="#"
542
- onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
543
- <div class="method-source-code" id="M000073-source">
541
+ onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
542
+ <div class="method-source-code" id="M000104-source">
544
543
  <pre>
545
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 110</span>
546
- 110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_stream</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>={})
547
- 111: <span class="ruby-identifier">put_resource</span>(<span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">headers</span>)
548
- 112: <span class="ruby-keyword kw">end</span>
544
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 109</span>
545
+ 109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_stream</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>={})
546
+ 110: <span class="ruby-identifier">put_resource</span>(<span class="ruby-ivar">@name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">headers</span>)
547
+ 111: <span class="ruby-keyword kw">end</span>
549
548
  </pre>
550
549
  </div>
551
550
  </div>
552
551
  </div>
553
552
 
554
- <div id="method-M000071" class="method-detail">
555
- <a name="M000071"></a>
553
+ <div id="method-M000102" class="method-detail">
554
+ <a name="M000102"></a>
556
555
 
557
556
  <div class="method-heading">
558
- <a href="#M000071" class="method-signature">
557
+ <a href="#M000102" class="method-signature">
559
558
  <span class="method-name">put_text</span><span class="method-args">(string, resource_key, headers={})</span>
560
559
  </a>
561
560
  </div>
@@ -565,23 +564,23 @@ Put a generic stream (e.g. from a file handle) into the bucket.
565
564
  Put a string into a key inside the bucket.
566
565
  </p>
567
566
  <p><a class="source-toggle" href="#"
568
- onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
569
- <div class="method-source-code" id="M000071-source">
567
+ onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
568
+ <div class="method-source-code" id="M000102-source">
570
569
  <pre>
571
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 100</span>
572
- 100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_text</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>={})
573
- 101: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">string</span>, <span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>)
574
- 102: <span class="ruby-keyword kw">end</span>
570
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 99</span>
571
+ 99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_text</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>={})
572
+ 100: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">string</span>, <span class="ruby-ivar">@name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">headers</span>)
573
+ 101: <span class="ruby-keyword kw">end</span>
575
574
  </pre>
576
575
  </div>
577
576
  </div>
578
577
  </div>
579
578
 
580
- <div id="method-M000075" class="method-detail">
581
- <a name="M000075"></a>
579
+ <div id="method-M000106" class="method-detail">
580
+ <a name="M000106"></a>
582
581
 
583
582
  <div class="method-heading">
584
- <a href="#M000075" class="method-signature">
583
+ <a href="#M000106" class="method-signature">
585
584
  <span class="method-name">s3_authenticated_url</span><span class="method-args">(resource_key, expires=(Time.now.to_i + DEFAULT_EXPIRY_SECS))</span>
586
585
  </a>
587
586
  </div>
@@ -597,23 +596,23 @@ for an object inside this bucket.
597
596
  invalid.
598
597
  </p>
599
598
  <p><a class="source-toggle" href="#"
600
- onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
601
- <div class="method-source-code" id="M000075-source">
599
+ onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
600
+ <div class="method-source-code" id="M000106-source">
602
601
  <pre>
603
- <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 127</span>
604
- 127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">s3_authenticated_url</span>(<span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">expires</span>=(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">+</span> <span class="ruby-constant">DEFAULT_EXPIRY_SECS</span>))
605
- 128: <span class="ruby-keyword kw">super</span>(<span class="ruby-ivar">@aws_access_key</span>, <span class="ruby-ivar">@aws_secret_access_key</span>, <span class="ruby-ivar">@bucket_name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">expires</span>)
606
- 129: <span class="ruby-keyword kw">end</span>
602
+ <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 126</span>
603
+ 126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">s3_authenticated_url</span>(<span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">expires</span>=(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">+</span> <span class="ruby-constant">DEFAULT_EXPIRY_SECS</span>))
604
+ 127: <span class="ruby-keyword kw">super</span>(<span class="ruby-ivar">@aws_access_key</span>, <span class="ruby-ivar">@aws_secret_access_key</span>, <span class="ruby-ivar">@name</span>, <span class="ruby-identifier">resource_key</span>, <span class="ruby-identifier">expires</span>)
605
+ 128: <span class="ruby-keyword kw">end</span>
607
606
  </pre>
608
607
  </div>
609
608
  </div>
610
609
  </div>
611
610
 
612
- <div id="method-M000063" class="method-detail">
613
- <a name="M000063"></a>
611
+ <div id="method-M000094" class="method-detail">
612
+ <a name="M000094"></a>
614
613
 
615
614
  <div class="method-heading">
616
- <a href="#M000063" class="method-signature">
615
+ <a href="#M000094" class="method-signature">
617
616
  <span class="method-name">strict?</span><span class="method-args">()</span>
618
617
  </a>
619
618
  </div>
@@ -623,8 +622,8 @@ invalid.
623
622
  Is this a strict bucket (i.e. the target bucket must exist on S3)?
624
623
  </p>
625
624
  <p><a class="source-toggle" href="#"
626
- onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
627
- <div class="method-source-code" id="M000063-source">
625
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
626
+ <div class="method-source-code" id="M000094-source">
628
627
  <pre>
629
628
  <span class="ruby-comment cmt"># File lib/s33r/named_bucket.rb, line 57</span>
630
629
  57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strict?</span>