vatsim_online_redux 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07e8ebbfd89689a7ce2ca212b97a16b245a31fc2fe096d4ea21c43837ae09aca
4
- data.tar.gz: faad629bba96ca658d66458c92b81ca2c5159e2db10f4cd97adcdc2aff7d8c6f
3
+ metadata.gz: 4a78e86307bec08f8b4dd9dbb4fefbb7178201c182fd79a636fb08779d638efc
4
+ data.tar.gz: 6d4cb6b9b60b1214539bc3b34a84b19970199f9cb54721f097e4ca8e3e3924f3
5
5
  SHA512:
6
- metadata.gz: b56cff667609da28c95b453d165f726a4f651019b56c548fb06347299bb9f5091d30f8c1be74c3f0fbc5a20b5ab9f4c177fd1d344754e0d9966f34a468cd7d5e
7
- data.tar.gz: 7f7bb3c6f2d83e538c3d4ca5087af24abd955f507fa9edb5a1932ce3c896449aef759bce97ae6cc160af0808b96c25bc57686a2fbc130493e6cd18f78037b935
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
@@ -1,3 +1,3 @@
1
1
  module VatsimOnline
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -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/tarakanbg/vatsim_online"
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.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/tarakanbg/vatsim_online
135
+ homepage: https://github.com/aldent95/vatsim_online_redux
136
136
  licenses:
137
137
  - MIT
138
138
  metadata: {}