git-fit 0.14.3 → 0.15.0
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/garmin_base.rb +13 -1
- 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: 79cc74453027121864f89091916030e85740e51843fc01fec0653e1d81d56b73
|
|
4
|
+
data.tar.gz: e4ac69b5d96ca061484445242435bb2f3b36ca112c1cf7ef0ca0031862914b0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf5d3a7c4341b75039170cbae3f5ccd6f423ea7ac1e297a1c4a4ba72b9e22eb66ca3c6a4d3f293f3079e5d38fe1d9c03985871cf859194bd7ddfe1e9b860b9f1
|
|
7
|
+
data.tar.gz: 15009f7d14e7625cde88cffab15a126f732a756ba29d41b75a610e0498a8d33df371a3cd07c79285a2ede47edcc9942398c28b48194453de48b8226ef5ea0ed8
|
|
@@ -655,7 +655,19 @@ module GitFit
|
|
|
655
655
|
FIT_EPOCH = 631_065_600
|
|
656
656
|
|
|
657
657
|
def raw_path(platform_id)
|
|
658
|
-
File.join(raw_dir,
|
|
658
|
+
File.join(raw_dir, platform_id, 'activity.fit')
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
def write_source_archive(data, platform_id, ext = 'json')
|
|
662
|
+
dir = File.join(raw_dir, platform_id)
|
|
663
|
+
FileUtils.mkdir_p(dir)
|
|
664
|
+
tmp = File.join(dir, ".activity.#{ext}.tmp")
|
|
665
|
+
dest = File.join(dir, "activity.#{ext}")
|
|
666
|
+
case data
|
|
667
|
+
when String then File.write(tmp, data)
|
|
668
|
+
when Hash, Array then File.write(tmp, JSON.generate(data))
|
|
669
|
+
end
|
|
670
|
+
File.rename(tmp, dest)
|
|
659
671
|
end
|
|
660
672
|
|
|
661
673
|
def fetch_summary_polyline(activity_id)
|
data/lib/git_fit/version.rb
CHANGED