vatsim_online_redux 1.0.0 → 1.0.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/vatsim_online/data_downloader.rb +0 -7
- data/lib/vatsim_online/version.rb +1 -1
- data/vatsim_online_redux.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a78e86307bec08f8b4dd9dbb4fefbb7178201c182fd79a636fb08779d638efc
|
4
|
+
data.tar.gz: 6d4cb6b9b60b1214539bc3b34a84b19970199f9cb54721f097e4ca8e3e3924f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ecc57d54538a812f72ad152e9ef690b61ccf8be8c689997550d5c15d913c9b23e855b21ec746a0a0bc5732f92ba564b6f44d8110e55110564ee3c9a26f6717c
|
7
|
+
data.tar.gz: 83652fe1c4c98c5ca26a182e41b6e79583e4b0e5db8b95a57b51cf9759ecf3518db9cb172d0667018c3fcb4af6e11efd048c33accfbe3c66f971581f65b74ce9
|
@@ -24,9 +24,6 @@ require 'fileutils'
|
|
24
24
|
request = Net::HTTP::Get.new(uri.path)
|
25
25
|
data = http.request(request).body.gsub("\n", '')
|
26
26
|
create_status_backup if File.exists?(LOCAL_STATUS)
|
27
|
-
status = Tempfile.new('vatsim_status')
|
28
|
-
status.close
|
29
|
-
File.rename status.path, LOCAL_STATUS
|
30
27
|
File.write(LOCAL_STATUS, data)
|
31
28
|
File.chmod(0777, LOCAL_STATUS)
|
32
29
|
dummy_status if data.include? "<html><head>"
|
@@ -72,9 +69,6 @@ require 'fileutils'
|
|
72
69
|
request = Net::HTTP::Get.new(uri.path)
|
73
70
|
req_data = http.request(request).body
|
74
71
|
create_data_backup if File.exists?(LOCAL_DATA)
|
75
|
-
data = Tempfile.new('vatsim_data', :encoding => 'utf-8')
|
76
|
-
data.close
|
77
|
-
File.rename data.path, LOCAL_DATA
|
78
72
|
data = req_data.gsub(/["]/, '\s').encode!('UTF-16', 'UTF-8', :invalid => :replace, :replace => '').encode!('UTF-8', 'UTF-16')
|
79
73
|
data = data.slice(0..(data.index('!PREFILE:')))
|
80
74
|
File.open(LOCAL_DATA, "w+") {|f| f.write(data)}
|
@@ -97,7 +91,6 @@ require 'fileutils'
|
|
97
91
|
def read_local_datafile
|
98
92
|
data = File.open(LOCAL_DATA)
|
99
93
|
difference = Time.diff(data.ctime, Time.now)[:minute]
|
100
|
-
difference > 2 ? create_local_data_file : data.read
|
101
94
|
if difference > 2
|
102
95
|
d = create_local_data_file
|
103
96
|
else
|
data/vatsim_online_redux.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["alex@flightleveltech.co.nz"]
|
7
7
|
gem.description = %q{Updated version of original gem by Svilen Vassilev. Selectively pulls and parses Vatsim online stations data. Essentially it's a 'who's online' library, capable of displaying online ATC and/or pilots for given airports, areas or globally. Stations are returned as objects, exposing a rich set of attributes. Vatsim data is pulled on preset intervals and cached locally to avoid flooding the servers.}
|
8
8
|
gem.summary = %q{Updated version of original gem by Svilen Vassilev. Selectively pulls and parses Vatsim online stations data. Essentially it's a 'who's online' library, capable of displaying online ATC and/or pilots for given airports, areas or globally. Stations are returned as objects, exposing a rich set of attributes. Vatsim data is pulled on preset intervals and cached locally to avoid flooding the servers.}
|
9
|
-
gem.homepage = "https://github.com/
|
9
|
+
gem.homepage = "https://github.com/aldent95/vatsim_online_redux"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vatsim_online_redux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svilen Vassilev
|
@@ -132,7 +132,7 @@ files:
|
|
132
132
|
- spec/vatsim_online_spec.rb
|
133
133
|
- spec/vatsim_online_spec_helper.rb
|
134
134
|
- vatsim_online_redux.gemspec
|
135
|
-
homepage: https://github.com/
|
135
|
+
homepage: https://github.com/aldent95/vatsim_online_redux
|
136
136
|
licenses:
|
137
137
|
- MIT
|
138
138
|
metadata: {}
|