cumtd 0.0.1 → 0.1.1
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.
- checksums.yaml +4 -4
- data/lib/cumtd.rb +186 -23
- data/lib/departure.rb +68 -0
- data/lib/route.rb +29 -0
- data/lib/shape.rb +29 -0
- data/lib/stop.rb +29 -0
- data/lib/stop_point.rb +30 -0
- data/lib/stop_time.rb +32 -0
- data/lib/trip.rb +40 -0
- data/lib/vehicle.rb +45 -0
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd40b208a39e58b04532f3480f40bfa872fb9a9c
|
4
|
+
data.tar.gz: 0be1f6a864db4f9f12542d9312b67ee2f3d438d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe7ebb6bf969afd5b457cfb0ecdf4dbc4ee08ef140b3888960ca9fb083df28388d8a71f7452484bffab3a1870a0269f85910a1a07d20dbfc5a325374fbb74395
|
7
|
+
data.tar.gz: 4c1689a745a21980d2fa46a48d655bbc3795ed1b4336af9551c2602cc801f84ea6e3cac0d83a08d52ff02465af0dfb899e6a632d475a38b91ad8153279a1d220
|
data/lib/cumtd.rb
CHANGED
@@ -1,23 +1,90 @@
|
|
1
1
|
require 'httparty'
|
2
|
+
require 'yaml'
|
2
3
|
class CUMTD
|
4
|
+
require 'stop'
|
5
|
+
require 'stop_point'
|
6
|
+
require 'departure'
|
7
|
+
require 'route'
|
8
|
+
require 'shape'
|
9
|
+
require 'trip'
|
10
|
+
require 'vehicle'
|
3
11
|
include HTTParty
|
4
12
|
base_uri 'developer.cumtd.com/api/v2.2/json'
|
5
|
-
def initialize(api_key)
|
13
|
+
def initialize(api_key, stops_file=nil, routes_file=nil, serialize_path=File.expand_path(File.dirname(__FILE__)))
|
6
14
|
@api_key = api_key
|
15
|
+
|
16
|
+
@@all_stops = Array.new
|
17
|
+
if stops_file
|
18
|
+
object = nil
|
19
|
+
File.open(stops_file,"rb") {|f| @@all_stops = Marshal.load(f)}
|
20
|
+
else
|
21
|
+
self.get_stops
|
22
|
+
end
|
23
|
+
|
24
|
+
@@all_routes = Array.new
|
25
|
+
if routes_file
|
26
|
+
object = nil
|
27
|
+
File.open(routes_file,"rb") {|f| @@all_routes = Marshal.load(f)}
|
28
|
+
else
|
29
|
+
self.get_routes
|
30
|
+
end
|
31
|
+
|
32
|
+
unless serialize_path == :no_serialize
|
33
|
+
p File.join(serialize_path, 'stops')
|
34
|
+
serialize_stops(File.join(serialize_path, 'stops.yaml'))
|
35
|
+
serialize_routes(File.join(serialize_path, 'routes.yaml'))
|
36
|
+
end
|
37
|
+
|
7
38
|
end
|
8
39
|
|
9
40
|
def api_key
|
10
41
|
@api_key
|
11
42
|
end
|
12
43
|
|
13
|
-
def
|
14
|
-
|
44
|
+
def self.all_stops
|
45
|
+
@@all_stops
|
15
46
|
end
|
16
47
|
|
17
|
-
def
|
18
|
-
|
19
|
-
|
20
|
-
|
48
|
+
def self.all_routes
|
49
|
+
@@all_routes
|
50
|
+
end
|
51
|
+
|
52
|
+
def serialize_stops(file_location)
|
53
|
+
File.open(file_location, "wb") do |file|
|
54
|
+
YAML.dump(@@all_stops,file)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def serialize_routes(file_location)
|
59
|
+
File.open(file_location, "wb") do |file|
|
60
|
+
YAML.dump(@@all_routes,file)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def get_stops
|
65
|
+
response = self.class.get("/GetStops?key=#{@api_key}")
|
66
|
+
@@all_stops.clear
|
67
|
+
response["stops"].each do |stop|
|
68
|
+
@@all_stops << Stop.new(stop)
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
def get_routes
|
74
|
+
response = self.class.get("/GetRoutes?key=#{@api_key}")
|
75
|
+
@@all_routes.clear
|
76
|
+
response["routes"].each do |route|
|
77
|
+
@@all_routes << Route.new(route)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def get_stops_by_lat_lon(lat, lon, count=20)
|
82
|
+
response = self.class.get("/GetStopsByLatLon?key=#{@api_key}&lat=#{lat}&lon=#{lon}&count=#{count}")
|
83
|
+
stops = Array.new
|
84
|
+
response["stops"].each do |stop|
|
85
|
+
stops << Stop.new(stop)
|
86
|
+
end
|
87
|
+
return stops
|
21
88
|
end
|
22
89
|
|
23
90
|
def print_all_departures(stops)
|
@@ -28,28 +95,37 @@ class CUMTD
|
|
28
95
|
end
|
29
96
|
end
|
30
97
|
|
31
|
-
def get_routes_by_stop(
|
32
|
-
response = self.class.get("/GetRoutesByStop?key=#{api_key}&stop_id=#{stop_id}")
|
33
|
-
|
98
|
+
def get_routes_by_stop(stop)
|
99
|
+
response = self.class.get("/GetRoutesByStop?key=#{@api_key}&stop_id=#{stop.stop_id}")
|
100
|
+
routes = Array.new
|
101
|
+
response["routes"].each do |route|
|
102
|
+
routes << Route.new(route)
|
103
|
+
end
|
104
|
+
return routes
|
34
105
|
end
|
35
106
|
|
36
107
|
def get_stop_by_id(stop_id)
|
37
|
-
response = self.class.get("/GetStop?key=#{api_key}&stop_id=#{stop_id}")
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
def get_departures_by_stop(stop_id)
|
42
|
-
response = self.class.get("/GetDeparturesByStop?key=#{api_key}&stop_id=#{stop_id}")
|
43
|
-
return departures = response.parsed_response["departures"]
|
108
|
+
response = self.class.get("/GetStop?key=#{@api_key}&stop_id=#{stop_id}")
|
109
|
+
stop = Stop.new(response["stops"])
|
110
|
+
return stop
|
44
111
|
end
|
45
112
|
|
46
|
-
def
|
47
|
-
|
48
|
-
departures
|
49
|
-
|
113
|
+
def get_departures_by_stop(stop)
|
114
|
+
response = self.class.get("/GetDeparturesByStop?key=#{@api_key}&stop_id=#{stop.stop_id}")
|
115
|
+
departures = Array.new
|
116
|
+
response["departures"].each do |departure|
|
117
|
+
departures << Departure.new(departure)
|
50
118
|
end
|
119
|
+
return departures
|
51
120
|
end
|
52
121
|
|
122
|
+
# def print_departures(departures)
|
123
|
+
# puts stop["stop_name"] unless departures == []
|
124
|
+
# departures.each do |departure|
|
125
|
+
# puts departure["headsign"] + " " + departure["expected_mins"].to_s + "mins"
|
126
|
+
# end
|
127
|
+
# end
|
128
|
+
|
53
129
|
# Returns an array of hashes. Each hash contains a "stop" key denoting the stop
|
54
130
|
# and the "departures" key contains one departure. These hashes are sorted
|
55
131
|
# based on length of time until they depart, given stops to get departures for.
|
@@ -58,12 +134,99 @@ class CUMTD
|
|
58
134
|
master_deps = Array.new
|
59
135
|
stops.each do |stop|
|
60
136
|
# master_deps.concat(Hash["stop", stop, "departures", get_departures_by_stop(stop["stop_id"]))
|
61
|
-
stops_from_deps = get_departures_by_stop(stop
|
137
|
+
stops_from_deps = get_departures_by_stop(stop)
|
62
138
|
stops_from_deps.each do |stop_dep|
|
63
139
|
master_deps << Hash["stop", stop, "departures", stop_dep]
|
64
140
|
end
|
65
141
|
end
|
66
|
-
return master_deps.sort_by! { |stop| stop["departures"]
|
142
|
+
return master_deps.sort_by! { |stop| stop["departures"].expected_mins }
|
143
|
+
end
|
144
|
+
|
145
|
+
def get_stops_by_search(query, count=10)
|
146
|
+
response = self.class.get("/GetStopsBySearch?key=#{@api_key}&query=#{query}&count=#{count}")
|
147
|
+
stops = Array.new
|
148
|
+
response["stops"].each do |stop|
|
149
|
+
stops << Stop.new(stop)
|
150
|
+
end
|
151
|
+
return stops
|
152
|
+
end
|
153
|
+
|
154
|
+
def get_stop_times_by_trip(trip_id)
|
155
|
+
response = self.class.get("/GetStopTimesByTrip?key=#{@api_key}&trip_id=#{trip_id}")
|
156
|
+
stop_times = Array.new
|
157
|
+
response["stop_times"].each do |stop_time|
|
158
|
+
stop_times << StopTime.new(stop_time)
|
159
|
+
end
|
160
|
+
return stop_times
|
161
|
+
end
|
162
|
+
|
163
|
+
def get_vehicles
|
164
|
+
response = self.class.get("/GetVehicles?key=#{@api_key}")
|
165
|
+
vehicles = Array.new
|
166
|
+
response["vehicles"].each do |vehicle|
|
167
|
+
vehicles << Vehicle.new(vehicle)
|
168
|
+
end
|
169
|
+
return vehicles
|
170
|
+
end
|
171
|
+
|
172
|
+
def get_vehicle_by_id(vehicle_id)
|
173
|
+
response = self.class.get("/GetVehicle?key=#{@api_key}&vehicle_id=#{vehicle_id}")
|
174
|
+
return Vehicle.new(response["vehicles"].first)
|
175
|
+
end
|
176
|
+
|
177
|
+
def get_vehicles_by_route_id(route_id)
|
178
|
+
response = self.class.get("/GetVehiclesByRoute?key=#{@api_key}&route_id=#{route_id}")
|
179
|
+
vehicles = Array.new
|
180
|
+
response["vehicles"].each do |vehicle|
|
181
|
+
vehicles << Vehicle.new(vehicle)
|
182
|
+
end
|
183
|
+
return vehicles
|
184
|
+
end
|
185
|
+
|
186
|
+
def get_trip_by_id(trip_id)
|
187
|
+
response = self.class.get("/GetTrip?key=#{@api_key}&trip_id=#{trip_id}")
|
188
|
+
return Trip.new(response["trips"].first)
|
189
|
+
end
|
190
|
+
|
191
|
+
def get_trips_by_block(block_id)
|
192
|
+
response = self.class.get("/GetTripsByBlock?key=#{@api_key}&block_id=#{block_id}")
|
193
|
+
trips = Array.new
|
194
|
+
response["trips"].each do |trip|
|
195
|
+
trips << Trip.new(trip)
|
196
|
+
end
|
197
|
+
return trips
|
198
|
+
end
|
199
|
+
|
200
|
+
def get_shape_by_id(shape_id)
|
201
|
+
response = self.class.get("/GetShape?key=#{@api_key}&shape_id=#{shape_id}")
|
202
|
+
shapes = Array.new
|
203
|
+
response["shapes"].each do |shape|
|
204
|
+
shapes << Shape.new(shape)
|
205
|
+
end
|
206
|
+
return shapes
|
207
|
+
end
|
208
|
+
|
209
|
+
def get_shape_between_stops(begin_stop_id, end_stop_id, shape_id)
|
210
|
+
response = self.class.get("/GetShape?key=#{@api_key}&begin_stop_id=#{begin_stop_id}&end_stop_id=#{end_stop_id}&shape_id=#{shape_id}")
|
211
|
+
shapes = Array.new
|
212
|
+
response["shapes"].each do |shape|
|
213
|
+
shapes << Shape.new(shape)
|
214
|
+
end
|
215
|
+
return shapes
|
216
|
+
end
|
217
|
+
|
218
|
+
def get_stop_times_by_stop(stop_id, route_id=nil, date=Time.now.to_s)
|
219
|
+
if !route_id
|
220
|
+
response = self.class.get("/GetStopTimesByStop?key=#{@api_key}&stop_id=#{stop_id}")
|
221
|
+
else
|
222
|
+
response = self.class.get("/GetStopTimesByStop?key=#{@api_key}&stop_id=#{stop_id}&route_id=#{route_id}")
|
223
|
+
end
|
224
|
+
|
225
|
+
stop_times = Array.new
|
226
|
+
response["stop_times"].each do |stop_time|
|
227
|
+
stop_times << StopTime.new(stop_time)
|
228
|
+
end
|
229
|
+
return stop_times
|
67
230
|
end
|
68
231
|
|
69
232
|
end
|
data/lib/departure.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'trip'
|
2
|
+
require 'route'
|
3
|
+
class Departure < CUMTD
|
4
|
+
def initialize(json)
|
5
|
+
@stop_id = json["stop_id"]
|
6
|
+
@headsign = json["headsign"]
|
7
|
+
@trip = Trip.new(json["trip"])
|
8
|
+
@vehicle_id = json["vehicle_id"]
|
9
|
+
@origin = CUMTD.all_stops.select { |stop| stop.stop_points.each == \
|
10
|
+
json["origin"]["stop_id"] }
|
11
|
+
@destination = CUMTD.all_stops.select { |stop| stop.stop_points.each == \
|
12
|
+
json["destination"]["stop_id"] }
|
13
|
+
@is_monitored = json["is_monitored"]
|
14
|
+
@is_scheduled = json["is_scheduled"]
|
15
|
+
@scheduled = DateTime.parse(json["scheduled"]).to_time
|
16
|
+
@expected = DateTime.parse(json["expected"]).to_time
|
17
|
+
@expected_mins = json["expected_mins"]
|
18
|
+
@location = Hash[:lat, json["location"]["lat"], :lon, json["location"]["lon"]]
|
19
|
+
end
|
20
|
+
|
21
|
+
def stop_id
|
22
|
+
@stop_id
|
23
|
+
end
|
24
|
+
|
25
|
+
def headsign
|
26
|
+
@headsign
|
27
|
+
end
|
28
|
+
|
29
|
+
def trip
|
30
|
+
@trip
|
31
|
+
end
|
32
|
+
|
33
|
+
def vehicle_id
|
34
|
+
@vehicle_id
|
35
|
+
end
|
36
|
+
|
37
|
+
def origin
|
38
|
+
@origin
|
39
|
+
end
|
40
|
+
|
41
|
+
def destination
|
42
|
+
@destination
|
43
|
+
end
|
44
|
+
|
45
|
+
def is_monitored
|
46
|
+
@is_monitored
|
47
|
+
end
|
48
|
+
|
49
|
+
def is_scheduled
|
50
|
+
@is_scheduled
|
51
|
+
end
|
52
|
+
|
53
|
+
def scheduled
|
54
|
+
@scheduled
|
55
|
+
end
|
56
|
+
|
57
|
+
def expected
|
58
|
+
@expected
|
59
|
+
end
|
60
|
+
|
61
|
+
def expected_mins
|
62
|
+
@expected_mins
|
63
|
+
end
|
64
|
+
|
65
|
+
def location
|
66
|
+
@location
|
67
|
+
end
|
68
|
+
end
|
data/lib/route.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
class Route < CUMTD
|
2
|
+
def initialize(json)
|
3
|
+
@route_color = json["route_color"]
|
4
|
+
@route_id = json["route_id"]
|
5
|
+
@route_long_name = json["route_long_name"]
|
6
|
+
@route_short_name = json["route_short_name"]
|
7
|
+
@route_text_color = json["route_text_color"]
|
8
|
+
end
|
9
|
+
|
10
|
+
def route_color
|
11
|
+
@route_color
|
12
|
+
end
|
13
|
+
|
14
|
+
def route_id
|
15
|
+
@route_id
|
16
|
+
end
|
17
|
+
|
18
|
+
def route_long_name
|
19
|
+
@route_long_name
|
20
|
+
end
|
21
|
+
|
22
|
+
def route_short_name
|
23
|
+
@route_short_name
|
24
|
+
end
|
25
|
+
|
26
|
+
def route_text_color
|
27
|
+
@route_text_color
|
28
|
+
end
|
29
|
+
end
|
data/lib/shape.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
class Shape < CUMTD
|
2
|
+
def initialize(json)
|
3
|
+
@shape_dist_traveled = json["shape_dist_traveled"]
|
4
|
+
@shape_pt_lat = json["shape_pt_lat"]
|
5
|
+
@shape_pt_lon = json["shape_pt_lon"]
|
6
|
+
@shape_pt_sequence = json["shape_pt_sequence"]
|
7
|
+
@shape_stop_id = json["shape_stop_id"] if json["shape_stop_id"]
|
8
|
+
end
|
9
|
+
|
10
|
+
def shape_dist_traveled
|
11
|
+
@shape_dist_traveled
|
12
|
+
end
|
13
|
+
|
14
|
+
def shape_pt_lat
|
15
|
+
@shape_pt_lat
|
16
|
+
end
|
17
|
+
|
18
|
+
def shape_pt_lon
|
19
|
+
@shape_pt_lon
|
20
|
+
end
|
21
|
+
|
22
|
+
def shape_pt_sequence
|
23
|
+
@shape_pt_sequence
|
24
|
+
end
|
25
|
+
|
26
|
+
def shape_stop_id
|
27
|
+
@shape_stop_id
|
28
|
+
end
|
29
|
+
end
|
data/lib/stop.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
class Stop < CUMTD
|
2
|
+
def initialize(json)
|
3
|
+
@stop_id = json["stop_id"]
|
4
|
+
@stop_name = json["stop_name"]
|
5
|
+
@code = json["code"]
|
6
|
+
@stop_points = Array.new
|
7
|
+
json["stop_points"].each do |stop_point|
|
8
|
+
@stop_points << StopPoint.new(stop_point)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def stop_id
|
13
|
+
@stop_id
|
14
|
+
end
|
15
|
+
|
16
|
+
def stop_name
|
17
|
+
@stop_name
|
18
|
+
end
|
19
|
+
|
20
|
+
def code
|
21
|
+
@code
|
22
|
+
end
|
23
|
+
|
24
|
+
def stop_points
|
25
|
+
@stop_points
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
end
|
data/lib/stop_point.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
class StopPoint < CUMTD
|
2
|
+
def initialize(json)
|
3
|
+
@code = json["code"]
|
4
|
+
@stop_id = json["stop_id"]
|
5
|
+
@stop_lat = json["stop_lat"]
|
6
|
+
@stop_lon = json["stop_lon"]
|
7
|
+
@stop_name = json["stop_name"]
|
8
|
+
end
|
9
|
+
|
10
|
+
def code
|
11
|
+
@code
|
12
|
+
end
|
13
|
+
|
14
|
+
def stop_id
|
15
|
+
@stop_id
|
16
|
+
end
|
17
|
+
|
18
|
+
def stop_lat
|
19
|
+
@stop_lat
|
20
|
+
end
|
21
|
+
|
22
|
+
def stop_lon
|
23
|
+
@stop_lon
|
24
|
+
end
|
25
|
+
|
26
|
+
def stop_name
|
27
|
+
@stop_name
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
data/lib/stop_time.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
class StopTime < CUMTD
|
2
|
+
require 'stop_point'
|
3
|
+
require 'trip'
|
4
|
+
def initialize(json)
|
5
|
+
@arrival_time = DateTime.parse(json["arrival_time"]).to_time
|
6
|
+
@departure_time = DateTime.parse(json["departure_time"]).to_time
|
7
|
+
@stop_sequence = json["stop_sequence"]
|
8
|
+
@stop_point = StopPoint.new(json["stop_point"]) if json["stop_point"]
|
9
|
+
@trip = Trip.new(json["trip"]) if json["trip"]
|
10
|
+
end
|
11
|
+
|
12
|
+
def arrival_time
|
13
|
+
@arrival_time
|
14
|
+
end
|
15
|
+
|
16
|
+
def departure_time
|
17
|
+
@departure_time
|
18
|
+
end
|
19
|
+
|
20
|
+
def stop_sequence
|
21
|
+
@stop_sequence
|
22
|
+
end
|
23
|
+
|
24
|
+
def stop_point
|
25
|
+
@stop_point
|
26
|
+
end
|
27
|
+
|
28
|
+
def trip
|
29
|
+
@trip
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/lib/trip.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
class Trip < CUMTD
|
2
|
+
def initialize(json)
|
3
|
+
@trip_id = json["trip_id"]
|
4
|
+
@trip_headsign = json["trip_headsign"]
|
5
|
+
@route_id = json["route_id"]
|
6
|
+
@block_id = json["block_id"]
|
7
|
+
@direction = json["direction"]
|
8
|
+
@service_id = json["service_id"]
|
9
|
+
@shape_id = json["shape_id"]
|
10
|
+
end
|
11
|
+
|
12
|
+
def trip_id
|
13
|
+
@trip_id
|
14
|
+
end
|
15
|
+
|
16
|
+
def trip_headsign
|
17
|
+
@trip_headsign
|
18
|
+
end
|
19
|
+
|
20
|
+
def route_id
|
21
|
+
@route_id
|
22
|
+
end
|
23
|
+
|
24
|
+
def block_id
|
25
|
+
@block_id
|
26
|
+
end
|
27
|
+
|
28
|
+
def direction
|
29
|
+
@direction
|
30
|
+
end
|
31
|
+
|
32
|
+
def service_id
|
33
|
+
@service_id
|
34
|
+
end
|
35
|
+
|
36
|
+
def shape_id
|
37
|
+
@shape_id
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
data/lib/vehicle.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
class Vehicle < CUMTD
|
2
|
+
def initialize(json)
|
3
|
+
@vehicle_id = json["vehicle_id"]
|
4
|
+
@trip = Trip.new(json["trip"])
|
5
|
+
@location = Hash[:lat, json["location"]["lat"], :lon, json["location"]["lon"]]
|
6
|
+
@previous_stop_id = json["previous_stop_id"]
|
7
|
+
@next_stop_id = json["next_stop_id"]
|
8
|
+
@origin_stop_id = json["origin_stop_id"]
|
9
|
+
@destination_stop_id = json["destination_stop_id"]
|
10
|
+
@last_updated = DateTime.parse(json["last_updated"]).to_time
|
11
|
+
end
|
12
|
+
|
13
|
+
def vehicle_id
|
14
|
+
@vehicle_id
|
15
|
+
end
|
16
|
+
|
17
|
+
def trip
|
18
|
+
@trip
|
19
|
+
end
|
20
|
+
|
21
|
+
def location
|
22
|
+
@location
|
23
|
+
end
|
24
|
+
|
25
|
+
def previous_stop_id
|
26
|
+
@previous_stop_id
|
27
|
+
end
|
28
|
+
|
29
|
+
def next_stop_id
|
30
|
+
@next_stop_id
|
31
|
+
end
|
32
|
+
|
33
|
+
def origin_stop_id
|
34
|
+
@origin_stop_id
|
35
|
+
end
|
36
|
+
|
37
|
+
def destination_stop_id
|
38
|
+
@destination_stop_id
|
39
|
+
end
|
40
|
+
|
41
|
+
def last_updated
|
42
|
+
@last_updated
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cumtd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Jackson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: An interface to CUMTD's API.
|
14
14
|
email: brett@brettjackson.org
|
@@ -17,7 +17,15 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/cumtd.rb
|
20
|
-
|
20
|
+
- lib/stop.rb
|
21
|
+
- lib/stop_point.rb
|
22
|
+
- lib/departure.rb
|
23
|
+
- lib/route.rb
|
24
|
+
- lib/trip.rb
|
25
|
+
- lib/stop_time.rb
|
26
|
+
- lib/vehicle.rb
|
27
|
+
- lib/shape.rb
|
28
|
+
homepage: http://github.com/bjackson/cumtd
|
21
29
|
licenses:
|
22
30
|
- MIT
|
23
31
|
metadata: {}
|