run_kit 0.1.6 → 0.1.7

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: 88bb49c39cde1b38476bad542e725026bf1709aecd58ed4ffd676a1367a87faf
4
- data.tar.gz: 016eed022444cb2aa2fbfeaf213eceee7259fabdf920bde34a7500d60f79ff46
3
+ metadata.gz: c2e261e9ecccb8fd6abcf6708b7e5cf4a31331e1d1c89b89320b58ec64c75b66
4
+ data.tar.gz: 4135324d938c3e29d6ae9ea9a85798b2f8a2211d2f4550bb081eac1630ac8346
5
5
  SHA512:
6
- metadata.gz: 82159e72865bd71a9d6d696e2c7276e3b5051b82217093e68381ebbd051ef8faeaff9f53debefd09c4b71f4c77c20f335e20ab489aef6e3785a756d7bbfe9b1e
7
- data.tar.gz: 5a38d4bb77f1e2a7440c69ebdf435a55e58a772c401f0756c1fea0cdbc9a8aaf8d429e739a846213927b4d300825c8e0ee13347e7ed325883ea8355e955449ca
6
+ metadata.gz: ae9fae564b7b9d5534b5166bc0b35b0d465f44064952ea38236eda22259f8656b251c28267f12a1e89713ed98a9c88dbcbf3dacff75313e3f14d0b57aa4e7cff
7
+ data.tar.gz: 07f5af57b5328997f8ab7fdb4b98c1ae255bac63295bd6f351c6680684e69d059f6c6557177b29bac4ec66dccb5d521008148a9414479a980a016e4548ccd8bd
data/README.md CHANGED
@@ -145,6 +145,10 @@ Note: There has been some effort to get the Pathname helpers into Ruby itself, w
145
145
 
146
146
  ### Changelog
147
147
 
148
+ #### 0.1.7 (Sep 2026)
149
+
150
+ - don't emit hide/show cursor for progbar when `hide: true`
151
+
148
152
  #### 0.1.6 (Sep 2026)
149
153
 
150
154
  - default subcommands with `default: true`
@@ -39,14 +39,13 @@ module RunKit
39
39
  total: size
40
40
  ).merge(options)
41
41
 
42
- return enum_for(__method__) if !block
42
+ return enum_for(__method__, options) if !block
43
+ return each(&block) if options[:hide]
43
44
 
44
- bar = if !options[:hide]
45
- ProgressBar.create(options)
46
- end
45
+ bar = ProgressBar.create(options)
47
46
  RunKit::Term.with_hidden_cursor(options[:output]) do
48
47
  each do
49
- bar&.increment
48
+ bar.increment
50
49
  yield(_1)
51
50
  end
52
51
  end
@@ -92,7 +92,7 @@ module RunKit
92
92
  if ex.is_a?(Error)
93
93
  warn "#{ctx.full_name}: #{ex.message}"
94
94
  warn "#{ctx.full_name}: try '#{ctx.full_name} --help' for more information"
95
- return exit_fn(1, error: ex.message)
95
+ return exit_fn(2, error: ex.message)
96
96
  end
97
97
 
98
98
  # Inferred help on a bare invocation introduces the whole app.
data/lib/run_kit/shell.rb CHANGED
@@ -167,9 +167,9 @@ module RunKit
167
167
  banner(str, color: :peach)
168
168
  end
169
169
 
170
- def fatal(str)
170
+ def fatal(str, code: 1)
171
171
  banner(str, color: :red)
172
- exit(1)
172
+ exit(code)
173
173
  end
174
174
 
175
175
  # Ask the user a question via stderr, then return true if they enter YES, yes, y, etc.
data/run_kit.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "run_kit"
3
- s.version = "0.1.6"
3
+ s.version = "0.1.7"
4
4
  s.authors = ["Adam Doppelt"]
5
5
  s.email = "amd@gurge.com"
6
6
  s.summary = "Run kit."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Doppelt