hiiro 0.1.308 → 0.1.310

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: 293e176ea2c898019b001c0db7277c079980b304b43199dc270d31d91a869cca
4
- data.tar.gz: c3b6118daf238da019e7f739b2b602d6eab1f6b643c18d3dfb6f502335887e4b
3
+ metadata.gz: e89f6d5a07e33746a1baf1d469a8b8700498ff911a1d8f0752e8ce1dbcb1089e
4
+ data.tar.gz: 5384556d6652e582a716454513c983681085192618c15c488d7001d0f3cf2e1d
5
5
  SHA512:
6
- metadata.gz: d5878d6857a592da9b566b93eb8df31918196584e58c1f8ee4b637bbf281fbf0c8e72fd207d9751754eadadfbde8124d35c2b1f178bce9426d3809bfffe7494b
7
- data.tar.gz: 6217a52654077df7be803b923de5a87fb58efb3e0dce4ec51601e4cd040e98a2f911e70755ced173e5b3764de291acece7792259eb97ee1a19b76a3f04e4839a
6
+ metadata.gz: a1631db9191041ea6b7cf641ecd01f6ec3782bcad8f8de35c24a401513e7551a60e42171f807d5e2ad650e83c4fd01b7da490847257451f3990f4077ec0fd718
7
+ data.tar.gz: da298a0edf9fad8a1c38e88a29838cd6072532bf9f2569759088ba18ad1273ca3b3bde6fa7bbc3ab1020a19bcc194b0c6c1d261195b187ace84ac96e4dc37fb1
data/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  ```markdown
2
2
  # Changelog
3
3
 
4
+ ## [0.1.310] - 2026-04-01
5
+
6
+ ### Fixed
7
+ - `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
8
+
9
+ ## [0.1.309] - 2026-03-31
10
+
11
+ ### Added
12
+ - `h link tag` support for tagging links in the link manager
13
+
14
+ ### Fixed
15
+ - Correct argument passing in `run_child` to prevent arg dropping in nested Hiiro instances
16
+
4
17
  ## [0.1.308] - 2026-03-31
5
18
 
6
19
  ### Added
@@ -68,7 +81,7 @@
68
81
  ### Deprecated
69
82
  - `SystemCallCapture` — use `Hiiro::Effects` helpers in `TestHarness` instead
70
83
 
71
- ## [Unreleased]
84
+ ## [0.1.307]
72
85
 
73
86
  ### Added
74
87
  - `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/bin/h-link CHANGED
@@ -8,7 +8,9 @@ require 'tempfile'
8
8
  require "hiiro"
9
9
 
10
10
  opts = Hiiro::Options.setup {
11
- option(:shorthand, short: :s)
11
+ option(:shorthand, short: :s, desc: 'Shorthand alias for the link')
12
+ option(:tag, short: :t, multi: true, desc: 'Tag for the link (repeatable)')
13
+ option(:tags, multi: true, desc: 'Tag for the link (alias for --tag, repeatable)')
12
14
  }
13
15
 
14
16
  class LinkManager
@@ -262,7 +264,8 @@ Hiiro.run(*ARGV, plugins: [Pins], links_file: lm.links_file) do
262
264
 
263
265
  url = add_args.shift
264
266
  vals = opts.parse!(add_args)
265
- description = add_args.join(' ')
267
+ description = vals.args.join(' ')
268
+ tags = (Array(vals.tag) + Array(vals.tags)).uniq.reject(&:empty?)
266
269
 
267
270
  new_link = Hiiro::Link.create(
268
271
  url: url,
@@ -270,6 +273,7 @@ Hiiro.run(*ARGV, plugins: [Pins], links_file: lm.links_file) do
270
273
  shorthand: vals.shorthand,
271
274
  created_at: Time.now.iso8601
272
275
  )
276
+ Hiiro::Tag.tag!(new_link, *tags) if tags.any?
273
277
  lm.save_yaml_backup
274
278
 
275
279
  puts "Saved link ##{Hiiro::Link.count}: #{url}"
@@ -472,6 +476,30 @@ Hiiro.run(*ARGV, plugins: [Pins], links_file: lm.links_file) do
472
476
  system('open', url)
473
477
  end
474
478
 
479
+ add_subcmd(:paste) do |*paste_args|
480
+ url = `pbpaste`.strip
481
+
482
+ if url.empty?
483
+ puts "Clipboard is empty."
484
+ exit 1
485
+ end
486
+
487
+ vals = opts.parse!(paste_args)
488
+ description = vals.args.join(' ')
489
+ tags = (Array(vals.tag) + Array(vals.tags)).uniq.reject(&:empty?)
490
+
491
+ new_link = Hiiro::Link.create(
492
+ url: url,
493
+ description: description,
494
+ shorthand: vals.shorthand,
495
+ created_at: Time.now.iso8601
496
+ )
497
+ Hiiro::Tag.tag!(new_link, *tags) if tags.any?
498
+ lm.save_yaml_backup
499
+
500
+ puts "Saved link ##{Hiiro::Link.count}: #{url}"
501
+ end
502
+
475
503
  add_subcmd(:path) do |*path_args|
476
504
  print lm.links_file
477
505
  end
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.308"
2
+ VERSION = "0.1.310"
3
3
  end
data/lib/hiiro.rb CHANGED
@@ -65,21 +65,31 @@ 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
+ h_bin, *h_args = oargs
69
+ h_bin ||= values[:bin_name] || $0
70
+ h_args = ARGV if h_args.empty?
71
+ h_args = values[:args] if values.key?(:args)
72
+
73
+ # if values[:args]
74
+ # args = values[:args]
75
+ # else
76
+ # args ||= oargs
77
+ # args = ARGV if args.empty?
78
+ # end
79
+ #
80
+ # bin_name = values[:bin_name] || $0
81
+
82
+ begin
83
+ Hiiro::Invocation.record!(
84
+ bin: File.basename(h_bin),
85
+ subcmd: h_args.first,
86
+ args: h_args[1..]
87
+ )
88
+ rescue => e
89
+ puts " ... ERROR ... there shouldn't be any reason for this to fail...unless sqlite is broken"
90
+ binding.pry
73
91
  end
74
92
 
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
93
  new(bin_name, *args, logging: logging, tasks: tasks, task_scope: task_scope, **values).tap do |hiiro|
84
94
  hiiro.load_plugins(plugins)
85
95
 
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.308
4
+ version: 0.1.310
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota