twiglet 3.8.0 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -5
- data/.ruby-version +1 -1
- data/lib/hash_extensions.rb +1 -1
- data/lib/twiglet/formatter.rb +7 -5
- data/lib/twiglet/version.rb +1 -1
- data/test/logger_test.rb +13 -2
- data/twiglet.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24bb01ca290d4e49c2a38e69a0566bcb0e06d38e5c1daa120abb90c2a88c1826
|
4
|
+
data.tar.gz: 00e825a9ae2164604a36b54811bf659321bc5bb1bf96afc198399c890058004a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8992a36124f946eb46fc63fd432d5ae1c5359101572a759eea3a70bb7d1b5d3ccadc9d76a075b42222906f6eb2a4c03de273b967a4e7bb8d977ec9f2a2095954
|
7
|
+
data.tar.gz: bfd2479a25d3d2f5212721941bd2400ad6179080f65a913efa4256c7ca7304e8042efc9ca50f294e19d5157e4d640e2c03e97c45891320ea445ef32792eaaa88
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.2
|
data/lib/hash_extensions.rb
CHANGED
@@ -10,7 +10,7 @@ module HashExtensions
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def deep_merge(hash_to_merge)
|
13
|
-
merger = proc { |_,
|
13
|
+
merger = proc { |_, val_1, val_2| val_1.is_a?(Hash) && val_2.is_a?(Hash) ? val_1.merge(val_2, &merger) : val_2 }
|
14
14
|
merge(hash_to_merge, &merger)
|
15
15
|
end
|
16
16
|
|
data/lib/twiglet/formatter.rb
CHANGED
@@ -6,11 +6,13 @@ module Twiglet
|
|
6
6
|
class Formatter < ::Logger::Formatter
|
7
7
|
Hash.include HashExtensions
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
def initialize(
|
10
|
+
service_name,
|
11
|
+
validator:,
|
12
|
+
default_properties: {},
|
13
|
+
context_provider: nil,
|
14
|
+
now: -> { Time.now.utc }
|
15
|
+
)
|
14
16
|
@service_name = service_name
|
15
17
|
@now = now
|
16
18
|
@default_properties = default_properties
|
data/lib/twiglet/version.rb
CHANGED
data/test/logger_test.rb
CHANGED
@@ -34,8 +34,19 @@ describe Twiglet::Logger do
|
|
34
34
|
|
35
35
|
it 'conforms to the standard Ruby Logger API' do
|
36
36
|
[
|
37
|
-
:debug,
|
38
|
-
:
|
37
|
+
:debug,
|
38
|
+
:debug?,
|
39
|
+
:info,
|
40
|
+
:info?,
|
41
|
+
:warn,
|
42
|
+
:warn?,
|
43
|
+
:fatal,
|
44
|
+
:fatal?,
|
45
|
+
:error,
|
46
|
+
:error?,
|
47
|
+
:level,
|
48
|
+
:level=,
|
49
|
+
:sev_threshold=
|
39
50
|
].each do |call|
|
40
51
|
assert @logger.respond_to?(call), "Logger does not respond to #{call}"
|
41
52
|
end
|
data/twiglet.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twiglet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simply Business
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -141,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
requirements:
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
144
|
+
version: '3.0'
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
147
|
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
151
|
+
rubygems_version: 3.4.10
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Twiglet
|