git-fit 0.7.3 → 0.7.4

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: 2665f0cb116a56e2339e49c813dca902c7d3cbb99a43c78cdab4f8c7e567998d
4
- data.tar.gz: 4d9f6d2836371d9e932c6dfdfd93293271be921c6656ae5e8a6ef887d39b8bd0
3
+ metadata.gz: 8b529b539d17dfce5129f5b5e9a26c87d29fc2c42d01cc28b33663951e019ce2
4
+ data.tar.gz: 491038827bc8844b30ec1f42d6f2a13582543419c028710ed4c76329eb2b8cc3
5
5
  SHA512:
6
- metadata.gz: e1ac839603e678841e02b4c0091d12ab78784b026bf1edcaa960c8287133ccaae12f5270a11f077e381d4b313300853aef4f079f78f3a0e711fa77fb8b2ff3e6
7
- data.tar.gz: 257601a655c5acc7ec0b67498784e8f34e1041c0d50c82c02e7fb33a0d3b3453488371f6e78af24e7d4990b1607c6c9e18bf77b9e48050ab97645a2cf1c26413
6
+ metadata.gz: 73a4d04e598d30851db5ee28bc74452c4556b18dbbd7a95c82c904072276a0b6afe88ca2662c41682484c771a53dc74f30d5d2939fbe32294bcc56406e640e74
7
+ data.tar.gz: 0fdbf72996b45cb0c03fb9f92f156257950632080730f5288e9af056ae63fce74faa53333a323a7290577a2abc64a3da01d330f8d97c6b8261c86533db9ce161
@@ -21,7 +21,11 @@ module GitFit
21
21
  @start_time = Time.now
22
22
  @dry_run = dry_run
23
23
  @processed = 0
24
- @skipped = 0
24
+ @skipped_placeholder = 0
25
+ @skipped_empty_polyline = 0
26
+ @skipped_no_gps = 0
27
+ @skipped_no_samples = 0
28
+ @skipped_no_divisions = 0
25
29
  @errors = 0
26
30
  @attempted = 0
27
31
  @total = 0
@@ -71,36 +75,45 @@ module GitFit
71
75
  end
72
76
 
73
77
  def process_one(activity)
78
+ @attempted += 1
79
+ prefix = "[#{@attempted}/#{@total}]"
74
80
  run_id = activity[:run_id]
75
81
  polyline = activity[:summary_polyline]
76
82
 
77
- if polyline.nil? || polyline.empty? || polyline == KEEP_PLACEHOLDER
83
+ if polyline == KEEP_PLACEHOLDER
84
+ $stdout.puts " #{prefix} #{run_id} → skipped (Keep placeholder)"
85
+ mark_empty_divisions(run_id) unless @dry_run
86
+ @skipped_placeholder += 1
87
+ return
88
+ end
89
+
90
+ if polyline.nil? || polyline.empty?
91
+ $stdout.puts " #{prefix} #{run_id} → skipped (empty polyline)"
78
92
  mark_empty_divisions(run_id) unless @dry_run
79
- @skipped += 1
93
+ @skipped_empty_polyline += 1
80
94
  return
81
95
  end
82
96
 
83
97
  points = decode_points(polyline)
84
98
  unless points && points.size >= 2
99
+ $stdout.puts " #{prefix} #{run_id} → skipped (no GPS data)"
85
100
  mark_empty_divisions(run_id) unless @dry_run
86
- @skipped += 1
101
+ @skipped_no_gps += 1
87
102
  return
88
103
  end
89
104
 
90
105
  samples = sample_points(points)
91
106
  if samples.empty?
107
+ $stdout.puts " #{prefix} #{run_id} → skipped (no sample points)"
92
108
  mark_empty_divisions(run_id) unless @dry_run
93
- @skipped += 1
109
+ @skipped_no_samples += 1
94
110
  return
95
111
  end
96
112
 
97
- @attempted += 1
98
- prefix = "[#{@attempted}/#{@total}]"
99
-
100
113
  divisions = resolve_divisions(samples)
101
114
  if divisions.empty?
102
115
  $stdout.puts " #{prefix} #{run_id} → skipped (no divisions resolved)"
103
- @skipped += 1
116
+ @skipped_no_divisions += 1
104
117
  return
105
118
  end
106
119
 
@@ -237,7 +250,18 @@ module GitFit
237
250
  end
238
251
 
239
252
  def print_summary
240
- $stdout.puts "Geo detection complete: #{@processed} processed, #{@skipped} skipped, #{@errors} errors"
253
+ skipped_total = @skipped_placeholder + @skipped_empty_polyline +
254
+ @skipped_no_gps + @skipped_no_samples + @skipped_no_divisions
255
+ $stdout.puts "Geo detection complete: #{@processed} processed, #{skipped_total} skipped, #{@errors} errors"
256
+ if skipped_total > 0
257
+ parts = []
258
+ parts << "#{@skipped_placeholder} placeholder" if @skipped_placeholder > 0
259
+ parts << "#{@skipped_empty_polyline} empty polyline" if @skipped_empty_polyline > 0
260
+ parts << "#{@skipped_no_gps} no GPS data" if @skipped_no_gps > 0
261
+ parts << "#{@skipped_no_samples} no sample points" if @skipped_no_samples > 0
262
+ parts << "#{@skipped_no_divisions} no divisions" if @skipped_no_divisions > 0
263
+ $stdout.puts " Skipped: #{parts.join(", ")}"
264
+ end
241
265
  end
242
266
  end
243
267
  end
@@ -1,3 +1,3 @@
1
1
  module GitFit
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  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.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lax