hiiro 0.1.357 → 0.1.358
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 +6 -1
- data/README.md +2 -0
- data/docs/h-bin.md +2 -1
- data/docs/h.md +1 -1
- data/exe/h +8 -2
- data/hiiro.gemspec +1 -1
- data/lib/hiiro/bins.rb +19 -0
- data/lib/hiiro/rbenv.rb +17 -1
- data/lib/hiiro/version.rb +2 -1
- data/script/publish +31 -5
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ac9a8a76b3fde89fee6dc085622cceab7771d6bcdb283712fb5b60557fe72f4
|
|
4
|
+
data.tar.gz: 11ea63e7bfa74155c1fa2508f34bc9bc246f744339a74fdd0e41ba1a7f8a2a9c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4236b8344c5208faedfa3edca652b5b6c0c3d3126b73bbd9f310fa788e59f5dee6460bad213ad9ee6c521f7d2ae0d4b6fd44709b18c946d288c32a9525cfe451
|
|
7
|
+
data.tar.gz: 237f5864abd39396303f5fb2d702452c41fc94a4a0e36416fd29df4ed102628af526355c1996f7d28d680a30ca8e0d10deb09424b3fc26ac5b8572a41e113dfb
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
### Fixed
|
|
6
|
+
- Restore the missing `Hiiro::Bins` helper so `require "hiiro"` boots and commands like `h jumplist record` dispatch correctly.
|
|
7
|
+
- Make Hiiro's Ruby requirement explicit as Ruby 3.2+ and have rbenv-wide gem installs skip incompatible Ruby versions.
|
|
8
|
+
- Update the publish script to preserve the Ruby support constant, run only on supported Ruby, and install releases only into compatible rbenv versions.
|
|
9
|
+
|
|
5
10
|
## [0.1.355] - 2026-05-19
|
|
6
11
|
|
|
7
12
|
### Added
|
|
@@ -337,4 +342,4 @@
|
|
|
337
342
|
- `h db cleanup` subcommand to preview and prune duplicate rows from SQLite tables
|
|
338
343
|
|
|
339
344
|
### Fixed
|
|
340
|
-
- Prevent duplicate pinned_prs during import with `insert_conflict` and per-row rescue
|
|
345
|
+
- Prevent duplicate pinned_prs during import with `insert_conflict` and per-row rescue
|
data/README.md
CHANGED
data/docs/h-bin.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
List and edit hiiro bin scripts (`h-*` executables found in PATH).
|
|
4
4
|
|
|
5
|
+
`h bin` uses `Hiiro::Bins` to scan the current `PATH` for executable files.
|
|
6
|
+
|
|
5
7
|
## Synopsis
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -36,4 +38,3 @@ List `h-*` executables found in PATH. With no arguments, lists all. With names,
|
|
|
36
38
|
h bin list
|
|
37
39
|
h bin list branch pr
|
|
38
40
|
```
|
|
39
|
-
|
data/docs/h.md
CHANGED
|
@@ -21,7 +21,7 @@ These subcommands are defined directly in `exe/h` or loaded from `lib/`:
|
|
|
21
21
|
| `h delayed_update` | Poll RubyGems for a new version and install when available | `exe/h` |
|
|
22
22
|
| `h edit` | Open the `h` bin file in your editor | `exe/h` |
|
|
23
23
|
| [`h file`](h-file.md) | Track frequently-used files per app and open them in your editor | `lib/hiiro/app_files.rb` |
|
|
24
|
-
| `h install` / `h update` | Install or update the hiiro gem (`-a`
|
|
24
|
+
| `h install` / `h update` | Install or update the hiiro gem (`-a` compatible rbenv versions, `-p` pre-release) | `exe/h` |
|
|
25
25
|
| `h ping` | Health check — prints `pong` | `exe/h` |
|
|
26
26
|
| `h pry` | Open a pry REPL in the hiiro context | `exe/h` |
|
|
27
27
|
| [`h queue`](h-queue.md) | Claude prompt queue — create, watch, and run AI prompts in tmux | `lib/hiiro/queue.rb` |
|
data/exe/h
CHANGED
|
@@ -38,10 +38,16 @@ Hiiro.run(*ARGV, cwd: Dir.pwd, tasks: true) do
|
|
|
38
38
|
|
|
39
39
|
if opts.all
|
|
40
40
|
versions = Hiiro::Rbenv.versions
|
|
41
|
-
|
|
41
|
+
supported_versions = Hiiro::Rbenv.supported_versions
|
|
42
|
+
skipped_versions = versions - supported_versions
|
|
43
|
+
puts "Updating hiiro across #{supported_versions.size} compatible Ruby version(s)...\n\n"
|
|
44
|
+
skipped_versions.each do |ver|
|
|
45
|
+
puts " ruby #{ver} skipped (requires Ruby #{Hiiro::SUPPORTED_RUBY_VERSION})"
|
|
46
|
+
end
|
|
47
|
+
puts if skipped_versions.any?
|
|
42
48
|
mu = Mutex.new
|
|
43
49
|
|
|
44
|
-
threads =
|
|
50
|
+
threads = supported_versions.map do |ver|
|
|
45
51
|
Thread.new do
|
|
46
52
|
Hiiro::Rbenv.install_gem('hiiro', pre: opts.pre, version: ver)
|
|
47
53
|
Hiiro::Rbenv.run('h', 'setup', version: ver)
|
data/hiiro.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.description = "Build multi-command CLI tools with subcommand dispatch, abbreviation matching, and a plugin system. Similar to git or docker command structure."
|
|
11
11
|
spec.homepage = "https://github.com/unixsuperhero/hiiro"
|
|
12
12
|
spec.license = "MIT"
|
|
13
|
-
spec.required_ruby_version =
|
|
13
|
+
spec.required_ruby_version = Hiiro::SUPPORTED_RUBY_VERSION
|
|
14
14
|
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
16
|
spec.metadata["source_code_uri"] = spec.homepage
|
data/lib/hiiro/bins.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class Hiiro
|
|
2
|
+
class Bins
|
|
3
|
+
PATH = ENV['PATH']
|
|
4
|
+
|
|
5
|
+
def self.path = PATH
|
|
6
|
+
def self.paths = path.split(?:).map(&:strip).uniq
|
|
7
|
+
|
|
8
|
+
def self.glob(*names)
|
|
9
|
+
path_glob = [?{, paths.join(?,), ?}].join
|
|
10
|
+
name_glob = [?{, names.flatten.compact.join(?,), ?}].join
|
|
11
|
+
|
|
12
|
+
Dir[File.join(path_glob, name_glob)].select(&File.method(:executable?))
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.all
|
|
16
|
+
Dir[glob('*')].select(&File.method(:executable?))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/hiiro/rbenv.rb
CHANGED
|
@@ -38,6 +38,22 @@ class Hiiro
|
|
|
38
38
|
capture('ruby', '--version', version: version).strip
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
def ruby_version_number(version: current_version)
|
|
42
|
+
capture('ruby', '-e', 'print RUBY_VERSION', version: version).strip
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def supported_ruby?(version)
|
|
46
|
+
Gem::Requirement.new(Hiiro::SUPPORTED_RUBY_VERSION).satisfied_by?(
|
|
47
|
+
Gem::Version.new(ruby_version_number(version: version))
|
|
48
|
+
)
|
|
49
|
+
rescue ArgumentError
|
|
50
|
+
false
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def supported_versions
|
|
54
|
+
versions.select { |ver| supported_ruby?(ver) }
|
|
55
|
+
end
|
|
56
|
+
|
|
41
57
|
# --- Running commands ---
|
|
42
58
|
|
|
43
59
|
# Run a command through `rbenv exec` in the given version.
|
|
@@ -78,7 +94,7 @@ class Hiiro
|
|
|
78
94
|
|
|
79
95
|
# Install or update a gem across all installed versions.
|
|
80
96
|
def install_gem_in_all(gem_name, pre: false)
|
|
81
|
-
|
|
97
|
+
supported_versions.each { |ver| install_gem(gem_name, pre: pre, version: ver) }
|
|
82
98
|
end
|
|
83
99
|
|
|
84
100
|
# --- Path helpers ---
|
data/lib/hiiro/version.rb
CHANGED
data/script/publish
CHANGED
|
@@ -5,6 +5,12 @@ require "json"
|
|
|
5
5
|
require "open3"
|
|
6
6
|
require "shellwords"
|
|
7
7
|
|
|
8
|
+
HIIRO_SUPPORTED_RUBY_VERSION = ">= 3.2.0"
|
|
9
|
+
|
|
10
|
+
unless Gem::Requirement.new(HIIRO_SUPPORTED_RUBY_VERSION).satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
|
11
|
+
abort("ERROR: publishing hiiro requires Ruby #{HIIRO_SUPPORTED_RUBY_VERSION}; current Ruby is #{RUBY_VERSION}")
|
|
12
|
+
end
|
|
13
|
+
|
|
8
14
|
# ─── RubyGems API ────────────────────────────────────────────────────────────
|
|
9
15
|
|
|
10
16
|
class RubyGems
|
|
@@ -107,7 +113,7 @@ class Git
|
|
|
107
113
|
puts "Tagged v#{version}"
|
|
108
114
|
end
|
|
109
115
|
|
|
110
|
-
def self.push
|
|
116
|
+
def self.push(version)
|
|
111
117
|
if system("git", "push", "origin", "main", "--follow-tags")
|
|
112
118
|
puts "Pushed to origin/main"
|
|
113
119
|
else
|
|
@@ -232,7 +238,15 @@ if pending_before
|
|
|
232
238
|
else
|
|
233
239
|
puts "\nNo pending changes — skipping Claude."
|
|
234
240
|
end
|
|
235
|
-
File.write(
|
|
241
|
+
File.write(
|
|
242
|
+
"lib/hiiro/version.rb",
|
|
243
|
+
<<~RUBY
|
|
244
|
+
class Hiiro
|
|
245
|
+
VERSION = #{new_version.inspect}
|
|
246
|
+
SUPPORTED_RUBY_VERSION = #{HIIRO_SUPPORTED_RUBY_VERSION.inspect}
|
|
247
|
+
end
|
|
248
|
+
RUBY
|
|
249
|
+
)
|
|
236
250
|
|
|
237
251
|
RubyGem.build(new_version)
|
|
238
252
|
|
|
@@ -242,7 +256,7 @@ end
|
|
|
242
256
|
|
|
243
257
|
Git.commit_all("publishing v#{new_version}")
|
|
244
258
|
Git.tag(new_version)
|
|
245
|
-
Git.push
|
|
259
|
+
Git.push(new_version)
|
|
246
260
|
|
|
247
261
|
puts "\nWaiting for v#{new_version} to appear on RubyGems..."
|
|
248
262
|
unless RubyGems.wait_for("hiiro", new_version)
|
|
@@ -250,12 +264,24 @@ unless RubyGems.wait_for("hiiro", new_version)
|
|
|
250
264
|
exit 1
|
|
251
265
|
end
|
|
252
266
|
|
|
253
|
-
puts "v#{new_version} available — installing across
|
|
267
|
+
puts "v#{new_version} available — installing across compatible Ruby versions...\n\n"
|
|
254
268
|
pre_flag = pre_release ? ["--pre"] : []
|
|
255
269
|
mu = Mutex.new
|
|
256
270
|
|
|
257
271
|
rbenv_versions = `rbenv versions --bare`.lines(chomp: true)
|
|
258
|
-
|
|
272
|
+
supported_versions, skipped_versions = rbenv_versions.partition do |ver|
|
|
273
|
+
ruby_version = `RBENV_VERSION=#{ver.shellescape} rbenv exec ruby -e 'print RUBY_VERSION' 2>/dev/null`.strip
|
|
274
|
+
Gem::Requirement.new(HIIRO_SUPPORTED_RUBY_VERSION).satisfied_by?(Gem::Version.new(ruby_version))
|
|
275
|
+
rescue ArgumentError
|
|
276
|
+
false
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
skipped_versions.each do |ver|
|
|
280
|
+
puts " ruby #{ver} skipped (requires Ruby #{HIIRO_SUPPORTED_RUBY_VERSION})"
|
|
281
|
+
end
|
|
282
|
+
puts if skipped_versions.any?
|
|
283
|
+
|
|
284
|
+
threads = supported_versions.map do |ver|
|
|
259
285
|
Thread.new do
|
|
260
286
|
env = { "RBENV_VERSION" => ver }
|
|
261
287
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hiiro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.358
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua Toyota
|
|
@@ -327,6 +327,7 @@ files:
|
|
|
327
327
|
- lib/hiiro/app_record.rb
|
|
328
328
|
- lib/hiiro/assignment.rb
|
|
329
329
|
- lib/hiiro/background.rb
|
|
330
|
+
- lib/hiiro/bins.rb
|
|
330
331
|
- lib/hiiro/branch.rb
|
|
331
332
|
- lib/hiiro/capture.rb
|
|
332
333
|
- lib/hiiro/check_run.rb
|
|
@@ -414,14 +415,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
414
415
|
requirements:
|
|
415
416
|
- - ">="
|
|
416
417
|
- !ruby/object:Gem::Version
|
|
417
|
-
version: 2.
|
|
418
|
+
version: 3.2.0
|
|
418
419
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
419
420
|
requirements:
|
|
420
421
|
- - ">="
|
|
421
422
|
- !ruby/object:Gem::Version
|
|
422
423
|
version: '0'
|
|
423
424
|
requirements: []
|
|
424
|
-
rubygems_version: 3.
|
|
425
|
+
rubygems_version: 3.4.19
|
|
425
426
|
signing_key:
|
|
426
427
|
specification_version: 4
|
|
427
428
|
summary: A lightweight CLI framework for Ruby
|