lorekeeper 1.7.1 → 1.7.2

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
- SHA1:
3
- metadata.gz: eacd166a17c5e6f4ad24a5f03fe872a25290dd5e
4
- data.tar.gz: 9c85bd94a282067e28010081ff0e79e0963fc830
2
+ SHA256:
3
+ metadata.gz: d8b0a7ef791f5abaf9fc2452ac135e9c5ec37510b879b19a02039cb3d1096342
4
+ data.tar.gz: 418c008350fd3f1a221291266b3ab39e59d8333f796148bffba16f717399c066
5
5
  SHA512:
6
- metadata.gz: 2e1c6718980ffaf6736fcee85a5d01dabed7df31b3af84c39efede9b69cc994ab602c010ca1f34e9301daa66f9eddce2ee773849c6d82234a5a15c8cd07be58b
7
- data.tar.gz: 2dae7e8356d9d03280c08a16ac90827dda1ae25945c94854fa8f6da9c57a2602297a08815672801b9936738fdd0b2dd9a83bf420e715dd1e4a8412e7a1da4dc3
6
+ metadata.gz: fb7b5c1889b2e133bfe6f6a55be4424bcdfbe26718f2096889b1409d09609678ad57fc50fa2363fa17b7e59f79342422e1ac2ff3c22fd7572fec14fa09da5692
7
+ data.tar.gz: 6933ce6d182c41fd7fd23950df831bc3e9f93c3d72c31198dd93906882f50a24395919b5cb2ba1a65587c0a5adc240b397872a27e25e2a7e251324661669e795
@@ -2,11 +2,14 @@ language: ruby
2
2
  cache: bundler
3
3
 
4
4
  rvm:
5
- - 2.1.10
6
- - 2.2.10
7
5
  - 2.3.8
8
- - 2.4.5
9
- - 2.5.3
10
- - 2.6.0-rc1
6
+ - 2.4.6
7
+ - 2.5.5
8
+ - 2.6.3
9
+
10
+ before_install:
11
+ - gem install rubygems-update -v 2.7.8
12
+ - gem install bundler -v 1.17.3
13
+ - bundle --version
11
14
 
12
15
  script: bundle exec rspec
@@ -1,3 +1,7 @@
1
+ # 1.7.2
2
+ * Add a second parameter to respond_to? to avoid Ruby 2.6 warnings
3
+ * Drop support for unsupported Ruby 2.1 and Ruby 2.2
4
+
1
5
  # 1.7.1
2
6
  * Ensure `data` is not nil when logging wrong #exception usage
3
7
 
data/Gemfile CHANGED
@@ -1,8 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- group :development do
4
- gem 'mutant-rspec', '~> 0.8'
5
- end
6
-
7
3
  # Specify your gem's dependencies in lorekeeper.gemspec
8
4
  gemspec
data/README.md CHANGED
@@ -141,6 +141,34 @@ Will output:
141
141
  }
142
142
  ```
143
143
 
144
+ This method also accepts a custom message, data and log level.
145
+
146
+ ```ruby
147
+ rescue => e
148
+ logger.exception(e, "custom msg!", { some: { data: 123 } }, :warn)
149
+ end
150
+ ```
151
+
152
+ Will output:
153
+
154
+ ```javascript
155
+ {
156
+ "message": "custom msg!",
157
+ "timestamp": "1970-01-01T00:00:00.000+0100",
158
+ "level": "warning",
159
+ "data": {
160
+ ":some": {
161
+ ":data": 123
162
+ }
163
+ },
164
+ "exception": "<exception name>",
165
+ "stack": [
166
+ "<stacktraceline1>",
167
+ "<stacktraceline2>"
168
+ ]
169
+ }
170
+ ```
171
+
144
172
 
145
173
  ## License
146
174
 
@@ -16,9 +16,15 @@ module Lorekeeper
16
16
  "Lorekeeper multilogger, loggers: #{@loggers.map(&:inspect)}"
17
17
  end
18
18
 
19
+ if RUBY_VERSION > "2.6"
20
+ def respond_to?(method, all_included = false)
21
+ @loggers.all? { |logger| logger.respond_to?(method, all_included) }
22
+ end
23
+ else
19
24
  def respond_to?(method)
20
25
  @loggers.all? { |logger| logger.respond_to?(method) }
21
26
  end
27
+ end
22
28
 
23
29
  def method_missing(method, *args, &block)
24
30
  result = @loggers.map do |logger|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lorekeeper
4
- VERSION = '1.7.1'
4
+ VERSION = '1.7.2'
5
5
  end
@@ -20,16 +20,17 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.required_ruby_version = '>= 2.1.0'
23
+ spec.required_ruby_version = '>= 2.3.0'
24
24
 
25
25
  spec.add_dependency 'oj', '>= 3.4', '< 4.0'
26
26
 
27
27
  spec.add_development_dependency 'bundler', '>= 1.16', '< 3.0'
28
28
  spec.add_development_dependency 'rake', '~> 12.0'
29
- spec.add_development_dependency 'rspec', '~> 3.4'
29
+ spec.add_development_dependency 'rspec', '~> 3.8'
30
30
  spec.add_development_dependency 'benchmark-ips', '~> 2.3'
31
31
  spec.add_development_dependency 'timecop', '~> 0.8'
32
- spec.add_development_dependency 'byebug', '~> 8.0'
32
+ spec.add_development_dependency 'byebug', '~> 11.0'
33
33
  spec.add_development_dependency 'rbtrace', '~> 0.4'
34
34
  spec.add_development_dependency 'simplecov', '~> 0.16'
35
+ spec.add_development_dependency 'mutant-rspec', '~> 0.8'
35
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lorekeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordi Polo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-12 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -70,14 +70,14 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '3.4'
73
+ version: '3.8'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '3.4'
80
+ version: '3.8'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: benchmark-ips
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -112,14 +112,14 @@ dependencies:
112
112
  requirements:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: '8.0'
115
+ version: '11.0'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: '8.0'
122
+ version: '11.0'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: rbtrace
125
125
  requirement: !ruby/object:Gem::Requirement
@@ -148,6 +148,20 @@ dependencies:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0.16'
151
+ - !ruby/object:Gem::Dependency
152
+ name: mutant-rspec
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: '0.8'
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: '0.8'
151
165
  description: Opinionated logger which outputs messages in JSON format
152
166
  email:
153
167
  - mumismo@gmail.com
@@ -185,15 +199,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
199
  requirements:
186
200
  - - ">="
187
201
  - !ruby/object:Gem::Version
188
- version: 2.1.0
202
+ version: 2.3.0
189
203
  required_rubygems_version: !ruby/object:Gem::Requirement
190
204
  requirements:
191
205
  - - ">="
192
206
  - !ruby/object:Gem::Version
193
207
  version: '0'
194
208
  requirements: []
195
- rubyforge_project:
196
- rubygems_version: 2.6.14
209
+ rubygems_version: 3.0.2
197
210
  signing_key:
198
211
  specification_version: 4
199
212
  summary: Very fast JSON logger