agouti 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,310 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Agouti::Rack::PackageLimiter::GzipTruncatedStream
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!Agouti/Rack/PackageLimiter/GzipTruncatedStream.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../../_index.html">Index (G)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../../Agouti.html" title="Agouti (module)">Agouti</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Rack.html" title="Agouti::Rack (module)">Rack</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../PackageLimiter.html" title="Agouti::Rack::PackageLimiter (class)">PackageLimiter</a></span></span>
36
+ &raquo;
37
+ <span class="title">GzipTruncatedStream</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Agouti::Rack::PackageLimiter::GzipTruncatedStream
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Rack::Deflater::GzipStream</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Rack::Deflater::GzipStream</li>
82
+
83
+ <li class="next">Agouti::Rack::PackageLimiter::GzipTruncatedStream</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/agouti/rack/package_limiter.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Public: class responsible for truncating the gzip stream to a given number
108
+ of bytes.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <h2>
125
+ Instance Method Summary
126
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
127
+ </h2>
128
+
129
+ <ul class="summary">
130
+
131
+ <li class="public ">
132
+ <span class="summary_signature">
133
+
134
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (GzipTruncatedStream) <strong>initialize</strong>(body, mtime, byte_limit) </a>
135
+
136
+
137
+
138
+ </span>
139
+
140
+
141
+ <span class="note title constructor">constructor</span>
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ <span class="summary_desc"><div class='inline'>
151
+ <p>Public: Constructor.</p>
152
+ </div></span>
153
+
154
+ </li>
155
+
156
+
157
+ <li class="public ">
158
+ <span class="summary_signature">
159
+
160
+ <a href="#write-instance_method" title="#write (instance method)">- (Object) <strong>write</strong>(data) </a>
161
+
162
+
163
+
164
+ </span>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <span class="summary_desc"><div class='inline'>
175
+ <p>Public: Writes data to stream.</p>
176
+ </div></span>
177
+
178
+ </li>
179
+
180
+
181
+ </ul>
182
+
183
+
184
+
185
+ <div id="constructor_details" class="method_details_list">
186
+ <h2>Constructor Details</h2>
187
+
188
+ <div class="method_details first">
189
+ <h3 class="signature first" id="initialize-instance_method">
190
+
191
+ - (<tt><span class='object_link'><a href="" title="Agouti::Rack::PackageLimiter::GzipTruncatedStream (class)">GzipTruncatedStream</a></span></tt>) <strong>initialize</strong>(body, mtime, byte_limit)
192
+
193
+
194
+
195
+
196
+
197
+ </h3><div class="docstring">
198
+ <div class="discussion">
199
+
200
+ <p>Public: Constructor.</p>
201
+
202
+ <p>body - response body. mtime - last-modified time. byte_limit - byte limit.</p>
203
+
204
+ <p>Returns an instance of Agouti::Rack::PackageLimiter::GzipTruncatedStream.</p>
205
+
206
+
207
+ </div>
208
+ </div>
209
+ <div class="tags">
210
+
211
+
212
+ </div><table class="source_code">
213
+ <tr>
214
+ <td>
215
+ <pre class="lines">
216
+
217
+
218
+ 106
219
+ 107
220
+ 108
221
+ 109
222
+ 110</pre>
223
+ </td>
224
+ <td>
225
+ <pre class="code"><span class="info file"># File 'lib/agouti/rack/package_limiter.rb', line 106</span>
226
+
227
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_mtime'>mtime</span><span class='comma'>,</span> <span class='id identifier rubyid_byte_limit'>byte_limit</span>
228
+ <span class='kw'>super</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_mtime'>mtime</span>
229
+ <span class='ivar'>@byte_limit</span> <span class='op'>=</span> <span class='id identifier rubyid_byte_limit'>byte_limit</span>
230
+ <span class='ivar'>@total_sent_bytes</span> <span class='op'>=</span> <span class='int'>0</span>
231
+ <span class='kw'>end</span></pre>
232
+ </td>
233
+ </tr>
234
+ </table>
235
+ </div>
236
+
237
+ </div>
238
+
239
+
240
+ <div id="instance_method_details" class="method_details_list">
241
+ <h2>Instance Method Details</h2>
242
+
243
+
244
+ <div class="method_details first">
245
+ <h3 class="signature first" id="write-instance_method">
246
+
247
+ - (<tt>Object</tt>) <strong>write</strong>(data)
248
+
249
+
250
+
251
+
252
+
253
+ </h3><div class="docstring">
254
+ <div class="discussion">
255
+
256
+ <p>Public: Writes data to stream.</p>
257
+
258
+ <p>data - data.</p>
259
+
260
+ <p>If total sent bytes reaches bytes limit, data is sliced.</p>
261
+
262
+
263
+ </div>
264
+ </div>
265
+ <div class="tags">
266
+
267
+
268
+ </div><table class="source_code">
269
+ <tr>
270
+ <td>
271
+ <pre class="lines">
272
+
273
+
274
+ 117
275
+ 118
276
+ 119
277
+ 120
278
+ 121
279
+ 122
280
+ 123
281
+ 124</pre>
282
+ </td>
283
+ <td>
284
+ <pre class="code"><span class="info file"># File 'lib/agouti/rack/package_limiter.rb', line 117</span>
285
+
286
+ <span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
287
+ <span class='kw'>if</span> <span class='ivar'>@total_sent_bytes</span> <span class='op'>+</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_bytesize'>bytesize</span> <span class='op'>&gt;</span> <span class='ivar'>@byte_limit</span>
288
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_byteslice'>byteslice</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='ivar'>@byte_limit</span> <span class='op'>-</span> <span class='ivar'>@total_sent_bytes</span><span class='rparen'>)</span>
289
+ <span class='kw'>end</span>
290
+
291
+ <span class='ivar'>@total_sent_bytes</span> <span class='op'>+=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_bytesize'>bytesize</span>
292
+ <span class='ivar'>@writer</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
293
+ <span class='kw'>end</span></pre>
294
+ </td>
295
+ </tr>
296
+ </table>
297
+ </div>
298
+
299
+ </div>
300
+
301
+ </div>
302
+
303
+ <div id="footer">
304
+ Generated on Tue Sep 2 15:27:50 2014 by
305
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
306
+ 0.8.7.4 (ruby-2.0.0).
307
+ </div>
308
+
309
+ </body>
310
+ </html>
@@ -0,0 +1,134 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Exception: Agouti::Rack::PackageLimiter::InvalidHeaderException
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!Agouti/Rack/PackageLimiter/InvalidHeaderException.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../../_index.html">Index (I)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../../Agouti.html" title="Agouti (module)">Agouti</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Rack.html" title="Agouti::Rack (module)">Rack</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../PackageLimiter.html" title="Agouti::Rack::PackageLimiter (class)">PackageLimiter</a></span></span>
36
+ &raquo;
37
+ <span class="title">InvalidHeaderException</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Exception: Agouti::Rack::PackageLimiter::InvalidHeaderException
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Exception</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Exception</li>
82
+
83
+ <li class="next">Agouti::Rack::PackageLimiter::InvalidHeaderException</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/agouti/rack/package_limiter.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Public: custom exception class for invalid headers.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ </div>
126
+
127
+ <div id="footer">
128
+ Generated on Tue Sep 2 15:27:50 2014 by
129
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
+ 0.8.7.4 (ruby-2.0.0).
131
+ </div>
132
+
133
+ </body>
134
+ </html>
@@ -0,0 +1,123 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Agouti::Railtie
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!Agouti/Railtie.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Agouti.html" title="Agouti (module)">Agouti</a></span></span>
36
+ &raquo;
37
+ <span class="title">Railtie</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Agouti::Railtie
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Rails::Railtie</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Rails::Railtie</li>
82
+
83
+ <li class="next">Agouti::Railtie</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/agouti/railtie.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ </div>
115
+
116
+ <div id="footer">
117
+ Generated on Tue Sep 2 15:27:50 2014 by
118
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
+ 0.8.7.4 (ruby-2.0.0).
120
+ </div>
121
+
122
+ </body>
123
+ </html>