eagletree-log 0.0.14 → 0.1.0

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
  SHA1:
3
- metadata.gz: 09f24125242cd8cb79a7eaceb2132195135583eb
4
- data.tar.gz: f86149ece57a737e655f75fef77fdb2ea3c2f7ee
3
+ metadata.gz: d74a8ca1e2c22ea2bca99fbba550e82cc3cc29a4
4
+ data.tar.gz: bbd72ab047a601ae00f532312b4be37f73d01a6e
5
5
  SHA512:
6
- metadata.gz: 524147f89960ecd2b5954f6d85bf48ea345d7ccc35a12cdce07894b80ee9b2a70968990109249e1e7f431c7bd253812b7992a37cf9b214eb7dc5f90ddcac6ea7
7
- data.tar.gz: e1ec42a32bf0a110e5e2d20b5390909fe6ecfb9341034137c4b5eb71b51205a4e2820b7ffc7040279249465436f1169fca6132827ee8fbb0a4acb6729dca1055
6
+ metadata.gz: c69c4a594cf33c68c59004f28bce7b64d1f4a4b0fc0c726446064a1544eaf3668622842442995899c4a2621de48f2f5275ad6b7c6c04072803944a2a36351aec
7
+ data.tar.gz: bf4a4bfddbff477a7c5e2198e4d5c021feeb961ffd105c57445b39647b327764ac6eaebcbf6c71cb8c3229df9661879acda8d90c97ec7305b6fdd9db92e5dad8
@@ -19,14 +19,12 @@ module EagleTree
19
19
  # @return [FixNum] Version of the data recorder software
20
20
  attr_reader :version
21
21
 
22
- # Determines if the file at the given URI is a EagleTree log file. If one intends
23
- # to read the file, simply using #new should be preferred in favor of this, catching any
24
- # errors that may be raised.
22
+ # Determines if the file at the given URI is a EagleTree log file.
25
23
  #
26
24
  # @param uri URI to file to read
27
- # @return [Boolean] true if the file is a EagleTree log file, false otherwise
25
+ # @return [EagleTree::Log::File] loaded file if the file is an Eagle Tree log file, nil otherwise
28
26
  def self.eagle_tree? uri
29
- !!File.new(uri) rescue false
27
+ File.new(uri) rescue nil
30
28
  end
31
29
 
32
30
  def initialize uri
@@ -1,5 +1,5 @@
1
1
  module EagleTree
2
2
  module Log
3
- VERSION = '0.0.14'
3
+ VERSION = '0.1.0'
4
4
  end
5
5
  end
data/spec/file_spec.rb CHANGED
@@ -6,7 +6,9 @@ describe EagleTree::Log::File do
6
6
 
7
7
  context 'data file empty.fdr' do
8
8
 
9
- subject { EagleTree::Log::File.new(data_file('empty.fdr')) }
9
+ before(:all) { @file = empty_fdr }
10
+
11
+ subject { @file }
10
12
 
11
13
  it { should have(0).sessions }
12
14
 
@@ -20,7 +22,9 @@ describe EagleTree::Log::File do
20
22
 
21
23
  context 'data file funjet-gps.fdr' do
22
24
 
23
- subject { EagleTree::Log::File.new(data_file('funjet-gps.fdr')) }
25
+ before(:all) { @file = funjet_fdr }
26
+
27
+ subject { @file }
24
28
 
25
29
  it { should have(1).sessions }
26
30
 
@@ -36,7 +40,9 @@ describe EagleTree::Log::File do
36
40
 
37
41
  context 'data file multi-session-1.fdr' do
38
42
 
39
- subject { EagleTree::Log::File.new(data_file('multi-session-1.fdr')) }
43
+ before(:all) { @file = multi_1_fdr }
44
+
45
+ subject { @file }
40
46
 
41
47
  it { should have(3).sessions }
42
48
 
@@ -52,7 +58,9 @@ describe EagleTree::Log::File do
52
58
 
53
59
  context 'data file multi-session-2.fdr' do
54
60
 
55
- subject { EagleTree::Log::File.new(data_file('multi-session-2.fdr')) }
61
+ before(:all) { @file = multi_2_fdr }
62
+
63
+ subject { @file }
56
64
 
57
65
  it { should have(3).sessions }
58
66
 
@@ -66,7 +74,9 @@ describe EagleTree::Log::File do
66
74
 
67
75
  context 'data file t600-1.fdr' do
68
76
 
69
- subject { EagleTree::Log::File.new(data_file('t600-1.fdr')) }
77
+ before(:all) { @file = t600_1_fdr }
78
+
79
+ subject { @file }
70
80
 
71
81
  it { should have(1).sessions }
72
82
 
@@ -80,7 +90,9 @@ describe EagleTree::Log::File do
80
90
 
81
91
  context 'data file t600-2.fdr' do
82
92
 
83
- subject { EagleTree::Log::File.new(data_file('t600-2.fdr')) }
93
+ before(:all) { @file = t600_2_fdr }
94
+
95
+ subject { @file }
84
96
 
85
97
  it { should have(1).sessions }
86
98
 
@@ -110,7 +122,7 @@ describe EagleTree::Log::File do
110
122
  files.should have(17).files
111
123
 
112
124
  files.each do |f|
113
- EagleTree::Log::File.eagle_tree?(f).should be_false
125
+ expect(EagleTree::Log::File.eagle_tree?(f)).to be_false
114
126
  end
115
127
  end
116
128
 
@@ -119,17 +131,27 @@ describe EagleTree::Log::File do
119
131
  files.should have(9).files
120
132
 
121
133
  files.each do |f|
122
- EagleTree::Log::File.eagle_tree?(f).should be_true
134
+ expect(EagleTree::Log::File.eagle_tree?(f)).to be_true
123
135
  end
124
136
  end
125
137
 
138
+ it 'should return a file object' do
139
+ expect(EagleTree::Log::File.eagle_tree?(data_files[0])).to be_a(EagleTree::Log::File)
140
+ end
141
+
142
+ it 'should return nil when invalid' do
143
+ expect(EagleTree::Log::File.eagle_tree?(invalid_data_files[0])).to be_nil
144
+ end
145
+
126
146
  end
127
147
 
128
148
  describe '#to_kml' do
129
149
 
130
150
  context 'with file with GPS data' do
131
151
 
132
- subject { EagleTree::Log::File.new(data_file('funjet-gps.fdr')) }
152
+ before(:all) { @file = funjet_fdr }
153
+
154
+ subject { @file }
133
155
 
134
156
  its(:to_kml?) { should be_true }
135
157
 
@@ -139,7 +161,9 @@ describe EagleTree::Log::File do
139
161
 
140
162
  context 'with file without GPS data' do
141
163
 
142
- subject { EagleTree::Log::File.new(data_file('multi-session-1.fdr')) }
164
+ before(:all) { @file = multi_1_fdr }
165
+
166
+ subject { @file }
143
167
 
144
168
  its(:to_kml?) { should be_false }
145
169
 
@@ -155,20 +179,24 @@ describe EagleTree::Log::File do
155
179
 
156
180
  context 'with file with GPS data' do
157
181
 
158
- subject { EagleTree::Log::File.new(data_file('funjet-gps.fdr')) }
182
+ before(:all) { @file = funjet_fdr }
183
+
184
+ subject { @file }
159
185
 
160
186
  its(:to_kml_file) { should be_a(KMLFile) }
161
187
 
162
188
  it 'should take options for file and placemark' do
163
189
  kml = subject.to_kml_file({ :name => 'File Name' })
164
- kml.objects[0].name.should eql('File Name')
190
+ expect(kml.objects[0].name).to eql('File Name')
165
191
  end
166
192
 
167
193
  end
168
194
 
169
195
  context 'with file without GPS data' do
170
196
 
171
- subject { EagleTree::Log::File.new(data_file('multi-session-1.fdr')) }
197
+ before(:all) { @file = multi_1_fdr }
198
+
199
+ subject { @file }
172
200
 
173
201
  it 'should raise w/o kml data' do
174
202
  expect { subject.to_kml_file }.to raise_error
data/spec/session_spec.rb CHANGED
@@ -4,15 +4,15 @@ describe EagleTree::Log::Session do
4
4
 
5
5
  context 'data file funjet-gps.fdr' do
6
6
 
7
- let(:file) { EagleTree::Log::File.new(data_file('funjet-gps.fdr')) }
7
+ before(:all) { @file = funjet_fdr }
8
8
 
9
- subject { file }
9
+ subject { @file }
10
10
 
11
11
  it { should have(1).sessions }
12
12
 
13
13
  context 'session 1' do
14
14
 
15
- subject { file.sessions[0] }
15
+ subject { @file.sessions[0] }
16
16
 
17
17
  it { should have(2929).rows }
18
18
 
@@ -21,88 +21,88 @@ describe EagleTree::Log::Session do
21
21
  its(:milliseconds?) { should be_true }
22
22
 
23
23
  it 'should have a few select milliseconds' do
24
- subject.milliseconds[0].should eql(0)
25
- subject.milliseconds[125].should eql(31250)
26
- subject.milliseconds[250].should eql(62500)
27
- subject.milliseconds[2230].should eql(557500)
24
+ expect(subject.milliseconds[0]).to eql(0)
25
+ expect(subject.milliseconds[125]).to eql(31250)
26
+ expect(subject.milliseconds[250]).to eql(62500)
27
+ expect(subject.milliseconds[2230]).to eql(557500)
28
28
  end
29
29
 
30
30
  its(:latitudes?) { should be_true }
31
31
 
32
32
  it 'should have a few select latitudes' do
33
- subject.latitudes[0].should be_within(0.0001).of(49.0775)
34
- subject.latitudes[1242].should be_within(0.0001).of(49.0793)
35
- subject.latitudes[1666].should be_within(0.0001).of(49.0750)
36
- subject.latitudes[2077].should be_within(0.0001).of(49.0771)
33
+ expect(subject.latitudes[0]).to be_within(0.0001).of(49.0775)
34
+ expect(subject.latitudes[1242]).to be_within(0.0001).of(49.0793)
35
+ expect(subject.latitudes[1666]).to be_within(0.0001).of(49.0750)
36
+ expect(subject.latitudes[2077]).to be_within(0.0001).of(49.0771)
37
37
  end
38
38
 
39
39
  its(:longitudes?) { should be_true }
40
40
 
41
41
  it 'should have a few select longitudes' do
42
- subject.longitudes[0].should be_within(0.0001).of(2.1545)
43
- subject.longitudes[1356].should be_within(0.0001).of(2.1530)
44
- subject.longitudes[1727].should be_within(0.0001).of(2.1560)
45
- subject.longitudes[2317].should be_within(0.0001).of(2.1519)
42
+ expect(subject.longitudes[0]).to be_within(0.0001).of(2.1545)
43
+ expect(subject.longitudes[1356]).to be_within(0.0001).of(2.1530)
44
+ expect(subject.longitudes[1727]).to be_within(0.0001).of(2.1560)
45
+ expect(subject.longitudes[2317]).to be_within(0.0001).of(2.1519)
46
46
  end
47
47
 
48
48
  its(:gps_altitudes?) { should be_true }
49
49
 
50
50
  it 'should have a few select gps_altitudes' do
51
- subject.gps_altitudes[864].should be_within(0.1).of(75.0)
52
- subject.gps_altitudes[1566].should be_within(0.1).of(208.0)
53
- subject.gps_altitudes[1879].should be_within(0.1).of(99.0)
54
- subject.gps_altitudes[2317].should be_within(0.1).of(168.0)
51
+ expect(subject.gps_altitudes[864]).to be_within(0.1).of(75.0)
52
+ expect(subject.gps_altitudes[1566]).to be_within(0.1).of(208.0)
53
+ expect(subject.gps_altitudes[1879]).to be_within(0.1).of(99.0)
54
+ expect(subject.gps_altitudes[2317]).to be_within(0.1).of(168.0)
55
55
  end
56
56
 
57
57
  its(:coords) { should be_true }
58
58
 
59
59
  it 'should have a few select coords' do
60
- subject.coords[0][0].should be_within(0.0001).of(2.1545)
61
- subject.coords[0][1].should be_within(0.0001).of(49.0775)
62
- subject.coords[0][2].should be_within(0.1).of(102.0)
63
- subject.coords[0][3].should be_within(0.1).of(0.0)
64
- subject.coords[500][0].should be_within(0.0001).of(2.1545)
65
- subject.coords[500][1].should be_within(0.0001).of(49.0775)
66
- subject.coords[500][2].should be_within(0.1).of(75.0)
67
- subject.coords[500][3].should be_within(0.1).of(175.7)
68
- subject.coords[1500][0].should be_within(0.0001).of(2.1531)
69
- subject.coords[1500][1].should be_within(0.0001).of(49.0780)
70
- subject.coords[1500][2].should be_within(0.1).of(121.0)
71
- subject.coords[1500][3].should be_within(0.1).of(35.1)
72
- subject.coords[2500][0].should be_within(0.0001).of(2.1542)
73
- subject.coords[2500][1].should be_within(0.0001).of(49.0778)
74
- subject.coords[2500][2].should be_within(0.1).of(89.0)
75
- subject.coords[2500][3].should be_within(0.1).of(8.6)
60
+ expect(subject.coords[0][0]).to be_within(0.0001).of(2.1545)
61
+ expect(subject.coords[0][1]).to be_within(0.0001).of(49.0775)
62
+ expect(subject.coords[0][2]).to be_within(0.1).of(102.0)
63
+ expect(subject.coords[0][3]).to be_within(0.1).of(0.0)
64
+ expect(subject.coords[500][0]).to be_within(0.0001).of(2.1545)
65
+ expect(subject.coords[500][1]).to be_within(0.0001).of(49.0775)
66
+ expect(subject.coords[500][2]).to be_within(0.1).of(75.0)
67
+ expect(subject.coords[500][3]).to be_within(0.1).of(175.7)
68
+ expect(subject.coords[1500][0]).to be_within(0.0001).of(2.1531)
69
+ expect(subject.coords[1500][1]).to be_within(0.0001).of(49.0780)
70
+ expect(subject.coords[1500][2]).to be_within(0.1).of(121.0)
71
+ expect(subject.coords[1500][3]).to be_within(0.1).of(35.1)
72
+ expect(subject.coords[2500][0]).to be_within(0.0001).of(2.1542)
73
+ expect(subject.coords[2500][1]).to be_within(0.0001).of(49.0778)
74
+ expect(subject.coords[2500][2]).to be_within(0.1).of(89.0)
75
+ expect(subject.coords[2500][3]).to be_within(0.1).of(8.6)
76
76
  end
77
77
 
78
78
  its(:gps_speeds?) { should be_true }
79
79
 
80
80
  it 'should have a few select speeds' do
81
- subject.gps_speeds[0].should be_within(0.1).of(0.0)
82
- subject.gps_speeds[864].should be_within(0.1).of(0.7)
83
- subject.gps_speeds[1566].should be_within(0.1).of(194.6)
84
- subject.gps_speeds[1879].should be_within(0.1).of(180.6)
85
- subject.gps_speeds[2317].should be_within(0.1).of(126.7)
81
+ expect(subject.gps_speeds[0]).to be_within(0.1).of(0.0)
82
+ expect(subject.gps_speeds[864]).to be_within(0.1).of(0.7)
83
+ expect(subject.gps_speeds[1566]).to be_within(0.1).of(194.6)
84
+ expect(subject.gps_speeds[1879]).to be_within(0.1).of(180.6)
85
+ expect(subject.gps_speeds[2317]).to be_within(0.1).of(126.7)
86
86
  end
87
87
 
88
88
  its(:gps_courses?) { should be_true }
89
89
 
90
90
  it 'should have a few select courses' do
91
- subject.gps_courses[0].should be_within(0.1).of(0.0)
92
- subject.gps_courses[864].should be_within(0.1).of(291.6)
93
- subject.gps_courses[1566].should be_within(0.1).of(197.6)
94
- subject.gps_courses[1879].should be_within(0.1).of(189.1)
95
- subject.gps_courses[2317].should be_within(0.1).of(266.1)
91
+ expect(subject.gps_courses[0]).to be_within(0.1).of(0.0)
92
+ expect(subject.gps_courses[864]).to be_within(0.1).of(291.6)
93
+ expect(subject.gps_courses[1566]).to be_within(0.1).of(197.6)
94
+ expect(subject.gps_courses[1879]).to be_within(0.1).of(189.1)
95
+ expect(subject.gps_courses[2317]).to be_within(0.1).of(266.1)
96
96
  end
97
97
 
98
98
  its(:gps_satellites?) { should be_true }
99
99
 
100
100
  it 'should have a few select satellites' do
101
- subject.gps_satellites[0].should eql(0)
102
- subject.gps_satellites[864].should eql(8)
103
- subject.gps_satellites[1566].should eql(7)
104
- subject.gps_satellites[1879].should eql(7)
105
- subject.gps_satellites[2317].should eql(8)
101
+ expect(subject.gps_satellites[0]).to eql(0)
102
+ expect(subject.gps_satellites[864]).to eql(8)
103
+ expect(subject.gps_satellites[1566]).to eql(7)
104
+ expect(subject.gps_satellites[1879]).to eql(7)
105
+ expect(subject.gps_satellites[2317]).to eql(8)
106
106
  end
107
107
 
108
108
  its(:to_kml?) { should be_true }
@@ -115,15 +115,15 @@ describe EagleTree::Log::Session do
115
115
 
116
116
  context 'data file multi-session-1.fdr' do
117
117
 
118
- let(:file) { EagleTree::Log::File.new(data_file('multi-session-1.fdr')) }
118
+ before(:all) { @file = multi_1_fdr }
119
119
 
120
- subject { file }
120
+ subject { @file }
121
121
 
122
122
  it { should have(3).sessions }
123
123
 
124
124
  context 'session 1' do
125
125
 
126
- subject { file.sessions[0] }
126
+ subject { @file.sessions[0] }
127
127
 
128
128
  it { should have(3555).rows }
129
129
 
@@ -132,10 +132,10 @@ describe EagleTree::Log::Session do
132
132
  its(:milliseconds?) { should be_true }
133
133
 
134
134
  it 'should have a few select milliseconds' do
135
- subject.milliseconds[0].should eql(0)
136
- subject.milliseconds[125].should eql(12500)
137
- subject.milliseconds[250].should eql(25000)
138
- subject.milliseconds[2230].should eql(223000)
135
+ expect(subject.milliseconds[0]).to eql(0)
136
+ expect(subject.milliseconds[125]).to eql(12500)
137
+ expect(subject.milliseconds[250]).to eql(25000)
138
+ expect(subject.milliseconds[2230]).to eql(223000)
139
139
  end
140
140
 
141
141
  its(:latitudes?) { should be_false }
@@ -156,7 +156,7 @@ describe EagleTree::Log::Session do
156
156
 
157
157
  context 'session 2' do
158
158
 
159
- subject { file.sessions[1] }
159
+ subject { @file.sessions[1] }
160
160
 
161
161
  it { should have(3699).rows }
162
162
 
@@ -165,17 +165,17 @@ describe EagleTree::Log::Session do
165
165
  its(:milliseconds?) { should be_true }
166
166
 
167
167
  it 'should have a few select milliseconds' do
168
- subject.milliseconds[0].should eql(355500)
169
- subject.milliseconds[125].should eql(368000)
170
- subject.milliseconds[250].should eql(380500)
171
- subject.milliseconds[2230].should eql(578500)
168
+ expect(subject.milliseconds[0]).to eql(355500)
169
+ expect(subject.milliseconds[125]).to eql(368000)
170
+ expect(subject.milliseconds[250]).to eql(380500)
171
+ expect(subject.milliseconds[2230]).to eql(578500)
172
172
  end
173
173
 
174
174
  end
175
175
 
176
176
  context 'session 3' do
177
177
 
178
- subject { file.sessions[2] }
178
+ subject { @file.sessions[2] }
179
179
 
180
180
  it { should have(4241).rows }
181
181
 
@@ -187,15 +187,15 @@ describe EagleTree::Log::Session do
187
187
 
188
188
  context 'data file multi-session-2.fdr' do
189
189
 
190
- let(:file) { EagleTree::Log::File.new(data_file('multi-session-2.fdr')) }
190
+ before(:all) { @file = multi_2_fdr }
191
191
 
192
- subject { file }
192
+ subject { @file }
193
193
 
194
194
  it { should have(3).sessions }
195
195
 
196
196
  context 'session 1' do
197
197
 
198
- subject { file.sessions[0] }
198
+ subject { @file.sessions[0] }
199
199
 
200
200
  it { should have(226).rows }
201
201
 
@@ -211,7 +211,7 @@ describe EagleTree::Log::Session do
211
211
 
212
212
  context 'session 2' do
213
213
 
214
- subject { file.sessions[1] }
214
+ subject { @file.sessions[1] }
215
215
 
216
216
  it { should have(124).rows }
217
217
 
@@ -221,7 +221,7 @@ describe EagleTree::Log::Session do
221
221
 
222
222
  context 'session 3' do
223
223
 
224
- subject { file.sessions[2] }
224
+ subject { @file.sessions[2] }
225
225
 
226
226
  it { should have(6336).rows }
227
227
 
@@ -233,7 +233,9 @@ describe EagleTree::Log::Session do
233
233
 
234
234
  context 'data file t600-1.fdr' do
235
235
 
236
- subject { EagleTree::Log::File.new(data_file('t600-1.fdr')).sessions[0] }
236
+ before(:all) { @file = t600_1_fdr }
237
+
238
+ subject { @file.sessions[0] }
237
239
 
238
240
  it { should have(692).rows }
239
241
 
@@ -250,19 +252,19 @@ describe EagleTree::Log::Session do
250
252
  its(:pack_voltages?) { should be_true }
251
253
 
252
254
  it 'should have a few select pack voltages' do
253
- subject.pack_voltages[0].should be_within(0.1).of(46.5)
254
- subject.pack_voltages[100].should be_within(0.1).of(46.5)
255
- subject.pack_voltages[250].should be_within(0.1).of(42.8)
256
- subject.pack_voltages[500].should be_within(0.1).of(45.2)
255
+ expect(subject.pack_voltages[0]).to be_within(0.1).of(46.5)
256
+ expect(subject.pack_voltages[100]).to be_within(0.1).of(46.5)
257
+ expect(subject.pack_voltages[250]).to be_within(0.1).of(42.8)
258
+ expect(subject.pack_voltages[500]).to be_within(0.1).of(45.2)
257
259
  end
258
260
 
259
261
  its(:amps?) { should be_true }
260
262
 
261
263
  it 'should have a few select amps' do
262
- subject.amps[0].should be_within(0.01).of(0.18)
263
- subject.amps[100].should be_within(0.01).of(0.31)
264
- subject.amps[250].should be_within(0.01).of(19.40)
265
- subject.amps[500].should be_within(0.01).of(0.12)
264
+ expect(subject.amps[0]).to be_within(0.01).of(0.18)
265
+ expect(subject.amps[100]).to be_within(0.01).of(0.31)
266
+ expect(subject.amps[250]).to be_within(0.01).of(19.40)
267
+ expect(subject.amps[500]).to be_within(0.01).of(0.12)
266
268
  end
267
269
 
268
270
  its(:temps1?) { should be_false }
@@ -285,7 +287,9 @@ describe EagleTree::Log::Session do
285
287
 
286
288
  context 'data file t600-2.fdr' do
287
289
 
288
- subject { EagleTree::Log::File.new(data_file('t600-2.fdr')).sessions[0] }
290
+ before(:all) { @file = t600_2_fdr }
291
+
292
+ subject { @file.sessions[0] }
289
293
 
290
294
  it { should have(865).rows }
291
295
 
@@ -302,19 +306,19 @@ describe EagleTree::Log::Session do
302
306
  its(:pack_voltages?) { should be_true }
303
307
 
304
308
  it 'should have a few select pack voltages' do
305
- subject.pack_voltages[0].should be_within(0.1).of(46.6)
306
- subject.pack_voltages[100].should be_within(0.1).of(46.6)
307
- subject.pack_voltages[250].should be_within(0.1).of(46.6)
308
- subject.pack_voltages[500].should be_within(0.1).of(42.3)
309
+ expect(subject.pack_voltages[0]).to be_within(0.1).of(46.6)
310
+ expect(subject.pack_voltages[100]).to be_within(0.1).of(46.6)
311
+ expect(subject.pack_voltages[250]).to be_within(0.1).of(46.6)
312
+ expect(subject.pack_voltages[500]).to be_within(0.1).of(42.3)
309
313
  end
310
314
 
311
315
  its(:amps?) { should be_true }
312
316
 
313
317
  it 'should have a few select amps' do
314
- subject.amps[0].should be_within(0.01).of(0.18)
315
- subject.amps[100].should be_within(0.01).of(0.0)
316
- subject.amps[250].should be_within(0.01).of(0.0)
317
- subject.amps[500].should be_within(0.01).of(19.9)
318
+ expect(subject.amps[0]).to be_within(0.01).of(0.18)
319
+ expect(subject.amps[100]).to be_within(0.01).of(0.0)
320
+ expect(subject.amps[250]).to be_within(0.01).of(0.0)
321
+ expect(subject.amps[500]).to be_within(0.01).of(19.9)
318
322
  end
319
323
 
320
324
  its(:temps1?) { should be_false }
data/spec/spec_helper.rb CHANGED
@@ -36,3 +36,15 @@ def invalid_data_files
36
36
  invalid << __FILE__
37
37
  invalid << 'NOFILE.TLM'
38
38
  end
39
+
40
+ def empty_fdr; EagleTree::Log::File.new(data_file('empty.fdr')) end
41
+
42
+ def funjet_fdr; EagleTree::Log::File.new(data_file('funjet-gps.fdr')) end
43
+
44
+ def multi_1_fdr; EagleTree::Log::File.new(data_file('multi-session-1.fdr')) end
45
+
46
+ def multi_2_fdr; EagleTree::Log::File.new(data_file('multi-session-2.fdr')) end
47
+
48
+ def t600_1_fdr; EagleTree::Log::File.new(data_file('t600-1.fdr')) end
49
+
50
+ def t600_2_fdr; EagleTree::Log::File.new(data_file('t600-2.fdr')) end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eagletree-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Veys
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-06 00:00:00.000000000 Z
11
+ date: 2013-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print