console 1.23.7 → 1.24.0

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: 16dee5ad9914f3983622406c0e1b84d39a187c67c01bd29d31966e964b703e8c
4
- data.tar.gz: 0f175325d0d8e6bee203025a83917ab5309efa6a9e2995d242b0f99a3cceedf0
3
+ metadata.gz: 9a62f7c19673292c5cd3c0d8b9d93350ca4b36ac0a5c0a0466deef6543b388ba
4
+ data.tar.gz: f382353a7b052c056936fdd2c95ad0bd20cfb8619db2f6d2af1ce7e9e0cd7967
5
5
  SHA512:
6
- metadata.gz: 8909e58d31aa84e349f4d87aaa6f818baff0a2416ac2de6dd1961136c1d9380e570fc94d34c44cc7463c707222a56d5507b2dd0f58281c6503a5622aa7c04e30
7
- data.tar.gz: 857289e0809007816272b9270691bb07a1d657fe5cefeed73329406c6ececb63f4dec495ca70513702533bedd70666b557a5a31fa9216ec4b461c586f854cfcb
6
+ metadata.gz: 6638ede52de5f0954a38adf71e910997eb643d2e39ef59645f320ce16ebefd4f804cb062e47e03472ac742fb46591c310217da72eb63eb87fe91d93090f8ee5f
7
+ data.tar.gz: 15f4929956b45e0c445e95774dfa3ac1c4bb485401e1b0003835c9ae5435a25ebda70b69ad475cf0e6b48131b0cc41258e3c5bb8c70121daaa9fe482c12b5404
checksums.yaml.gz.sig CHANGED
Binary file
@@ -43,8 +43,18 @@ module Console
43
43
  format_exception(@exception, nil, output, terminal, verbose)
44
44
  end
45
45
 
46
+ if Exception.method_defined?(:detailed_message)
47
+ def detailed_message(exception)
48
+ exception.detailed_message
49
+ end
50
+ else
51
+ def detailed_message(exception)
52
+ exception.message
53
+ end
54
+ end
55
+
46
56
  def format_exception(exception, prefix, output, terminal, verbose)
47
- lines = exception.message.lines.map(&:chomp)
57
+ lines = detailed_message(exception).lines.map(&:chomp)
48
58
 
49
59
  output.puts " #{prefix}#{terminal[:exception_title]}#{exception.class}#{terminal.reset}: #{lines.shift}"
50
60
 
@@ -119,7 +119,7 @@ module Console
119
119
  protected
120
120
 
121
121
  def format_options(options, output)
122
- format_value(options.to_json, output)
122
+ format_value(::JSON.pretty_generate(options), output)
123
123
  end
124
124
 
125
125
  def format_argument(argument, output)
@@ -199,6 +199,7 @@ module Console
199
199
  string = value.to_s
200
200
 
201
201
  string.each_line do |line|
202
+ line.chomp!
202
203
  output.puts "#{@terminal[:value]}#{line}#{@terminal.reset}"
203
204
  end
204
205
  end
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2019-2023, by Samuel Williams.
5
5
 
6
6
  module Console
7
- VERSION = "1.23.7"
7
+ VERSION = "1.24.0"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.7
4
+ version: 1.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -46,7 +46,7 @@ cert_chain:
46
46
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
47
47
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
48
48
  -----END CERTIFICATE-----
49
- date: 2024-04-20 00:00:00.000000000 Z
49
+ date: 2024-04-22 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: fiber-annotation
metadata.gz.sig CHANGED
Binary file