loog 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -1
- data/.simplecov +7 -5
- data/lib/loog.rb +6 -8
- data/loog.gemspec +8 -12
- data/test/test__helper.rb +1 -1
- metadata +16 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2662abfce60be64b01efbd3ed10c270b3c428acd81c0836e78404d0117a4fa7
|
4
|
+
data.tar.gz: be86fa2d1456d366135e778f8c8da1d67ef1690b0625fa5a7656e28cac13e757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35804d417e1054e73f031ce1f3a2cad69d5765b8fdace16f8812b2f1dc61efd371eb59a090e3d4b274efed7e7544d9e688b1171702c5226ce26665cb23c34de5
|
7
|
+
data.tar.gz: 46c6b5bc84b603a64a62e6506de8bbbcefb52f264a9b1962b1d20b92cca78c219b5d806051d3daae2bbb2243e4577188467362c0f5cff5069cee8b9b1ebe1544
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
AllCops:
|
2
2
|
DisplayCopNames: true
|
3
3
|
TargetRubyVersion: 2.3.3
|
4
|
+
SuggestExtensions: false
|
5
|
+
NewCops: enable
|
4
6
|
|
5
7
|
Layout/EmptyLineAfterGuardClause:
|
6
8
|
Enabled: false
|
@@ -16,7 +18,7 @@ Metrics/PerceivedComplexity:
|
|
16
18
|
Max: 10
|
17
19
|
Metrics/ParameterLists:
|
18
20
|
Max: 10
|
19
|
-
Layout/
|
21
|
+
Layout/ParameterAlignment:
|
20
22
|
Enabled: false
|
21
23
|
Style/ClassAndModuleChildren:
|
22
24
|
Enabled: false
|
data/.simplecov
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright (c) 2019 Yegor Bugayenko
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -18,21 +20,21 @@
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
21
|
# SOFTWARE.
|
20
22
|
|
21
|
-
if Gem.win_platform?
|
23
|
+
if Gem.win_platform?
|
22
24
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
23
25
|
SimpleCov::Formatter::HTMLFormatter
|
24
26
|
]
|
25
27
|
SimpleCov.start do
|
26
|
-
add_filter
|
27
|
-
add_filter
|
28
|
+
add_filter '/test/'
|
29
|
+
add_filter '/features/'
|
28
30
|
end
|
29
31
|
else
|
30
32
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
31
33
|
[SimpleCov::Formatter::HTMLFormatter]
|
32
34
|
)
|
33
35
|
SimpleCov.start do
|
34
|
-
add_filter
|
35
|
-
add_filter
|
36
|
+
add_filter '/test/'
|
37
|
+
add_filter '/features/'
|
36
38
|
minimum_coverage 60
|
37
39
|
end
|
38
40
|
end
|
data/lib/loog.rb
CHANGED
@@ -46,12 +46,12 @@ module Loog
|
|
46
46
|
when 'DEBUG'
|
47
47
|
prefix = 'D: '
|
48
48
|
end
|
49
|
-
prefix
|
49
|
+
"#{prefix}#{msg.to_s.rstrip.gsub(/\n/, "\n#{' ' * prefix.length}")}\n"
|
50
50
|
end
|
51
51
|
|
52
52
|
# Short formatter
|
53
53
|
SHORT = proc do |_severity, _time, _target, msg|
|
54
|
-
msg.to_s.rstrip
|
54
|
+
"#{msg.to_s.rstrip}\n"
|
55
55
|
end
|
56
56
|
|
57
57
|
# Full formatter
|
@@ -65,27 +65,25 @@ module Loog
|
|
65
65
|
end
|
66
66
|
|
67
67
|
# No logging at all
|
68
|
-
NULL = Logger.new(
|
68
|
+
NULL = Logger.new($stdout)
|
69
69
|
NULL.level = Logger::UNKNOWN
|
70
70
|
NULL.freeze
|
71
71
|
|
72
72
|
# Everything, including debug
|
73
|
-
VERBOSE = Logger.new(
|
73
|
+
VERBOSE = Logger.new($stdout)
|
74
74
|
VERBOSE.level = Logger::DEBUG
|
75
75
|
VERBOSE.formatter = COMPACT
|
76
76
|
VERBOSE.freeze
|
77
77
|
|
78
78
|
# Info and errors, no debug info
|
79
|
-
REGULAR = Logger.new(
|
79
|
+
REGULAR = Logger.new($stdout)
|
80
80
|
REGULAR.level = Logger::INFO
|
81
81
|
REGULAR.formatter = COMPACT
|
82
82
|
REGULAR.freeze
|
83
83
|
|
84
84
|
# Errors only
|
85
|
-
ERRORS = Logger.new(
|
85
|
+
ERRORS = Logger.new($stdout)
|
86
86
|
ERRORS.level = Logger::ERROR
|
87
87
|
ERRORS.formatter = COMPACT
|
88
88
|
ERRORS.freeze
|
89
89
|
end
|
90
|
-
|
91
|
-
require_relative 'loog/tee'
|
data/loog.gemspec
CHANGED
@@ -24,14 +24,10 @@
|
|
24
24
|
|
25
25
|
require 'English'
|
26
26
|
Gem::Specification.new do |s|
|
27
|
-
s.
|
28
|
-
if s.respond_to? :required_rubygems_version=
|
29
|
-
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
30
|
-
end
|
31
|
-
s.rubygems_version = '2.3.3'
|
27
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
32
28
|
s.required_ruby_version = '>=2.3'
|
33
29
|
s.name = 'loog'
|
34
|
-
s.version = '0.3.
|
30
|
+
s.version = '0.3.1'
|
35
31
|
s.license = 'MIT'
|
36
32
|
s.summary = 'Object-oriented logging wrapper'
|
37
33
|
s.description = 'Object-oriented wrapper for Ruby default logging facility'
|
@@ -39,13 +35,13 @@ Gem::Specification.new do |s|
|
|
39
35
|
s.email = 'yegor256@gmail.com'
|
40
36
|
s.homepage = 'http://github.com/yegor256/loog'
|
41
37
|
s.files = `git ls-files`.split($RS)
|
42
|
-
s.test_files = s.files.grep(%r{^(test)/})
|
43
38
|
s.rdoc_options = ['--charset=UTF-8']
|
44
39
|
s.extra_rdoc_files = ['README.md']
|
45
40
|
s.add_development_dependency 'codecov', '0.6.0'
|
46
|
-
s.add_development_dependency 'minitest', '5.
|
47
|
-
s.add_development_dependency 'rake', '
|
48
|
-
s.add_development_dependency 'rdoc', '
|
49
|
-
s.add_development_dependency 'rubocop', '
|
50
|
-
s.add_development_dependency 'rubocop-rspec', '
|
41
|
+
s.add_development_dependency 'minitest', '5.18.0'
|
42
|
+
s.add_development_dependency 'rake', '13.0.6'
|
43
|
+
s.add_development_dependency 'rdoc', '6.5.0'
|
44
|
+
s.add_development_dependency 'rubocop', '1.48.1'
|
45
|
+
s.add_development_dependency 'rubocop-rspec', '2.19.0'
|
46
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
51
47
|
end
|
data/test/test__helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codecov
|
@@ -30,70 +30,70 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.
|
33
|
+
version: 5.18.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.
|
40
|
+
version: 5.18.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 13.0.6
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 13.0.6
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rdoc
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 6.5.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 6.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 1.48.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.48.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubocop-rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 2.19.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 2.19.0
|
97
97
|
description: Object-oriented wrapper for Ruby default logging facility
|
98
98
|
email: yegor256@gmail.com
|
99
99
|
executables: []
|
@@ -129,7 +129,8 @@ files:
|
|
129
129
|
homepage: http://github.com/yegor256/loog
|
130
130
|
licenses:
|
131
131
|
- MIT
|
132
|
-
metadata:
|
132
|
+
metadata:
|
133
|
+
rubygems_mfa_required: 'true'
|
133
134
|
post_install_message:
|
134
135
|
rdoc_options:
|
135
136
|
- "--charset=UTF-8"
|
@@ -148,9 +149,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
149
|
requirements: []
|
149
150
|
rubygems_version: 3.1.2
|
150
151
|
signing_key:
|
151
|
-
specification_version:
|
152
|
+
specification_version: 4
|
152
153
|
summary: Object-oriented logging wrapper
|
153
|
-
test_files:
|
154
|
-
- test/test__helper.rb
|
155
|
-
- test/test_loog.rb
|
156
|
-
- test/test_tee.rb
|
154
|
+
test_files: []
|