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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44ebb0da15dec524cc71b24e09edc1f9aa486943
4
- data.tar.gz: 24210b28ba2ca885478a21b92752d153f8864caf
3
+ metadata.gz: 2431365ee2ab9ab2e8f53d2b128761fca850eb25
4
+ data.tar.gz: 7aa974c7955ace6587130b244ff67c6704b8c47b
5
5
  SHA512:
6
- metadata.gz: c32d3a03d108bca1c4b6d615963edb7a5373d340f606f413c1fa5fed80a59265dcc6ba8431249e83d44c816d17cbaa50105746d342538bc16d5248437a914081
7
- data.tar.gz: 65413230a7e05f5fdf38da9441cefe8be504b010777ac4509757d057067d81c6b145f170fbf5e3a458541e81d71936c6730d2953d733f74749ff9b99845d3394
6
+ metadata.gz: 79123d4ddd3a2f92b8a21bbe34d4d53101b868d6fc5201c4e42f154d36b54a05d29daba27afe262141a065932fe8987d815f0defe632b9dd693225d5ce815dd5
7
+ data.tar.gz: 027eed9d8886cc3a88f1d7541041f4d3a4e940b368705ad950e117b120595afa76875520403ab07464646d427dbd8ec719f07ebc4be13679237ca0cd0a8adbae
@@ -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 << "def #{field.name.gsub('/', '_').gsub('+', '').gsub('%', '')}\n"
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.gsub('/', '_').gsub('%', '')}.snapshot, '#{field.real_type}', scale, dyn
106
+ get_value #{field.raw_name}.snapshot, '#{field.real_type}', scale, dyn
106
107
  end
107
108
  RUBY
108
109
 
@@ -1,3 +1,3 @@
1
1
  module FitParser
2
- VERSION = '1.0.7'
2
+ VERSION = '1.0.8'
3
3
  end
@@ -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
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.7
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-09 00:00:00.000000000 Z
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.