console 1.23.3 → 1.23.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/console/filter.rb +14 -3
- data/lib/console/version.rb +1 -1
- data/license.md +1 -1
- data/readme.md +1 -1
- data.tar.gz.sig +4 -1
- metadata +17 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 105256b565db153e00ef1c725c0d8a1b0b4ba48f0d4b2787984e00f1a7725a68
|
4
|
+
data.tar.gz: 80635fbb3abf6efc322db6d2d25a8b9360c989ecc9f94e6e53456e9e15f523ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf532ee6fc791b2f10ad385f3f3662bccc58c0a8ba996764c6ab779b521c6351425dd6ec3c18325861837de5a4240117ab1adb9fa9c43a6ac8404c633ba9afbd
|
7
|
+
data.tar.gz: a391326938867557ddd06dde39ef915e86733eb429fe8d0c0ffd9d761db72666ed6338813386eb4d00d5c83aea4b4cf41c6fd56608eef5d6b48e084f12050009
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/console/filter.rb
CHANGED
@@ -12,6 +12,17 @@ module Console
|
|
12
12
|
UNKNOWN = 'unknown'
|
13
13
|
|
14
14
|
class Filter
|
15
|
+
if Object.const_defined?(:Ractor)
|
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
|
-
|
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
|
-
|
44
|
+
define_immutable_method("#{name}!") do
|
34
45
|
@level = level
|
35
46
|
end
|
36
47
|
|
37
|
-
|
48
|
+
define_immutable_method("#{name}?") do
|
38
49
|
@level <= level
|
39
50
|
end
|
40
51
|
end
|
data/lib/console/version.rb
CHANGED
data/license.md
CHANGED
data/readme.md
CHANGED
@@ -42,7 +42,7 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
|
|
42
42
|
|
43
43
|
### Contributor Covenant
|
44
44
|
|
45
|
-
This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
45
|
+
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
46
46
|
|
47
47
|
## See Also
|
48
48
|
|
data.tar.gz.sig
CHANGED
@@ -1 +1,4 @@
|
|
1
|
-
|
1
|
+
���1�\"U�F�T)�8x �^a��lU���NL4�M:>�V�1�e�R�ӄ�2e�U�GL����{G�T�c�0�=�/x�7�k�YQ��� ̇b�#j̖}���s�p3QwNs÷G�ޗiH�֪̬�aԳ��y��nM�MZk�o�7{���uNb5S� �A�k0#�*���&��9$bO~��ra����YzM��j��
|
2
|
+
?6�;y:"��vj�6$�ZJQ��h���P��sl���8�9+�����ȼ0
|
3
|
+
�A�˱Dh~����9'���>-��\#�����b��B|u�9,���?�g%*�۾�0P�����X�uzB��x*�ɿ����0}�:�/!�.[�|r,�uu>���tq��
|
4
|
+
[NY= ��kwe/��X
|
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
|
+
version: 1.23.5
|
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:
|
49
|
+
date: 2024-03-06 00:00:00.000000000 Z
|
50
50
|
dependencies:
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: fiber-annotation
|
@@ -76,6 +76,20 @@ dependencies:
|
|
76
76
|
- - ">="
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: json
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
79
93
|
description:
|
80
94
|
email:
|
81
95
|
executables: []
|
@@ -136,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
150
|
- !ruby/object:Gem::Version
|
137
151
|
version: '0'
|
138
152
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
153
|
+
rubygems_version: 3.5.3
|
140
154
|
signing_key:
|
141
155
|
specification_version: 4
|
142
156
|
summary: Beautiful logging for Ruby.
|
metadata.gz.sig
CHANGED
Binary file
|