hiiro 0.1.308.pre.2 → 0.1.308.pre.3
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/CHANGELOG.md +8 -0
- data/exe/h +36 -2
- data/lib/hiiro/db.rb +3 -1
- data/lib/hiiro/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: 4585afb8d2689cc0d400701986ccae708929b8e554186181b8507f4502f6c91b
|
|
4
|
+
data.tar.gz: 5c8e9613d6d0e8f6b83885a71bd947e7ece57b3637d9a4fdf8be830f3ed99ccc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0376bbbbf2f82f6cef4e6a958f290f2ca204ea1605840d7fc0c69488882f34ac0e7a0b66382ef9f2c1b5f72d2ac21acd8e75496504babf8c530720ad60ad9fa
|
|
7
|
+
data.tar.gz: c2b00bcc066feb4cb7c8ed84a343d174a7b6f1c16cd96163294af3d3914027adc7cab3342b847e48926702bda2caaea622d4568ffc86c59e66881cf7670110a2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
```markdown
|
|
2
2
|
# Changelog
|
|
3
3
|
|
|
4
|
+
## [0.1.308.pre.3] - 2026-03-31
|
|
5
|
+
|
|
6
|
+
### Changed
|
|
7
|
+
- Poll RubyGems in `delayed_update` instead of blind sleep for more reliable version detection
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Per-row rescue in `import_todos` so one bad row doesn't abort the entire batch
|
|
11
|
+
|
|
4
12
|
## [0.1.308.pre.2] - 2026-03-31
|
|
5
13
|
|
|
6
14
|
### Added
|
data/exe/h
CHANGED
|
@@ -196,9 +196,43 @@ Hiiro.run(*ARGV, cwd: Dir.pwd, tasks: true) do
|
|
|
196
196
|
|
|
197
197
|
script = <<~RUBY
|
|
198
198
|
#!/usr/bin/env ruby
|
|
199
|
+
require 'net/http'
|
|
200
|
+
require 'json'
|
|
201
|
+
|
|
199
202
|
expected = #{expected.inspect}
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
is_pre = expected.include?('.pre.')
|
|
204
|
+
|
|
205
|
+
# Poll RubyGems until the expected version appears (up to ~10 min)
|
|
206
|
+
found = false
|
|
207
|
+
attempts = 0
|
|
208
|
+
max = 40
|
|
209
|
+
|
|
210
|
+
until found || attempts >= max
|
|
211
|
+
sleep(attempts == 0 ? 5 : 15)
|
|
212
|
+
attempts += 1
|
|
213
|
+
begin
|
|
214
|
+
uri = URI('https://rubygems.org/api/v1/versions/hiiro.json')
|
|
215
|
+
versions = JSON.parse(Net::HTTP.get(uri)).map { |v| v['number'] }
|
|
216
|
+
if versions.include?(expected)
|
|
217
|
+
found = true
|
|
218
|
+
puts "v\#{expected} found on RubyGems after \#{attempts} poll(s). Installing..."
|
|
219
|
+
else
|
|
220
|
+
puts "Waiting for v\#{expected} on RubyGems (attempt \#{attempts}/\#{max})..."
|
|
221
|
+
end
|
|
222
|
+
rescue => e
|
|
223
|
+
puts "RubyGems poll error: \#{e.message}"
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
unless found
|
|
228
|
+
system('say', 'hiiro publish timed out')
|
|
229
|
+
exit 1
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
install_args = ['update', '-a']
|
|
233
|
+
install_args << '--pre' if is_pre
|
|
234
|
+
system('h', *install_args)
|
|
235
|
+
|
|
202
236
|
versions = `rbenv versions --bare`.lines(chomp: true)
|
|
203
237
|
mismatched = versions.reject do |ver|
|
|
204
238
|
output = `RBENV_VERSION=\#{ver} rbenv exec gem list hiiro --exact 2>/dev/null`
|
data/lib/hiiro/db.rb
CHANGED
|
@@ -155,7 +155,9 @@ class Hiiro
|
|
|
155
155
|
'updated_at' => r['updated_at']&.to_s,
|
|
156
156
|
}.compact
|
|
157
157
|
record['id'] = r['id'].to_i if r['id']
|
|
158
|
-
connection[:todos].insert(record)
|
|
158
|
+
connection[:todos].insert_conflict.insert(record)
|
|
159
|
+
rescue => e
|
|
160
|
+
warn "Hiiro::DB: skipping todo row (#{e.class}: #{e.message.lines.first&.strip})"
|
|
159
161
|
end
|
|
160
162
|
bak(path)
|
|
161
163
|
rescue => e
|
data/lib/hiiro/version.rb
CHANGED