ruby_smart-simple_logger 1.2.1 → 1.2.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f93f509aad065f314393b0b7f630694091fb06c967bc20ad1fe4e0b7683f843b
|
4
|
+
data.tar.gz: 9d5a325fac9bc01ad330cec1c1c31a9bc3f5602e1934893b04ab5f3baed22ac0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b4b91d4c70cd0e373af89191b9147739a55443e851ffdc8751e3853d833e04f59cd9aa6d125a60c752e924686a190d8bd492560860e91d18749af48adc210d4
|
7
|
+
data.tar.gz: 5cb89dd0a2cf9b77f3ce2cbc4bcf7c9f8ee218fb9030a16c9bba0259ac5ca16bf82fcdffef2602533b567b2591d94f672662a46e3562b8a1fdee398980137718
|
data/docs/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# RubySmart::SimpleLogger - CHANGELOG
|
2
2
|
|
3
|
+
## [1.2.2] - 2023-03-15
|
4
|
+
* **[ref]** simplify device-generation for builtins
|
5
|
+
* **[fix]** `ActionView::Helpers::DateHelper` require, which breaks rails loading process in some cases
|
6
|
+
|
3
7
|
## [1.2.1] - 2023-02-17
|
4
8
|
* **[fix]** 'rails'-related builtins
|
5
9
|
* **[fix]** `::RubySmart::SimpleLogger::Devices::MultiDevice` register `MultiDevice` instead of nested devices
|
@@ -61,36 +61,30 @@ module RubySmart
|
|
61
61
|
# check for already existing +device+
|
62
62
|
return if opts[:device]
|
63
63
|
|
64
|
-
# remove builtin key from opts
|
65
|
-
|
64
|
+
# remove builtin key from opts and force an array
|
65
|
+
builtins = Array(opts.delete(:builtin))
|
66
66
|
|
67
|
-
#
|
68
|
-
|
67
|
+
# expand builtins with stdout
|
68
|
+
builtins << :stdout if opts.delete(:stdout)
|
69
69
|
|
70
|
-
# expand
|
71
|
-
if opts.delete(:
|
72
|
-
builtin = [builtin] unless builtin.is_a?(Array)
|
73
|
-
builtin << :stdout
|
74
|
-
end
|
70
|
+
# expand builtins with memory
|
71
|
+
builtins << :memory if opts.delete(:memory)
|
75
72
|
|
76
|
-
|
77
|
-
builtin = [builtin] unless builtin.is_a?(Array)
|
78
|
-
builtin << :memory
|
79
|
-
end
|
73
|
+
builtins.uniq!
|
80
74
|
|
81
|
-
#
|
82
|
-
if
|
75
|
+
# don't create multi-device for a single (or +nil+) builtin
|
76
|
+
if builtins.length < 2
|
77
|
+
opts[:device] = _resolve_device(builtins[0], opts)
|
78
|
+
else
|
83
79
|
opts[:device] = ::RubySmart::SimpleLogger::Devices::MultiDevice.new
|
84
|
-
|
80
|
+
builtins.each do |builtin|
|
85
81
|
# IMPORTANT: dup, original hash to prevent reference manipulation (on the TOP-level, only)
|
86
82
|
builtin_opts = opts.dup
|
87
|
-
opts[:device].register(_resolve_device(
|
83
|
+
opts[:device].register(_resolve_device(builtin, builtin_opts), _resolve_formatter(builtin_opts))
|
88
84
|
end
|
89
85
|
|
90
86
|
# force 'passthrough', as format, since this is required for multi-devices
|
91
87
|
opts[:format] = :passthrough
|
92
|
-
else
|
93
|
-
opts[:device] = _resolve_device(builtin, opts)
|
94
88
|
end
|
95
89
|
|
96
90
|
# prevent to return any data
|
@@ -17,9 +17,8 @@ module RubySmart
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# load date extensions for logger
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
20
|
+
# since 'actionview' is loaded in different ways, we only can check for +installed?+ here...
|
21
|
+
if GemInfo.installed?('actionview')
|
22
|
+
# IMPORTANT: any require will break the loading process
|
23
|
+
RubySmart::SimpleLogger::Logger.include(ActionView::Helpers::DateHelper) unless RubySmart::SimpleLogger::Logger.included_modules.include?(ActionView::Helpers::DateHelper)
|
25
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_smart-simple_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Gonsior
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_smart-support
|