dvla-herodotus 2.3.0 → 2.3.1
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/.gitignore +2 -1
- data/CHANGELOG.md +3 -0
- data/lib/dvla/herodotus/version.rb +1 -1
- data/lib/dvla/herodotus.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d295b22355aa8831f1ae6a1401560b06e3ab22da60647a68a2e2f11d4ed19087
|
|
4
|
+
data.tar.gz: 9a18e2310d62f1bb9f71a5785b4714e18ebac9d7ef68bd7b27aafd46fb3b80d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57be084aba32ce6c0a938442600ae034fe0ae31ebc7a77ffe0605137ce10a28d6fdd346311708e3f242330005cc513523faff67052b745def965588b9d18bbf0
|
|
7
|
+
data.tar.gz: 240ad9c21db389debbad9a36f2dfe22fd7142b7ace789d0cf40825003e5ecc353a210e64d0151c0272aa5f4e142c41ee03f26a92b40ccdf2c31fe1d70322c24f
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [2.3.1] - 2025-11-21
|
|
5
|
+
- Fixed issue with output_path in create_logger, will now make a directory if it did not exist
|
|
6
|
+
|
|
4
7
|
## [2.3.0] - 2025-10-05
|
|
5
8
|
- Config block can now accept prefix colour options. Can be applied to the whole prefix or configure individual components.
|
|
6
9
|
|
data/lib/dvla/herodotus.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'logger'
|
|
2
|
+
require 'fileutils'
|
|
2
3
|
require_relative 'herodotus/herodotus_logger'
|
|
3
4
|
require_relative 'herodotus/multi_writer'
|
|
4
5
|
require_relative 'herodotus/proc_writer'
|
|
@@ -25,9 +26,11 @@ module DVLA
|
|
|
25
26
|
private_class_method def self.create_logger(system_name, config, output_path)
|
|
26
27
|
if output_path
|
|
27
28
|
if output_path.is_a? String
|
|
29
|
+
ensure_directory_exists(output_path: output_path)
|
|
28
30
|
output_file = File.open(output_path, 'a')
|
|
29
31
|
return HerodotusLogger.new(system_name, MultiWriter.new(output_file, $stdout), config: config)
|
|
30
32
|
elsif output_path.is_a? Proc
|
|
33
|
+
ensure_directory_exists(output_path: output_path.call)
|
|
31
34
|
proc_writer = ProcWriter.new(output_path)
|
|
32
35
|
return HerodotusLogger.new(system_name, MultiWriter.new(proc_writer, $stdout), config: config)
|
|
33
36
|
else
|
|
@@ -36,5 +39,12 @@ module DVLA
|
|
|
36
39
|
end
|
|
37
40
|
HerodotusLogger.new(system_name, $stdout, config: config)
|
|
38
41
|
end
|
|
42
|
+
|
|
43
|
+
private_class_method def self.ensure_directory_exists(output_path:)
|
|
44
|
+
directory = File.split(output_path).first
|
|
45
|
+
unless File.directory?(directory)
|
|
46
|
+
FileUtils.mkdir_p(directory)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
39
49
|
end
|
|
40
50
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dvla-herodotus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Driver and Vehicle Licensing Agency (DVLA)
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2025-
|
|
12
|
+
date: 2025-12-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: dvla-lint
|