ougai 1.8.0 → 1.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e90a87243634db150725e76c0fb0537ab1a81f40b6e88a0e47dffaa81f4aa4ee
4
- data.tar.gz: d971d8bbcd9d518929619735a56a9ff00a871cc08234000468a575a882fe271d
3
+ metadata.gz: fdfdff5fa693d4f9cc99ebcf23f98d469efd554bc305ef235808a08d614492f5
4
+ data.tar.gz: a62f7b67bb08ce159c18ce11055556d9363ab828d6d4c18c033c9a77e3275158
5
5
  SHA512:
6
- metadata.gz: 17bd3de3ab8dc568701056f7fb324d0fe9181916f781407fae322a28edfa1f887c48bcfc2aae5891c4de71662fb956a106fc0b50c65f55e3678cbf702ef3a9f3
7
- data.tar.gz: d66df9e168a0ee17d3b4fcd0606c80aafc6d3e301d5627fddc733e3b02a2e71ff92bbf00fb676bcc6ce108415039cf7aa812562ca330a8356569cab65b5e7efd
6
+ metadata.gz: 82e5cb16d19270f57b2b398419a5f75c0feb459fa93925870662e7763722d718f0b2c8528f42c8b7ce97570310b55185235fa62e3a04a373c410484f76e5fd60
7
+ data.tar.gz: 00ba0a0e24b2dda62a19e31774c24bd6178f89f5edb1856528ed5411b2f07a03a8e0eca888eadb3c4e5ac32dbdfcf0fc5afdb03961311534f1721de9b7a538f2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ougai (1.8.0)
4
+ ougai (1.8.1)
5
5
  oj (~> 3.4)
6
6
 
7
7
  GEM
@@ -11,6 +11,7 @@ GEM
11
11
  diff-lcs (1.3)
12
12
  docile (1.3.2)
13
13
  json (2.2.0)
14
+ json (2.2.0-java)
14
15
  oj (3.9.0)
15
16
  rake (10.5.0)
16
17
  rspec (3.8.0)
@@ -35,6 +36,7 @@ GEM
35
36
  yard (0.9.20)
36
37
 
37
38
  PLATFORMS
39
+ java
38
40
  ruby
39
41
 
40
42
  DEPENDENCIES
@@ -48,4 +50,4 @@ DEPENDENCIES
48
50
  yard
49
51
 
50
52
  BUNDLED WITH
51
- 2.0.1
53
+ 2.0.2
data/README.md CHANGED
@@ -2,7 +2,7 @@ Ougai
2
2
  =====
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/ougai.svg)](https://badge.fury.io/rb/ougai)
5
- [![document](https://img.shields.io/badge/document-1.7.0-green.svg)](http://www.rubydoc.info/gems/ougai/)
5
+ [![document](https://img.shields.io/badge/document-1.8.1-green.svg)](http://www.rubydoc.info/gems/ougai/)
6
6
  [![Build Status](https://travis-ci.org/tilfin/ougai.svg?branch=master)](https://travis-ci.org/tilfin/ougai)
7
7
  [![Code Climate](https://codeclimate.com/github/tilfin/ougai/badges/gpa.svg)](https://codeclimate.com/github/tilfin/ougai)
8
8
  [![Test Coverage](https://codeclimate.com/github/tilfin/ougai/badges/coverage.svg)](https://codeclimate.com/github/tilfin/ougai/coverage)
@@ -17,7 +17,7 @@ module Ougai
17
17
  @default_message = 'No message'
18
18
  @exc_key = :err
19
19
  @with_fields = {}
20
- @formatter = create_formatter
20
+ @formatter = create_formatter if @formatter.nil?
21
21
  end
22
22
 
23
23
  class << self
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ougai
4
- VERSION = '1.8.0'
4
+ VERSION = '1.8.1'
5
5
  end
@@ -51,6 +51,24 @@ describe Ougai::Logger do
51
51
  end
52
52
  end
53
53
 
54
+ describe '.new' do
55
+ context 'if formatter argument is not specified' do
56
+ it 'sets Bunyan to formatter attribute' do
57
+ expect(logger.formatter).to be_an(Ougai::Formatters::Bunyan)
58
+ end
59
+ end
60
+
61
+ if RUBY_VERSION > '2.4'
62
+ context 'if formatter argument is specified' do
63
+ it 'sets it to formatter attribute' do
64
+ a_formatter = Ougai::Formatters::Readable.new
65
+ a_logger = described_class.new(io, formatter: a_formatter)
66
+ expect(a_logger.formatter).to eq a_formatter
67
+ end
68
+ end
69
+ end
70
+ end
71
+
54
72
  shared_examples 'log' do
55
73
  context 'with message' do
56
74
  it 'outputs valid' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ougai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshimitsu Takahashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-20 00:00:00.000000000 Z
11
+ date: 2019-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.0.3
124
+ rubygems_version: 3.0.1
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: JSON logger compatible with node-bunyan or pino is capable of handling structured