hiiro 0.1.317 → 0.1.318
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 +13 -0
- data/lib/hiiro/rbenv.rb +4 -8
- data/lib/hiiro/registry.rb +14 -0
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +1 -0
- data/script/publish +9 -11
- 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: 18a7b5de061af02dfb8d60a1dd50eaf91e790937976ab598120439f99170bad3
|
|
4
|
+
data.tar.gz: ca79b1405eaec4fb5ba0b8d43bd48ce6ff1b52136a806e08ddb7b4aa09bfb055
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e32866b673ce6ec24d27c453653853c6a594aa331d714712b19a817a2138ea56dac74eecc546289c9405819c5631cc1f8f5970b98f7d2d10828ccfce707a6487
|
|
7
|
+
data.tar.gz: 27f8163a315a7aa03e95cea498b57aadca0f22f2b2e09fdfe38f3cc760706be2ebf4cf54732f500c8b0a4174589ce56d44231fb8937f8a6820cd9e6f3c9250e8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.318] - 2026-04-01
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `registry_pick` helper method for interactive registry entry selection via fuzzyfinder
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Simplify gem installation logic: always use `gem install -u` instead of checking installation state and branching between `gem install` and `gem update`
|
|
10
|
+
- Remove `--clear-sources` and `--source` flags in favor of gem's built-in source cache handling
|
|
11
|
+
- Improve gem version regex in publish script to match only the first (latest) version from `gem list` output
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- Ensure gem installation works reliably across all rbenv Ruby versions by using `-u` flag for consistent update behavior
|
|
15
|
+
|
|
3
16
|
## [0.1.317] - 2026-04-01
|
|
4
17
|
|
|
5
18
|
### Changed
|
data/lib/hiiro/rbenv.rb
CHANGED
|
@@ -69,15 +69,11 @@ class Hiiro
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
# Install or update a gem in the given version.
|
|
72
|
-
#
|
|
72
|
+
# Always uses gem install (handles both fresh installs and updates to the latest
|
|
73
|
+
# version) and pins to rubygems.org to bypass the local source cache.
|
|
73
74
|
def install_gem(gem_name, version: current_version, pre: false)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if gem_installed?(gem_name, version: version)
|
|
77
|
-
run('gem', 'update', gem_name, *source_flags, *pre_flag, version: version)
|
|
78
|
-
else
|
|
79
|
-
run('gem', 'install', gem_name, *source_flags, *pre_flag, version: version)
|
|
80
|
-
end
|
|
75
|
+
pre_flag = pre ? ['--pre'] : []
|
|
76
|
+
run('gem', 'install', gem_name, '-u', *pre_flag, version: version)
|
|
81
77
|
end
|
|
82
78
|
|
|
83
79
|
# Install or update a gem across all installed versions.
|
data/lib/hiiro/registry.rb
CHANGED
|
@@ -64,3 +64,17 @@ class Hiiro
|
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
|
+
|
|
68
|
+
class Hiiro
|
|
69
|
+
# Pick a registry entry by fuzzyfinder. Returns the canonical name string, or nil.
|
|
70
|
+
# Usage inside a subcommand block:
|
|
71
|
+
# task = opts.task || registry_pick('isc_task')
|
|
72
|
+
def registry_pick(type = nil)
|
|
73
|
+
lines = Hiiro::RegistryEntry.fuzzy_lines(type: type)
|
|
74
|
+
return nil if lines.empty?
|
|
75
|
+
chosen = fuzzyfind(lines)
|
|
76
|
+
return nil unless chosen
|
|
77
|
+
# fuzzy_line format: "type short name # desc" — name is 3rd column
|
|
78
|
+
chosen.strip.split(/\s{2,}/)[2]
|
|
79
|
+
end
|
|
80
|
+
end
|
data/lib/hiiro/version.rb
CHANGED
data/lib/hiiro.rb
CHANGED
data/script/publish
CHANGED
|
@@ -239,27 +239,25 @@ unless RubyGems.wait_for("hiiro", new_version)
|
|
|
239
239
|
end
|
|
240
240
|
|
|
241
241
|
puts "v#{new_version} available — installing across all Ruby versions...\n\n"
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
mu = Mutex.new
|
|
242
|
+
pre_flag = pre_release ? ["--pre"] : []
|
|
243
|
+
mu = Mutex.new
|
|
245
244
|
|
|
246
245
|
rbenv_versions = `rbenv versions --bare`.lines(chomp: true)
|
|
247
246
|
threads = rbenv_versions.map do |ver|
|
|
248
247
|
Thread.new do
|
|
249
248
|
env = { "RBENV_VERSION" => ver }
|
|
250
249
|
|
|
251
|
-
#
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
250
|
+
# Always use gem install — it picks up the latest version whether or not
|
|
251
|
+
# an older one is installed, and handles the source cache reliably.
|
|
252
|
+
system(env, "rbenv", "exec",
|
|
253
|
+
"gem", "install", "hiiro", "-u", *pre_flag,
|
|
254
|
+
out: File::NULL, err: File::NULL)
|
|
256
255
|
|
|
257
|
-
# run setup for the new version
|
|
258
256
|
system(env, "rbenv", "exec", "h", "setup", out: File::NULL, err: File::NULL)
|
|
259
257
|
|
|
260
|
-
#
|
|
258
|
+
# gem list returns "hiiro (0.1.317, 0.1.316, ...)" — grab only the first (latest)
|
|
261
259
|
hiiro_ver = `RBENV_VERSION=#{ver.shellescape} rbenv exec gem list hiiro --exact 2>/dev/null`
|
|
262
|
-
.match(/hiiro \(([
|
|
260
|
+
.match(/hiiro \(([^,)]+)/)&.[](1) || "?"
|
|
263
261
|
mu.synchronize { puts " ruby #{ver} → hiiro #{hiiro_ver}" }
|
|
264
262
|
end
|
|
265
263
|
end
|