cogger 0.29.0 → 0.30.0
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/cogger.gemspec +2 -1
- data/lib/cogger/hub.rb +1 -2
- data/lib/cogger/refines/log_device.rb +23 -0
- data/lib/cogger/refines/logger.rb +16 -0
- data.tar.gz.sig +0 -0
- metadata +18 -2
- 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: 1c0d3f9bd15ed49c1eb4bd2be78da5f296007e98dfa0996bb4871abb5980015f
|
4
|
+
data.tar.gz: 98ae66096f718592dbf368b51a10eea1d99f3e8b55ac27766032d93498c1890a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eb35e39ff35389fe745d848672a11f5b547573bd5083b60b0027b7b6bb53f68a1e4e379bab951d22a229818a17255d4708db7a234f9b244eeb48ffe3b8918fd
|
7
|
+
data.tar.gz: 0da0da9c636aa830873b576f7bac1c557e842ef24f37390e359a326e20a1d512da523221ca121e09cb8ac2127c262fa5bdb1b1f990e199b407ff1b4f555efe05
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/cogger.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "cogger"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "0.30.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/cogger"
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = ">= 3.3", "<= 3.4"
|
26
26
|
spec.add_dependency "core", "~> 1.7"
|
27
|
+
spec.add_dependency "logger", "~> 1.6"
|
27
28
|
spec.add_dependency "refinements", "~> 12.10"
|
28
29
|
spec.add_dependency "tone", "~> 1.0"
|
29
30
|
spec.add_dependency "zeitwerk", "~> 2.7"
|
data/lib/cogger/hub.rb
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
require "forwardable"
|
4
4
|
require "logger"
|
5
5
|
require "refinements/hash"
|
6
|
-
require "refinements/logger"
|
7
6
|
|
8
7
|
module Cogger
|
9
8
|
# Loads configuration and simultaneously sends messages to multiple streams.
|
@@ -13,7 +12,7 @@ module Cogger
|
|
13
12
|
extend Forwardable
|
14
13
|
|
15
14
|
using Refinements::Hash
|
16
|
-
using
|
15
|
+
using Refines::Logger
|
17
16
|
|
18
17
|
delegate %i[
|
19
18
|
close
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "logger"
|
4
|
+
require "refinements/string_io"
|
5
|
+
|
6
|
+
module Cogger
|
7
|
+
module Refines
|
8
|
+
# Provides additional enhancements to a log device.
|
9
|
+
module LogDevice
|
10
|
+
using Refinements::StringIO
|
11
|
+
|
12
|
+
refine ::Logger::LogDevice do
|
13
|
+
def reread
|
14
|
+
case dev
|
15
|
+
when ::File then dev.class.new(dev).read
|
16
|
+
when ::StringIO then dev.reread
|
17
|
+
else ""
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cogger
|
4
|
+
module Refines
|
5
|
+
# Provides additional enhancements to a logger.
|
6
|
+
module Logger
|
7
|
+
using LogDevice
|
8
|
+
|
9
|
+
refine ::Logger do
|
10
|
+
def reread = @logdev.reread
|
11
|
+
|
12
|
+
alias_method :any, :unknown
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cogger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-11-05 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: core
|
@@ -51,6 +51,20 @@ dependencies:
|
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '1.7'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: logger
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.6'
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.6'
|
54
68
|
- !ruby/object:Gem::Dependency
|
55
69
|
name: refinements
|
56
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,6 +145,8 @@ files:
|
|
131
145
|
- lib/cogger/level.rb
|
132
146
|
- lib/cogger/program.rb
|
133
147
|
- lib/cogger/rack/logger.rb
|
148
|
+
- lib/cogger/refines/log_device.rb
|
149
|
+
- lib/cogger/refines/logger.rb
|
134
150
|
- lib/cogger/registry.rb
|
135
151
|
- lib/cogger/tag.rb
|
136
152
|
- lib/cogger/time/clock.rb
|
metadata.gz.sig
CHANGED
Binary file
|