spektrum-log 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spektrum/log/file.rb +1 -3
- data/lib/spektrum/log/version.rb +1 -1
- data/spec/file_spec.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b27ea4e4e0b71ec0ba1395c8d05ce04af0baaad
|
4
|
+
data.tar.gz: 784d8e0e1f26c9d3555e702d3a2d226d65847c1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c3dd04459dc87fe770a8384304c68e693a9d59522d17fe3032edda33b1bc91ade4dd3f6899c71e03df82a7d06fc2b1c68b14b063e7d35740d0c5517505f21da
|
7
|
+
data.tar.gz: 3a38cb895d757d3bd04ca82f64d1f5e32c02b260e07f5ecb4ba4490fd58b53b131de5dcd0b8d4325545da6d8c2cc5abe33a15fbe10a500835adca74af55ca7fe
|
data/lib/spektrum/log/file.rb
CHANGED
@@ -7,9 +7,7 @@ module Spektrum
|
|
7
7
|
|
8
8
|
attr_reader :records, :flights
|
9
9
|
|
10
|
-
# Determines if the file at the given URI is a Spektrum telemetry log file.
|
11
|
-
# to read the file, simply using #new should be preferred in favor of this, catching any
|
12
|
-
# errors that may be raised.
|
10
|
+
# Determines if the file at the given URI is a Spektrum telemetry log file.
|
13
11
|
#
|
14
12
|
# @param uri URI to file to read
|
15
13
|
# @return [Spektrum::Log::File] loaded file if the file is a Spektrum log file, nil otherwise
|
data/lib/spektrum/log/version.rb
CHANGED
data/spec/file_spec.rb
CHANGED
@@ -143,6 +143,14 @@ describe Spektrum::Log::File do
|
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
146
|
+
it 'should return a file object when valid' do
|
147
|
+
expect(Spektrum::Log::File.spektrum?(data_files[0])).to be_a(Spektrum::Log::File)
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'should return nil when invalid' do
|
151
|
+
expect(Spektrum::Log::File.spektrum?(invalid_data_files[0])).to be_nil
|
152
|
+
end
|
153
|
+
|
146
154
|
end
|
147
155
|
|
148
156
|
describe '#to_kml' do
|