hiiro 0.1.309 → 0.1.311

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: 64fee11a94745ab455e4a3681d71b101db2319eb1def5ab5fc884191e5289bb2
4
- data.tar.gz: 4508a89bfc1a9a0ce5570820346db8fa09434b62e8b21c8b83ee9fa6bd384a10
3
+ metadata.gz: d4937fcb1ad316ecedd51fe5559351c483ef900e19c23c7af48c49287854bbf9
4
+ data.tar.gz: 1e3afdef66a5be9cf24a5ca4c3da12c55e25ffd0c219052be65c4e3730f25dfb
5
5
  SHA512:
6
- metadata.gz: d0a2039f5a8c1717c94bfcf010d8b59629666eb15a03316f7d9a07be5aacdff4d6a1becca8f0f03079a4a46e6a7ac850a9a3283008ccf3cc905ba98a89fa98f4
7
- data.tar.gz: 76cd5e53ff951e720b2544c01653766573e61b132eab4499c3b0e95a5d10707a61ac7fffde7d4a266b1896627cab6d57198eb99aa7896f2ef7103bececa2f357
6
+ metadata.gz: 83338c0a75aadc645b41efbd79a28f2c3cf706e4087a2b55af2444f239e1af0c3e4b8746449ba8803dd795a228f3889976409b74848866553408e9b58a97b8b7
7
+ data.tar.gz: e032125f376cb473f53dfb6d7021bca07218fddf32b02f3676d13280a39d08ddf217359f33a8e4c4c813a1e9af3ca4d5a126c1844b6dd22502b56ca7fbe53a86
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  ```markdown
2
2
  # Changelog
3
3
 
4
+ ## [0.1.311] - 2026-04-01
5
+
6
+ ### Changed
7
+ - Add `ap()` inspection for bin/args initialization in debug mode
8
+
9
+ ## [0.1.310] - 2026-04-01
10
+
11
+ ### Fixed
12
+ - `make_child` now passes `bin_name:` and `args:` as keyword args to `Hiiro.init`, fixing subcommand dispatch for all `h task`, `h queue`, `h service`, and `h run` child hierarchies — previously `child_bin_name` leaked into `oargs` and became the subcmd, so every child hiiro showed help instead of dispatching
13
+
4
14
  ## [0.1.309] - 2026-03-31
5
15
 
6
16
  ### Added
@@ -76,7 +86,7 @@
76
86
  ### Deprecated
77
87
  - `SystemCallCapture` — use `Hiiro::Effects` helpers in `TestHarness` instead
78
88
 
79
- ## [Unreleased]
89
+ ## [0.1.307]
80
90
 
81
91
  ### Added
82
92
  - `Hiiro::DB` — SQLite foundation via Sequel; `DB.setup!` creates all tables, `DB.connection` establishes connection eagerly at load time; supports `HIIRO_TEST_DB=sqlite::memory:` for tests
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.309"
2
+ VERSION = "0.1.311"
3
3
  end
data/lib/hiiro.rb CHANGED
@@ -65,22 +65,34 @@ class Hiiro
65
65
  load_env
66
66
  Hiiro::DB.setup!
67
67
 
68
- if values[:args]
69
- args = values[:args]
70
- else
71
- args ||= oargs
72
- args = ARGV if args.empty?
68
+ ap(oargs: oargs, values: values)
69
+ h_bin, *h_args = oargs
70
+ h_bin ||= values[:bin_name] || $0
71
+ h_args = ARGV if h_args.empty?
72
+ h_args = values[:args] if values.key?(:args)
73
+ ap(h_bin: h_bin, h_args: h_args)
74
+
75
+ # if values[:args]
76
+ # args = values[:args]
77
+ # else
78
+ # args ||= oargs
79
+ # args = ARGV if args.empty?
80
+ # end
81
+ #
82
+ # bin_name = values[:bin_name] || $0
83
+
84
+ begin
85
+ Hiiro::Invocation.record!(
86
+ bin: File.basename(h_bin),
87
+ subcmd: h_args.first,
88
+ args: h_args[1..]
89
+ )
90
+ rescue => e
91
+ puts " ... ERROR ... there shouldn't be any reason for this to fail...unless sqlite is broken"
92
+ binding.pry
73
93
  end
74
94
 
75
- bin_name = values[:bin_name] || $0
76
-
77
- Hiiro::Invocation.record!(
78
- bin: File.basename(bin_name),
79
- subcmd: args.first,
80
- args: args[1..]
81
- ) rescue nil
82
-
83
- new(bin_name, *args, logging: logging, tasks: tasks, task_scope: task_scope, **values).tap do |hiiro|
95
+ new(h_bin, *h_args, logging: logging, tasks: tasks, task_scope: task_scope, **values).tap do |hiiro|
84
96
  hiiro.load_plugins(plugins)
85
97
 
86
98
  hiiro.add_subcommand(:pry) { |*args|
@@ -229,7 +241,11 @@ class Hiiro
229
241
  block.arity == 1 ? block.call(h) : h.instance_eval(&block) if block
230
242
  end
231
243
 
232
- Hiiro.init(child_bin_name, *child_args, **kwargs, &wrapper)
244
+ begin
245
+ Hiiro.init(bin_name: child_bin_name, args: child_args, **kwargs, &wrapper)
246
+ rescue => e
247
+ binding.pry
248
+ end
233
249
  end
234
250
 
235
251
  def run_child(custom_subcmd=nil, custom_args=nil, **kwargs, &block)
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.309
4
+ version: 0.1.311
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota