lumberjack_json_device 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/continuous_integration.yml +3 -2
- data/CHANGE_LOG.md +6 -0
- data/VERSION +1 -1
- data/lib/lumberjack_json_device.rb +1 -40
- data/lumberjack_json_device.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: 81b9e1a335053608bb8428db2f6828acd748c02ec0610c0c064e060ab94fe36c
|
4
|
+
data.tar.gz: 9a1bf5cb6cce667cde7837624be8db44826976abb4c07c9568481d89efd38c16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3226afbeeb3c72a0e60b940e26fa47973882d6f5770dff91d0d859087c0399a033c1dd54982da74a03fddd8e8fc7acc2849773b0a20bf362d1c4551314a5ba4e
|
7
|
+
data.tar.gz: 2068343690c36690deda5c7c6b91d9c9f1ba8663ad375f28f064ab88d9acdb9ffdb8912b04611c4898363c024bcc01d9e6fca8ab8293a58db3a72992234ff4b7
|
@@ -3,13 +3,14 @@ name: Continuous Integration
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
-
|
6
|
+
- main
|
7
7
|
- actions-*
|
8
8
|
tags:
|
9
9
|
- v*
|
10
10
|
pull_request:
|
11
11
|
branches-ignore:
|
12
12
|
- actions-*
|
13
|
+
workflow_dispatch:
|
13
14
|
|
14
15
|
env:
|
15
16
|
BUNDLE_CLEAN: "true"
|
@@ -30,7 +31,7 @@ jobs:
|
|
30
31
|
- ruby: "2.7"
|
31
32
|
- ruby: "2.5"
|
32
33
|
steps:
|
33
|
-
- uses: actions/checkout@
|
34
|
+
- uses: actions/checkout@v4
|
34
35
|
- name: Set up Ruby
|
35
36
|
uses: ruby/setup-ruby@v1
|
36
37
|
with:
|
data/CHANGE_LOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## 2.1.0
|
8
|
+
|
9
|
+
### Changed
|
10
|
+
|
11
|
+
- Tags that contain arrays of hashes are no longer expanded to nested hashes if the hashes in the array use dot nottion in their keys. The hashes in the array will now be included as is in JSON output.
|
12
|
+
|
7
13
|
## 2.0.0
|
8
14
|
|
9
15
|
### Added
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.0
|
@@ -164,7 +164,7 @@ module Lumberjack
|
|
164
164
|
set_attribute(data, @progname_key, entry.progname) if @progname_key
|
165
165
|
set_attribute(data, @pid_key, entry.pid) if @pid_key
|
166
166
|
|
167
|
-
tags =
|
167
|
+
tags = Lumberjack::Utils.expand_tags(entry.tags) if entry.tags
|
168
168
|
extracted_tags = nil
|
169
169
|
if @custom_keys.size > 0 && !tags&.empty?
|
170
170
|
extracted_tags = []
|
@@ -198,45 +198,6 @@ module Lumberjack
|
|
198
198
|
|
199
199
|
private
|
200
200
|
|
201
|
-
def dereference_tags(tags)
|
202
|
-
updated_tags = nil
|
203
|
-
remove_tags = nil
|
204
|
-
|
205
|
-
tags.each do |original_key, value|
|
206
|
-
updated_tags ||= tags.dup unless original_key.is_a?(String)
|
207
|
-
key = original_key.to_s
|
208
|
-
|
209
|
-
dot_index = key.index(".")
|
210
|
-
if dot_index
|
211
|
-
remove_tags ||= []
|
212
|
-
remove_tags << original_key
|
213
|
-
updated_tags ||= tags.dup
|
214
|
-
sub_key = key[dot_index + 1..-1]
|
215
|
-
key = key[0, dot_index]
|
216
|
-
existing_vals = updated_tags[key]
|
217
|
-
unless existing_vals.is_a?(Hash)
|
218
|
-
existing_vals = {}
|
219
|
-
updated_tags[key] = existing_vals
|
220
|
-
end
|
221
|
-
existing_vals.merge!(dereference_tags({sub_key => value}))
|
222
|
-
elsif value.is_a?(Enumerable)
|
223
|
-
updated_tags ||= tags.dup
|
224
|
-
updated_tags[key] = if value.is_a?(Hash)
|
225
|
-
dereference_tags(value)
|
226
|
-
else
|
227
|
-
value.collect { |v| v.is_a?(Hash) ? dereference_tags(v) : v }
|
228
|
-
end
|
229
|
-
elsif updated_tags
|
230
|
-
updated_tags[key] = value
|
231
|
-
end
|
232
|
-
end
|
233
|
-
|
234
|
-
return tags unless updated_tags
|
235
|
-
|
236
|
-
remove_tags&.each { |key| updated_tags.delete(key) }
|
237
|
-
updated_tags
|
238
|
-
end
|
239
|
-
|
240
201
|
def tag_value(tags, name)
|
241
202
|
return nil if tags.nil?
|
242
203
|
return tags[name] unless name.is_a?(Array)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lumberjack_json_device
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Durand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lumberjack
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.3.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.3.3
|
27
27
|
description:
|
28
28
|
email:
|
29
29
|
- bbdurand@gmail.com
|