git-fit 0.15.1 → 0.15.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1288abd3413532666d8f9582a8a2934dade01fc0dc81258f2903029d42129887
4
- data.tar.gz: 5a6b72a2be75a4eef7f5136a8ac3d631b967f40fc0e6fff615279531ff160e0c
3
+ metadata.gz: 9309a27e967e49673133559b061b89a64d77d3e4575125490f1b9f86b3e79d43
4
+ data.tar.gz: a299431199f67d3e7ff3279857c0a19f97255970915c234dc29e329e23156f0d
5
5
  SHA512:
6
- metadata.gz: a488380bc74c1ae7baceb6686a98c38325fa8be5ccac2c32b6b09d9c715b25edc20cce66aeb1f5cb7342962e6240e95f48f0583c5be32d739824aa9c19bf9a95
7
- data.tar.gz: 57b4d882f162663cf5b69c2eb024ed511bf7829dba0d99f6ac391508b315df9196c9bfd9b927c648a5f5b4a256f162c74ddc302e79b373b400895738d7f7df97
6
+ metadata.gz: feba2797f9c5d8a096f65c51a479ac1bc03a05c5face9f066970a20b4cafa8f2acea522c7d7b89c63a261ba4472a885fe455d5156c5f87afca558b3665b34979
7
+ data.tar.gz: 9dc3878ca195c32eb45da3710b3c7649a275e1c12e4883fa548483a7fc10b28497195c8b603e02133fa6b562043b4ba2f8f002712c084d75526a51c04e1ef424
@@ -501,7 +501,7 @@ module GitFit
501
501
  max_cadence = summary['maxCadence']&.to_f
502
502
  max_cadence ||= sport_max_cadence(summary, type)&.to_f
503
503
 
504
- average_temperature = summary['avgTemperature']&.to_f
504
+ average_temperature = summary['averageTemperature']&.to_f
505
505
  average_temperature ||= fallback_avg_temperature(activity_id, l2_data)
506
506
 
507
507
  {
@@ -59,6 +59,7 @@ module GitFit
59
59
 
60
60
  def pending_ids
61
61
  existing = existing_run_ids
62
+ seen = {}
62
63
  ids = []
63
64
  offset = 1
64
65
  limit = 50
@@ -70,6 +71,11 @@ module GitFit
70
71
  next if existing.include?(act_id) && raw_file_exists?(act_id)
71
72
  type = map_sport(act['sport'])
72
73
  next if skip_type?(type)
74
+ seen[act_id] = seen.fetch(act_id, 0) + 1
75
+ if seen[act_id] > 3
76
+ raise SyncError, "XOSS: activity list returned #{seen[act_id]} duplicate records for id #{act_id} — server-side degradation. Run: git fit sync --source xoss"
77
+ end
78
+ next if seen[act_id] > 1
73
79
  ids << { id: act_id, type: type, summary: act }
74
80
  end
75
81
  offset += limit
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitFit
4
- VERSION = '0.15.1'
4
+ VERSION = '0.15.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-fit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lax