console 1.23.4 → 1.23.6

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: 7b083e1f81e12d9ba2dae4929c26a2f193d772edc1b32a08714bc317353b08fc
4
- data.tar.gz: 3c560f105a74fcf8f0b75c1e8cac36abfabbfaa3fab2781e32780eb85e36a8de
3
+ metadata.gz: b6c2f4f9045bf84a92ba1aaf858485afeb72361b204656fe955c43a6209483cf
4
+ data.tar.gz: 01c47bb0c968c5fee4310c685c1478a51201548258788b3c4bec0cde53fb7a28
5
5
  SHA512:
6
- metadata.gz: cfc967d833d6522aa8a50e0482f5f2f8f436d16afbd94b47c6347e2c9bc706edacf6047ae49f344b7cbb93fdca85a4c6c98f0595af41583e368be8c1192b9ef1
7
- data.tar.gz: da3a3e5af4b8f60bbfb69fa734ea4a17bbf7167d9ff81db02b7492ce65ea5b0bcda1ac7d607b44a17f164bc9bfda44b9226fb2996668d60feb4b518c7bf022f1
6
+ metadata.gz: 4c8fb8b20df0150fa6d72f200c7bff5f7bcf4dfe653436e76c7081fb1bf49cb490333df0220643957a8e8d21def176f1fec1af2fecb6f443f98e27895c844055
7
+ data.tar.gz: 912dff77733c98d8b5c0d90e4ce8d208552b5badbd620fb424f89e660ff7a64d78981bb4a8817263dac649246096f363f8247b0b923916bcf6af15a6aadbcaa3
checksums.yaml.gz.sig CHANGED
@@ -1 +1,3 @@
1
- r��*��r��Nu�J�߇_�O��ga�=,�6��0a��/y�%46��fbw�� T��=�5�� x*����o{U|�����BwZ�In� �Q�?t5�deO΀��ĭعv�����3����k#�^��`ҁz��!M~�𿇭!��K���>VL�Qj'H+8��x[5y�z�,#��^؂�v��3A��/�����n J��La&V$�ኺ<�l&�_ 9QZ6:���u/{a��a���3�+���󞬱/|���H�#? ��"A�RGv]�x_��ك�M*{٭�\�xz=,��R�%W>�@��{�,�>�b1�o����>��,o��a �,�c�<9d:���xs^���vvϊ���?�
1
+ m�ړ�6��P2��Z[�޲������1Kcee��<ʝ�|8P��OG5u��������2X�u�
2
+ ǯ1Ք�t�Ի
3
+ +&v �ҟݺB<F����H��~�5*��7�[��,��S�
@@ -12,6 +12,17 @@ module Console
12
12
  UNKNOWN = 'unknown'
13
13
 
14
14
  class Filter
15
+ if Object.const_defined?(:Ractor) and RUBY_VERSION >= '3.1'
16
+ def self.define_immutable_method(name, &block)
17
+ block = Ractor.make_shareable(block)
18
+ self.define_method(name, &block)
19
+ end
20
+ else
21
+ def self.define_immutable_method(name, &block)
22
+ define_method(name, &block)
23
+ end
24
+ end
25
+
15
26
  def self.[] **levels
16
27
  klass = Class.new(self)
17
28
  minimum_level, maximum_level = levels.values.minmax
@@ -24,17 +35,17 @@ module Console
24
35
  levels.each do |name, level|
25
36
  const_set(name.to_s.upcase, level)
26
37
 
27
- define_method(name) do |subject = nil, *arguments, **options, &block|
38
+ define_immutable_method(name) do |subject = nil, *arguments, **options, &block|
28
39
  if self.enabled?(subject, level)
29
40
  self.call(subject, *arguments, severity: name, **options, **@options, &block)
30
41
  end
31
42
  end
32
43
 
33
- define_method("#{name}!") do
44
+ define_immutable_method("#{name}!") do
34
45
  @level = level
35
46
  end
36
47
 
37
- define_method("#{name}?") do
48
+ define_immutable_method("#{name}?") do
38
49
  @level <= level
39
50
  end
40
51
  end
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2019-2023, by Samuel Williams.
5
5
 
6
6
  module Console
7
- VERSION = "1.23.4"
7
+ VERSION = "1.23.6"
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.4
4
+ version: 1.23.6
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-02-12 00:00:00.000000000 Z
49
+ date: 2024-03-20 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: fiber-annotation
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubygems_version: 3.5.5
153
+ rubygems_version: 3.5.3
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Beautiful logging for Ruby.
metadata.gz.sig CHANGED
Binary file