vatsim_online 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/lib/vatsim_online/station_parser.rb +4 -1
- data/lib/vatsim_online/version.rb +1 -1
- data/spec/station_parser_spec.rb +2 -0
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -305,6 +305,10 @@ the same result.
|
|
305
305
|
|
306
306
|
## Changelog
|
307
307
|
|
308
|
+
### v. 0.6.1 - 08 October 2012
|
309
|
+
|
310
|
+
* Fixed pilot station duplication issue when using multiple ICAOs
|
311
|
+
|
308
312
|
### v. 0.6.0 - 08 October 2012
|
309
313
|
|
310
314
|
* The `vatsim_online` method now also supports a comma-separated list of full or
|
@@ -52,7 +52,10 @@ module VatsimTools
|
|
52
52
|
atc = []; pilots = []; arrivals = []; departures = []
|
53
53
|
station_objects.each {|sobj| sobj.role == "ATC" ? atc << sobj : pilots << sobj}
|
54
54
|
for icao in @icao
|
55
|
-
|
55
|
+
for pilot in pilots
|
56
|
+
departures << pilot if pilot.origin[0...icao.length] == icao
|
57
|
+
arrivals << pilot if pilot.destination[0...icao.length] == icao
|
58
|
+
end
|
56
59
|
end
|
57
60
|
atc.delete_if {|a| @excluded && a.callsign[0...@excluded.length] == @excluded }
|
58
61
|
{:atc => atc, :pilots => pilots, :arrivals => arrivals, :departures => departures}
|
data/spec/station_parser_spec.rb
CHANGED
@@ -151,6 +151,8 @@ describe VatsimTools::StationParser do
|
|
151
151
|
target.new(icao).sorted_station_objects[:atc].size.should eq(4)
|
152
152
|
icao = "LO , LB"
|
153
153
|
target.new(icao).sorted_station_objects[:pilots].size.should eq(14)
|
154
|
+
target.new(icao).sorted_station_objects[:arrivals].size.should eq(7)
|
155
|
+
target.new(icao).sorted_station_objects[:departures].size.should eq(7)
|
154
156
|
target.new(icao).sorted_station_objects[:atc].size.should eq(4)
|
155
157
|
end
|
156
158
|
|