console 1.12.0 → 1.13.1

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: '019b21198110cd3da94ef40ce3d666ea19be493e1ef2fa85e818bdd03d67e864'
4
- data.tar.gz: 33994cbf5c6349aed18c79f3b20527785de1dd1c2307c49b864382750c2d807d
3
+ metadata.gz: a8c8affd2da03cdb084d7ef8af7c666409d12606c4459da493bf01a96d6b7bf3
4
+ data.tar.gz: d0af1c352b7b89f91b57ea737a5069282177be325f1bae82db3cb8de2ee76f57
5
5
  SHA512:
6
- metadata.gz: dc7b76666ff0f3dda0cfaf3d966f8cd00bae86d0930f34452e6dcd20dc42fac72d2ba9a7533f6dc9bf7790cdb4e1c98c97830434bc36a463ae156104c6caa657
7
- data.tar.gz: 9bc0323787283b1fd20357914b1ff12eb1cd19bc20f68c7132bacf7533817829f514d5b408b5421366bf07a38265417ad3b3d93cc1984844affe5d91b0f0889c
6
+ metadata.gz: b9c453a4bfc44ac3b87c034e8854addb31d4a1c4d2cbdc9abf698f3dbf657ff99fa636d8e46dd0262e30cd195d1c3b12ba6d64c5e8b75668ec05d8b26952f494
7
+ data.tar.gz: 9ca8d1ade8c3b7fc3c4dd307a27e2e67f236526bd60619cb30cc7c70af179846050bd22d0e67d1e55f3019702052ffeb593c5eed1d1522c577e73cebc2e56795
@@ -27,7 +27,7 @@ module Console
27
27
  module Output
28
28
  def self.new(output = nil, env = ENV, **options)
29
29
  if names = env['CONSOLE_OUTPUT']
30
- names = names.split(',').map(&:to_sym).reverse
30
+ names = names.split(',').reverse
31
31
 
32
32
  names.inject(output) do |output, name|
33
33
  Output.const_get(name).new(output, **options)
@@ -27,10 +27,11 @@ require 'json'
27
27
  module Console
28
28
  module Serialized
29
29
  class Logger
30
- def initialize(io = $stderr, format: JSON, **options)
30
+ def initialize(io = $stderr, format: JSON, verbose: false, **options)
31
31
  @io = io
32
32
  @start = Time.now
33
33
  @format = format
34
+ @verbose = verbose
34
35
  end
35
36
 
36
37
  attr :io
@@ -38,6 +39,11 @@ module Console
38
39
  attr :format
39
40
 
40
41
  def verbose!(value = true)
42
+ @verbose = true
43
+ end
44
+
45
+ def dump(record)
46
+ @format.dump(record)
41
47
  end
42
48
 
43
49
  def call(subject = nil, *arguments, severity: UNKNOWN, **options, &block)
@@ -71,7 +77,7 @@ module Console
71
77
  end
72
78
  end
73
79
 
74
- @io.puts(@format.dump(record))
80
+ @io.puts(self.dump(record))
75
81
  end
76
82
  end
77
83
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Console
22
- VERSION = "1.12.0"
22
+ VERSION = "1.13.1"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-28 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiber-local
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.2.3
152
+ rubygems_version: 3.3.0.dev
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Beautiful logging for Ruby.