fit_parser 1.0.5 → 1.0.6

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: 06e763340f365fc8b014a1d0631d572441f80b97
4
- data.tar.gz: 73e1389249adaae256dff949c5319fc4831c1438
3
+ metadata.gz: 763aa538552a5710b53e2e07aa96e9e168312ba7
4
+ data.tar.gz: 718d76e9d9ff9d86b83aa88f6e784e062f93c4f6
5
5
  SHA512:
6
- metadata.gz: 2e668fe09baecda65ed99fbd8d9468350a19b84df7324e3a50d06d1303d7d41664ab6cc609a91f4afa7d30814709a5dc2e8375efa00cb374ee75bdb992a6f06b
7
- data.tar.gz: 5726f8cc8edde5b60a3ad7c90ef9156a6e7bbe3d79ab37c9b5a5f0f52c605adfb05cd65d7f91000247e029870833ca0e719c605f24052627864595d457043979
6
+ metadata.gz: 1f69ea8b46cd2f4769904e4eac82c667b2d3e73eb8b323627f46c146a0eed7eaf0e39abe236f4e06fb9595209479e234b09b987d795e4778346821f3a15d675d
7
+ data.tar.gz: cb2d3b155de0e86f9ef5bd56044cec4a17afa741ed0ebd6a6053e26790d50964229721a77099ed812c0d7a0ffc7bde4a0bdbe66963944a4dfeda5f17ca534560
@@ -64,7 +64,7 @@ module FitParser
64
64
  definition.dev_fields_arr.each do |field|
65
65
  data = dev_definitions[field[:developer_data_index].to_s][field[:field_number].to_s]
66
66
  field.base_type_number = data[:raw_field_2]
67
- field.name = data[:raw_field_3].downcase.gsub(' ', '_').gsub('.', '')
67
+ field.name = data[:raw_field_3].downcase.gsub(' ', '_').gsub('.', '').gsub('%', '')
68
68
  field.scale = data[:raw_field_6] && data[:raw_field_6] != 255 ? data[:raw_field_6] : nil
69
69
  code = ''
70
70
 
@@ -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.gsub('/', '_').gsub('+', '')}"
76
+ code << "#{field.type} :#{field.raw_name.gsub('/', '_').gsub('+', '').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.gsub('/', '_').gsub('+', '')}\n"
83
+ code << "def #{field.name.gsub('/', '_').gsub('+', '').gsub('%', '')}\n"
84
84
 
85
85
  if field.scale && field.scale != 1
86
86
  scale = field.scale
@@ -100,7 +100,7 @@ module FitParser
100
100
  end
101
101
 
102
102
  code << <<-RUBY
103
- get_value #{field.raw_name.gsub('/', '_')}.snapshot, '#{field.real_type}', scale, dyn
103
+ get_value #{field.raw_name.gsub('/', '_').gsub('%', '')}.snapshot, '#{field.real_type}', scale, dyn
104
104
  end
105
105
  RUBY
106
106
 
@@ -1,3 +1,3 @@
1
1
  module FitParser
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
@@ -127,4 +127,10 @@ describe FitParser do
127
127
  data = FitParser.load_file(path)
128
128
  expect(data.records).to_not be_nil
129
129
  end
130
+
131
+ it 'works 19205208205.fit' do
132
+ path = 'spec/support/examples/file/19205208205.fit'
133
+ data = FitParser.load_file(path)
134
+ expect(data.records).to_not be_nil
135
+ end
130
136
  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.5
4
+ version: 1.0.6
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-02-26 00:00:00.000000000 Z
11
+ date: 2018-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bindata
@@ -172,6 +172,7 @@ files:
172
172
  - spec/support/examples/6AUI5200.FIT
173
173
  - spec/support/examples/file/16050359900.fit
174
174
  - spec/support/examples/file/18119560227.fit
175
+ - spec/support/examples/file/19205208205.fit
175
176
  - spec/support/examples/file/3110334490
176
177
  - spec/support/examples/file/3863374146
177
178
  - spec/support/examples/file/598363e9-3121-4f24-8b6f-b1368a269e8f.