fit_parser 1.0.2 → 1.0.3

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: c6b323c9b7d256650f64a66bf1510c6de9e02130
4
- data.tar.gz: d4a588c1f97dfedc0eaeebb10bd6a05705083273
3
+ metadata.gz: e4e4819fd3bb8005892624c8c2f10bc7959d5288
4
+ data.tar.gz: da1a0d45c960d7f6c798ce8658c165963480c257
5
5
  SHA512:
6
- metadata.gz: 08c55bf7f7cb8211083030dc9bb288d0bc8fbd9e0cc54aacb8d96e0897b0d572bb577caaceb425a9989b659dac7a8fe64bbbd183dfc2197f78d91fe695d53c4b
7
- data.tar.gz: 8e06348bf350995c2961ef981e0269f48f4d21105828f37736d26e4676b9a8ab2ccfbe5ee37cb7e6f0dc584cf581cfa35f317cbdc72eb49f34ea8a1c5153eb04
6
+ metadata.gz: 8279e0a004871aaa87854315ee46fc844fc4d1c999954fa3887018fa148bd33bfee1fb1b25218b2ebdbe35e33e7f4caf0072c5323581b2e0b884eae8437c82f6
7
+ data.tar.gz: 7d40e4fb71a1e4990d393eda08ff9e6779d7413d16a5a6e563c3a907b974939c58d2fc55e1301e8d0552955b3df032775eab921e7aa3df599395773a8100d607
@@ -73,14 +73,14 @@ module FitParser
73
73
  code << "array :#{field.raw_name}, :type => :#{field.type}, :initial_length => #{field.field_size/field.length}\n"
74
74
  else
75
75
  # string are not null terminated when they have exactly the lenght of the field
76
- code << "#{field.type} :#{field.raw_name}"
76
+ code << "#{field.type} :#{field.raw_name.gsub('/', '_')}"
77
77
  if field.type == 'string'
78
78
  code << ", :read_length => #{field.field_size}, :trim_padding => true"
79
79
  end
80
80
  code << "\n"
81
81
  end
82
82
 
83
- code << "def #{field.name}\n"
83
+ code << "def #{field.name.gsub('/', '_')}\n"
84
84
 
85
85
  if field.scale && field.scale != 1
86
86
  scale = field.scale
@@ -98,8 +98,9 @@ module FitParser
98
98
  else
99
99
  code << "dyn = nil\n"
100
100
  end
101
+
101
102
  code << <<-RUBY
102
- get_value #{field.raw_name}.snapshot, '#{field.real_type}', scale, dyn
103
+ get_value #{field.raw_name.gsub('/', '_')}.snapshot, '#{field.real_type}', scale, dyn
103
104
  end
104
105
  RUBY
105
106
 
@@ -1,3 +1,3 @@
1
1
  module FitParser
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -115,4 +115,10 @@ describe FitParser do
115
115
  data = FitParser.load_file(path)
116
116
  expect(data.records).to_not be_nil
117
117
  end
118
+
119
+ it 'works 16050359900.fit' do
120
+ path = 'spec/support/examples/file/16050359900.fit'
121
+ data = FitParser.load_file(path)
122
+ expect(data.records).to_not be_nil
123
+ end
118
124
  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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dima Mescheryakov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-13 00:00:00.000000000 Z
11
+ date: 2017-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bindata
@@ -170,6 +170,7 @@ files:
170
170
  - spec/support/examples/1379311720.fit
171
171
  - spec/support/examples/1426768070-2.fit
172
172
  - spec/support/examples/6AUI5200.FIT
173
+ - spec/support/examples/file/16050359900.fit
173
174
  - spec/support/examples/file/3110334490
174
175
  - spec/support/examples/file/3863374146
175
176
  - spec/support/examples/file/598363e9-3121-4f24-8b6f-b1368a269e8f.
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
219
  version: '0'
219
220
  requirements: []
220
221
  rubyforge_project:
221
- rubygems_version: 2.5.1
222
+ rubygems_version: 2.6.11
222
223
  signing_key:
223
224
  specification_version: 4
224
225
  summary: ''