foobara-sh-cli-connector 1.1.0 → 1.1.2

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: 59cf7a21e3cefb21edff2aeff1190ae80b8ced00ea06ae8f283efeb9edf4fb5d
4
- data.tar.gz: 3f633ba9a19437fd36b8d5afb11bbe373a222f4e35014b65fe9eeea9a2786e4e
3
+ metadata.gz: 66e8c8336729e6c840ee38fec2f6b8d96237f078e1974c0fc2a38193307a1d29
4
+ data.tar.gz: d2a0652b6e70a782d46dc49dc5843cb30881465471db652d3f9a0f08be98139e
5
5
  SHA512:
6
- metadata.gz: 74f188499346a95da97cc18f1ae280ef0f1d2be8444761dc1de08905df15bd40908bec43daed15b95d69f163fa7a7c3bd15c60dd1663ecbacaf49d19744c6455
7
- data.tar.gz: 3a31ffab1eb40dbf87e767ad84cee1c01e667b124112db3bcd7cf94d12d30f981f843ceae2477d271778e0a70355ce3915debf92c6933d7485445a9a84ea230d
6
+ metadata.gz: 22f34b1310e54975cc3839e27bf3993ca51f49248a2cff8d204ad410348bd1b668de63fedfdc7c443a7b4c36374fdb96e335a8416a88737289a95060c389afef
7
+ data.tar.gz: 7bad46487ed10907757345ba223a236724d0a073937d04b2831ecb3d7185d9b449f3fe761ac8b3b75e6b657fe70af81f64e564afdf397146d5888254258c5c55
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.1.2] - 2025-11-04
2
+
3
+ - Fix an off-by-one line-wrapping bug when using --help
4
+
5
+ ## [1.1.1] - 2025-11-01
6
+
7
+ - Make values shown in help properly quoted for sh, consistently across one_of and default
8
+
1
9
  ## [1.1.0] - 2025-08-22
2
10
 
3
11
  - Handle Foobara 0.1.1 type declarations
@@ -175,7 +175,8 @@ module Foobara
175
175
  end
176
176
 
177
177
  if has_default?
178
- desc << "Default: #{default.inspect}"
178
+ displayable_str = to_bash_str(default)
179
+ desc << "Default: #{displayable_str}"
179
180
  end
180
181
 
181
182
  unless desc.empty?
@@ -192,6 +193,18 @@ module Foobara
192
193
  desc.join(" ")
193
194
  end
194
195
  end
196
+
197
+ private
198
+
199
+ def to_bash_str(inp_str)
200
+ stripped_str = inp_str.to_s.strip
201
+
202
+ if stripped_str.match?(/\s/)
203
+ stripped_str.inspect
204
+ else
205
+ stripped_str
206
+ end
207
+ end
195
208
  end
196
209
  end
197
210
  end
@@ -43,7 +43,7 @@ module Foobara
43
43
 
44
44
  lines.each do |line|
45
45
  if indent > 0
46
- line = (" " * indent) + line
46
+ line = (" " * (indent - 1)) + line
47
47
  end
48
48
 
49
49
  io.puts line.rstrip
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-sh-cli-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -58,7 +58,7 @@ files:
58
58
  - src/sh_cli_connector/request.rb
59
59
  - src/sh_cli_connector/serializers/cli_errors_serializer.rb
60
60
  - src/sh_cli_connector/serializers/cli_result_serializer.rb
61
- - src/sh_cli_connector/serializers/cli_tabular_serialzier.rb
61
+ - src/sh_cli_connector/serializers/cli_tabular_serializer.rb
62
62
  homepage: https://github.com/foobara/sh-cli-connector
63
63
  licenses:
64
64
  - Apache-2.0