hiiro 0.1.111 → 0.1.113

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: 953fe326b4ee384e2a79bde0ca6677dea2359fc99b85f1b525d57593a83023e7
4
- data.tar.gz: 9000caa4e62c8423e6e7c56f4eceec77bf4a7f0d90ec798626a3adeaa1dd57e3
3
+ metadata.gz: 73b96ee971e0da1d4bc1d64bbcce185de63124723e6ecf4d2b3ac176fc67acc6
4
+ data.tar.gz: cc3ecd7ba334fb43d9b4db6289a86458ee38e4a72a2b4a33850ab89127661bdc
5
5
  SHA512:
6
- metadata.gz: c7bd6e462bc0d595532a3d3c2d9e264d58d0e6c1ad4b55cdb51a3fd709407b8012474ef4edb108912490060686e7af22e5a3f71cda63a0e8266148357a087869
7
- data.tar.gz: 1284c3fa9767fa2f7097893a3a6d746b5b30c39278c1ea5db17fcb5eaaaa688fd34abe658a109ff276eeb038ffbb0feb460d48d955c89975e8b083d32cd4aba8
6
+ metadata.gz: 4e632fdb849d518599dbbb94ae437c3f8f579257abba2a7ca465486e7b299a1d3b94836fcaef4e6bbb89d47e42fe2fbc12adbc934e2c538d9d4e415f7b271205
7
+ data.tar.gz: '08fb72fbdd15209f9c338d724dcb104340e4cd6183a0201f60994600c94c9103c021f3bdb31c174e9cad4930c15779ed6267a9dbb15d4e0ffd7bcba23473e06c'
data/bin/h-link CHANGED
@@ -7,6 +7,10 @@ require 'pry'
7
7
  require 'tempfile'
8
8
  require "hiiro"
9
9
 
10
+ opts = Hiiro::Options.setup {
11
+ option(:shorthand, short: :s)
12
+ }
13
+
10
14
  class LinkManager
11
15
  LINKS_FILE = File.join(Dir.home, '.config/hiiro/links.yml')
12
16
  LINK_TEMPLATE = {
@@ -215,10 +219,12 @@ Hiiro.run(*ARGV, plugins: [Pins], links_file: lm.links_file) do
215
219
  url = add_args.shift
216
220
  description = add_args.join(' ')
217
221
 
222
+ vals = opts.parse!(add_args)
223
+
218
224
  new_link = LinkManager::Link.new(
219
225
  url: url,
220
226
  description: description,
221
- shorthand: nil,
227
+ shorthand: vals.shorthand,
222
228
  created_at: Time.now.iso8601
223
229
  )
224
230
 
data/bin/h-session CHANGED
@@ -4,7 +4,7 @@ require 'hiiro'
4
4
  require 'tempfile'
5
5
  require 'yaml'
6
6
 
7
- Hiiro.run(*ARGV, plugins: [Pins]) do
7
+ Hiiro.run(*ARGV, tasks: true, plugins: [Pins]) do
8
8
  tmux = tmux_client
9
9
 
10
10
  add_subcmd(:ls, :list) { |*args|
@@ -130,7 +130,6 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
130
130
  end
131
131
 
132
132
  add_subcmd(:orphans) do
133
- env = Environment.current
134
133
  task_session_names = env.all_tasks.map(&:session_name)
135
134
  orphans = env.all_sessions.reject { |s| task_session_names.include?(s.name) }
136
135
 
@@ -144,7 +143,6 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
144
143
  end
145
144
 
146
145
  add_subcmd(:okill) do
147
- env = Environment.current
148
146
  task_session_names = env.all_tasks.map(&:session_name)
149
147
  orphans = env.all_sessions.reject { |s| task_session_names.include?(s.name) }
150
148
 
data/exe/.h.swp ADDED
Binary file
data/exe/h CHANGED
@@ -3,6 +3,20 @@
3
3
  require "hiiro"
4
4
  require "fileutils"
5
5
 
6
+ def update_hiiro
7
+ if `gem list hiiro`.strip.empty?
8
+ system('gem', 'install', 'hiiro')
9
+ else
10
+ system('gem', 'update', 'hiiro')
11
+ end
12
+
13
+ system('h', 'setup')
14
+ end
15
+
16
+ def rbenv_versions
17
+ versions = `rbenv versions --bare`.lines(chomp: true)
18
+ end
19
+
6
20
  Hiiro.run(*ARGV, cwd: Dir.pwd, tasks: true) do
7
21
  add_subcmd(:version) { |*args|
8
22
  puts Hiiro::VERSION
@@ -12,6 +26,21 @@ Hiiro.run(*ARGV, cwd: Dir.pwd, tasks: true) do
12
26
  puts "pong"
13
27
  }
14
28
 
29
+ add_subcmd(:install) { |*args|
30
+ opts = Hiiro::Options.setup {
31
+ flag(:all, short: :a)
32
+ }.parse!(ARGV)
33
+
34
+ if opts.all
35
+ rbenv_versions.each do |ver|
36
+ ENV['RBENV_VERSION'] = ver
37
+ update_hiiro
38
+ end
39
+ else
40
+ update_hiiro
41
+ end
42
+ }
43
+
15
44
  add_subcmd(:setup) do |*args|
16
45
  # Detect how the command was invoked to determine prefix
17
46
  invoked_as = File.basename($0)
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.111"
2
+ VERSION = "0.1.113"
3
3
  end
data/scripts/compare CHANGED
@@ -8,7 +8,7 @@ diff_dirs() {
8
8
 
9
9
  # s@Only in \(bin|plugins\): \(.*\)@cp -v \1/\2 $HOME/\1/@;
10
10
 
11
- diff_dirs | sed -E "s@Only in @@;s@: @/@;s@^(/.*(bin|plugins).*)@cp -v \\1 \\2/@;s@^(bin.*)@cp -v \\1 $HOME/bin/@;s@^(plugins.*)@cp -v \\1 $HOME/.config/hiiro/plugins/@;s@Files (.*) and (.*) differ@vim -d \\1 \\2@" | egrep 'cp -'
11
+ diff_dirs | sed -E "s@Only in @@;s@: @/@;s@^(/.*(bin|plugins).*)@cp -v \\1 \\2/@;s@^(bin.*)@cp -v \\1 $HOME/bin/@;s@^(plugins.*)@cp -v \\1 $HOME/.config/hiiro/plugins/@;s@Files (.*) and (.*) differ@safe_nvim -d \\1 \\2@" | egrep 'cp -'
12
12
 
13
- diff_dirs | sed -E "s@Only in @@;s@: @/@;s@^(/.*(bin|plugins).*)@cp -v \\1 \\2/@;s@^(bin.*)@cp -v \\1 $HOME/bin/@;s@^(plugins.*)@cp -v \\1 $HOME/.config/hiiro/plugins/@;s@Files (.*) and (.*) differ@vim -d \\1 \\2@" | egrep -v 'cp -'
13
+ diff_dirs | sed -E "s@Only in @@;s@: @/@;s@^(/.*(bin|plugins).*)@cp -v \\1 \\2/@;s@^(bin.*)@cp -v \\1 $HOME/bin/@;s@^(plugins.*)@cp -v \\1 $HOME/.config/hiiro/plugins/@;s@Files (.*) and (.*) differ@safe_nvim -d \\1 \\2@" | egrep -v 'cp -'
14
14
 
data/sync.sh ADDED
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ safe_nvim -d bin/h-app /Users/josh/bin/h-app
4
+ safe_nvim -d bin/h-branch /Users/josh/bin/h-branch
5
+ safe_nvim -d bin/h-link /Users/josh/bin/h-link
6
+ safe_nvim -d bin/h-pr /Users/josh/bin/h-pr
7
+ safe_nvim -d bin/h-session /Users/josh/bin/h-session
8
+ safe_nvim -d bin/h-window /Users/josh/bin/h-window
9
+ safe_nvim -d plugins/tasks.rb /Users/josh/.config/hiiro/plugins/tasks.rb
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.111
4
+ version: 0.1.113
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-02-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: pry
@@ -71,6 +70,7 @@ description: Build multi-command CLI tools with subcommand dispatch, abbreviatio
71
70
  email:
72
71
  - jearsh+rubygems@gmail.com
73
72
  executables:
73
+ - ".h.swp"
74
74
  - h
75
75
  - hiiro
76
76
  extensions: []
@@ -107,6 +107,7 @@ files:
107
107
  - docs/h-session.md
108
108
  - docs/h-window.md
109
109
  - editboth
110
+ - exe/.h.swp
110
111
  - exe/h
111
112
  - exe/hiiro
112
113
  - hiiro.gemspec
@@ -146,6 +147,7 @@ files:
146
147
  - scripts/sync
147
148
  - scripts/test
148
149
  - scripts/update
150
+ - sync.sh
149
151
  homepage: https://github.com/unixsuperhero/hiiro
150
152
  licenses:
151
153
  - MIT
@@ -153,7 +155,6 @@ metadata:
153
155
  homepage_uri: https://github.com/unixsuperhero/hiiro
154
156
  source_code_uri: https://github.com/unixsuperhero/hiiro
155
157
  changelog_uri: https://github.com/unixsuperhero/hiiro/blob/main/CHANGELOG.md
156
- post_install_message:
157
158
  rdoc_options: []
158
159
  require_paths:
159
160
  - lib
@@ -168,8 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
169
  - !ruby/object:Gem::Version
169
170
  version: '0'
170
171
  requirements: []
171
- rubygems_version: 3.3.7
172
- signing_key:
172
+ rubygems_version: 4.0.3
173
173
  specification_version: 4
174
174
  summary: A lightweight CLI framework for Ruby
175
175
  test_files: []