hiiro 0.1.380 → 0.1.382

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: f16b6af02e89f46207b5e15d23e5e112413036a2da29ff1257cc5fec2025a655
4
- data.tar.gz: 1b16f6ecf825bddf0ee1672710b09c31bac6db4489158ea0de6b714446cce1cf
3
+ metadata.gz: 224895f5055fcecd3d3a39fbd4d36720ff89df57999dea629765063af2f167f0
4
+ data.tar.gz: 3841aeb22c9bcfe916e5da722e6e451a415318a1b19160e858a8d4cfc07b0566
5
5
  SHA512:
6
- metadata.gz: 54990684ed981d3387fdfa212fdcc58ad55b6ac9f5422f79644b5bdf8c48f4d29aee5cdcbf33cd887903eee970b1ebc326b3b930e4808623001ca45c59b9283d
7
- data.tar.gz: aed85297b9d4c67a7634c99d37d1c6c27f387e9c1dd784f652f9c9199c48c883e2b8a12c123574acb6a57b7f6752299f4c4285b109750ae6dd45e7f6d0b173ec
6
+ metadata.gz: a0b1514b839eb458949365761d33f12850106e0a97fcfa986027d6cbe59d39fe583207a117fe96972208972298d70d6b7bffcbc418956a713ce7ec60a871183f
7
+ data.tar.gz: 34dd8a0c83c465d0ed85fd89c6371385e55f5c222b594eeec85428ef4c97936eef154b7544ae501214bba1a8222bdadde1e85fc96e7fd1f1cdedf4ff214a5e76
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.381] - 2026-09-20
4
+
5
+ ### Added
6
+ - `Hiiro::Options` now includes file/directory filtering methods: `files`, `dirs`, `file_or_dirs`, `not_files`, and `not_file_or_dirs` for convenient argument classification
7
+
3
8
  ## [0.1.377] - 2026-09-17
4
9
 
5
10
  ### Changed
data/lib/hiiro/options.rb CHANGED
@@ -124,6 +124,12 @@ class Hiiro
124
124
  do_parse(raw_args.dup)
125
125
  end
126
126
 
127
+ def files = @files ||= args.select{|x| File.file?(x) }
128
+ def dirs = @dirs ||= args.select{|x| File.directory?(x) }
129
+ def file_or_dirs = @file_or_dirs ||= args.select{|x| File.file?(x) || File.directory?(x) }
130
+ def not_files = args - files
131
+ def not_file_or_dirs = args - file_or_dirs
132
+
127
133
  def [](name)
128
134
  @values[name.to_sym]
129
135
  end
data/lib/hiiro/shell.rb CHANGED
@@ -8,6 +8,7 @@ class Hiiro
8
8
  stdout, status = Open3.capture2(env, *command)
9
9
  stdout
10
10
  end
11
+ self.alias capture capture_output
11
12
 
12
13
  def self.pipe_lines(lines, *command)
13
14
  content = lines.is_a?(Array) ? lines.join("\n") : lines.to_s
data/lib/hiiro/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class Hiiro
2
- VERSION = "0.1.380"
2
+ VERSION = "0.1.382"
3
3
  SUPPORTED_RUBY_VERSION = ">= 3.2.0"
4
4
  end
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.380
4
+ version: 0.1.382
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-09-20 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
@@ -469,7 +468,6 @@ metadata:
469
468
  homepage_uri: https://github.com/unixsuperhero/hiiro
470
469
  source_code_uri: https://github.com/unixsuperhero/hiiro
471
470
  changelog_uri: https://github.com/unixsuperhero/hiiro/blob/main/CHANGELOG.md
472
- post_install_message:
473
471
  rdoc_options: []
474
472
  require_paths:
475
473
  - lib
@@ -484,8 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
484
482
  - !ruby/object:Gem::Version
485
483
  version: '0'
486
484
  requirements: []
487
- rubygems_version: 3.5.22
488
- signing_key:
485
+ rubygems_version: 4.0.20
489
486
  specification_version: 4
490
487
  summary: A lightweight CLI framework for Ruby
491
488
  test_files: []