fit_parser 1.0.4 → 1.0.5
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 +2 -2
- data/lib/fit_parser/version.rb +1 -1
- data/spec/fit_parser_spec.rb +6 -0
- data/spec/support/examples/file/18119560227.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: 06e763340f365fc8b014a1d0631d572441f80b97
|
4
|
+
data.tar.gz: 73e1389249adaae256dff949c5319fc4831c1438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e668fe09baecda65ed99fbd8d9468350a19b84df7324e3a50d06d1303d7d41664ab6cc609a91f4afa7d30814709a5dc2e8375efa00cb374ee75bdb992a6f06b
|
7
|
+
data.tar.gz: 5726f8cc8edde5b60a3ad7c90ef9156a6e7bbe3d79ab37c9b5a5f0f52c605adfb05cd65d7f91000247e029870833ca0e719c605f24052627864595d457043979
|
data/lib/fit_parser/file/data.rb
CHANGED
@@ -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('/', '_')}"
|
76
|
+
code << "#{field.type} :#{field.raw_name.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('/', '_')}\n"
|
83
|
+
code << "def #{field.name.gsub('/', '_').gsub('+', '')}\n"
|
84
84
|
|
85
85
|
if field.scale && field.scale != 1
|
86
86
|
scale = field.scale
|
data/lib/fit_parser/version.rb
CHANGED
data/spec/fit_parser_spec.rb
CHANGED
@@ -121,4 +121,10 @@ describe FitParser do
|
|
121
121
|
data = FitParser.load_file(path)
|
122
122
|
expect(data.records).to_not be_nil
|
123
123
|
end
|
124
|
+
|
125
|
+
it 'works 18119560227.fit' do
|
126
|
+
path = 'spec/support/examples/file/18119560227.fit'
|
127
|
+
data = FitParser.load_file(path)
|
128
|
+
expect(data.records).to_not be_nil
|
129
|
+
end
|
124
130
|
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.5
|
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-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bindata
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- spec/support/examples/1426768070-2.fit
|
172
172
|
- spec/support/examples/6AUI5200.FIT
|
173
173
|
- spec/support/examples/file/16050359900.fit
|
174
|
+
- spec/support/examples/file/18119560227.fit
|
174
175
|
- spec/support/examples/file/3110334490
|
175
176
|
- spec/support/examples/file/3863374146
|
176
177
|
- spec/support/examples/file/598363e9-3121-4f24-8b6f-b1368a269e8f.
|