cli-ui 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli/ui/stdout_router.rb +5 -4
- data/lib/cli/ui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 140781de33cc19ef1c5bc946a0a887b3707e54475823affad8f5568e98fbc0dd
|
4
|
+
data.tar.gz: b754caad8da6b0d37ea17d807aef78351518c4f17d511a39decbfb29b0512791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d841fb206c3de7427c4903aa5bb350241c5fe10bbf39c04cb1980eada288deda4b235bf1d5d99a293ebaa6cd78482dd2f49849d65ddd3e7929d63d2f35894bc
|
7
|
+
data.tar.gz: 6a99dc71d996abbff3fccdda8ce9ede069a7868ba467d86296bed3575e5726f50f76b65d4d427757f5ddaea211b7926d25045402ae5304e1593ae2fb6bc656fb
|
data/lib/cli/ui/stdout_router.rb
CHANGED
@@ -16,12 +16,12 @@ module CLI
|
|
16
16
|
@name = name
|
17
17
|
end
|
18
18
|
|
19
|
-
sig { params(args:
|
19
|
+
sig { params(args: Object).returns(Integer) }
|
20
20
|
def write(*args)
|
21
21
|
args = args.map do |str|
|
22
22
|
if auto_frame_inset?
|
23
23
|
str = str.dup # unfreeze
|
24
|
-
str = str.force_encoding(Encoding::UTF_8)
|
24
|
+
str = str.to_s.force_encoding(Encoding::UTF_8)
|
25
25
|
apply_line_prefix(str, CLI::UI::Frame.prefix)
|
26
26
|
else
|
27
27
|
@pending_newline = false
|
@@ -31,10 +31,10 @@ module CLI
|
|
31
31
|
|
32
32
|
# hook return of false suppresses output.
|
33
33
|
if (hook = Thread.current[:cliui_output_hook])
|
34
|
-
return if hook.call(args.map(&:to_s).join, @name) == false
|
34
|
+
return 0 if hook.call(args.map(&:to_s).join, @name) == false
|
35
35
|
end
|
36
36
|
|
37
|
-
T.unsafe(@stream).write_without_cli_ui(*prepend_id(@stream, args))
|
37
|
+
ret = T.unsafe(@stream).write_without_cli_ui(*prepend_id(@stream, args))
|
38
38
|
if (dup = StdoutRouter.duplicate_output_to)
|
39
39
|
begin
|
40
40
|
T.unsafe(dup).write(*prepend_id(dup, args))
|
@@ -42,6 +42,7 @@ module CLI
|
|
42
42
|
# Ignore
|
43
43
|
end
|
44
44
|
end
|
45
|
+
ret
|
45
46
|
end
|
46
47
|
|
47
48
|
private
|
data/lib/cli/ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cli-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-05-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|