vatsim 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vatsim/airport.rb +1 -1
- data/lib/vatsim/data.rb +5 -5
- data/lib/vatsim/version.rb +2 -1
- metadata +4 -4
data/lib/vatsim/airport.rb
CHANGED
@@ -33,7 +33,7 @@ module Vatsim
|
|
33
33
|
def self.airport_cache
|
34
34
|
if @@airport_cache.nil?
|
35
35
|
@@airport_cache ||= Hash.new
|
36
|
-
Zlib::GzipReader.open(File.dirname(__FILE__) + "/airports.gz").
|
36
|
+
Zlib::GzipReader.open(File.dirname(__FILE__) + "/airports.gz").read.split("\n").each { |line|
|
37
37
|
airport = Airport.new(line)
|
38
38
|
@@airport_cache.store(airport.icao, airport)
|
39
39
|
}
|
data/lib/vatsim/data.rb
CHANGED
@@ -8,11 +8,11 @@ module Vatsim
|
|
8
8
|
|
9
9
|
attr_reader :pilots, :atc, :prefiles, :general, :servers, :voice_servers
|
10
10
|
|
11
|
-
STATUS_URL = "http://status.vatsim.net/status.txt"
|
12
|
-
STATUS_DOWNLOAD_INTERVAL = 60*60*6 # 6 hours
|
13
|
-
DATA_DOWNLOAD_INTERVAL = 60*2 # 2 minutes
|
14
|
-
STATUS_FILE_PATH = Dir::tmpdir + "/vatsim-status.txt"
|
15
|
-
DATA_FILE_PATH = Dir::tmpdir + "/vatsim-data.txt"
|
11
|
+
STATUS_URL = "http://status.vatsim.net/status.txt" # URL for downloading the Vatsim status file
|
12
|
+
STATUS_DOWNLOAD_INTERVAL = 60*60*6 # Download status file maximum of once every 6 hours
|
13
|
+
DATA_DOWNLOAD_INTERVAL = 60*2 # Download data file maximum of once every 2 minutes
|
14
|
+
STATUS_FILE_PATH = Dir::tmpdir + "/vatsim-status.txt" # Temporary location to store the Vatsim status file
|
15
|
+
DATA_FILE_PATH = Dir::tmpdir + "/vatsim-data.txt" # Temporary location to store the Vatsim data file
|
16
16
|
|
17
17
|
def initialize
|
18
18
|
@pilots = Array.new
|
data/lib/vatsim/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vatsim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
segments:
|
120
120
|
- 0
|
121
|
-
hash: -
|
121
|
+
hash: -173515344446614869
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
none: false
|
124
124
|
requirements:
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash: -
|
130
|
+
hash: -173515344446614869
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
133
|
rubygems_version: 1.8.24
|