hrt_bus 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +14 -4
- data/README.md +5 -5
- data/hrt_bus.gemspec +3 -3
- data/lib/hrt_bus/bus.rb +30 -2
- data/lib/hrt_bus/parse.rb +4 -1
- data/lib/hrt_bus/version.rb +1 -1
- data/spec/helpers/parse_methods_spec.rb +13 -0
- data/spec/models/bus_methods_spec.rb +18 -2
- data/vcr_cassettes/HrtBus_Bus/all.yml +347 -0
- metadata +7 -4
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,17 @@
|
|
1
|
-
|
1
|
+
> 0.0.1
|
2
2
|
|
3
|
-
|
3
|
+
* Inital release
|
4
4
|
|
5
|
-
|
5
|
+
> 0.0.2
|
6
6
|
|
7
|
-
|
7
|
+
* README
|
8
|
+
|
9
|
+
> 0.0.3
|
10
|
+
|
11
|
+
* Validation for bus.id
|
12
|
+
* Spec cleanup
|
13
|
+
|
14
|
+
> 0.0.4
|
15
|
+
|
16
|
+
* Added HrtBus#Bus.all
|
17
|
+
* Fix empty CSV row, improper time format - bschoenfeld
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Ruby gem for public HRT bus location data
|
|
8
8
|
|
9
9
|
### A collection of HRT buses as Ruby ActiveModel objects
|
10
10
|
|
11
|
-
ruby-1.9.2-p180 :001 > HrtBus::Bus.
|
11
|
+
ruby-1.9.2-p180 :001 > HrtBus::Bus.all
|
12
12
|
|
13
13
|
[
|
14
14
|
[0] #<HrtBus::Bus:0x101841ac8
|
@@ -32,7 +32,7 @@ Ruby gem for public HRT bus location data
|
|
32
32
|
|
33
33
|
### A collection of HRT buses as JSON
|
34
34
|
|
35
|
-
ruby-1.9.2-p180 :001 > HrtBus::Bus.
|
35
|
+
ruby-1.9.2-p180 :001 > HrtBus::Bus.all.to_json
|
36
36
|
|
37
37
|
[
|
38
38
|
{
|
@@ -58,17 +58,17 @@ Ruby gem for public HRT bus location data
|
|
58
58
|
|
59
59
|
### Buses from a specific route
|
60
60
|
|
61
|
-
HrtBus::Bus.
|
61
|
+
HrtBus::Bus.all.select { |bus| bus.route_id == "105" }
|
62
62
|
|
63
63
|
### Generate a static Google Map for a bus
|
64
64
|
|
65
|
-
HrtBus::Bus.
|
65
|
+
HrtBus::Bus.all.select { |bus| bus.route_id == "105" }.first.static_map
|
66
66
|
|
67
67
|
![map](http://github.com/bds/hrt_bus/raw/master/examples/map.png)
|
68
68
|
|
69
69
|
### Determine if a bus is valid
|
70
70
|
|
71
|
-
HrtBus::Bus.
|
71
|
+
HrtBus::Bus.all.last.valid?
|
72
72
|
|
73
73
|
## Contributing to hrt_bus
|
74
74
|
|
data/hrt_bus.gemspec
CHANGED
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = HrtBus::VERSION
|
8
8
|
s.authors = ["Brian Douglas Smith"]
|
9
9
|
s.email = ["m.b1205@gmail.com"]
|
10
|
-
s.homepage = ""
|
11
|
-
s.summary = %q{Ruby gem for public HRT bus location data}
|
12
|
-
s.description = %q{Ruby gem for public HRT bus location data}
|
10
|
+
s.homepage = "https://github.com/bds/hrt_bus"
|
11
|
+
s.summary = %q{Ruby gem for real-time public HRT bus location data}
|
12
|
+
s.description = %q{Ruby gem for real-time public HRT bus location data}
|
13
13
|
|
14
14
|
s.rubyforge_project = "hrt_bus"
|
15
15
|
|
data/lib/hrt_bus/bus.rb
CHANGED
@@ -53,7 +53,7 @@ module HrtBus
|
|
53
53
|
raise curl.response_code
|
54
54
|
end
|
55
55
|
|
56
|
-
parsed = ::CSV.new(curl.body_str, { :headers => true })
|
56
|
+
parsed = ::CSV.new(curl.body_str, { :headers => true, :skip_blanks => true })
|
57
57
|
|
58
58
|
parsed.each do |row|
|
59
59
|
time, date, id, lat_lon, valid, route_id = row[0],
|
@@ -63,7 +63,7 @@ module HrtBus
|
|
63
63
|
row[4],
|
64
64
|
row[7]
|
65
65
|
|
66
|
-
time
|
66
|
+
time = HrtBus::Parse.time(time, date)
|
67
67
|
lat, lon = HrtBus::Parse.geo(lat_lon)
|
68
68
|
|
69
69
|
bus = new(:id => id, :time => time, :route_id => route_id, :lat => lat, :lon => lon)
|
@@ -73,6 +73,34 @@ module HrtBus
|
|
73
73
|
buses
|
74
74
|
end
|
75
75
|
|
76
|
+
def self.all
|
77
|
+
buses = []
|
78
|
+
curl = ::Curl::Easy.perform(HrtBus::Config.buses_uri) do |c|
|
79
|
+
c.follow_location = true
|
80
|
+
end
|
81
|
+
|
82
|
+
unless curl.response_code == 226
|
83
|
+
raise curl.response_code
|
84
|
+
end
|
85
|
+
|
86
|
+
parsed = ::CSV.new(curl.body_str, { :headers => true, :skip_blanks => true })
|
87
|
+
|
88
|
+
parsed.each do |row|
|
89
|
+
time, date, id, lat_lon, valid, route_id = row[0],
|
90
|
+
row[1],
|
91
|
+
row[2],
|
92
|
+
row[3],
|
93
|
+
row[4],
|
94
|
+
row[7]
|
95
|
+
|
96
|
+
time = HrtBus::Parse.time(time, date)
|
97
|
+
lat, lon = HrtBus::Parse.geo(lat_lon)
|
98
|
+
|
99
|
+
buses << new(:id => id, :time => time, :route_id => route_id, :lat => lat, :lon => lon)
|
100
|
+
end
|
101
|
+
buses
|
102
|
+
end
|
103
|
+
|
76
104
|
end
|
77
105
|
|
78
106
|
end
|
data/lib/hrt_bus/parse.rb
CHANGED
data/lib/hrt_bus/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'factories/bus'
|
3
|
+
|
4
|
+
describe HrtBus::Bus do
|
5
|
+
describe "time" do
|
6
|
+
let(:parsed_time) { HrtBus::Parse.time("01:35:26", "03/03") }
|
7
|
+
|
8
|
+
it "should parse the time correctly" do
|
9
|
+
parsed_time.should be_a_kind_of(DateTime)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'factories/bus'
|
3
|
-
require 'tempfile'
|
4
3
|
|
5
4
|
describe HrtBus::Bus do
|
6
5
|
|
@@ -10,8 +9,9 @@ describe HrtBus::Bus do
|
|
10
9
|
context "when the server responds with 226" do
|
11
10
|
let(:buses) { HrtBus::Bus.active_buses }
|
12
11
|
|
13
|
-
it "should return a collection of buses" do
|
12
|
+
it "should return a collection of valid buses" do
|
14
13
|
buses.should be_a_kind_of(Enumerable)
|
14
|
+
buses.each { |bus| bus.should be_valid }
|
15
15
|
buses.first.should be_a_kind_of(HrtBus::Bus)
|
16
16
|
end
|
17
17
|
|
@@ -19,6 +19,22 @@ describe HrtBus::Bus do
|
|
19
19
|
|
20
20
|
end
|
21
21
|
|
22
|
+
describe "all" do
|
23
|
+
use_vcr_cassette
|
24
|
+
|
25
|
+
context "when the server responds with 226" do
|
26
|
+
let(:buses) { HrtBus::Bus.all }
|
27
|
+
|
28
|
+
it "should return a collection of all buses" do
|
29
|
+
buses.should be_a_kind_of(Enumerable)
|
30
|
+
buses.count.should > 200
|
31
|
+
buses.first.should be_a_kind_of(HrtBus::Bus)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
22
38
|
describe "static_map" do
|
23
39
|
use_vcr_cassette
|
24
40
|
let(:bus) { Factory.build(:bus) }
|
@@ -0,0 +1,347 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://ftp//216.54.15.3/Anrd/hrtrtf.txt
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers: {}
|
10
|
+
|
11
|
+
response:
|
12
|
+
status:
|
13
|
+
code: 226
|
14
|
+
message:
|
15
|
+
headers:
|
16
|
+
220 microsoft ftp service:
|
17
|
+
- ""
|
18
|
+
331 anonymous access allowed, send identity (e-Mail name) as password.:
|
19
|
+
- ""
|
20
|
+
230-Hampton roads transit:
|
21
|
+
- ""
|
22
|
+
230 anonymous user logged in.:
|
23
|
+
- ""
|
24
|
+
257 "/" is current directory.:
|
25
|
+
- ""
|
26
|
+
250 cwd command successful.:
|
27
|
+
- ""
|
28
|
+
500 'epsv':
|
29
|
+
- command not understood
|
30
|
+
227 entering passive mode (216,54,15,3,18,76).:
|
31
|
+
- ""
|
32
|
+
200 type set to i.:
|
33
|
+
- ""
|
34
|
+
213 14813:
|
35
|
+
- ""
|
36
|
+
125 data connection already open; transfer starting.:
|
37
|
+
- ""
|
38
|
+
226 transfer complete.:
|
39
|
+
- ""
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: |
|
43
|
+
Time,Date,Vehicle,Lat/Lon,Location Valid/Invalid,Adherence,Adherence Valid/Invalid[,Route,Direction,Stop]
|
44
|
+
08:07:57,03/03,1303,368218672/-764215519,V,0,V
|
45
|
+
08:07:57,03/03,null,368641223/-762811801,V,0,I
|
46
|
+
08:07:57,03/03,4027,368610524/-760270888,V,-1,V,29,2,5738
|
47
|
+
08:07:58,03/03,1210,370267907/-763629715,V,1,V
|
48
|
+
08:07:58,03/03,1222,370310713/-763467786,V,0,V
|
49
|
+
08:07:59,03/03,1219,371092932/-764972207,V,-2,V
|
50
|
+
08:07:59,03/03,2045,368722170/-762747028,V,0,V
|
51
|
+
08:08:00,03/03,2023,368955657/-762240539,V,-2,V
|
52
|
+
08:08:00,03/03,4027,368588368/-760263497,V,0,V
|
53
|
+
08:08:00,03/03,2037,369838814/-764345219,V,0,I
|
54
|
+
08:08:00,03/03,4011,368712264/-762959979,V,-1,V,16,1,9146
|
55
|
+
08:08:00,03/03,1202,369901232/-764194589,V,3,V
|
56
|
+
08:08:01,03/03,1247,367918952/-762602270,V,0,V
|
57
|
+
08:08:01,03/03,1249,368580283/-762866771,V,0,I
|
58
|
+
08:08:01,03/03,2031,369933277/-763972321,V,5,V
|
59
|
+
08:08:02,03/03,1233,368641825/-762826159,V,0,I
|
60
|
+
08:08:02,03/03,1801,367871592/-762565257,V,14,V
|
61
|
+
08:08:02,03/03,1500,368812910/-762901635,V,0,V
|
62
|
+
08:08:03,03/03,null,368593891/-762846608,V,0,I
|
63
|
+
08:08:04,03/03,1906,371469589/-765123136,V,0,V
|
64
|
+
08:08:05,03/03,2017,369083397/-762755714,V,-2,V
|
65
|
+
08:08:06,03/03,2000,368589072/-762061433,V,0,V,15,2,914
|
66
|
+
08:08:07,03/03,2026,368581349/-762868117,V,-3,V
|
67
|
+
08:08:07,03/03,2003,368468849/-761303174,V,5,V
|
68
|
+
08:08:07,03/03,2042,369429579/-762598913,V,0,V
|
69
|
+
08:08:08,03/03,2041,369431779/-763121611,V,0,V
|
70
|
+
08:08:08,03/03,5004,367959271/-761639065,V,4,V
|
71
|
+
08:08:08,03/03,4011,368721804/-762956880,I,-1,V
|
72
|
+
08:08:08,03/03,1501,368110991/-763637164,V,0,V
|
73
|
+
08:08:08,03/03,2049,370400060/-763827105,V,1,V
|
74
|
+
08:08:09,03/03,2000,368586626/-762059078,V,0,V
|
75
|
+
08:08:09,03/03,1220,370314987/-763459100,V,2,V,102,2,2047
|
76
|
+
08:08:10,03/03,4022,369671905/-762919013,V,0,V
|
77
|
+
08:08:10,03/03,2036,369863903/-764278057,V,0,V
|
78
|
+
08:08:10,03/03,1704,367868131/-762562243,V,2,V
|
79
|
+
08:08:10,03/03,2033,370429006/-764003782,V,-3,V
|
80
|
+
08:08:12,03/03,1220,370315578/-763464497,V,2,V
|
81
|
+
08:08:13,03/03,4008,368350911/-763147984,V,0,V
|
82
|
+
08:08:14,03/03,1715,369456954/-762692534,V,-2,V
|
83
|
+
08:08:15,03/03,2019,368925651/-759890312,V,0,V
|
84
|
+
08:08:15,03/03,4032,368049495/-760894959,V,0,V
|
85
|
+
08:08:15,03/03,4014,368573620/-763039030,V,0,I
|
86
|
+
08:08:16,03/03,4034,368474000/-759858364,V,1,V
|
87
|
+
08:08:16,03/03,4002,367616098/-762761495,V,-2,V
|
88
|
+
08:08:17,03/03,2021,368446692/-761544080,V,0,V
|
89
|
+
08:08:17,03/03,1907,370224007/-764386604,V,-4,V
|
90
|
+
08:08:17,03/03,1241,368542199/-762747492,V,2,V
|
91
|
+
08:08:17,03/03,1415,368227696/-763021498,V,0,V
|
92
|
+
08:08:18,03/03,2020,368381054/-762101224,V,0,V
|
93
|
+
08:08:18,03/03,2006,368590344/-762845422,V,2,V
|
94
|
+
08:08:18,03/03,1230,368520650/-762594151,V,-5,V
|
95
|
+
08:08:18,03/03,1211,370383651/-763143836,V,-7,V
|
96
|
+
08:08:18,03/03,2039,370198774/-764443149,V,-1,V
|
97
|
+
08:08:19,03/03,940,368477518/-763295314,V,3,V
|
98
|
+
08:08:20,03/03,1909,369836946/-764347626,V,6,V
|
99
|
+
08:08:21,03/03,1221,370426909/-762933343,V,7,V
|
100
|
+
08:08:21,03/03,1259,369152765/-762208941,V,2,V
|
101
|
+
08:08:23,03/03,2038,370129343/-763646841,V,0,I
|
102
|
+
08:08:23,03/03,1227,368603230/-762867682,V,-1,V
|
103
|
+
08:08:24,03/03,4028,367637464/-760152423,V,4,V
|
104
|
+
08:08:25,03/03,3008,368437938/-762773648,V,0,I
|
105
|
+
08:08:25,03/03,1238,368505999/-762501796,V,0,I
|
106
|
+
08:08:25,03/03,1700,368601626/-762852080,V,0,I
|
107
|
+
08:08:25,03/03,2050,370741927/-763508638,V,2,V
|
108
|
+
08:08:26,03/03,1905,369838057/-764348376,V,6,V
|
109
|
+
08:08:27,03/03,5008,368089631/-761988340,V,1,V
|
110
|
+
08:08:27,03/03,2008,368639751/-762820212,V,0,I
|
111
|
+
08:08:27,03/03,1802,368686974/-762677586,V,-11,V,8,1,527
|
112
|
+
08:08:27,03/03,2025,368224877/-763063908,V,1,V
|
113
|
+
08:08:28,03/03,4006,368107736/-763590084,V,-1,V
|
114
|
+
08:08:29,03/03,2010,369425115/-763060820,V,0,V
|
115
|
+
08:08:30,03/03,1802,368692835/-762672767,V,-11,V
|
116
|
+
08:08:30,03/03,1215,370322253/-764398636,V,-1,V
|
117
|
+
08:08:31,03/03,1710,368596269/-762845296,V,0,V,23,1,3222
|
118
|
+
08:08:31,03/03,4022,369671430/-762942195,V,0,V,5,1,1014
|
119
|
+
08:08:32,03/03,1217,370078763/-764306109,V,-2,V
|
120
|
+
08:08:33,03/03,1710,368597180/-762845777,V,0,V
|
121
|
+
08:08:33,03/03,4013,368414194/-763078215,V,-1,V
|
122
|
+
08:08:33,03/03,1714,368489022/-762104118,V,2,V
|
123
|
+
08:08:33,03/03,4005,368790301/-763021469,V,-4,V
|
124
|
+
08:08:34,03/03,1908,370304032/-763466927,V,0,V
|
125
|
+
08:08:34,03/03,4002,367618975/-762757061,V,-2,V,58,1,1850
|
126
|
+
08:08:35,03/03,1900,370142206/-763651007,V,0,I
|
127
|
+
08:08:35,03/03,1255,368194557/-761200139,V,-5,V
|
128
|
+
08:08:35,03/03,4022,369671384/-762944899,V,0,V
|
129
|
+
08:08:36,03/03,2019,368930893/-759895056,V,0,V,20,1,1268
|
130
|
+
08:08:36,03/03,2034,370614942/-764672831,V,1,V
|
131
|
+
08:08:37,03/03,1711,368546078/-762062212,V,6,V
|
132
|
+
08:08:37,03/03,1810,367873580/-762567263,V,0,V
|
133
|
+
08:08:37,03/03,1208,370126908/-763649884,V,3,V
|
134
|
+
08:08:37,03/03,5003,368542978/-762854796,V,-4,V
|
135
|
+
08:08:37,03/03,1209,370428215/-762934076,V,-4,V
|
136
|
+
08:08:38,03/03,1902,369835427/-764354536,V,0,V
|
137
|
+
08:08:38,03/03,3033,368424788/-760384998,V,-2,V
|
138
|
+
08:08:38,03/03,1803,369487568/-762432858,V,-5,V
|
139
|
+
08:08:38,03/03,1805,368620660/-762852544,V,0,I
|
140
|
+
08:08:38,03/03,2019,368927324/-759894019,V,0,V
|
141
|
+
08:08:39,03/03,1705,368608839/-763008331,V,1,V
|
142
|
+
08:08:39,03/03,2007,368488381/-762885730,V,2,V
|
143
|
+
08:08:39,03/03,4029,368408132/-760591991,V,0,V
|
144
|
+
08:08:40,03/03,1905,369838057/-764348376,V,0,I
|
145
|
+
08:08:40,03/03,1226,367734598/-763052632,V,-2,V
|
146
|
+
08:08:40,03/03,1217,370082298/-764308533,V,-2,V,104,1,2421
|
147
|
+
08:08:42,03/03,1205,371101853/-764946309,V,0,I
|
148
|
+
08:08:42,03/03,1904,369831818/-764357143,V,0,I
|
149
|
+
08:08:42,03/03,1217,370086417/-764311340,V,-2,V
|
150
|
+
08:08:43,03/03,2027,368598383/-762845789,V,3,V
|
151
|
+
08:08:43,03/03,4030,368580243/-761765156,V,-1,V
|
152
|
+
08:08:43,03/03,3027,370301781/-763628936,V,0,I
|
153
|
+
08:08:44,03/03,2024,369177861/-762725789,V,-2,V,15,2,39
|
154
|
+
08:08:44,03/03,1214,369862918/-764240139,V,0,V
|
155
|
+
08:08:46,03/03,2047,370624677/-764851989,V,1,V
|
156
|
+
08:08:46,03/03,2043,369162735/-762879261,V,-1,V
|
157
|
+
08:08:46,03/03,4002,367629861/-762748054,V,-2,V
|
158
|
+
08:08:47,03/03,2024,369176492/-762725061,V,-2,V
|
159
|
+
08:08:49,03/03,1263,368638851/-762815468,V,0,I
|
160
|
+
08:08:49,03/03,2018,367912810/-762337713,V,1,V
|
161
|
+
08:08:49,03/03,5005,368898429/-762403167,V,1,V
|
162
|
+
08:08:49,03/03,1216,371683732/-765620876,V,-3,V
|
163
|
+
08:08:50,03/03,2029,370313206/-764104359,V,0,V
|
164
|
+
08:08:51,03/03,4024,368633912/-762817531,V,0,I
|
165
|
+
08:08:51,03/03,1604,368543688/-762662139,V,10,V
|
166
|
+
08:08:51,03/03,2014,368595530/-762844391,V,0,V
|
167
|
+
08:08:52,03/03,2030,371056252/-765076073,V,-3,V
|
168
|
+
08:08:52,03/03,2022,369343996/-762101196,V,-2,V
|
169
|
+
08:08:52,03/03,3007,368527691/-762856280,V,-7,V
|
170
|
+
08:08:53,03/03,1901,370623502/-764849743,V,1,V
|
171
|
+
08:08:53,03/03,1707,368412727/-761893143,V,-2,V
|
172
|
+
08:08:53,03/03,1218,370307109/-763469012,V,0,V
|
173
|
+
08:08:54,03/03,1506,368065435/-763300843,V,1,V
|
174
|
+
08:08:54,03/03,4015,368404654/-763563562,V,3,V
|
175
|
+
08:08:54,03/03,4033,368264182/-759759265,V,-2,V
|
176
|
+
08:08:55,03/03,2002,368470132/-761299651,V,0,V
|
177
|
+
08:08:55,03/03,1702,368497113/-762485582,V,0,V
|
178
|
+
08:08:55,03/03,1610,370188622/-764294954,V,-1,V
|
179
|
+
08:08:56,03/03,2025,368191795/-763062539,V,1,V,45,1,1646
|
180
|
+
08:08:56,03/03,2048,370133429/-763644423,V,0,I
|
181
|
+
08:08:57,03/03,3025,368596653/-762870088,V,0,I
|
182
|
+
08:08:57,03/03,1303,368218672/-764215519,V,0,V
|
183
|
+
08:08:57,03/03,null,368641223/-762811801,V,0,I
|
184
|
+
08:08:57,03/03,1253,368593433/-762844563,V,0,V
|
185
|
+
08:08:58,03/03,1210,370280954/-763628925,V,1,V
|
186
|
+
08:08:58,03/03,1222,370310713/-763467786,V,0,V
|
187
|
+
08:08:58,03/03,2025,368188896/-763063095,V,1,V
|
188
|
+
08:08:58,03/03,1715,369451849/-762728607,V,-2,V,3,1,3774
|
189
|
+
08:08:59,03/03,1219,371027300/-764927287,V,-2,V
|
190
|
+
08:08:59,03/03,2045,368713295/-762774473,V,0,V
|
191
|
+
08:09:00,03/03,2037,369837209/-764350387,V,0,I
|
192
|
+
08:09:00,03/03,1202,369901214/-764194652,V,2,V
|
193
|
+
08:09:01,03/03,1247,367830602/-762586050,V,1,V
|
194
|
+
08:09:01,03/03,1715,369452147/-762729822,V,-3,V
|
195
|
+
08:09:01,03/03,4027,368540360/-760236063,V,1,V
|
196
|
+
08:09:01,03/03,2031,369933277/-763972321,V,4,V
|
197
|
+
08:09:01,03/03,1249,368566899/-762862960,V,0,I
|
198
|
+
08:09:02,03/03,1233,368641825/-762826159,V,0,I
|
199
|
+
08:09:02,03/03,1801,367871592/-762565257,V,13,V
|
200
|
+
08:09:02,03/03,1500,368783781/-762904649,V,1,V
|
201
|
+
08:09:03,03/03,null,368593891/-762846608,V,0,I
|
202
|
+
08:09:04,03/03,1906,371486400/-765054908,V,1,V
|
203
|
+
08:09:05,03/03,2036,369841232/-764344108,V,0,V,112,2,2000
|
204
|
+
08:09:05,03/03,2017,369021638/-762782414,V,-1,V
|
205
|
+
08:09:07,03/03,2026,368605270/-762866054,V,-3,V
|
206
|
+
08:09:07,03/03,2030,371048935/-765064986,V,-3,V,106,2,2743
|
207
|
+
08:09:07,03/03,2003,368468849/-761303174,V,4,V
|
208
|
+
08:09:07,03/03,2042,369499439/-762543468,V,0,V
|
209
|
+
08:09:08,03/03,2041,369431779/-763121611,V,0,V
|
210
|
+
08:09:08,03/03,2036,369839822/-764345695,V,0,V
|
211
|
+
08:09:09,03/03,5004,367972014/-761743229,V,6,V
|
212
|
+
08:09:09,03/03,4011,368755660/-762948411,V,-1,V
|
213
|
+
08:09:09,03/03,1501,368110991/-763637164,V,-1,V
|
214
|
+
08:09:10,03/03,2033,370462071/-763949197,V,-2,V
|
215
|
+
08:09:10,03/03,2030,371043990/-765059761,V,-3,V
|
216
|
+
08:09:10,03/03,1704,367868131/-762562243,V,1,V
|
217
|
+
08:09:10,03/03,2000,368562997/-762035649,V,1,V
|
218
|
+
08:09:12,03/03,1711,368532126/-762035174,V,7,V,23,1,916
|
219
|
+
08:09:12,03/03,1301,368920162/-762976595,V,-5,V
|
220
|
+
08:09:12,03/03,1205,371101229/-764969692,V,0,I
|
221
|
+
08:09:13,03/03,4008,368349020/-763226216,V,1,V
|
222
|
+
08:09:14,03/03,1711,368526706/-762033323,V,6,V
|
223
|
+
08:09:15,03/03,4032,368122965/-760959411,V,1,V
|
224
|
+
08:09:15,03/03,4014,368560516/-763029026,V,0,I
|
225
|
+
08:09:16,03/03,4034,368488232/-759776334,V,0,V
|
226
|
+
08:09:16,03/03,2021,368435537/-761464731,V,1,V
|
227
|
+
08:09:17,03/03,1907,370201691/-764443992,V,-3,V
|
228
|
+
08:09:17,03/03,1241,368504790/-762763879,V,2,V
|
229
|
+
08:09:17,03/03,1205,371100885/-764973393,V,-12,V
|
230
|
+
08:09:17,03/03,2020,368372466/-762102101,V,0,V
|
231
|
+
08:09:17,03/03,1415,368247355/-763032808,V,0,V
|
232
|
+
08:09:18,03/03,2006,368590344/-762845422,V,1,V
|
233
|
+
08:09:18,03/03,1230,368520799/-762591367,V,-6,V
|
234
|
+
08:09:18,03/03,1211,370382579/-763144088,V,-8,V
|
235
|
+
08:09:18,03/03,2039,370198666/-764443499,V,-2,V
|
236
|
+
08:09:19,03/03,940,368393379/-763293446,V,4,V
|
237
|
+
08:09:19,03/03,2049,370421294/-763887770,V,1,V
|
238
|
+
08:09:19,03/03,1205,371100919/-764973674,V,-12,V
|
239
|
+
08:09:20,03/03,1909,369836946/-764347626,V,5,V
|
240
|
+
08:09:21,03/03,1221,370426909/-762933343,V,6,V
|
241
|
+
08:09:21,03/03,1809,367186179/-763029714,V,1,V
|
242
|
+
08:09:23,03/03,2038,370129343/-763646841,V,0,I
|
243
|
+
08:09:23,03/03,1220,370305539/-763468686,V,1,V
|
244
|
+
08:09:24,03/03,1227,368600325/-762843887,V,-2,V
|
245
|
+
08:09:25,03/03,3008,368437938/-762773648,V,0,I
|
246
|
+
08:09:25,03/03,1238,368531330/-762468828,V,0,I
|
247
|
+
08:09:25,03/03,4028,367704408/-760119071,V,4,V
|
248
|
+
08:09:25,03/03,2050,370744958/-763506340,V,2,V
|
249
|
+
08:09:26,03/03,1214,369880966/-764243531,V,0,V,103,2,2304
|
250
|
+
08:09:26,03/03,1700,368586414/-762846998,V,-25,V,18,2,3222
|
251
|
+
08:09:26,03/03,1707,368412154/-761890519,V,-3,V,20,2,5741
|
252
|
+
08:09:27,03/03,2008,368639751/-762820212,V,0,I
|
253
|
+
08:09:27,03/03,4006,368063561/-763556188,V,0,V
|
254
|
+
08:09:28,03/03,5008,368047914/-761905233,V,1,V
|
255
|
+
08:09:28,03/03,1214,369882748/-764238964,V,0,V
|
256
|
+
08:09:28,03/03,1700,368588448/-762846425,V,0,V
|
257
|
+
08:09:28,03/03,1707,368414292/-761886703,V,-3,V
|
258
|
+
08:09:29,03/03,5004,367979743/-761745584,V,6,V,12,2,9173
|
259
|
+
08:09:29,03/03,2010,369454009/-763057594,V,0,V
|
260
|
+
08:09:29,03/03,1501,368110991/-763637164,V,0,I
|
261
|
+
08:09:30,03/03,1215,370257674/-764366728,V,0,V
|
262
|
+
08:09:31,03/03,1802,368740723/-762648164,V,-10,V
|
263
|
+
08:09:31,03/03,5004,367985788/-761742965,V,6,V
|
264
|
+
08:09:33,03/03,4013,368413650/-763101947,V,-2,V
|
265
|
+
08:09:33,03/03,1714,368489022/-762104118,V,1,V
|
266
|
+
08:09:33,03/03,4005,368750360/-763018874,V,-4,V
|
267
|
+
08:09:34,03/03,1908,370304032/-763466927,V,0,V
|
268
|
+
08:09:35,03/03,1900,370139874/-763648486,I,0,I
|
269
|
+
08:09:35,03/03,1210,370299793/-763628638,V,1,V,110,1,2838
|
270
|
+
08:09:35,03/03,1255,368200945/-761210183,V,-6,V
|
271
|
+
08:09:36,03/03,2034,370588454/-764656651,V,0,V
|
272
|
+
08:09:37,03/03,1810,367873580/-762567263,V,0,V
|
273
|
+
08:09:37,03/03,5003,368479890/-762847846,V,-2,V
|
274
|
+
08:09:37,03/03,1208,370126908/-763649884,V,2,V
|
275
|
+
08:09:37,03/03,1210,370300727/-763628604,V,1,V
|
276
|
+
08:09:37,03/03,1209,370428215/-762934076,V,-5,V
|
277
|
+
08:09:38,03/03,1902,369835427/-764354536,V,0,V
|
278
|
+
08:09:38,03/03,3033,368389786/-760544246,V,-2,V
|
279
|
+
08:09:38,03/03,1803,369424433/-762459008,V,-4,V
|
280
|
+
08:09:38,03/03,1805,368620660/-762852544,V,0,I
|
281
|
+
08:09:39,03/03,1705,368616574/-763026070,V,0,V
|
282
|
+
08:09:39,03/03,2007,368490214/-762883209,V,1,V
|
283
|
+
08:09:39,03/03,2019,368925868/-759893773,V,0,V
|
284
|
+
08:09:40,03/03,1905,369838057/-764348376,V,0,I
|
285
|
+
08:09:40,03/03,1226,367739789/-763026162,V,-2,V
|
286
|
+
08:09:40,03/03,4029,368415380/-760489271,V,0,V
|
287
|
+
08:09:42,03/03,1904,369831818/-764357143,V,0,I
|
288
|
+
08:09:43,03/03,2027,368598383/-762845789,V,2,V
|
289
|
+
08:09:43,03/03,3027,370288288/-763586474,V,0,I
|
290
|
+
08:09:44,03/03,1217,370140642/-764345002,V,-1,V
|
291
|
+
08:09:44,03/03,2034,370582839/-764653167,V,0,V,112,2,3272
|
292
|
+
08:09:46,03/03,2047,370624677/-764851989,V,0,V
|
293
|
+
08:09:46,03/03,4022,369669562/-762943719,V,0,V
|
294
|
+
08:09:46,03/03,2043,369161904/-762945420,V,-1,V
|
295
|
+
08:09:46,03/03,1255,368204125/-761215311,V,-6,V,36,2,1435
|
296
|
+
08:09:47,03/03,2034,370580296/-764651620,V,0,V
|
297
|
+
08:09:47,03/03,2001,368097629/-763521444,V,0,V
|
298
|
+
08:09:48,03/03,2024,369163365/-762685550,V,-2,V
|
299
|
+
08:09:49,03/03,2018,367903316/-762373821,V,1,V
|
300
|
+
08:09:49,03/03,5005,368898429/-762403167,V,0,V
|
301
|
+
08:09:49,03/03,1255,368207511/-761220663,V,-5,V
|
302
|
+
08:09:49,03/03,1216,371633186/-765571882,V,-3,V
|
303
|
+
08:09:50,03/03,2042,369530958/-762517318,V,0,V,1,1,53
|
304
|
+
08:09:50,03/03,2029,370318712/-764059749,V,0,V
|
305
|
+
08:09:51,03/03,4024,368633912/-762817531,V,0,I
|
306
|
+
08:09:51,03/03,1604,368543688/-762662139,V,9,V
|
307
|
+
08:09:52,03/03,2022,369353318/-762137149,V,-2,V
|
308
|
+
08:09:52,03/03,2042,369532814/-762517364,V,0,V
|
309
|
+
08:09:52,03/03,3007,368464987/-762859316,V,-7,V
|
310
|
+
08:09:52,03/03,2014,368595530/-762844391,V,0,V
|
311
|
+
08:09:53,03/03,4030,368546244/-761777486,V,-1,V
|
312
|
+
08:09:53,03/03,1901,370620552/-764847228,V,0,V
|
313
|
+
08:09:53,03/03,1218,370307109/-763469012,V,0,V
|
314
|
+
08:09:54,03/03,1506,368097876/-763286199,V,2,V
|
315
|
+
08:09:54,03/03,4015,368375646/-763505974,V,3,V
|
316
|
+
08:09:54,03/03,4033,368190683/-759843501,V,-1,V
|
317
|
+
08:09:55,03/03,2002,368470132/-761299651,V,0,V
|
318
|
+
08:09:55,03/03,4001,368488937/-762909450,V,0,I
|
319
|
+
08:09:55,03/03,1610,370163984/-764329474,V,-1,V
|
320
|
+
08:09:56,03/03,2048,370135228/-763647105,V,0,I
|
321
|
+
08:09:57,03/03,3025,368628263/-762857626,V,0,I
|
322
|
+
08:09:57,03/03,null,368641223/-762811801,V,0,I
|
323
|
+
08:09:57,03/03,1253,368594493/-762844964,V,0,V
|
324
|
+
08:09:58,03/03,1222,370310713/-763467786,V,0,V
|
325
|
+
08:09:59,03/03,1219,370938217/-764872243,V,-1,V
|
326
|
+
08:09:59,03/03,4027,368502991/-760221671,V,2,V,29,2,1085
|
327
|
+
08:09:59,03/03,1901,370618420/-764845795,V,0,V,106,1,5713
|
328
|
+
08:09:59,03/03,2045,368713209/-762819267,V,0,V
|
329
|
+
08:10:00,03/03,2023,369042689/-762304235,V,-2,V
|
330
|
+
08:10:00,03/03,2025,368194431/-763140581,V,2,V
|
331
|
+
08:10:00,03/03,2037,369837209/-764350387,V,0,I
|
332
|
+
08:10:00,03/03,1202,369903214/-764209159,V,1,V
|
333
|
+
08:10:01,03/03,1247,367851458/-762550979,V,1,V
|
334
|
+
08:10:01,03/03,2031,369933277/-763972321,V,3,V
|
335
|
+
08:10:01,03/03,1249,368541345/-762854910,V,0,I
|
336
|
+
08:10:02,03/03,1233,368641825/-762826159,V,0,I
|
337
|
+
08:10:02,03/03,1901,370615406/-764842793,V,0,V
|
338
|
+
08:10:02,03/03,1500,368781403/-762886841,V,0,V
|
339
|
+
08:10:03,03/03,null,368593891/-762846608,V,0,I
|
340
|
+
08:10:04,03/03,1906,371500741/-765048233,V,0,V
|
341
|
+
08:10:05,03/03,2017,368980397/-762799098,V,-1,V
|
342
|
+
08:10:07,03/03,2026,368588024/-762846385,V,-3,V
|
343
|
+
|
344
|
+
|
345
|
+
http_version:
|
346
|
+
recorded_at: Sat, 03 Mar 2012 13:10:49 GMT
|
347
|
+
recorded_with: VCR 2.0.0.rc2
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: hrt_bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brian Douglas Smith
|
@@ -144,7 +144,7 @@ dependencies:
|
|
144
144
|
version: "0"
|
145
145
|
type: :development
|
146
146
|
version_requirements: *id012
|
147
|
-
description: Ruby gem for public HRT bus location data
|
147
|
+
description: Ruby gem for real-time public HRT bus location data
|
148
148
|
email:
|
149
149
|
- m.b1205@gmail.com
|
150
150
|
executables: []
|
@@ -169,14 +169,16 @@ files:
|
|
169
169
|
- lib/hrt_bus/parse.rb
|
170
170
|
- lib/hrt_bus/version.rb
|
171
171
|
- spec/factories/bus.rb
|
172
|
+
- spec/helpers/parse_methods_spec.rb
|
172
173
|
- spec/models/bus_attributes_spec.rb
|
173
174
|
- spec/models/bus_methods_spec.rb
|
174
175
|
- spec/models/bus_validations_spec.rb
|
175
176
|
- spec/spec_helper.rb
|
176
177
|
- spec/support/vcr_setup.rb
|
177
178
|
- vcr_cassettes/HrtBus_Bus/active_buses.yml
|
179
|
+
- vcr_cassettes/HrtBus_Bus/all.yml
|
178
180
|
- vcr_cassettes/HrtBus_Bus/static_map.yml
|
179
|
-
homepage:
|
181
|
+
homepage: https://github.com/bds/hrt_bus
|
180
182
|
licenses: []
|
181
183
|
|
182
184
|
post_install_message:
|
@@ -202,9 +204,10 @@ rubyforge_project: hrt_bus
|
|
202
204
|
rubygems_version: 1.8.17
|
203
205
|
signing_key:
|
204
206
|
specification_version: 3
|
205
|
-
summary: Ruby gem for public HRT bus location data
|
207
|
+
summary: Ruby gem for real-time public HRT bus location data
|
206
208
|
test_files:
|
207
209
|
- spec/factories/bus.rb
|
210
|
+
- spec/helpers/parse_methods_spec.rb
|
208
211
|
- spec/models/bus_attributes_spec.rb
|
209
212
|
- spec/models/bus_methods_spec.rb
|
210
213
|
- spec/models/bus_validations_spec.rb
|