test_bench-bootstrap 5.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_bench/bootstrap.rb +24 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a477bb3e37ba7658184cef18d64bb583ebc6b806450ac7d2b414551e9de7865e
|
4
|
+
data.tar.gz: 385937532fa15f4fb5b3a616ed1bbe685dbf75bbd062ce56d907a6a95adf99cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc54646b9be52b8f4d244cea662a7f18e4c4a757f16ba424c5855076428c75dec148d1ad4b5973b69d47c4f0c2e3d9cb9d594aa428f0a1505961213fb417abb2
|
7
|
+
data.tar.gz: ad3987c5017ebca65f1db95e436e9deef09a25746119389b2f57602f007933a1df9db5ed154d602f26e28711aaa4fe42b39ffa4289457bca4174ae32ffee3d03
|
data/lib/test_bench/bootstrap.rb
CHANGED
@@ -151,30 +151,38 @@ module TestBench
|
|
151
151
|
test(title)
|
152
152
|
end
|
153
153
|
|
154
|
-
def comment(
|
155
|
-
|
154
|
+
def comment(...)
|
155
|
+
detail(...)
|
156
156
|
end
|
157
157
|
|
158
|
-
def detail(
|
159
|
-
|
160
|
-
|
161
|
-
|
158
|
+
def detail(detail, *additional_details, quote: nil, heading: nil)
|
159
|
+
details = [detail, *additional_details]
|
160
|
+
|
161
|
+
if quote.nil?
|
162
|
+
quote = details.last.end_with?("\n")
|
162
163
|
end
|
163
164
|
|
164
|
-
|
165
|
+
if quote
|
166
|
+
if heading.nil?
|
167
|
+
heading = !detail.end_with?("\n")
|
168
|
+
end
|
169
|
+
end
|
165
170
|
|
166
|
-
if
|
167
|
-
|
168
|
-
Output.indent(
|
169
|
-
else
|
170
|
-
first_supplemental_line = text
|
171
|
-
supplemental_lines.unshift(first_supplemental_line)
|
171
|
+
if heading
|
172
|
+
heading_text = details.shift
|
173
|
+
Output.indent(heading_text, sgr_codes: [0x1, 0x4])
|
172
174
|
end
|
173
175
|
|
174
|
-
|
175
|
-
|
176
|
+
details.each do |detail|
|
177
|
+
if quote
|
178
|
+
detail.each_line do |line|
|
179
|
+
line.chomp!
|
176
180
|
|
177
|
-
|
181
|
+
Output.indent("\e[2m>\e[22m \e[3m#{line}\e[0m")
|
182
|
+
end
|
183
|
+
else
|
184
|
+
Output.indent(detail)
|
185
|
+
end
|
178
186
|
end
|
179
187
|
end
|
180
188
|
|