cta_redux 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +37 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE +22 -0
  6. data/README.md +16 -0
  7. data/Rakefile +2 -0
  8. data/cta_redux.gemspec +32 -0
  9. data/data/.gitkeep +0 -0
  10. data/data/cta-gtfs.db.gz +0 -0
  11. data/lib/cta_redux/api/api_response.rb +45 -0
  12. data/lib/cta_redux/api/bus_tracker.rb +178 -0
  13. data/lib/cta_redux/api/customer_alerts.rb +68 -0
  14. data/lib/cta_redux/api/train_tracker.rb +89 -0
  15. data/lib/cta_redux/bus_tracker.rb +183 -0
  16. data/lib/cta_redux/customer_alerts.rb +72 -0
  17. data/lib/cta_redux/faraday_middleware/bus_tracker_parser.rb +46 -0
  18. data/lib/cta_redux/faraday_middleware/customer_alerts_parser.rb +39 -0
  19. data/lib/cta_redux/faraday_middleware/simple_cache.rb +32 -0
  20. data/lib/cta_redux/faraday_middleware/train_tracker_parser.rb +37 -0
  21. data/lib/cta_redux/models/agency.rb +4 -0
  22. data/lib/cta_redux/models/bus.rb +46 -0
  23. data/lib/cta_redux/models/calendar.rb +7 -0
  24. data/lib/cta_redux/models/route.rb +62 -0
  25. data/lib/cta_redux/models/shape.rb +4 -0
  26. data/lib/cta_redux/models/stop.rb +66 -0
  27. data/lib/cta_redux/models/stop_time.rb +6 -0
  28. data/lib/cta_redux/models/train.rb +74 -0
  29. data/lib/cta_redux/models/transfer.rb +6 -0
  30. data/lib/cta_redux/models/trip.rb +64 -0
  31. data/lib/cta_redux/train_tracker.rb +103 -0
  32. data/lib/cta_redux/version.rb +3 -0
  33. data/lib/cta_redux.rb +50 -0
  34. data/script/gtfs_to_sqlite.rb +137 -0
  35. data/spec/bus_tracker_spec.rb +149 -0
  36. data/spec/customer_alerts_spec.rb +48 -0
  37. data/spec/spec_helper.rb +16 -0
  38. data/spec/stubs/alerts_response.xml +362 -0
  39. data/spec/stubs/getdirections_response.xml +16 -0
  40. data/spec/stubs/getpatterns_rt22_response.xml +2768 -0
  41. data/spec/stubs/getpredictions_rt22stpid15895_response.xml +59 -0
  42. data/spec/stubs/getpredictions_vid4361_response.xml +647 -0
  43. data/spec/stubs/getroutes_response.xml +774 -0
  44. data/spec/stubs/getservicebulletins_rt8_response.xml +110 -0
  45. data/spec/stubs/getstops_response.xml +614 -0
  46. data/spec/stubs/gettime_response.xml +2 -0
  47. data/spec/stubs/getvehicles_rt22_response.xml +239 -0
  48. data/spec/stubs/getvehicles_vid4394_response.xml +23 -0
  49. data/spec/stubs/route_status8_response.xml +1 -0
  50. data/spec/stubs/routes_response.xml +1 -0
  51. data/spec/stubs/ttarivals_stpid30141_response.xml +1 -0
  52. data/spec/stubs/ttfollow_run217_response.xml +1 -0
  53. data/spec/stubs/ttpositions_response.xml +1 -0
  54. data/spec/train_tracker_spec.rb +70 -0
  55. metadata +234 -0
@@ -0,0 +1,110 @@
1
+ <?xml version="1.0"?>
2
+
3
+
4
+
5
+
6
+
7
+ <bustime-response>
8
+
9
+ <sb>
10
+ <nm>TCU #8 Halsted reroute Halsted/35th</nm>
11
+ <sbj>#8 Halsted reroute Halsted/35th</sbj>
12
+ <dtl>#8 Halsted buses are temporarily rerouted in both directions via Halsted, 31st, Wallace, 35th, and Halsted, due to street blockage.&lt;br/&gt;&lt;br/&gt;Allow extra travel time.&lt;br/&gt;</dtl>
13
+ <brf></brf>
14
+ <prty>Medium</prty>
15
+
16
+ <srvc>
17
+
18
+ <rt>8</rt>
19
+ <rtdir/>
20
+ <stpid/>
21
+ <stpnm/>
22
+
23
+ </srvc>
24
+
25
+ </sb>
26
+
27
+ <sb>
28
+ <nm>TCU #8 Reroute Halsted/Harrison</nm>
29
+ <sbj>Reroute at Halsted/Harrison</sbj>
30
+ <dtl>#8 Halsted buses are temporarily rerouted in both directions via Halsted, Harrison, Morgan, Van Buren, and Halsted, due to street blockage.&lt;br/&gt;</dtl>
31
+ <brf></brf>
32
+ <prty>Medium</prty>
33
+
34
+ <srvc>
35
+
36
+ <rt>8</rt>
37
+ <rtdir/>
38
+ <stpid/>
39
+ <stpnm/>
40
+
41
+ </srvc>
42
+
43
+ </sb>
44
+
45
+ <sb>
46
+ <nm>#63 - Bus Stop Relocation</nm>
47
+ <sbj>#63 63rd Bus Stop Relocation</sbj>
48
+ <dtl>The eastbound stop on the southeast corner at 63rd/Stewart will be temporarily relocated to the southwest corner at 63rd/Stewart.&lt;br/&gt;&lt;br/&gt;The bus stop is being relocated due to construction.&lt;br/&gt;</dtl>
49
+ <brf></brf>
50
+ <prty>Low</prty>
51
+
52
+ <srvc/>
53
+
54
+ </sb>
55
+
56
+ <sb>
57
+ <nm>#8 - Bus Stop Relocations/Eliminations</nm>
58
+ <sbj>#8 Stop Eliminations/Relocations</sbj>
59
+ <dtl>• The northbound and southbound #8 bus stops located near the southeast and northwest corners of Halsted/Huron will be eliminated. Please board buses as follows:&lt;br/&gt;&lt;br/&gt;–Board northbound buses on the northeast corner of Halsted/Grand&lt;br/&gt;–Board southbound buses on the northwest corner of Halsted/Erie.&lt;br/&gt;&lt;br/&gt;• The southbound #8 bus stop located near the northwest corner of Halsted/Hubbard will be eliminated. &lt;br/&gt;&lt;br/&gt;–Board southbound buses on the northwest corner at Grand/Halsted.&lt;br/&gt;&lt;br/&gt;• The southbound #8 bus stop on the southwest corner at Halsted/Erie will be relocated to the northwest corner at Halsted/Erie.&lt;br/&gt;&lt;br/&gt;• The southbound #8 bus stop on the northwest corner at Halsted/Lake will be relocated to southwest corner at Halsted/Lake.&lt;br/&gt; &lt;br/&gt;Why is service being changed?&lt;br/&gt;The bus stops are being relocated due to the installation of a bike lane on Halsted.&lt;br/&gt;</dtl>
60
+ <brf></brf>
61
+ <prty>Low</prty>
62
+
63
+ <srvc>
64
+
65
+ <rt>8</rt>
66
+ <rtdir/>
67
+ <stpid/>
68
+ <stpnm/>
69
+
70
+ </srvc>
71
+
72
+ </sb>
73
+
74
+ <sb>
75
+ <nm>#8 Halsted Bus Stop Relocations</nm>
76
+ <sbj>Bus Stop Relocations</sbj>
77
+ <dtl>Effective Wed, Apr 30&lt;br/&gt;&lt;br/&gt;The northbound bus stop on the southeast corner at Halsted/53rd will be relocated to the northeast corner at Halsted/53rd.&lt;br/&gt;&lt;br/&gt;The southbound bus stop on the northwest corner at Halsted/53rd will be relocated to the southwest corner at Halsted/53rd.&lt;br/&gt;&lt;br/&gt;</dtl>
78
+ <brf></brf>
79
+ <prty>Low</prty>
80
+
81
+ <srvc>
82
+
83
+ <rt>8</rt>
84
+ <rtdir/>
85
+ <stpid/>
86
+ <stpnm/>
87
+
88
+ </srvc>
89
+
90
+ </sb>
91
+
92
+ <sb>
93
+ <nm>#8 Halsted Bus Stop Relocations &lt;br/&gt;</nm>
94
+ <sbj>Bus Stop Relocations&lt;br/&gt;</sbj>
95
+ <dtl>The northbound bus stop on the southeast corners at Halsted/Jackson and Halsted/Randolph will be relocated to the northeast corners at Halsted/Jackson and Halsted/Randolph. &lt;br/&gt;</dtl>
96
+ <brf></brf>
97
+ <prty>Low</prty>
98
+
99
+ <srvc>
100
+
101
+ <rt>8</rt>
102
+ <rtdir/>
103
+ <stpid/>
104
+ <stpnm/>
105
+
106
+ </srvc>
107
+
108
+ </sb>
109
+
110
+ </bustime-response>