trackerific 0.5.5 → 0.6.0
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/README.rdoc +62 -44
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/changelog +9 -0
- data/lib/trackerific/configuration.rb +2 -2
- data/lib/trackerific/details.rb +36 -10
- data/lib/trackerific/event.rb +9 -7
- data/lib/trackerific/service.rb +22 -6
- data/lib/trackerific/services/fedex.rb +11 -7
- data/lib/trackerific/services/mock_service.rb +23 -14
- data/lib/trackerific/services/ups.rb +12 -8
- data/lib/trackerific/services/usps.rb +114 -21
- data/spec/fixtures/usps_city_state_lookup_response.xml +8 -0
- data/spec/lib/helpers/options_helper_spec.rb +3 -3
- data/spec/lib/trackerific/configuration_spec.rb +35 -0
- data/spec/lib/trackerific/details_spec.rb +71 -11
- data/spec/lib/trackerific/event_spec.rb +34 -19
- data/spec/lib/trackerific/service_spec.rb +3 -3
- data/spec/lib/trackerific/services/fedex_spec.rb +16 -3
- data/spec/lib/trackerific/services/mock_service_spec.rb +19 -4
- data/spec/lib/trackerific/services/ups_spec.rb +17 -2
- data/spec/lib/trackerific/services/usps_spec.rb +60 -11
- data/spec/lib/trackerific_spec.rb +7 -5
- data/trackerific.gemspec +5 -27
- metadata +8 -30
- data/doc/OptionsHelper.html +0 -287
- data/doc/Trackerific/Configuration.html +0 -354
- data/doc/Trackerific/Details.html +0 -565
- data/doc/Trackerific/Error.html +0 -127
- data/doc/Trackerific/Event.html +0 -639
- data/doc/Trackerific/FedEx.html +0 -558
- data/doc/Trackerific/Service.html +0 -579
- data/doc/Trackerific/UPS.html +0 -532
- data/doc/Trackerific/USPS.html +0 -568
- data/doc/Trackerific.html +0 -833
- data/doc/_index.html +0 -226
- data/doc/class_list.html +0 -47
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -53
- data/doc/css/style.css +0 -320
- data/doc/file.README.html +0 -288
- data/doc/file_list.html +0 -49
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -288
- data/doc/js/app.js +0 -205
- data/doc/js/full_list.js +0 -150
- data/doc/js/jquery.js +0 -16
- data/doc/method_list.html +0 -294
- data/doc/top-level-namespace.html +0 -103
data/doc/Trackerific/UPS.html
DELETED
@@ -1,532 +0,0 @@
|
|
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: Trackerific::UPS
|
8
|
-
|
9
|
-
— Documentation by YARD 0.7.1
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
relpath = '..';
|
19
|
-
if (relpath != '') relpath += '/';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
25
|
-
|
26
|
-
|
27
|
-
</head>
|
28
|
-
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
|
-
<div id="header">
|
34
|
-
<div id="menu">
|
35
|
-
|
36
|
-
<a href="../_index.html">Index (U)</a> »
|
37
|
-
<span class='title'><span class='object_link'><a href="../Trackerific.html" title="Trackerific (module)">Trackerific</a></span></span>
|
38
|
-
»
|
39
|
-
<span class="title">UPS</span>
|
40
|
-
|
41
|
-
|
42
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div id="search">
|
46
|
-
|
47
|
-
<a id="class_list_link" href="#">Class List</a>
|
48
|
-
|
49
|
-
<a id="method_list_link" href="#">Method List</a>
|
50
|
-
|
51
|
-
<a id="file_list_link" href="#">File List</a>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
<div class="clear"></div>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<iframe id="search_frame"></iframe>
|
58
|
-
|
59
|
-
<div id="content"><h1>Class: Trackerific::UPS
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
</h1>
|
64
|
-
|
65
|
-
<dl class="box">
|
66
|
-
|
67
|
-
<dt class="r1">Inherits:</dt>
|
68
|
-
<dd class="r1">
|
69
|
-
<span class="inheritName"><span class='object_link'><a href="Service.html" title="Trackerific::Service (class)">Service</a></span></span>
|
70
|
-
|
71
|
-
<ul class="fullTree">
|
72
|
-
<li>Object</li>
|
73
|
-
|
74
|
-
<li class="next"><span class='object_link'><a href="Service.html" title="Trackerific::Service (class)">Service</a></span></li>
|
75
|
-
|
76
|
-
<li class="next">Trackerific::UPS</li>
|
77
|
-
|
78
|
-
</ul>
|
79
|
-
<a href="#" class="inheritanceTree">show all</a>
|
80
|
-
|
81
|
-
</dd>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<dt class="r2">Includes:</dt>
|
89
|
-
<dd class="r2">HTTParty</dd>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dt class="r1 last">Defined in:</dt>
|
96
|
-
<dd class="r1 last">lib/trackerific/services/ups.rb</dd>
|
97
|
-
|
98
|
-
</dl>
|
99
|
-
<div class="clear"></div>
|
100
|
-
|
101
|
-
<h2>Overview</h2><div class="docstring">
|
102
|
-
<div class="discussion">
|
103
|
-
<p>
|
104
|
-
Provides package tracking support for UPS.
|
105
|
-
</p>
|
106
|
-
|
107
|
-
|
108
|
-
</div>
|
109
|
-
</div>
|
110
|
-
<div class="tags">
|
111
|
-
|
112
|
-
</div>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
<h2>
|
135
|
-
Class Method Summary
|
136
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
137
|
-
</h2>
|
138
|
-
|
139
|
-
<ul class="summary">
|
140
|
-
|
141
|
-
<li class="public ">
|
142
|
-
<span class="summary_signature">
|
143
|
-
|
144
|
-
<a href="#package_id_matchers-class_method" title="package_id_matchers (class method)">+ (Array, Regexp) <strong>package_id_matchers</strong> </a>
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
</span>
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
<span class="private note title">Private</span>
|
155
|
-
|
156
|
-
|
157
|
-
<span class="summary_desc"><div class='inline'><p>
|
158
|
-
An Array of Regexp that matches valid UPS package IDs.
|
159
|
-
</p>
|
160
|
-
</div></span>
|
161
|
-
|
162
|
-
</li>
|
163
|
-
|
164
|
-
|
165
|
-
<li class="public ">
|
166
|
-
<span class="summary_signature">
|
167
|
-
|
168
|
-
<a href="#required_options-class_method" title="required_options (class method)">+ (Array) <strong>required_options</strong> </a>
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
</span>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
<span class="private note title">Private</span>
|
179
|
-
|
180
|
-
|
181
|
-
<span class="summary_desc"><div class='inline'><p>
|
182
|
-
The required options for tracking a UPS package.
|
183
|
-
</p>
|
184
|
-
</div></span>
|
185
|
-
|
186
|
-
</li>
|
187
|
-
|
188
|
-
|
189
|
-
</ul>
|
190
|
-
|
191
|
-
<h2>
|
192
|
-
Instance Method Summary
|
193
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
194
|
-
</h2>
|
195
|
-
|
196
|
-
<ul class="summary">
|
197
|
-
|
198
|
-
<li class="public ">
|
199
|
-
<span class="summary_signature">
|
200
|
-
|
201
|
-
<a href="#track_package-instance_method" title="#track_package (instance method)">- (Trackerific::Details) <strong>track_package</strong>(package_id) </a>
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
</span>
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
<span class="summary_desc"><div class='inline'><p>
|
215
|
-
Tracks a UPS package.
|
216
|
-
</p>
|
217
|
-
</div></span>
|
218
|
-
|
219
|
-
</li>
|
220
|
-
|
221
|
-
|
222
|
-
</ul>
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Service.html" title="Trackerific::Service (class)">Service</a></span></h3>
|
235
|
-
<p class="inherited"><span class='object_link'><a href="Service.html#initialize-instance_method" title="Trackerific::Service#initialize (method)">#initialize</a></span></p>
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="../OptionsHelper.html" title="OptionsHelper (module)">OptionsHelper</a></span></h3>
|
245
|
-
<p class="inherited"><span class='object_link'><a href="../OptionsHelper.html#validate_options-instance_method" title="OptionsHelper#validate_options (method)">#validate_options</a></span></p>
|
246
|
-
<div id="constructor_details" class="method_details_list">
|
247
|
-
<h2>Constructor Details</h2>
|
248
|
-
|
249
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Service.html#initialize-instance_method" title="Trackerific::Service#initialize (method)">Trackerific::Service</a></span></p>
|
250
|
-
|
251
|
-
</div>
|
252
|
-
|
253
|
-
|
254
|
-
<div id="class_method_details" class="method_details_list">
|
255
|
-
<h2>Class Method Details</h2>
|
256
|
-
|
257
|
-
|
258
|
-
<div class="method_details first">
|
259
|
-
<p class="signature first" id="package_id_matchers-class_method">
|
260
|
-
|
261
|
-
+ (<tt>Array</tt>, <tt>Regexp</tt>) <strong>package_id_matchers</strong>
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
</p><div class="docstring">
|
266
|
-
<div class="discussion">
|
267
|
-
<p class="note private">
|
268
|
-
<strong>This method is part of a private API.</strong>
|
269
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
270
|
-
</p>
|
271
|
-
<p>
|
272
|
-
An Array of Regexp that matches valid UPS package IDs
|
273
|
-
</p>
|
274
|
-
|
275
|
-
|
276
|
-
</div>
|
277
|
-
</div>
|
278
|
-
<div class="tags">
|
279
|
-
<h3>Returns:</h3>
|
280
|
-
<ul class="return">
|
281
|
-
|
282
|
-
<li>
|
283
|
-
|
284
|
-
|
285
|
-
<span class='type'>(<tt>Array</tt>, <tt>Regexp</tt>)</span>
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
—
|
290
|
-
<div class='inline'><p>
|
291
|
-
the regular expression
|
292
|
-
</p>
|
293
|
-
</div>
|
294
|
-
|
295
|
-
</li>
|
296
|
-
|
297
|
-
</ul>
|
298
|
-
|
299
|
-
</div><table class="source_code">
|
300
|
-
<tr>
|
301
|
-
<td>
|
302
|
-
<pre class="lines">
|
303
|
-
|
304
|
-
|
305
|
-
21
|
306
|
-
22
|
307
|
-
23</pre>
|
308
|
-
</td>
|
309
|
-
<td>
|
310
|
-
<pre class="code"><span class="info file"># File 'lib/trackerific/services/ups.rb', line 21</span>
|
311
|
-
|
312
|
-
<span class='kw'>def</span> <span class='id package_id_matchers'>package_id_matchers</span>
|
313
|
-
<span class='lbracket'>[</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^.Z</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[HK].{10}$</span><span class='regexp_end'>/</span></span> <span class='rbracket'>]</span>
|
314
|
-
<span class='kw'>end</span></pre>
|
315
|
-
</td>
|
316
|
-
</tr>
|
317
|
-
</table>
|
318
|
-
</div>
|
319
|
-
|
320
|
-
<div class="method_details ">
|
321
|
-
<p class="signature " id="required_options-class_method">
|
322
|
-
|
323
|
-
+ (<tt>Array</tt>) <strong>required_options</strong>
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
</p><div class="docstring">
|
328
|
-
<div class="discussion">
|
329
|
-
<p class="note private">
|
330
|
-
<strong>This method is part of a private API.</strong>
|
331
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
332
|
-
</p>
|
333
|
-
<p>
|
334
|
-
The required options for tracking a UPS package
|
335
|
-
</p>
|
336
|
-
|
337
|
-
|
338
|
-
</div>
|
339
|
-
</div>
|
340
|
-
<div class="tags">
|
341
|
-
<h3>Returns:</h3>
|
342
|
-
<ul class="return">
|
343
|
-
|
344
|
-
<li>
|
345
|
-
|
346
|
-
|
347
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
—
|
352
|
-
<div class='inline'><p>
|
353
|
-
the required options for tracking a UPS package
|
354
|
-
</p>
|
355
|
-
</div>
|
356
|
-
|
357
|
-
</li>
|
358
|
-
|
359
|
-
</ul>
|
360
|
-
|
361
|
-
</div><table class="source_code">
|
362
|
-
<tr>
|
363
|
-
<td>
|
364
|
-
<pre class="lines">
|
365
|
-
|
366
|
-
|
367
|
-
27
|
368
|
-
28
|
369
|
-
29</pre>
|
370
|
-
</td>
|
371
|
-
<td>
|
372
|
-
<pre class="code"><span class="info file"># File 'lib/trackerific/services/ups.rb', line 27</span>
|
373
|
-
|
374
|
-
<span class='kw'>def</span> <span class='id required_options'>required_options</span>
|
375
|
-
<span class='lbracket'>[</span><span class='symbol'>:key</span><span class='comma'>,</span> <span class='symbol'>:user_id</span><span class='comma'>,</span> <span class='symbol'>:password</span><span class='rbracket'>]</span>
|
376
|
-
<span class='kw'>end</span></pre>
|
377
|
-
</td>
|
378
|
-
</tr>
|
379
|
-
</table>
|
380
|
-
</div>
|
381
|
-
|
382
|
-
</div>
|
383
|
-
|
384
|
-
<div id="instance_method_details" class="method_details_list">
|
385
|
-
<h2>Instance Method Details</h2>
|
386
|
-
|
387
|
-
|
388
|
-
<div class="method_details first">
|
389
|
-
<p class="signature first" id="track_package-instance_method">
|
390
|
-
|
391
|
-
- (<tt><span class='object_link'><a href="Details.html" title="Trackerific::Details (class)">Trackerific::Details</a></span></tt>) <strong>track_package</strong>(package_id)
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
</p><div class="docstring">
|
396
|
-
<div class="discussion">
|
397
|
-
<p>
|
398
|
-
Tracks a UPS package
|
399
|
-
</p>
|
400
|
-
|
401
|
-
|
402
|
-
</div>
|
403
|
-
</div>
|
404
|
-
<div class="tags">
|
405
|
-
|
406
|
-
<div class="examples">
|
407
|
-
<h3>Examples:</h3>
|
408
|
-
|
409
|
-
<h4><div class='inline'><p>
|
410
|
-
Track a package
|
411
|
-
</p>
|
412
|
-
</div></h4>
|
413
|
-
<pre class="example code"><span class='id ups'>ups</span> <span class='op'>=</span> <span class='const'>Trackerific</span><span class='op'>::</span><span class='const'>UPS</span><span class='period'>.</span><span class='id new'>new</span> <span class='label'>key:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>api key</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>user_id:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>user</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>password:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>secret</span><span class='tstring_end'>'</span></span>
|
414
|
-
<span class='id details'>details</span> <span class='op'>=</span> <span class='id ups'>ups</span><span class='period'>.</span><span class='id track_package'>track_package</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1Z12345E0291980793</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span></pre>
|
415
|
-
|
416
|
-
</div>
|
417
|
-
<h3>Parameters:</h3>
|
418
|
-
<ul class="param">
|
419
|
-
|
420
|
-
<li>
|
421
|
-
|
422
|
-
<span class='name'>package_id</span>
|
423
|
-
|
424
|
-
|
425
|
-
<span class='type'>(<tt>String</tt>)</span>
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
—
|
430
|
-
<div class='inline'><p>
|
431
|
-
the package identifier
|
432
|
-
</p>
|
433
|
-
</div>
|
434
|
-
|
435
|
-
</li>
|
436
|
-
|
437
|
-
</ul>
|
438
|
-
<h3>Returns:</h3>
|
439
|
-
<ul class="return">
|
440
|
-
|
441
|
-
<li>
|
442
|
-
|
443
|
-
|
444
|
-
<span class='type'>(<tt><span class='object_link'><a href="Details.html" title="Trackerific::Details (class)">Trackerific::Details</a></span></tt>)</span>
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
—
|
449
|
-
<div class='inline'><p>
|
450
|
-
the tracking details
|
451
|
-
</p>
|
452
|
-
</div>
|
453
|
-
|
454
|
-
</li>
|
455
|
-
|
456
|
-
</ul>
|
457
|
-
<h3>Raises:</h3>
|
458
|
-
<ul class="raise">
|
459
|
-
|
460
|
-
<li>
|
461
|
-
|
462
|
-
|
463
|
-
<span class='type'>(<tt><span class='object_link'><a href="Error.html" title="Trackerific::Error (class)">Trackerific::Error</a></span></tt>)</span>
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
—
|
468
|
-
<div class='inline'><p>
|
469
|
-
raised when the server returns an error (invalid credentials, tracking
|
470
|
-
package, etc.)
|
471
|
-
</p>
|
472
|
-
</div>
|
473
|
-
|
474
|
-
</li>
|
475
|
-
|
476
|
-
</ul>
|
477
|
-
|
478
|
-
</div><table class="source_code">
|
479
|
-
<tr>
|
480
|
-
<td>
|
481
|
-
<pre class="lines">
|
482
|
-
|
483
|
-
|
484
|
-
40
|
485
|
-
41
|
486
|
-
42
|
487
|
-
43
|
488
|
-
44
|
489
|
-
45
|
490
|
-
46
|
491
|
-
47
|
492
|
-
48
|
493
|
-
49
|
494
|
-
50
|
495
|
-
51
|
496
|
-
52
|
497
|
-
53</pre>
|
498
|
-
</td>
|
499
|
-
<td>
|
500
|
-
<pre class="code"><span class="info file"># File 'lib/trackerific/services/ups.rb', line 40</span>
|
501
|
-
|
502
|
-
<span class='kw'>def</span> <span class='id track_package'>track_package</span><span class='lparen'>(</span><span class='id package_id'>package_id</span><span class='rparen'>)</span>
|
503
|
-
<span class='kw'>super</span>
|
504
|
-
<span class='comment'># connect to UPS via HTTParty
|
505
|
-
</span> <span class='id http_response'>http_response</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id class'>class</span><span class='period'>.</span><span class='id post'>post</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/Track</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:body</span> <span class='op'>=></span> <span class='id build_xml_request'>build_xml_request</span><span class='rparen'>)</span>
|
506
|
-
<span class='comment'># throw any HTTP errors
|
507
|
-
</span> <span class='id http_response'>http_response</span><span class='period'>.</span><span class='id error!'>error!</span> <span class='kw'>unless</span> <span class='id http_response'>http_response</span><span class='period'>.</span><span class='id code'>code</span> <span class='op'>==</span> <span class='int'>200</span>
|
508
|
-
<span class='comment'># Check the response for errors, return a Trackerific::Error, or parse
|
509
|
-
</span> <span class='comment'># the response from UPS and return a Trackerific::Details
|
510
|
-
</span> <span class='kw'>case</span> <span class='id http_response'>http_response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>TrackResponse</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Response</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ResponseStatusCode</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
511
|
-
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='id raise'>raise</span> <span class='const'>Trackerific</span><span class='op'>::</span><span class='const'>Error</span><span class='comma'>,</span> <span class='id parse_error_response'>parse_error_response</span><span class='lparen'>(</span><span class='id http_response'>http_response</span><span class='rparen'>)</span>
|
512
|
-
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='kw'>return</span> <span class='id parse_success_response'>parse_success_response</span><span class='lparen'>(</span><span class='id http_response'>http_response</span><span class='rparen'>)</span>
|
513
|
-
<span class='kw'>else</span> <span class='id raise'>raise</span> <span class='const'>Trackerific</span><span class='op'>::</span><span class='const'>Error</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Invalid response code returned from server.</span><span class='tstring_end'>"</span></span>
|
514
|
-
<span class='kw'>end</span>
|
515
|
-
<span class='kw'>end</span></pre>
|
516
|
-
</td>
|
517
|
-
</tr>
|
518
|
-
</table>
|
519
|
-
</div>
|
520
|
-
|
521
|
-
</div>
|
522
|
-
|
523
|
-
</div>
|
524
|
-
|
525
|
-
<div id="footer">
|
526
|
-
Generated on Wed Jun 15 15:30:27 2011 by
|
527
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
528
|
-
0.7.1 (ruby-1.9.2).
|
529
|
-
</div>
|
530
|
-
|
531
|
-
</body>
|
532
|
-
</html>
|