console 1.20.0 → 1.21.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: d974c867b670b89c2b04c83f640f46217e9836e3eec7f92903bc062e6c59458c
4
- data.tar.gz: 4bc1d803689cad17d85a36d7da8c172a63ea869e6fa060f9c85702c1da365b90
3
+ metadata.gz: 36a5fff3c1cafc8686f77440fc2dcb09d3a94d1399b15b9bf6967e4b21e6a511
4
+ data.tar.gz: 3c7e6218667002f2a0f745bcfddbeec1dc8b126fdd1b81cec71fa03c53c3eba5
5
5
  SHA512:
6
- metadata.gz: 1db5693110b3a7f48b17abdf58eb74ac5269f4748d0746df057c7dbe01ddee228db5bcc74bd581c1e9bddf94602943682feb4cf50c7b14312d23db47e5209206
7
- data.tar.gz: 3209fa49d39e7de2040610187599b7b22e41af0da3c2749b7a7c939ce40d07c2101472fec9a47a20de754d216f780ab59f508a3b4ddc17dd5c251d4a94e215f3
6
+ metadata.gz: b4d6ebc41b6ea36a711f5f054a30a81ff4a29d06e0f4a2ef6a6554f6c94fd874439428df40e7a098f4bec25a8605452c2380987d1e275e38e6cf522254fdc3b8
7
+ data.tar.gz: 693ed3f6a7d6786a87aef0ff42d238a3cbd1fc267c0cafb1683b8236e0f878bb7a8dc316822f00ab84cdba7e6f58212e8474d0e85109d67ff59a65b3003548f3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -29,7 +29,7 @@ module Console
29
29
  end
30
30
  end
31
31
 
32
- def initialize(subject, output)
32
+ def initialize(subject, output = Console)
33
33
  super(nil)
34
34
 
35
35
  @progname = subject
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2019-2023, by Samuel Williams.
5
5
 
6
6
  module Console
7
- VERSION = "1.20.0"
7
+ VERSION = "1.21.0"
8
8
  end
data/lib/console.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2022, by Samuel Williams.
4
+ # Copyright, 2019-2023, by Samuel Williams.
5
5
  # Copyright, 2019, by Bryan Powell.
6
6
  # Copyright, 2020, by Michael Adams.
7
7
  # Copyright, 2021, by Cédric Boutillier.
@@ -10,23 +10,45 @@ require_relative 'console/version'
10
10
  require_relative 'console/logger'
11
11
 
12
12
  module Console
13
- def self.logger
14
- Logger.instance
15
- end
16
-
17
- def self.logger= instance
18
- Logger.instance= instance
13
+ class << self
14
+ def logger
15
+ Logger.instance
16
+ end
17
+
18
+ def logger= instance
19
+ Logger.instance= instance
20
+ end
21
+
22
+ def debug(...)
23
+ Logger.instance.debug(...)
24
+ end
25
+
26
+ def info(...)
27
+ Logger.instance.info(...)
28
+ end
29
+
30
+ def warn(...)
31
+ Logger.instance.warn(...)
32
+ end
33
+
34
+ def error(...)
35
+ Logger.instance.error(...)
36
+ end
37
+
38
+ def fatal(...)
39
+ Logger.instance.fatal(...)
40
+ end
41
+
42
+ def call(...)
43
+ Logger.instance.call(...)
44
+ end
19
45
  end
20
46
 
21
47
  def logger= logger
22
- @logger = logger
48
+ warn "Setting logger on #{self} is deprecated. Use Console.logger= instead.", uplevel: 1
23
49
  end
24
50
 
25
51
  def logger
26
- @logger || Logger.instance
27
- end
28
-
29
- def self.extended(klass)
30
- klass.instance_variable_set(:@logger, nil)
52
+ Logger.instance
31
53
  end
32
54
  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.20.0
4
+ version: 1.21.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: 2023-08-03 00:00:00.000000000 Z
49
+ date: 2023-08-07 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