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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e6e1262499d10a334cb59ca261e8999ba79d951ac1e7cfba12bccd7f89e6984
4
- data.tar.gz: 640cd8f249f96f87384cd787f9949c1756bc0138e1f1da4eca5a27d5c4c4a846
3
+ metadata.gz: dc9d8c829a0609b619169fd4607c88c9d2ec53e8bad01a7f3b85ef614718169d
4
+ data.tar.gz: 793221c44e39ee199ad34e3452a335d3c3838d84b5aab445680a7ff378009ba1
5
5
  SHA512:
6
- metadata.gz: 140efdbe4232fbe7ff475716b97059d119ee3a692b3e72ed5c1c3790f403e5fe2074f6265aa766d860fe329786c414cf54350083af64b42cb798fe9b534670d8
7
- data.tar.gz: 517647d3daa6af74fae8f23b1738c6de23c36765e8997130a89b7e29b636e9cf33910529b08dc67d41a5462d0506ff4b9f7b78619c464efea8b41b8a83a022d1
6
+ metadata.gz: 4aa2ca6d6dfedcaf36964f4877adf3c984db619b146d6dda4eea927286ac302cd01c738a848fb232829201fd3e4ec0e9377e29079342ed2c12720c68376af73e
7
+ data.tar.gz: 8d8364cacd0743b2a4713debf583f9d82f9d8ef9b534b7564fcf6e95e1ca52c0112e61e154e24a10935eb6b05e56fffceb900cf1a26dc73080f419ae6d19f679
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
1
  --format documentation
2
2
  --color
3
3
  --require spec_helper
4
+ --warnings
@@ -4,6 +4,7 @@ require_relative "lib/console/version"
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "console"
6
6
  spec.version = Console::VERSION
7
+ spec.licenses = ["MIT"]
7
8
  spec.authors = ["Samuel Williams"]
8
9
  spec.email = ["samuel.williams@oriontransfer.co.nz"]
9
10
 
@@ -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
- message = {
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
- message[:subject] = subject
50
+ record[:subject] = subject
51
51
  end
52
52
 
53
53
  if arguments.any?
54
- message[:arguments] = arguments
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
- message[:message] = yield
63
+ record[:message] = yield
60
64
  else
61
65
  buffer = StringIO.new
62
66
  yield buffer
63
- message[:message] = buffer.string
67
+ record[:message] = buffer.string
64
68
  end
65
69
  end
66
70
 
67
- @io.puts(@format.dump(message))
71
+ @io.puts(@format.dump(record))
68
72
  end
69
73
  end
70
74
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Console
22
- VERSION = "1.6.0"
22
+ VERSION = "1.7.0"
23
23
  end
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.6.0
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-18 00:00:00.000000000 Z
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.0.6
121
+ rubygems_version: 3.1.2
121
122
  signing_key:
122
123
  specification_version: 4
123
124
  summary: Beautiful logging for Ruby.