cogger 0.14.0 → 0.15.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: e943adc7eaeab019242b860b3c66da64e24c52cfe756c242d3b92de480586503
4
- data.tar.gz: ad0f47de612ca8fde2eff91593e32e5ed7cfaad13f77b62b6c3aebcbe18a9bc6
3
+ metadata.gz: 06b02f31842765991c8645f435efe1ac2c8d2ad54ec52e04cbfe6fc64096dd6d
4
+ data.tar.gz: 819a9aa91290741d08ea935c8ae9046676a6255c940759d6b4dd0eca5820f0f5
5
5
  SHA512:
6
- metadata.gz: 52c552fcb5ae45c4893bb84e427691504d49b987904734e81ce68b3dac889544f30c040e547d7a99d17c18429c732651a63b7628d11c00de6ba506985ea7c493
7
- data.tar.gz: 4d7d3c410af6800bbcc6c2d35d969d06e5752c9a326010e55c8049ba91e5657aa808a04cb82cbaf294f077630a61c01ff4dcbed156abf54696a017cd59955a00
6
+ metadata.gz: 2a6973639d6f83b05959cfc596d0940ed80e733c24df781a973b479a9bc406d8ab5fee499cc24dd6c9eaf9aabef59a6b2f7474eeab7012ceeb96390b518c1ad7
7
+ data.tar.gz: 9209e5c53220d33beb9f72c56c22b8bbbe5b731dc0ea25b6fdbca1955f7317619bfa35bf8a00a5e8eca178e9c95b770ce948d83392df43e7f5d60f23f1b4413a
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.14.0"
5
+ spec.version = "0.15.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/cogger"
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
22
22
  spec.signing_key = Gem.default_key_path
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
- spec.required_ruby_version = [">= 3.2", "<= 3.3"]
26
- spec.add_dependency "core", "~> 0.1"
27
- spec.add_dependency "refinements", "~> 11.0"
28
- spec.add_dependency "tone", "~> 0.3"
25
+ spec.required_ruby_version = "~> 3.3"
26
+ spec.add_dependency "core", "~> 1.0"
27
+ spec.add_dependency "refinements", "~> 12.0"
28
+ spec.add_dependency "tone", "~> 1.0"
29
29
  spec.add_dependency "zeitwerk", "~> 2.6"
30
30
 
31
31
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
@@ -46,13 +46,13 @@ module Cogger
46
46
  # :reek:TooManyStatements
47
47
  def sanitize_and_extract template, attributes
48
48
  template.gsub pattern do
49
- captures = Regexp.last_match.named_captures
50
- attributes[captures["key"].to_sym] = captures["directive"]
49
+ captures = Regexp.last_match.named_captures symbolize_names: true
50
+ attributes[captures[:key].to_sym] = captures[:directive]
51
51
 
52
52
  captures.reduce(+"%") do |body, (key, value)|
53
- next body if key == "directive"
53
+ next body if key == :directive
54
54
 
55
- body.concat key == "key" ? "<#{value}>" : value.to_s
55
+ body.concat key == :key ? "<#{value}>" : value.to_s
56
56
  end
57
57
  end
58
58
  end
data/lib/cogger/hub.rb CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  require "forwardable"
4
4
  require "logger"
5
- require "refinements/hashes"
6
- require "refinements/loggers"
5
+ require "refinements/hash"
6
+ require "refinements/logger"
7
7
 
8
8
  module Cogger
9
9
  # Loads configuration and simultaneously sends messages to multiple streams.
@@ -11,8 +11,8 @@ module Cogger
11
11
  class Hub
12
12
  extend Forwardable
13
13
 
14
- using Refinements::Loggers
15
- using Refinements::Hashes
14
+ using Refinements::Logger
15
+ using Refinements::Hash
16
16
 
17
17
  delegate %i[
18
18
  close
data/lib/cogger/level.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "logger"
4
- require "refinements/arrays"
4
+ require "refinements/array"
5
5
 
6
6
  # Loads log level from environment.
7
7
  module Cogger
8
- using Refinements::Arrays
8
+ using Refinements::Array
9
9
 
10
10
  Level = lambda do |logger = Logger, environment: ENV, allowed: LEVELS|
11
11
  value = String environment.fetch("LOG_LEVEL", "INFO")
data/lib/cogger/tag.rb CHANGED
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "core"
4
- require "refinements/hashes"
4
+ require "refinements/hash"
5
5
 
6
6
  module Cogger
7
7
  # Models a tag which may consist of an array and/or hash.
8
8
  Tag = Data.define :singles, :pairs do
9
- using Refinements::Hashes
9
+ using Refinements::Hash
10
10
 
11
11
  def self.for(*bag)
12
12
  bag.each.with_object new do |item, tag|
@@ -3,7 +3,6 @@
3
3
  module Cogger
4
4
  module Time
5
5
  # Provides unit of measure for duration.
6
- # rubocop:disable Style/MethodCallWithArgsParentheses
7
6
  Unit = lambda do |duration, range: RANGE|
8
7
  case duration
9
8
  when range.fetch(:nanoseconds) then "ns"
@@ -13,6 +12,5 @@ module Cogger
13
12
  else "m"
14
13
  end
15
14
  end
16
- # rubocop:enable Style/MethodCallWithArgsParentheses
17
15
  end
18
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.14.0
4
+ version: 0.15.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: 2023-12-10 00:00:00.000000000 Z
38
+ date: 2024-01-01 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: core
@@ -43,42 +43,42 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.1'
46
+ version: '1.0'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.1'
53
+ version: '1.0'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: refinements
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '11.0'
60
+ version: '12.0'
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '11.0'
67
+ version: '12.0'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: tone
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.3'
74
+ version: '1.0'
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.3'
81
+ version: '1.0'
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: zeitwerk
84
84
  requirement: !ruby/object:Gem::Requirement
@@ -146,10 +146,7 @@ require_paths:
146
146
  - lib
147
147
  required_ruby_version: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- version: '3.2'
152
- - - "<="
149
+ - - "~>"
153
150
  - !ruby/object:Gem::Version
154
151
  version: '3.3'
155
152
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -158,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
155
  - !ruby/object:Gem::Version
159
156
  version: '0'
160
157
  requirements: []
161
- rubygems_version: 3.4.22
158
+ rubygems_version: 3.5.3
162
159
  signing_key:
163
160
  specification_version: 4
164
161
  summary: A customizable and feature rich logger.
metadata.gz.sig CHANGED
Binary file