foobara-sh-cli-connector 0.0.7 → 0.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13bd07277bf5717eac15f70769b2f369b60ad3416fb46548575421ee985d1a16
|
4
|
+
data.tar.gz: 0206dd49d6d3da59200263ec6aa0732d7f886a1853e9950eb6b52d101bb67f84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 637e1537ba4d4e7e23d80bee694907ad2a3ba5e3683316d398f51d2dfe7113006d14ff816492f1b4894c3790cf1816569126c195997ed0c8356943c698bd09ee
|
7
|
+
data.tar.gz: ca9045f6bc124affffc31bbf635f834161c2f0c92419364db6dbfcb018448fa586f944e8cd2768bc6049f8ce4826acdb17e995b88600a86da3e0aba26b4219a7
|
data/CHANGELOG.md
CHANGED
@@ -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
|
@@ -104,10 +108,22 @@ module Foobara
|
|
104
108
|
config.terminal_width
|
105
109
|
# :nocov:
|
106
110
|
end
|
107
|
-
|
111
|
+
|
112
|
+
(width || IO.console_size[1]) - indent
|
108
113
|
end
|
109
114
|
end
|
110
115
|
|
116
|
+
def indent
|
117
|
+
@indent ||= if declaration_data.is_a?(::Hash)
|
118
|
+
declaration_data[:indent]
|
119
|
+
elsif declaration_data.respond_to?(:indent)
|
120
|
+
# TODO: test this
|
121
|
+
# :nocov:
|
122
|
+
declaration_data.indent
|
123
|
+
# :nocov:
|
124
|
+
end || 0
|
125
|
+
end
|
126
|
+
|
111
127
|
def min_final_column_width
|
112
128
|
@min_final_column_width ||= begin
|
113
129
|
config = declaration_data
|