foobara-sh-cli-connector 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb9d3953666b0625afed022b3d6b2af58ce99df8fea4b9338a11cb81666db14b
4
- data.tar.gz: c1b32114bcd3c4176b31bd527586c8d11b9afbc258653e079e6d52990b4f89cc
3
+ metadata.gz: f62157a31d383d3c3187cdf5e31c486c4fefbddfbc43f160386f874a1aac0278
4
+ data.tar.gz: cb677b2184da2e9bd351f7d2aecf1b80733b3fede34a8f25a47ca22a1e862743
5
5
  SHA512:
6
- metadata.gz: 8dd5a544763bfe3be4b66ce81e21df3ab870d117b1e2c5cd37320e393158bc6ca5931f8f627bd01c8739c8bfbbf792209299859f0e859f037b1533f811349e9d
7
- data.tar.gz: 03170c33e3742835c7564b7223fb3fe2ebbda9ef4759df07f2c611b7d9fbfa29c7902a668c2a08611aa0ffadaf103df13b6434330c172ec3d6fe51c18a07e2c5
6
+ metadata.gz: 48fa9bb84b785bad9890158df3a763a6d842d80e83b072c94c49254b630b89a40c065c8baa1ae982e9ec7ca10ef02ee549c959413630a5319b4f69d73f0bc914
7
+ data.tar.gz: '08d61fe32c10be33fde0254cd3e6b5d22d4fe0411546122e63146c5dd6e81a4de4f90739e6aae5b365d740affbcc29b3bb8c285e49fd69e6a228b876fe7d0c30'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,7 @@
1
- ## [0.0.7] - 2024-11-30
1
+ ## [0.0.8] - 2024-11-30
2
2
 
3
3
  * Add descriptions to available commands
4
+ * Add support for indent: option
4
5
 
5
6
  ## [0.0.6] - 2024-10-28
6
7
 
@@ -157,7 +157,7 @@ module Foobara
157
157
  [" #{command_class.full_command_name}", command_class.description]
158
158
  end
159
159
 
160
- serializer = Serializers::CliTabularSerializer.new
160
+ serializer = Serializers::CliTabularSerializer.new(indent: 2)
161
161
 
162
162
  output.puts serializer.serialize(table)
163
163
  end
@@ -40,6 +40,10 @@ module Foobara
40
40
  end
41
41
 
42
42
  lines.each do |line|
43
+ if indent > 0
44
+ line = (" " * indent) + line
45
+ end
46
+
43
47
  io.puts line.rstrip
44
48
  end
45
49
  end
@@ -108,6 +112,17 @@ module Foobara
108
112
  end
109
113
  end
110
114
 
115
+ def indent
116
+ @indent ||= if declaration_data.is_a?(::Hash)
117
+ declaration_data[:indent]
118
+ elsif declaration_data.respond_to?(:indent)
119
+ # TODO: test this
120
+ # :nocov:
121
+ declaration_data.indent
122
+ # :nocov:
123
+ end || 0
124
+ end
125
+
111
126
  def min_final_column_width
112
127
  @min_final_column_width ||= begin
113
128
  config = declaration_data
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: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi