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.
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Changelog
4
4
 
5
+ ### v. 0.6.1 - 08 October 2012
6
+
7
+ * Fixed pilot station duplication issue when using multiple ICAOs
8
+
5
9
  ### v. 0.6.0 - 08 October 2012
6
10
 
7
11
  * The `vatsim_online` method now also supports a comma-separated list of full or
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
- pilots.each {|p| p.origin[0...icao.length] == icao ? departures << p : arrivals << p }
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}
@@ -1,3 +1,3 @@
1
1
  module VatsimOnline
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vatsim_online
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: