fit_parser 1.0.6 → 1.0.7
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 -1
- data/lib/fit_parser/version.rb +1 -1
- data/spec/fit_parser_spec.rb +6 -0
- data/spec/support/examples/file/23489915119.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: 44ebb0da15dec524cc71b24e09edc1f9aa486943
|
4
|
+
data.tar.gz: 24210b28ba2ca885478a21b92752d153f8864caf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c32d3a03d108bca1c4b6d615963edb7a5373d340f606f413c1fa5fed80a59265dcc6ba8431249e83d44c816d17cbaa50105746d342538bc16d5248437a914081
|
7
|
+
data.tar.gz: 65413230a7e05f5fdf38da9441cefe8be504b010777ac4509757d057067d81c6b145f170fbf5e3a458541e81d71936c6730d2953d733f74749ff9b99845d3394
|
data/lib/fit_parser/file/data.rb
CHANGED
@@ -62,7 +62,9 @@ module FitParser
|
|
62
62
|
end
|
63
63
|
|
64
64
|
definition.dev_fields_arr.each do |field|
|
65
|
-
|
65
|
+
developer_data = dev_definitions[field[:developer_data_index].to_s]
|
66
|
+
next unless developer_data
|
67
|
+
data = developer_data[field[:field_number].to_s]
|
66
68
|
field.base_type_number = data[:raw_field_2]
|
67
69
|
field.name = data[:raw_field_3].downcase.gsub(' ', '_').gsub('.', '').gsub('%', '')
|
68
70
|
field.scale = data[:raw_field_6] && data[:raw_field_6] != 255 ? data[:raw_field_6] : nil
|
data/lib/fit_parser/version.rb
CHANGED
data/spec/fit_parser_spec.rb
CHANGED
@@ -133,4 +133,10 @@ describe FitParser do
|
|
133
133
|
data = FitParser.load_file(path)
|
134
134
|
expect(data.records).to_not be_nil
|
135
135
|
end
|
136
|
+
|
137
|
+
it 'works 23489915119.fit' do
|
138
|
+
path = 'spec/support/examples/file/23489915119.fit'
|
139
|
+
data = FitParser.load_file(path)
|
140
|
+
expect(data.records).to_not be_nil
|
141
|
+
end
|
136
142
|
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.7
|
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-
|
11
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bindata
|
@@ -173,6 +173,7 @@ files:
|
|
173
173
|
- spec/support/examples/file/16050359900.fit
|
174
174
|
- spec/support/examples/file/18119560227.fit
|
175
175
|
- spec/support/examples/file/19205208205.fit
|
176
|
+
- spec/support/examples/file/23489915119.fit
|
176
177
|
- spec/support/examples/file/3110334490
|
177
178
|
- spec/support/examples/file/3863374146
|
178
179
|
- spec/support/examples/file/598363e9-3121-4f24-8b6f-b1368a269e8f.
|