vatsim_online_redux 2.1.1 → 2.1.2

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: c66083b4e7cce58e2f54c7582452157ff5ef8ea741b77a07b18cccc5b21a0e21
4
- data.tar.gz: 1513cda20bf54348b56821c50d18de0b9f389f58fe31f7875a3572f0a7bd9124
3
+ metadata.gz: bd68ccf12195db00f19d4d0b1dc2b63f37398a91acc7b31ec39431509a824eb6
4
+ data.tar.gz: d8b59e279987e9556a46461673c51edf822b74f9babf07fa5b09f5e981a2bd78
5
5
  SHA512:
6
- metadata.gz: 6597071f1292ef8a6e2f0ae6b05e285fa7fde6df224f6d88868798d24014ee2e7b1e964a95bdb8c3eadae11215473882e6b4eb0af8af35e4f14b921368f09614
7
- data.tar.gz: 15fb29033a50d6a5f71e48588551454c7d4fdd0f2a76c18dfae6e232f654f8cd048154038bf89628a516e89c7a2ceae39b687b8f86be75eabe9e6b8ad8a9be8e
6
+ metadata.gz: 2d0623b2c5eec7131dc915da80541b89c9a3b289d4a7e7560353dd1d15b2765bfca31ebfdb87c2512293463131a89d4a4cd84a1f9168546e7d2977e7d21fc183
7
+ data.tar.gz: 111171a1440fa950db5d79a5a2dfd0076cf50ed7bd2eb4fcd3a765bf6b19e475c1c5df29ce7046ce168953c6d9952d06bbac804b5fe6a0a3d91d1e2c042d5c73
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Changelog
4
4
 
5
+ ### v. 2.1.2 - 2 June 2023
6
+
7
+ * Fixed a bug preventing gem from working with Ruby 3.2
8
+
5
9
  ### v. 2.1.1 - 16 Mar 2022
6
10
 
7
11
  * Fixing a bug with the time diff on the status and data files
@@ -24,7 +24,7 @@ require 'fileutils'
24
24
  request = Net::HTTP::Get.new(uri.path)
25
25
  http.use_ssl = (uri.scheme == 'https')
26
26
  data = http.request(request).body.gsub("\n", '')
27
- create_status_backup if File.exists?(LOCAL_STATUS)
27
+ create_status_backup if File.exist?(LOCAL_STATUS)
28
28
  File.write(LOCAL_STATUS, data)
29
29
  File.chmod(0777, LOCAL_STATUS)
30
30
  dummy_status if data.include? "<html><head>"
@@ -55,7 +55,7 @@ require 'fileutils'
55
55
  end
56
56
 
57
57
  def status_file
58
- File.exists?(LOCAL_STATUS) ? read_status_tempfile : create_status_tempfile
58
+ File.exist?(LOCAL_STATUS) ? read_status_tempfile : create_status_tempfile
59
59
  LOCAL_STATUS
60
60
  end
61
61
 
@@ -71,7 +71,7 @@ require 'fileutils'
71
71
  request = Net::HTTP::Get.new(uri.path)
72
72
  http.use_ssl = (uri.scheme == 'https')
73
73
  req_data = http.request(request).body
74
- create_data_backup if File.exists?(LOCAL_DATA)
74
+ create_data_backup if File.exist?(LOCAL_DATA)
75
75
  File.open(LOCAL_DATA, "w+") {|f| f.write(req_data.force_encoding('UTF-8'))}
76
76
  File.chmod(0777, LOCAL_DATA)
77
77
  gem_data_file if req_data.include? "<html><head>"
@@ -105,7 +105,7 @@ require 'fileutils'
105
105
  end
106
106
 
107
107
  def data_file
108
- File.exists?(LOCAL_DATA) ? read_local_datafile : create_local_data_file
108
+ File.exist?(LOCAL_DATA) ? read_local_datafile : create_local_data_file
109
109
  LOCAL_DATA
110
110
  end
111
111
 
@@ -1,3 +1,3 @@
1
1
  module VatsimOnline
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.2"
3
3
  end
@@ -17,9 +17,9 @@ describe VatsimTools::DataDownloader do
17
17
  describe "create_status_tempfile" do
18
18
  it "should create a file" do
19
19
  delete_local_files
20
- File.exists?(LOCAL_STATUS).should be false
20
+ File.exist?(LOCAL_STATUS).should be false
21
21
  target.new.create_status_tempfile
22
- File.exists?(LOCAL_STATUS).should be true
22
+ File.exist?(LOCAL_STATUS).should be true
23
23
  status = File.open(LOCAL_STATUS)
24
24
  status.path.should eq("#{Dir.tmpdir}/vatsim_online/vatsim_status.json")
25
25
  status.size.should be > 100
@@ -30,7 +30,7 @@ describe VatsimTools::DataDownloader do
30
30
  describe "read_status_tempfile" do
31
31
  it "should confirm a file exists" do
32
32
  target.new.read_status_tempfile
33
- File.exists?(LOCAL_STATUS).should be true
33
+ File.exist?(LOCAL_STATUS).should be true
34
34
  status = File.open(LOCAL_STATUS)
35
35
  status.size.should be > 100
36
36
  status.close
@@ -40,18 +40,18 @@ describe VatsimTools::DataDownloader do
40
40
  describe "status_file" do
41
41
  it "should return status.txt path" do
42
42
  delete_local_files
43
- File.exists?(LOCAL_STATUS).should be false
43
+ File.exist?(LOCAL_STATUS).should be false
44
44
  target.new.status_file.class.should eq(String)
45
45
  target.new.status_file.should include("vatsim_status.json")
46
46
  target.new.status_file.should eq(LOCAL_STATUS)
47
47
  target.new.status_file.should eq("#{Dir.tmpdir}/vatsim_online/vatsim_status.json")
48
- File.exists?(LOCAL_STATUS).should be true
48
+ File.exist?(LOCAL_STATUS).should be true
49
49
  end
50
50
  end
51
51
 
52
52
  describe "servers" do
53
53
  it "should contain an array of server URLs" do
54
- File.exists?(LOCAL_STATUS).should be true
54
+ File.exist?(LOCAL_STATUS).should be true
55
55
  target.new.servers.class.should eq(Array)
56
56
  target.new.servers.size.should eq(1)
57
57
  end
@@ -60,9 +60,9 @@ describe VatsimTools::DataDownloader do
60
60
  describe "create_local_data_file" do
61
61
  it "should confirm a file exists" do
62
62
  delete_local_files
63
- File.exists?(LOCAL_DATA).should be false
63
+ File.exist?(LOCAL_DATA).should be false
64
64
  target.new.create_local_data_file
65
- File.exists?(LOCAL_DATA).should be true
65
+ File.exist?(LOCAL_DATA).should be true
66
66
  data = File.open(LOCAL_DATA)
67
67
  data.path.should eq("#{Dir.tmpdir}/vatsim_online/vatsim_data.json")
68
68
  data.size.should be > 100
@@ -73,7 +73,7 @@ describe VatsimTools::DataDownloader do
73
73
  describe "read_local_datafile" do
74
74
  it "should confirm a file exists" do
75
75
  target.new.read_local_datafile
76
- File.exists?(LOCAL_DATA).should be true
76
+ File.exist?(LOCAL_DATA).should be true
77
77
  data = File.open(LOCAL_DATA)
78
78
  data.size.should be > 100
79
79
  data.close
@@ -83,23 +83,23 @@ describe VatsimTools::DataDownloader do
83
83
  describe "data_file" do
84
84
  it "should contain file path" do
85
85
  delete_local_files
86
- File.exists?(LOCAL_DATA).should be false
86
+ File.exist?(LOCAL_DATA).should be false
87
87
  target.new.data_file.class.should eq(String)
88
88
  target.new.data_file.should include("vatsim_data.json")
89
89
  target.new.data_file.should eq(LOCAL_DATA)
90
90
  target.new.data_file.should eq("#{Dir.tmpdir}/vatsim_online/vatsim_data.json")
91
- File.exists?(LOCAL_DATA).should be true
91
+ File.exist?(LOCAL_DATA).should be true
92
92
  end
93
93
  end
94
94
 
95
95
  describe "new" do
96
96
  it "should return" do
97
97
  delete_local_files
98
- File.exists?(LOCAL_DATA).should be false
99
- File.exists?(LOCAL_STATUS).should be false
98
+ File.exist?(LOCAL_DATA).should be false
99
+ File.exist?(LOCAL_STATUS).should be false
100
100
  target.new
101
- File.exists?(LOCAL_DATA).should be true
102
- File.exists?(LOCAL_STATUS).should be true
101
+ File.exist?(LOCAL_DATA).should be true
102
+ File.exist?(LOCAL_STATUS).should be true
103
103
  data = File.open(LOCAL_DATA)
104
104
  status = File.open(LOCAL_DATA)
105
105
  data.size.should be > 100
@@ -1,10 +1,10 @@
1
1
  def delete_local_files
2
2
  local_Status = "#{Dir.tmpdir}/vatsim_online/vatsim_status.json"
3
3
  lOCAL_DATA = "#{Dir.tmpdir}/vatsim_online/vatsim_data.json"
4
- if File.exists?(local_Status)
4
+ if File.exist?(local_Status)
5
5
  File.delete(local_Status)
6
6
  end
7
- if File.exists?(lOCAL_DATA)
7
+ if File.exist?(lOCAL_DATA)
8
8
  File.delete(lOCAL_DATA)
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vatsim_online_redux
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svilen Vassilev
8
8
  - Alex Dent
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-15 00:00:00.000000000 Z
12
+ date: 2023-06-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -151,7 +151,7 @@ homepage: https://github.com/aldent95/vatsim_online_redux
151
151
  licenses:
152
152
  - MIT
153
153
  metadata: {}
154
- post_install_message:
154
+ post_install_message:
155
155
  rdoc_options: []
156
156
  require_paths:
157
157
  - lib
@@ -166,8 +166,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubygems_version: 3.1.2
170
- signing_key:
169
+ rubygems_version: 3.4.12
170
+ signing_key:
171
171
  specification_version: 4
172
172
  summary: Updated version of original gem by Svilen Vassilev. Selectively pulls and
173
173
  parses Vatsim online stations data. Essentially it's a 'who's online' library, capable