git-fit 0.17.5 → 0.17.7
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/elevation/backfill.rb +7 -2
- data/lib/git_fit/sync/xingzhe.rb +2 -2
- 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: 07a2d85e156f49fab20ac37947f6490a3f370e7a378b5da6c2738e3bc302ecd1
|
|
4
|
+
data.tar.gz: 16d5983ed447c3c8d3569db4368d4d5a00cb984f177fc599beccd9f5667f1057
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ffc90630d917ab67ca4a130581a36c4551c7133a3b0d162e6defa40768d643ffcf0460bb48b578bda198fc5129de5eab1324ed3702b7ce774bb557bb2ae2603
|
|
7
|
+
data.tar.gz: badf20acc060aea95e6e3d3e0d7d742cdf71b9604970937a826eac610b97c3042c393e4ef1d5280d0bab53a8651896aa9df2de271e018d47d6980797b85d5684
|
|
@@ -120,8 +120,13 @@ module GitFit
|
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
def compute_from_xingzhe(natural_id)
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
# New per-id directory: data/raw/xingzhe/{id}/stream.json (Phase 1, commit 661007e)
|
|
124
|
+
# Legacy flat: data/raw/xingzhe/{id}.json
|
|
125
|
+
raw_path = File.join('data', 'raw', 'xingzhe', natural_id, 'stream.json')
|
|
126
|
+
unless File.exist?(raw_path)
|
|
127
|
+
raw_path = File.join('data', 'raw', 'xingzhe', "#{natural_id}.json")
|
|
128
|
+
return nil unless File.exist?(raw_path)
|
|
129
|
+
end
|
|
125
130
|
|
|
126
131
|
raw = JSON.parse(File.read(raw_path))
|
|
127
132
|
alts = raw.dig('stream', 'altitude') || []
|
data/lib/git_fit/sync/xingzhe.rb
CHANGED
|
@@ -409,7 +409,7 @@ module GitFit
|
|
|
409
409
|
end
|
|
410
410
|
|
|
411
411
|
def fetch_activity_detail(id)
|
|
412
|
-
resp =
|
|
412
|
+
resp = authed_get("#{DETAIL_PATH}#{id}/")
|
|
413
413
|
return nil unless resp.code.to_i == 200
|
|
414
414
|
|
|
415
415
|
data = JSON.parse(resp.body)
|
|
@@ -418,7 +418,7 @@ module GitFit
|
|
|
418
418
|
|
|
419
419
|
# Full detail with segments/slopes/pois/laps — returns [full_json, workout_hash]
|
|
420
420
|
def fetch_full_detail(id)
|
|
421
|
-
resp =
|
|
421
|
+
resp = authed_get("#{DETAIL_PATH}#{id}/",
|
|
422
422
|
params: { segments: 'true', slopes: 'true', pois: 'true', laps: 'true' })
|
|
423
423
|
return [nil, nil] unless resp.code.to_i == 200
|
|
424
424
|
|
data/lib/git_fit/version.rb
CHANGED