octranspo 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/.gitignore +3 -0
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +26 -0
  4. data/Rakefile +8 -0
  5. data/lib/octranspo.rb +20 -0
  6. data/lib/octranspo/headsign.rb +2539 -0
  7. data/lib/octranspo/headsigns.yml +40565 -0
  8. data/lib/octranspo/landmarks.rb +37 -0
  9. data/lib/octranspo/lingo.rb +125 -0
  10. data/lib/octranspo/lingo/headsign_messages.yml +104 -0
  11. data/lib/octranspo/lingo/headsign_signatures.yml +3 -0
  12. data/lib/octranspo/lingo/landmarks.yml +205 -0
  13. data/lib/octranspo/lingo/roadways.yml +1957 -0
  14. data/lib/octranspo/mobile_resource_methods.rb +98 -0
  15. data/lib/octranspo/mobile_route_data.rb +85 -0
  16. data/lib/octranspo/mobile_route_schedule.rb +118 -0
  17. data/lib/octranspo/mobile_stop_schedule.rb +137 -0
  18. data/lib/octranspo/remote_resource_methods.rb +89 -0
  19. data/lib/octranspo/route.rb +31 -0
  20. data/lib/octranspo/routes.yml +507 -0
  21. data/lib/octranspo/service_date.rb +17 -0
  22. data/lib/octranspo/stations.yml +77 -0
  23. data/lib/octranspo/stop.rb +69 -0
  24. data/lib/octranspo/stop_resource.rb +46 -0
  25. data/lib/octranspo/stops.yml +30696 -0
  26. data/lib/octranspo/version.rb +3 -0
  27. data/octranspo.gemspec +22 -0
  28. data/test/fixtures/mobile_route_data/20090323/route_123_index_0.html +457 -0
  29. data/test/fixtures/mobile_route_data/20090323/route_123_index_1.html +99 -0
  30. data/test/fixtures/mobile_route_data/20090323/route_1_index_0.html +700 -0
  31. data/test/fixtures/mobile_route_data/20090323/route_1_index_1.html +691 -0
  32. data/test/fixtures/mobile_route_data/20090323/route_2_index_0.html +682 -0
  33. data/test/fixtures/mobile_route_data/20090323/route_2_index_1.html +646 -0
  34. data/test/fixtures/mobile_route_data/20100323/route_123_index_0.html +469 -0
  35. data/test/fixtures/mobile_route_data/20100323/route_123_index_1.html +105 -0
  36. data/test/fixtures/mobile_route_data/20100323/route_1_index_0.html +703 -0
  37. data/test/fixtures/mobile_route_data/20100323/route_1_index_1.html +694 -0
  38. data/test/fixtures/mobile_route_data/20100323/route_2_index_0.html +685 -0
  39. data/test/fixtures/mobile_route_data/20100323/route_2_index_1.html +649 -0
  40. data/test/fixtures/mobile_route_data/20100323/route_3_index_0.html +649 -0
  41. data/test/fixtures/mobile_route_data/20100323/route_3_index_1.html +721 -0
  42. data/test/fixtures/mobile_route_schedule/20090323/route_18_direction_2_location_25.html +1038 -0
  43. data/test/fixtures/mobile_route_schedule/20090323/route_1_direction_1_location_0.html +1127 -0
  44. data/test/fixtures/mobile_route_schedule/20090323/route_2_direction_2_location_11.html +1430 -0
  45. data/test/fixtures/mobile_route_schedule/20090323/route_2_direction__location_11.html +104 -0
  46. data/test/fixtures/mobile_route_schedule/20100323/route_1_direction_1_location_0.html +1180 -0
  47. data/test/fixtures/mobile_route_schedule/20100323/route_2_direction_2_location_11.html +1554 -0
  48. data/test/fixtures/mobile_route_schedule/20100323/route_3_direction_1_location_0.html +1082 -0
  49. data/test/fixtures/mobile_route_schedule/20100323/route_3_direction_1_location_1.html +1082 -0
  50. data/test/fixtures/mobile_stop_schedule/20090323/location_1987.yml +198 -0
  51. data/test/fixtures/mobile_stop_schedule/20090323/location_1987_route_index_0.html +1283 -0
  52. data/test/fixtures/mobile_stop_schedule/20090323/location_1987_route_index_1.html +194 -0
  53. data/test/fixtures/mobile_stop_schedule/20090323/location_1987_route_index_2.html +116 -0
  54. data/test/fixtures/mobile_stop_schedule/20090323/location_3058_route_index_12.html +149 -0
  55. data/test/fixtures/mobile_stop_schedule/20090323/location_8789_route_index_0.html +1002 -0
  56. data/test/fixtures/mobile_stop_schedule/20100323/location_1987.yml +209 -0
  57. data/test/fixtures/mobile_stop_schedule/20100323/location_1987_route_index_0.html +1393 -0
  58. data/test/fixtures/mobile_stop_schedule/20100323/location_1987_route_index_1.html +206 -0
  59. data/test/fixtures/mobile_stop_schedule/20100323/location_1987_route_index_2.html +123 -0
  60. data/test/fixtures/mobile_stop_schedule/20100323/location_3058_route_index_12.html +278 -0
  61. data/test/fixtures/mobile_stop_schedule/20100323/location_7558_route_index_0.html +979 -0
  62. data/test/fixtures/mobile_stop_schedule/20100323/location_8789_route_index_0.html +1059 -0
  63. data/test/fixtures/stop_resource/1987.html +126 -0
  64. data/test/test_helper.rb +15 -0
  65. data/test/unit/headsign_test.rb +34 -0
  66. data/test/unit/lingo_test.rb +139 -0
  67. data/test/unit/mobile_resource_methods_test.rb +25 -0
  68. data/test/unit/mobile_route_data_test.rb +124 -0
  69. data/test/unit/mobile_route_schedule_test.rb +210 -0
  70. data/test/unit/mobile_stop_schedule_test.rb +153 -0
  71. data/test/unit/service_date_test.rb +27 -0
  72. data/test/unit/stop_resource_test.rb +26 -0
  73. metadata +251 -0
@@ -0,0 +1,3 @@
1
+ module OCTranspo
2
+ VERSION = "0.0.0"
3
+ end
@@ -0,0 +1,22 @@
1
+ $:.push File.expand_path("lib")
2
+ require "octranspo/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "octranspo"
6
+ s.version = "0.0.0"
7
+ s.date = "2012-01-20"
8
+ s.summary = "OC Transpo tools."
9
+ s.description = "Tools for gathering data about OC Transpo service, routes and stop locations."
10
+ s.authors = ["Craig Davey"]
11
+ s.email = "me@craigdavey.ca"
12
+ s.homepage = "http://github.com/craigdavey/octranspo"
13
+ s.files = `git ls-files`.split("\n")
14
+ s.test_files = `git ls-files -- test/*`.split("\n")
15
+ s.require_paths = ["lib"]
16
+
17
+ s.add_dependency "activesupport", ">= 2.3.5"
18
+ s.add_dependency "hpricot"
19
+ s.add_dependency "htmlentities"
20
+ s.add_dependency "i18n"
21
+ s.add_dependency "tzinfo"
22
+ end
@@ -0,0 +1,457 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd">
9
+ <html>
10
+ <head>
11
+ <title>OCTranspo Schedules</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
13
+ <meta http-equiv="Content-Language" content="en-us"/>
14
+ <link rel="stylesheet" type="text/css" href="mobileweb.css"/>
15
+
16
+
17
+
18
+
19
+
20
+
21
+ </head>
22
+ <body>
23
+ <p id="TemplateHeader" class="TemplateHeader"><img src="logo.jpg" width="80" height="20" alt="octranspo" align="left"/>&nbsp;Schedules</p>
24
+ <br/>
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ <form action="post.stoplist.schedules.oci;jsessionid=507290AFA5FAA641C1AB3522DFCEA746" method="get">
42
+ <table id="SchedulesStopListStopsTable" cellpadding="0" cellspacing="0" border="0">
43
+ <tr>
44
+ <td class="header" valign="top">Route:</td><td class="selected">
45
+
46
+ 123 Gloucester N. & Blair
47
+ .</td>
48
+ </tr>
49
+ <tr><td colspan="2">&nbsp;</td></tr>
50
+ <tr>
51
+ <td class="question" colspan="2">
52
+
53
+
54
+ Please select up to 3 stops:
55
+ </td>
56
+ </tr>
57
+
58
+ <tr>
59
+ <td class="checkbox" colspan="2">
60
+ <input type="checkbox" name="check0" id="check0"/>
61
+
62
+
63
+ BLAIR 3B (3027)
64
+ </td>
65
+ </tr>
66
+
67
+ <tr>
68
+ <td class="checkbox" colspan="2">
69
+ <input type="checkbox" name="check1" id="check1"/>
70
+
71
+
72
+ BLAIR / LEROY (8542)
73
+ </td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <td class="checkbox" colspan="2">
78
+ <input type="checkbox" name="check2" id="check2"/>
79
+
80
+
81
+ LEROY / DUNHAM (8646)
82
+ </td>
83
+ </tr>
84
+
85
+ <tr>
86
+ <td class="checkbox" colspan="2">
87
+ <input type="checkbox" name="check3" id="check3"/>
88
+
89
+
90
+ CROWNHILL / APPLEFORD (8592)
91
+ </td>
92
+ </tr>
93
+
94
+ <tr>
95
+ <td class="checkbox" colspan="2">
96
+ <input type="checkbox" name="check4" id="check4"/>
97
+
98
+
99
+ STEEL / CROWNHILL (8642)
100
+ </td>
101
+ </tr>
102
+
103
+ <tr>
104
+ <td class="checkbox" colspan="2">
105
+ <input type="checkbox" name="check5" id="check5"/>
106
+
107
+
108
+ MOWAT / STEEL (8593)
109
+ </td>
110
+ </tr>
111
+
112
+ <tr>
113
+ <td class="checkbox" colspan="2">
114
+ <input type="checkbox" name="check6" id="check6"/>
115
+
116
+
117
+ MOWAT / ELVINA (8622)
118
+ </td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <td class="checkbox" colspan="2">
123
+ <input type="checkbox" name="check7" id="check7"/>
124
+
125
+
126
+ MOWAT / BLAIR (8691)
127
+ </td>
128
+ </tr>
129
+
130
+ <tr>
131
+ <td class="checkbox" colspan="2">
132
+ <input type="checkbox" name="check8" id="check8"/>
133
+
134
+
135
+ BLAIR / SEGUIN (8746)
136
+ </td>
137
+ </tr>
138
+
139
+ <tr>
140
+ <td class="checkbox" colspan="2">
141
+ <input type="checkbox" name="check9" id="check9"/>
142
+
143
+
144
+ BLAIR / MONTR�AL (8748)
145
+ </td>
146
+ </tr>
147
+
148
+ <tr>
149
+ <td class="checkbox" colspan="2">
150
+ <input type="checkbox" name="check10" id="check10"/>
151
+
152
+
153
+ BLAIR / MONTREAL (1789)
154
+ </td>
155
+ </tr>
156
+
157
+ <tr>
158
+ <td class="checkbox" colspan="2">
159
+ <input type="checkbox" name="check11" id="check11"/>
160
+
161
+
162
+ BLAIR / NICOL (8843)
163
+ </td>
164
+ </tr>
165
+
166
+ <tr>
167
+ <td class="checkbox" colspan="2">
168
+ <input type="checkbox" name="check12" id="check12"/>
169
+
170
+
171
+ BLAIR E / DAVIDSON (8846)
172
+ </td>
173
+ </tr>
174
+
175
+ <tr>
176
+ <td class="checkbox" colspan="2">
177
+ <input type="checkbox" name="check13" id="check13"/>
178
+
179
+
180
+ BLAIR / SWANS (8848)
181
+ </td>
182
+ </tr>
183
+
184
+ <tr>
185
+ <td class="checkbox" colspan="2">
186
+ <input type="checkbox" name="check14" id="check14"/>
187
+
188
+
189
+ BLAIR / SWANS (1783)
190
+ </td>
191
+ </tr>
192
+
193
+ <tr>
194
+ <td class="checkbox" colspan="2">
195
+ <input type="checkbox" name="check15" id="check15"/>
196
+
197
+
198
+ BLAIR / BRIARCLIFF (8180)
199
+ </td>
200
+ </tr>
201
+
202
+ <tr>
203
+ <td class="checkbox" colspan="2">
204
+ <input type="checkbox" name="check16" id="check16"/>
205
+
206
+
207
+ BLAIR / MASSEY (8865)
208
+ </td>
209
+ </tr>
210
+
211
+ <tr>
212
+ <td class="checkbox" colspan="2">
213
+ <input type="checkbox" name="check17" id="check17"/>
214
+
215
+
216
+ MASSEY / REBECCA (8886)
217
+ </td>
218
+ </tr>
219
+
220
+ <tr>
221
+ <td class="checkbox" colspan="2">
222
+ <input type="checkbox" name="check18" id="check18"/>
223
+
224
+
225
+ DELONG / MASSEY (8181)
226
+ </td>
227
+ </tr>
228
+
229
+ <tr>
230
+ <td class="checkbox" colspan="2">
231
+ <input type="checkbox" name="check19" id="check19"/>
232
+
233
+
234
+ DELONG / COMBERMERE (8915)
235
+ </td>
236
+ </tr>
237
+
238
+ <tr>
239
+ <td class="checkbox" colspan="2">
240
+ <input type="checkbox" name="check20" id="check20"/>
241
+
242
+
243
+ DELONG / REBECCA (8919)
244
+ </td>
245
+ </tr>
246
+
247
+ <tr>
248
+ <td class="checkbox" colspan="2">
249
+ <input type="checkbox" name="check21" id="check21"/>
250
+
251
+
252
+ DELONG / KAYMAR (8182)
253
+ </td>
254
+ </tr>
255
+
256
+ <tr>
257
+ <td class="checkbox" colspan="2">
258
+ <input type="checkbox" name="check22" id="check22"/>
259
+
260
+
261
+ DELONG / ORIOLE (8923)
262
+ </td>
263
+ </tr>
264
+
265
+ <tr>
266
+ <td class="checkbox" colspan="2">
267
+ <input type="checkbox" name="check23" id="check23"/>
268
+
269
+
270
+ ROTHWELL / DELONG (8942)
271
+ </td>
272
+ </tr>
273
+
274
+ <tr>
275
+ <td class="checkbox" colspan="2">
276
+ <input type="checkbox" name="check24" id="check24"/>
277
+
278
+
279
+ ROTHWELL / WICK (8943)
280
+ </td>
281
+ </tr>
282
+
283
+ <tr>
284
+ <td class="checkbox" colspan="2">
285
+ <input type="checkbox" name="check25" id="check25"/>
286
+
287
+
288
+ WICK / COXFORD (8654)
289
+ </td>
290
+ </tr>
291
+
292
+ <tr>
293
+ <td class="checkbox" colspan="2">
294
+ <input type="checkbox" name="check26" id="check26"/>
295
+
296
+
297
+ SWANS / WREN (8827)
298
+ </td>
299
+ </tr>
300
+
301
+ <tr>
302
+ <td class="checkbox" colspan="2">
303
+ <input type="checkbox" name="check27" id="check27"/>
304
+
305
+
306
+ SWANS / WHIPPOORWILL (8829)
307
+ </td>
308
+ </tr>
309
+
310
+ <tr>
311
+ <td class="checkbox" colspan="2">
312
+ <input type="checkbox" name="check28" id="check28"/>
313
+
314
+
315
+ SWANS / BLAIR (8830)
316
+ </td>
317
+ </tr>
318
+
319
+ <tr>
320
+ <td class="checkbox" colspan="2">
321
+ <input type="checkbox" name="check29" id="check29"/>
322
+
323
+
324
+ BLAIR / DAVIDSON (8833)
325
+ </td>
326
+ </tr>
327
+
328
+ <tr>
329
+ <td class="checkbox" colspan="2">
330
+ <input type="checkbox" name="check30" id="check30"/>
331
+
332
+
333
+ BLAIR / NICOL (8842)
334
+ </td>
335
+ </tr>
336
+
337
+ <tr>
338
+ <td class="checkbox" colspan="2">
339
+ <input type="checkbox" name="check31" id="check31"/>
340
+
341
+
342
+ BLAIR / MONTREAL (8639)
343
+ </td>
344
+ </tr>
345
+
346
+ <tr>
347
+ <td class="checkbox" colspan="2">
348
+ <input type="checkbox" name="check32" id="check32"/>
349
+
350
+
351
+ MONTR�AL / BLAIR (8647)
352
+ </td>
353
+ </tr>
354
+
355
+ <tr>
356
+ <td class="checkbox" colspan="2">
357
+ <input type="checkbox" name="check33" id="check33"/>
358
+
359
+
360
+ ELWOOD / MONTR�AL (8644)
361
+ </td>
362
+ </tr>
363
+
364
+ <tr>
365
+ <td class="checkbox" colspan="2">
366
+ <input type="checkbox" name="check34" id="check34"/>
367
+
368
+
369
+ CROWNHILL / SUMAC (8507)
370
+ </td>
371
+ </tr>
372
+
373
+ <tr>
374
+ <td class="checkbox" colspan="2">
375
+ <input type="checkbox" name="check35" id="check35"/>
376
+
377
+
378
+ CROWNHILL / STEEL (2340)
379
+ </td>
380
+ </tr>
381
+
382
+ <tr>
383
+ <td class="checkbox" colspan="2">
384
+ <input type="checkbox" name="check36" id="check36"/>
385
+
386
+
387
+ CROWNHILL / APPLEFORD (8645)
388
+ </td>
389
+ </tr>
390
+
391
+ <tr>
392
+ <td class="checkbox" colspan="2">
393
+ <input type="checkbox" name="check37" id="check37"/>
394
+
395
+
396
+ LEROY / DUNHAM (8553)
397
+ </td>
398
+ </tr>
399
+
400
+ <tr>
401
+ <td class="checkbox" colspan="2">
402
+ <input type="checkbox" name="check38" id="check38"/>
403
+
404
+
405
+ LEROY / BLAIR (8554)
406
+ </td>
407
+ </tr>
408
+
409
+ <tr>
410
+ <td class="checkbox" colspan="2">
411
+ <input type="checkbox" name="check39" id="check39"/>
412
+
413
+
414
+ BLAIR / OGILVIE (8659)
415
+ </td>
416
+ </tr>
417
+
418
+ <tr>
419
+ <td class="checkbox" colspan="2">
420
+ <input type="checkbox" name="check40" id="check40"/>
421
+
422
+
423
+ BLAIR 2B (3027)
424
+ </td>
425
+ </tr>
426
+
427
+ <tr>
428
+ <td class="button" colspan="2">
429
+ <input name="lang" id="lang" type="hidden" value="en"/>
430
+ <input name="route" id="route" type="hidden" value="123"/>
431
+ <input name="direction" id="direction" type="hidden" value="Direction1"/>
432
+ <input name="day" id="day" type="hidden" value="20090323"/>
433
+ <input name="rangeIndex" id="rangeIndex" type="hidden" value="5"/>
434
+ <input class="button" name="continue" type="submit" value="Continue"/>
435
+ </td>
436
+ </tr>
437
+ <tr><td colspan="2">&nbsp;</td></tr>
438
+ </table>
439
+ </form>
440
+ <table id="SchedulesStopListLinksTable" cellpadding="0" cellspacing="0" border="0">
441
+ <tr>
442
+ <td class="link"><a href="post.dateroute.schedules.oci;jsessionid=507290AFA5FAA641C1AB3522DFCEA746?lang=en&amp;route=123&amp;day=20090323&amp;rangeIndex=5">Choose a new direction</a></td>
443
+ </tr>
444
+ <tr>
445
+ <td class="link"><a href="start.schedules.oci;jsessionid=507290AFA5FAA641C1AB3522DFCEA746?lang=en">Choose a new route</a></td>
446
+ </tr>
447
+ </table>
448
+
449
+
450
+
451
+ <br/>
452
+ <p id="TemplateFooter" class="TemplateFooter"><a href="startFR.schedules.oci">Fran�ais</a> | <a href="startEN.stoptimes.oci">Stop Times</a> | <a href="startEN.tripplan.oci">Travel Planner</a></p>
453
+ </body>
454
+ </html>
455
+
456
+
457
+