console 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/console.gemspec +1 -0
- data/lib/console/serialized/logger.rb +11 -7
- data/lib/console/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc9d8c829a0609b619169fd4607c88c9d2ec53e8bad01a7f3b85ef614718169d
|
4
|
+
data.tar.gz: 793221c44e39ee199ad34e3452a335d3c3838d84b5aab445680a7ff378009ba1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aa2ca6d6dfedcaf36964f4877adf3c984db619b146d6dda4eea927286ac302cd01c738a848fb232829201fd3e4ec0e9377e29079342ed2c12720c68376af73e
|
7
|
+
data.tar.gz: 8d8364cacd0743b2a4713debf583f9d82f9d8ef9b534b7564fcf6e95e1ca52c0112e61e154e24a10935eb6b05e56fffceb900cf1a26dc73080f419ae6d19f679
|
data/.rspec
CHANGED
data/console.gemspec
CHANGED
@@ -40,31 +40,35 @@ module Console
|
|
40
40
|
def verbose!(value = true)
|
41
41
|
end
|
42
42
|
|
43
|
-
def call(subject = nil, *arguments, severity: UNKNOWN, &block)
|
44
|
-
|
43
|
+
def call(subject = nil, *arguments, severity: UNKNOWN, **options, &block)
|
44
|
+
record = {
|
45
45
|
time: Time.now.iso8601,
|
46
46
|
severity: severity,
|
47
47
|
}
|
48
48
|
|
49
49
|
if subject
|
50
|
-
|
50
|
+
record[:subject] = subject
|
51
51
|
end
|
52
52
|
|
53
53
|
if arguments.any?
|
54
|
-
|
54
|
+
record[:arguments] = arguments
|
55
|
+
end
|
56
|
+
|
57
|
+
if options.any?
|
58
|
+
record[:options] = options
|
55
59
|
end
|
56
60
|
|
57
61
|
if block_given?
|
58
62
|
if block.arity.zero?
|
59
|
-
|
63
|
+
record[:message] = yield
|
60
64
|
else
|
61
65
|
buffer = StringIO.new
|
62
66
|
yield buffer
|
63
|
-
|
67
|
+
record[:message] = buffer.string
|
64
68
|
end
|
65
69
|
end
|
66
70
|
|
67
|
-
@io.puts(@format.dump(
|
71
|
+
@io.puts(@format.dump(record))
|
68
72
|
end
|
69
73
|
end
|
70
74
|
end
|
data/lib/console/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|
@@ -100,7 +100,8 @@ files:
|
|
100
100
|
- lib/console/version.rb
|
101
101
|
- proposal.md
|
102
102
|
homepage: https://github.com/socketry/console
|
103
|
-
licenses:
|
103
|
+
licenses:
|
104
|
+
- MIT
|
104
105
|
metadata: {}
|
105
106
|
post_install_message:
|
106
107
|
rdoc_options: []
|
@@ -117,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
118
|
- !ruby/object:Gem::Version
|
118
119
|
version: '0'
|
119
120
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.1.2
|
121
122
|
signing_key:
|
122
123
|
specification_version: 4
|
123
124
|
summary: Beautiful logging for Ruby.
|