git-fit 0.17.4 → 0.17.6

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: 4c9c026f3d44b75a14eae1f36cc7dc6a56434cd0039996bfb38163fc3bb617a5
4
- data.tar.gz: b11245bfa2b0fef405e5f0f369fd02582d1a2ba509b7fb91972f38249ae8ec01
3
+ metadata.gz: 5015658feae71e9b2834dcabede734c6fd18ce3eb107574a88849a103b252cd0
4
+ data.tar.gz: 7d89ca6992b25f8d6319c1c0fbbe4afb23f32fb1ef8b9b56d8f705655c6924c0
5
5
  SHA512:
6
- metadata.gz: 1baed90c0c86bbb46edefd951646ba0f2fffd8cd08b07eb900479a74f372de43d50c7a0f39c56f728f8fb476cfe264075eaafcc3721b2bcd5dddc692b9469592
7
- data.tar.gz: e98542328ef0210b5934a1c85dfb388b35563df9a4998bb52de7dd6847c05f7ada8a57402d9c359ed08bb6f9420d3a5205d91454c61b40801faa6bfd6fad769f
6
+ metadata.gz: 9cb00b5a74e1acdbd21d654e2d49efc1239f7456d986897da130f528743f168a8646b048f87f4c8888b586b0fcb18c99148aff8ecf0932163730883211ec408e
7
+ data.tar.gz: 0c29a0c7771f4207105f391e17b1880ded4ef418c373bcbee7238e44f4658ae09f15d4d691d9eabc5175132e33bb3e36445e5548d281eb6c819907e30ba84d2e
@@ -120,8 +120,13 @@ module GitFit
120
120
  end
121
121
 
122
122
  def compute_from_xingzhe(natural_id)
123
- raw_path = File.join('data', 'raw', 'xingzhe', "#{natural_id}.json")
124
- return nil unless File.exist?(raw_path)
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') || []
@@ -106,7 +106,8 @@ module GitFit
106
106
  end
107
107
 
108
108
  def raw_file_exists?(platform_id)
109
- File.exist?(raw_path(platform_id))
109
+ dir = File.join(raw_dir, platform_id)
110
+ %w[stream.json detail.json].all? { |f| File.exist?(File.join(dir, f)) }
110
111
  end
111
112
 
112
113
  def write_source_archive(data, platform_id, _ext = 'json')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitFit
4
- VERSION = '0.17.4'
4
+ VERSION = '0.17.6'
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.17.4
4
+ version: 0.17.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lax