postrunner 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/postrunner/FitFileStore.rb +10 -3
- data/lib/postrunner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee79192eef591186d2dcbf992af1d193a60aee49b9ae9d90d6a880d4758c623c
|
|
4
|
+
data.tar.gz: 7fefaf239fe43c71be7183b7773f909415126669f514e608b6c6f16fef9682f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 65900650e3e1751f4f92994f4473c18d0131615ff60f72c1683ee7ed05c40abd6d060ba6eca2cfa4134c7507effb90edc4785901e5a8d006c0ed05fa64b6d23d
|
|
7
|
+
data.tar.gz: 5de44344671bf391611e2636e4cebd0fc6e7a5f5636444ca2fc828c1d699e17086dfe7ea1a80aa89a0a593b279ca17fe0f5c26583af7fa21763ab7130f7f73ba
|
|
@@ -144,7 +144,9 @@ module PostRunner
|
|
|
144
144
|
|
|
145
145
|
# Generate a String that uniquely identifies the device that generated
|
|
146
146
|
# the FIT file.
|
|
147
|
-
id = extract_fit_file_id(fit_entity)
|
|
147
|
+
unless (id = extract_fit_file_id(fit_entity))
|
|
148
|
+
return nil
|
|
149
|
+
end
|
|
148
150
|
long_uid = "#{id[:numeric_manufacturer]}-" +
|
|
149
151
|
"#{id[:numeric_product]}-#{id[:serial_number]}"
|
|
150
152
|
|
|
@@ -503,7 +505,12 @@ module PostRunner
|
|
|
503
505
|
end
|
|
504
506
|
|
|
505
507
|
fit_entity.device_infos.each do |di|
|
|
506
|
-
|
|
508
|
+
# Not all FIT file have indexed device sections. In case the device
|
|
509
|
+
# index is nil we'll take the first entry.
|
|
510
|
+
if (di.device_index.nil? || di.device_index == 0) &&
|
|
511
|
+
(di.manufacturer &&
|
|
512
|
+
(di.garmin_product || di.product) &&
|
|
513
|
+
di.numeric_product && di.serial_number)
|
|
507
514
|
return {
|
|
508
515
|
:manufacturer => di.manufacturer,
|
|
509
516
|
:product => di.garmin_product || di.product,
|
|
@@ -514,7 +521,7 @@ module PostRunner
|
|
|
514
521
|
end
|
|
515
522
|
end
|
|
516
523
|
|
|
517
|
-
Log.error "Fit entity has no device info
|
|
524
|
+
Log.error "Fit entity has no device info section"
|
|
518
525
|
return nil
|
|
519
526
|
end
|
|
520
527
|
|
data/lib/postrunner/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postrunner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Schlaeger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-08-
|
|
11
|
+
date: 2020-08-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fit4ruby
|