git-fit 0.17.7 → 0.17.8
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/git_fit/sync/xingzhe.rb +5 -4
- data/lib/git_fit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63105e40b78dfc16931efa9ffe2b88e9ac53b576f2ce14857401d818d6375c5a
|
|
4
|
+
data.tar.gz: 792778796644fd2117a9e57b1cb330b2a337ac02010f4297e170639f64b9fa4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6787fb194f869eb5dd48226b617e2d9757cbfb9ee6cfc657018f9e0f868f3018bb66b3a63718ef9d919836298ce0f3e612504bf77fc033a2286dcaaf7c9dd35
|
|
7
|
+
data.tar.gz: 1ef52c06c6a9ff330e7e22dd0bb89152bcbeeb861b430a04ffa1841e8e0280ff6e859e2b12007090784e0e692be2fa0b6a6488b1eae825ca44130a3de2d87a5b
|
data/lib/git_fit/sync/xingzhe.rb
CHANGED
|
@@ -86,7 +86,7 @@ module GitFit
|
|
|
86
86
|
|
|
87
87
|
# ── Raw directory layout (Phase 1, mirrors garmin Phase 1) ──────────
|
|
88
88
|
# data/raw/xingzhe/{id}/stream.json — stream envelope
|
|
89
|
-
# data/raw/xingzhe/{id}/detail.json —
|
|
89
|
+
# data/raw/xingzhe/{id}/detail.json — detail payload — inner data:{workout,user,slopes,segments,pois,laps}
|
|
90
90
|
# data/raw/xingzhe/{id}/{id}.gpx — GPX export (when available)
|
|
91
91
|
# data/raw/xingzhe/{id}/{id}.fit — FIT export (when is_fit)
|
|
92
92
|
def raw_path(platform_id)
|
|
@@ -307,7 +307,7 @@ module GitFit
|
|
|
307
307
|
if fetched_full
|
|
308
308
|
full_detail = fetched_full
|
|
309
309
|
detail_workout = fetched_workout
|
|
310
|
-
# Persist
|
|
310
|
+
# Persist detail payload (data:{workout,user,slopes,segments,pois,laps}) as detail.json
|
|
311
311
|
write_raw_file(full_detail, 'detail.json', aid)
|
|
312
312
|
# Prefer workout from full_detail for attrs that benefit from richer data
|
|
313
313
|
if detail_workout
|
|
@@ -425,8 +425,9 @@ module GitFit
|
|
|
425
425
|
data = JSON.parse(resp.body)
|
|
426
426
|
return [nil, nil] unless data['code'] == 200 || data.dig('data', 'workout')
|
|
427
427
|
|
|
428
|
-
|
|
429
|
-
|
|
428
|
+
inner = data['data']
|
|
429
|
+
workout = inner&.dig('workout')
|
|
430
|
+
[inner, workout]
|
|
430
431
|
rescue JSON::ParserError
|
|
431
432
|
[nil, nil]
|
|
432
433
|
end
|
data/lib/git_fit/version.rb
CHANGED