fit_parser 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fit_parser/file/data.rb +3 -2
- data/lib/fit_parser/version.rb +1 -1
- data/spec/fit_parser_spec.rb +6 -0
- data/spec/support/examples/file/24093026216.fit +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2431365ee2ab9ab2e8f53d2b128761fca850eb25
|
4
|
+
data.tar.gz: 7aa974c7955ace6587130b244ff67c6704b8c47b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79123d4ddd3a2f92b8a21bbe34d4d53101b868d6fc5201c4e42f154d36b54a05d29daba27afe262141a065932fe8987d815f0defe632b9dd693225d5ce815dd5
|
7
|
+
data.tar.gz: 027eed9d8886cc3a88f1d7541041f4d3a4e940b368705ad950e117b120595afa76875520403ab07464646d427dbd8ec719f07ebc4be13679237ca0cd0a8adbae
|
data/lib/fit_parser/file/data.rb
CHANGED
@@ -62,6 +62,7 @@ module FitParser
|
|
62
62
|
end
|
63
63
|
|
64
64
|
definition.dev_fields_arr.each do |field|
|
65
|
+
next unless dev_definitions
|
65
66
|
developer_data = dev_definitions[field[:developer_data_index].to_s]
|
66
67
|
next unless developer_data
|
67
68
|
data = developer_data[field[:field_number].to_s]
|
@@ -82,7 +83,7 @@ module FitParser
|
|
82
83
|
code << "\n"
|
83
84
|
end
|
84
85
|
|
85
|
-
code << "
|
86
|
+
code << "define_method \"#{field.name}\" do\n"
|
86
87
|
|
87
88
|
if field.scale && field.scale != 1
|
88
89
|
scale = field.scale
|
@@ -102,7 +103,7 @@ module FitParser
|
|
102
103
|
end
|
103
104
|
|
104
105
|
code << <<-RUBY
|
105
|
-
get_value #{field.raw_name
|
106
|
+
get_value #{field.raw_name}.snapshot, '#{field.real_type}', scale, dyn
|
106
107
|
end
|
107
108
|
RUBY
|
108
109
|
|
data/lib/fit_parser/version.rb
CHANGED
data/spec/fit_parser_spec.rb
CHANGED
@@ -139,4 +139,10 @@ describe FitParser do
|
|
139
139
|
data = FitParser.load_file(path)
|
140
140
|
expect(data.records).to_not be_nil
|
141
141
|
end
|
142
|
+
|
143
|
+
it 'works 24093026216.fit' do
|
144
|
+
path = 'spec/support/examples/file/24093026216.fit'
|
145
|
+
data = FitParser.load_file(path)
|
146
|
+
expect(data.records).to_not be_nil
|
147
|
+
end
|
142
148
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fit_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dima Mescheryakov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bindata
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- spec/support/examples/file/18119560227.fit
|
175
175
|
- spec/support/examples/file/19205208205.fit
|
176
176
|
- spec/support/examples/file/23489915119.fit
|
177
|
+
- spec/support/examples/file/24093026216.fit
|
177
178
|
- spec/support/examples/file/3110334490
|
178
179
|
- spec/support/examples/file/3863374146
|
179
180
|
- spec/support/examples/file/598363e9-3121-4f24-8b6f-b1368a269e8f.
|