trackerific 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +40 -38
- data/README.rdoc +4 -9
- data/VERSION +1 -1
- data/doc/Trackerific.html +34 -22
- data/doc/Trackerific/Base.html +237 -20
- data/doc/Trackerific/Details.html +6 -6
- data/doc/Trackerific/Error.html +2 -2
- data/doc/Trackerific/Event.html +7 -7
- data/doc/Trackerific/FedEx.html +190 -3
- data/doc/Trackerific/UPS.html +190 -3
- data/doc/Trackerific/USPS.html +190 -3
- data/doc/_index.html +1 -1
- data/doc/file.README.html +6 -24
- data/doc/index.html +6 -24
- data/doc/method_list.html +68 -4
- data/doc/top-level-namespace.html +1 -1
- data/lib/trackerific.rb +37 -74
- data/lib/trackerific/base.rb +70 -0
- data/lib/{trackerific_details.rb → trackerific/details.rb} +0 -0
- data/lib/trackerific/error.rb +4 -0
- data/lib/{trackerific_event.rb → trackerific/event.rb} +0 -0
- data/lib/{fedex.rb → trackerific/services/fedex.rb} +9 -2
- data/lib/{ups.rb → trackerific/services/ups.rb} +10 -4
- data/lib/{usps.rb → trackerific/services/usps.rb} +10 -3
- data/spec/lib/trackerific/base_spec.rb +34 -0
- data/spec/lib/{trackerific_details_spec.rb → trackerific/details_spec.rb} +0 -0
- data/spec/lib/trackerific/error_spec.rb +5 -0
- data/spec/lib/{trackerific_event_spec.rb → trackerific/event_spec.rb} +0 -0
- data/spec/lib/{fedex_spec.rb → trackerific/services/fedex_spec.rb} +19 -14
- data/spec/lib/{ups_spec.rb → trackerific/services/ups_spec.rb} +20 -14
- data/spec/lib/{usps_spec.rb → trackerific/services/usps_spec.rb} +18 -14
- data/spec/lib/trackerific_spec.rb +7 -30
- data/spec/spec_helper.rb +1 -0
- data/trackerific.gemspec +18 -22
- metadata +38 -27
data/doc/Trackerific/USPS.html
CHANGED
@@ -93,7 +93,7 @@
|
|
93
93
|
|
94
94
|
|
95
95
|
<dt class="r1 last">Defined in:</dt>
|
96
|
-
<dd class="r1 last">lib/usps.rb</dd>
|
96
|
+
<dd class="r1 last">lib/trackerific/services/usps.rb</dd>
|
97
97
|
|
98
98
|
</dl>
|
99
99
|
<div class="clear"></div>
|
@@ -124,6 +124,63 @@ Provides package tracking support for USPS.
|
|
124
124
|
|
125
125
|
|
126
126
|
|
127
|
+
<h2>
|
128
|
+
Class Method Summary
|
129
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
130
|
+
</h2>
|
131
|
+
|
132
|
+
<ul class="summary">
|
133
|
+
|
134
|
+
<li class="public ">
|
135
|
+
<span class="summary_signature">
|
136
|
+
|
137
|
+
<a href="#package_id_matchers-class_method" title="package_id_matchers (class method)">+ (Regexp) <strong>package_id_matchers</strong> </a>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
</span>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="private note title">Private</span>
|
148
|
+
|
149
|
+
|
150
|
+
<span class="summary_desc"><div class='inline'><p>
|
151
|
+
A regex that matches valid package identifiers for USPS package ids.
|
152
|
+
</p>
|
153
|
+
</div></span>
|
154
|
+
|
155
|
+
</li>
|
156
|
+
|
157
|
+
|
158
|
+
<li class="public ">
|
159
|
+
<span class="summary_signature">
|
160
|
+
|
161
|
+
<a href="#required_options-class_method" title="required_options (class method)">+ (Array) <strong>required_options</strong> </a>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</span>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="private note title">Private</span>
|
172
|
+
|
173
|
+
|
174
|
+
<span class="summary_desc"><div class='inline'><p>
|
175
|
+
The required options for tracking a UPS package.
|
176
|
+
</p>
|
177
|
+
</div></span>
|
178
|
+
|
179
|
+
</li>
|
180
|
+
|
181
|
+
|
182
|
+
</ul>
|
183
|
+
|
127
184
|
<h2>
|
128
185
|
Instance Method Summary
|
129
186
|
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
@@ -177,6 +234,136 @@ Tracks a USPS package.
|
|
177
234
|
</div>
|
178
235
|
|
179
236
|
|
237
|
+
<div id="class_method_details" class="method_details_list">
|
238
|
+
<h2>Class Method Details</h2>
|
239
|
+
|
240
|
+
|
241
|
+
<div class="method_details first">
|
242
|
+
<p class="signature first" id="package_id_matchers-class_method">
|
243
|
+
|
244
|
+
+ (<tt>Regexp</tt>) <strong>package_id_matchers</strong>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
</p><div class="docstring">
|
249
|
+
<div class="discussion">
|
250
|
+
<p class="note private">
|
251
|
+
<strong>This method is part of a private API.</strong>
|
252
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
253
|
+
</p>
|
254
|
+
<p>
|
255
|
+
A regex that matches valid package identifiers for USPS package ids
|
256
|
+
</p>
|
257
|
+
|
258
|
+
|
259
|
+
</div>
|
260
|
+
</div>
|
261
|
+
<div class="tags">
|
262
|
+
<h3>Returns:</h3>
|
263
|
+
<ul class="return">
|
264
|
+
|
265
|
+
<li>
|
266
|
+
|
267
|
+
|
268
|
+
<span class='type'>(<tt>Regexp</tt>)</span>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
—
|
273
|
+
<div class='inline'><p>
|
274
|
+
the regular expression
|
275
|
+
</p>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
</li>
|
279
|
+
|
280
|
+
</ul>
|
281
|
+
|
282
|
+
</div><table class="source_code">
|
283
|
+
<tr>
|
284
|
+
<td>
|
285
|
+
<pre class="lines">
|
286
|
+
|
287
|
+
|
288
|
+
62
|
289
|
+
63
|
290
|
+
64</pre>
|
291
|
+
</td>
|
292
|
+
<td>
|
293
|
+
<pre class="code"><span class="info file"># File 'lib/trackerific/services/usps.rb', line 62</span>
|
294
|
+
|
295
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id package_id_matchers'>package_id_matchers</span>
|
296
|
+
<span class='lbracket'>[</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^E\D{1}\d{9}\D{2}$|^9\d{15,21}$</span><span class='regexp_end'>/</span></span> <span class='rbracket'>]</span>
|
297
|
+
<span class='kw'>end</span></pre>
|
298
|
+
</td>
|
299
|
+
</tr>
|
300
|
+
</table>
|
301
|
+
</div>
|
302
|
+
|
303
|
+
<div class="method_details ">
|
304
|
+
<p class="signature " id="required_options-class_method">
|
305
|
+
|
306
|
+
+ (<tt>Array</tt>) <strong>required_options</strong>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
</p><div class="docstring">
|
311
|
+
<div class="discussion">
|
312
|
+
<p class="note private">
|
313
|
+
<strong>This method is part of a private API.</strong>
|
314
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
315
|
+
</p>
|
316
|
+
<p>
|
317
|
+
The required options for tracking a UPS package
|
318
|
+
</p>
|
319
|
+
|
320
|
+
|
321
|
+
</div>
|
322
|
+
</div>
|
323
|
+
<div class="tags">
|
324
|
+
<h3>Returns:</h3>
|
325
|
+
<ul class="return">
|
326
|
+
|
327
|
+
<li>
|
328
|
+
|
329
|
+
|
330
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
—
|
335
|
+
<div class='inline'><p>
|
336
|
+
the required options for tracking a UPS package
|
337
|
+
</p>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
</li>
|
341
|
+
|
342
|
+
</ul>
|
343
|
+
|
344
|
+
</div><table class="source_code">
|
345
|
+
<tr>
|
346
|
+
<td>
|
347
|
+
<pre class="lines">
|
348
|
+
|
349
|
+
|
350
|
+
69
|
351
|
+
70
|
352
|
+
71</pre>
|
353
|
+
</td>
|
354
|
+
<td>
|
355
|
+
<pre class="code"><span class="info file"># File 'lib/trackerific/services/usps.rb', line 69</span>
|
356
|
+
|
357
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id required_options'>required_options</span>
|
358
|
+
<span class='lbracket'>[</span><span class='symbol'>:user_id</span><span class='rbracket'>]</span>
|
359
|
+
<span class='kw'>end</span></pre>
|
360
|
+
</td>
|
361
|
+
</tr>
|
362
|
+
</table>
|
363
|
+
</div>
|
364
|
+
|
365
|
+
</div>
|
366
|
+
|
180
367
|
<div id="instance_method_details" class="method_details_list">
|
181
368
|
<h2>Instance Method Details</h2>
|
182
369
|
|
@@ -311,7 +498,7 @@ package, etc.)
|
|
311
498
|
57</pre>
|
312
499
|
</td>
|
313
500
|
<td>
|
314
|
-
<pre class="code"><span class="info file"># File 'lib/usps.rb', line 26</span>
|
501
|
+
<pre class="code"><span class="info file"># File 'lib/trackerific/services/usps.rb', line 26</span>
|
315
502
|
|
316
503
|
<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>
|
317
504
|
<span class='kw'>super</span>
|
@@ -355,7 +542,7 @@ package, etc.)
|
|
355
542
|
</div>
|
356
543
|
|
357
544
|
<div id="footer">
|
358
|
-
Generated on Mon Jun 13
|
545
|
+
Generated on Mon Jun 13 21:28:36 2011 by
|
359
546
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
360
547
|
0.7.1 (ruby-1.9.2).
|
361
548
|
</div>
|
data/doc/_index.html
CHANGED
@@ -186,7 +186,7 @@
|
|
186
186
|
</div>
|
187
187
|
|
188
188
|
<div id="footer">
|
189
|
-
Generated on Mon Jun 13
|
189
|
+
Generated on Mon Jun 13 21:28:36 2011 by
|
190
190
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
191
191
|
0.7.1 (ruby-1.9.2).
|
192
192
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -149,24 +149,14 @@ Here’s an example on how to handle Trackerific::Errors:
|
|
149
149
|
<ul>
|
150
150
|
<li><p>
|
151
151
|
Check out the latest master to make sure the feature hasn’t been
|
152
|
-
implemented
|
152
|
+
implemented or the bug hasn’t been fixed yet
|
153
153
|
</p>
|
154
154
|
</li>
|
155
|
-
</ul>
|
156
|
-
<p>
|
157
|
-
or the bug hasn’t been fixed yet
|
158
|
-
</p>
|
159
|
-
<ul>
|
160
155
|
<li><p>
|
161
156
|
Check out the issue tracker to make sure someone already hasn’t
|
162
|
-
requested it
|
157
|
+
requested it and/or contributed it
|
163
158
|
</p>
|
164
159
|
</li>
|
165
|
-
</ul>
|
166
|
-
<p>
|
167
|
-
and/or contributed it
|
168
|
-
</p>
|
169
|
-
<ul>
|
170
160
|
<li><p>
|
171
161
|
Fork the project
|
172
162
|
</p>
|
@@ -181,24 +171,16 @@ Commit and push until you are happy with your contribution
|
|
181
171
|
</li>
|
182
172
|
<li><p>
|
183
173
|
Make sure to add tests for it. This is important so I don’t break it
|
184
|
-
in a
|
174
|
+
in a future version unintentionally.
|
185
175
|
</p>
|
186
176
|
</li>
|
187
|
-
</ul>
|
188
|
-
<p>
|
189
|
-
future version unintentionally.
|
190
|
-
</p>
|
191
|
-
<ul>
|
192
177
|
<li><p>
|
193
178
|
Please try not to mess with the Rakefile, version, or history. If you want
|
194
|
-
to
|
179
|
+
to have your own version, or is otherwise necessary, that is fine, but
|
180
|
+
please isolate to its own commit so I can cherry-pick around it.
|
195
181
|
</p>
|
196
182
|
</li>
|
197
183
|
</ul>
|
198
|
-
<p>
|
199
|
-
have your own version, or is otherwise necessary, that is fine, but please
|
200
|
-
isolate to its own commit so I can cherry-pick around it.
|
201
|
-
</p>
|
202
184
|
<h2>Copyright</h2>
|
203
185
|
<p>
|
204
186
|
Copyright © 2011 Travis Haynes. See LICENSE.txt for further details.
|
@@ -206,7 +188,7 @@ Copyright © 2011 Travis Haynes. See LICENSE.txt for further details.
|
|
206
188
|
</div></div>
|
207
189
|
|
208
190
|
<div id="footer">
|
209
|
-
Generated on Mon Jun 13
|
191
|
+
Generated on Mon Jun 13 21:28:36 2011 by
|
210
192
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
211
193
|
0.7.1 (ruby-1.9.2).
|
212
194
|
</div>
|
data/doc/index.html
CHANGED
@@ -149,24 +149,14 @@ Here’s an example on how to handle Trackerific::Errors:
|
|
149
149
|
<ul>
|
150
150
|
<li><p>
|
151
151
|
Check out the latest master to make sure the feature hasn’t been
|
152
|
-
implemented
|
152
|
+
implemented or the bug hasn’t been fixed yet
|
153
153
|
</p>
|
154
154
|
</li>
|
155
|
-
</ul>
|
156
|
-
<p>
|
157
|
-
or the bug hasn’t been fixed yet
|
158
|
-
</p>
|
159
|
-
<ul>
|
160
155
|
<li><p>
|
161
156
|
Check out the issue tracker to make sure someone already hasn’t
|
162
|
-
requested it
|
157
|
+
requested it and/or contributed it
|
163
158
|
</p>
|
164
159
|
</li>
|
165
|
-
</ul>
|
166
|
-
<p>
|
167
|
-
and/or contributed it
|
168
|
-
</p>
|
169
|
-
<ul>
|
170
160
|
<li><p>
|
171
161
|
Fork the project
|
172
162
|
</p>
|
@@ -181,24 +171,16 @@ Commit and push until you are happy with your contribution
|
|
181
171
|
</li>
|
182
172
|
<li><p>
|
183
173
|
Make sure to add tests for it. This is important so I don’t break it
|
184
|
-
in a
|
174
|
+
in a future version unintentionally.
|
185
175
|
</p>
|
186
176
|
</li>
|
187
|
-
</ul>
|
188
|
-
<p>
|
189
|
-
future version unintentionally.
|
190
|
-
</p>
|
191
|
-
<ul>
|
192
177
|
<li><p>
|
193
178
|
Please try not to mess with the Rakefile, version, or history. If you want
|
194
|
-
to
|
179
|
+
to have your own version, or is otherwise necessary, that is fine, but
|
180
|
+
please isolate to its own commit so I can cherry-pick around it.
|
195
181
|
</p>
|
196
182
|
</li>
|
197
183
|
</ul>
|
198
|
-
<p>
|
199
|
-
have your own version, or is otherwise necessary, that is fine, but please
|
200
|
-
isolate to its own commit so I can cherry-pick around it.
|
201
|
-
</p>
|
202
184
|
<h2>Copyright</h2>
|
203
185
|
<p>
|
204
186
|
Copyright © 2011 Travis Haynes. See LICENSE.txt for further details.
|
@@ -206,7 +188,7 @@ Copyright © 2011 Travis Haynes. See LICENSE.txt for further details.
|
|
206
188
|
</div></div>
|
207
189
|
|
208
190
|
<div id="footer">
|
209
|
-
Generated on Mon Jun 13
|
191
|
+
Generated on Mon Jun 13 21:28:36 2011 by
|
210
192
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
211
193
|
0.7.1 (ruby-1.9.2).
|
212
194
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -73,17 +73,17 @@
|
|
73
73
|
|
74
74
|
|
75
75
|
<li class="r1 ">
|
76
|
-
<span class='object_link'><a href="Trackerific/
|
76
|
+
<span class='object_link'><a href="Trackerific/Event.html#initialize-instance_method" title="Trackerific::Event#initialize (method)">#initialize</a></span>
|
77
77
|
|
78
|
-
<small>Trackerific::
|
78
|
+
<small>Trackerific::Event</small>
|
79
79
|
|
80
80
|
</li>
|
81
81
|
|
82
82
|
|
83
83
|
<li class="r2 ">
|
84
|
-
<span class='object_link'><a href="Trackerific/
|
84
|
+
<span class='object_link'><a href="Trackerific/Details.html#initialize-instance_method" title="Trackerific::Details#initialize (method)">#initialize</a></span>
|
85
85
|
|
86
|
-
<small>Trackerific::
|
86
|
+
<small>Trackerific::Details</small>
|
87
87
|
|
88
88
|
</li>
|
89
89
|
|
@@ -104,6 +104,70 @@
|
|
104
104
|
</li>
|
105
105
|
|
106
106
|
|
107
|
+
<li class="r1 ">
|
108
|
+
<span class='object_link'><a href="Trackerific/UPS.html#package_id_matchers-class_method" title="Trackerific::UPS.package_id_matchers (method)">package_id_matchers</a></span>
|
109
|
+
|
110
|
+
<small>Trackerific::UPS</small>
|
111
|
+
|
112
|
+
</li>
|
113
|
+
|
114
|
+
|
115
|
+
<li class="r2 ">
|
116
|
+
<span class='object_link'><a href="Trackerific/FedEx.html#package_id_matchers-class_method" title="Trackerific::FedEx.package_id_matchers (method)">package_id_matchers</a></span>
|
117
|
+
|
118
|
+
<small>Trackerific::FedEx</small>
|
119
|
+
|
120
|
+
</li>
|
121
|
+
|
122
|
+
|
123
|
+
<li class="r1 ">
|
124
|
+
<span class='object_link'><a href="Trackerific/Base.html#package_id_matchers-class_method" title="Trackerific::Base.package_id_matchers (method)">package_id_matchers</a></span>
|
125
|
+
|
126
|
+
<small>Trackerific::Base</small>
|
127
|
+
|
128
|
+
</li>
|
129
|
+
|
130
|
+
|
131
|
+
<li class="r2 ">
|
132
|
+
<span class='object_link'><a href="Trackerific/USPS.html#package_id_matchers-class_method" title="Trackerific::USPS.package_id_matchers (method)">package_id_matchers</a></span>
|
133
|
+
|
134
|
+
<small>Trackerific::USPS</small>
|
135
|
+
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="r1 ">
|
140
|
+
<span class='object_link'><a href="Trackerific/Base.html#required_options-class_method" title="Trackerific::Base.required_options (method)">required_options</a></span>
|
141
|
+
|
142
|
+
<small>Trackerific::Base</small>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
<li class="r2 ">
|
148
|
+
<span class='object_link'><a href="Trackerific/USPS.html#required_options-class_method" title="Trackerific::USPS.required_options (method)">required_options</a></span>
|
149
|
+
|
150
|
+
<small>Trackerific::USPS</small>
|
151
|
+
|
152
|
+
</li>
|
153
|
+
|
154
|
+
|
155
|
+
<li class="r1 ">
|
156
|
+
<span class='object_link'><a href="Trackerific/UPS.html#required_options-class_method" title="Trackerific::UPS.required_options (method)">required_options</a></span>
|
157
|
+
|
158
|
+
<small>Trackerific::UPS</small>
|
159
|
+
|
160
|
+
</li>
|
161
|
+
|
162
|
+
|
163
|
+
<li class="r2 ">
|
164
|
+
<span class='object_link'><a href="Trackerific/FedEx.html#required_options-class_method" title="Trackerific::FedEx.required_options (method)">required_options</a></span>
|
165
|
+
|
166
|
+
<small>Trackerific::FedEx</small>
|
167
|
+
|
168
|
+
</li>
|
169
|
+
|
170
|
+
|
107
171
|
<li class="r1 ">
|
108
172
|
<span class='object_link'><a href="Trackerific/Details.html#summary-instance_method" title="Trackerific::Details#summary (method)">#summary</a></span>
|
109
173
|
|