loga 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/gemfiles/rails60.gemfile +11 -0
- data/lib/loga/rack/logger.rb +3 -0
- data/lib/loga/version.rb +1 -1
- data/spec/unit/loga/rack/logger_spec.rb +3 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2edeb506c587fc55a4a3569aa4fa50af23c0080d0409da3de8aaf4f8f9df60f1
|
4
|
+
data.tar.gz: 98ef790dd9c26f71d3a5f6c656d1a1663db56a90da28fa49f03da239bbc57d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62a82d5f31b3b4a1d29464d51e15ef1346ee9a7cc0fddc8047703fbdd0d041c089fc9423ed02fcdf81f0a5be6f329893d5081003ef347fbf5c8f032bd4f7dabe
|
7
|
+
data.tar.gz: a70770e9de89a0357a25c1290bafff87b0422efc1b9dd7a6861004bacceb6acc9db67f10bd9c41e1bc5ff0178a63b1142ab5efe3cca4cb18745808deb550b1d4
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [2.5.1] - 2020-01-02
|
8
|
+
### Fixed
|
9
|
+
- Fixed a long standing bug that would mask exceptions raised by the host application when serving requests. The original exception would be replaced with a `TypeError` one due to a HTTP status code not being available within `Loga::Rack::Logger`.
|
10
|
+
|
7
11
|
## [2.5.0] - 2019-11-12
|
8
12
|
### Added
|
9
13
|
- Add support for rails 6
|
data/lib/loga/rack/logger.rb
CHANGED
@@ -44,6 +44,9 @@ module Loga
|
|
44
44
|
data['user_agent'] = request.user_agent
|
45
45
|
data['controller'] = request.controller_action_name if request.controller_action_name
|
46
46
|
data['duration'] = duration_in_ms(started_at, Time.now)
|
47
|
+
|
48
|
+
# If data['status'] is nil we assume an exception was raised when calling the application
|
49
|
+
data['status'] ||= 500
|
47
50
|
end
|
48
51
|
# rubocop:enable Metrics/LineLength
|
49
52
|
|
data/lib/loga/version.rb
CHANGED
@@ -65,12 +65,13 @@ describe Loga::Rack::Logger do
|
|
65
65
|
let(:exception) { StandardError.new }
|
66
66
|
let(:logged_exception) { nil }
|
67
67
|
let(:response_status) { 200 }
|
68
|
+
let(:exception_class) { Class.new(StandardError) }
|
68
69
|
|
69
70
|
context 'when an exception is raised' do
|
70
|
-
let(:app) { ->(_env) { raise
|
71
|
+
let(:app) { ->(_env) { raise exception_class } }
|
71
72
|
|
72
73
|
it 'does not rescue the exception' do
|
73
|
-
expect { subject.call(env) }.to raise_error(
|
74
|
+
expect { subject.call(env) }.to raise_error(exception_class)
|
74
75
|
end
|
75
76
|
end
|
76
77
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Funding Circle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -259,6 +259,7 @@ files:
|
|
259
259
|
- gemfiles/rails42.gemfile
|
260
260
|
- gemfiles/rails50.gemfile
|
261
261
|
- gemfiles/rails52.gemfile
|
262
|
+
- gemfiles/rails60.gemfile
|
262
263
|
- gemfiles/sidekiq51.gemfile
|
263
264
|
- gemfiles/sinatra14.gemfile
|
264
265
|
- gemfiles/unit.gemfile
|