loga 2.5.0 → 2.5.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: b861a3c084a6aee96710b7de7e863dc5a6167a189ff99975805500c7d1c66596
4
- data.tar.gz: 15190282eedb92b8d18ab65b3e27b7ea5a73de754ddd6f80b2e0bbaf24bf8ec5
3
+ metadata.gz: 2edeb506c587fc55a4a3569aa4fa50af23c0080d0409da3de8aaf4f8f9df60f1
4
+ data.tar.gz: 98ef790dd9c26f71d3a5f6c656d1a1663db56a90da28fa49f03da239bbc57d80
5
5
  SHA512:
6
- metadata.gz: ab122312cd675226c261250c65b90d900246c52471937450eafe767cc143f94954128d72c67803a418e05599b515272e95255eddd688b8f4fffe511ee46cae23
7
- data.tar.gz: 4af4ebe2bfb678a3cc45ec9a7b48bb768490313d85f5983135f57b83448171411ca262dea277f67093a26559a4de7e4ecbc309158d92f25fefc45429554984bf
6
+ metadata.gz: 62a82d5f31b3b4a1d29464d51e15ef1346ee9a7cc0fddc8047703fbdd0d041c089fc9423ed02fcdf81f0a5be6f329893d5081003ef347fbf5c8f032bd4f7dabe
7
+ data.tar.gz: a70770e9de89a0357a25c1290bafff87b0422efc1b9dd7a6861004bacceb6acc9db67f10bd9c41e1bc5ff0178a63b1142ab5efe3cca4cb18745808deb550b1d4
@@ -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
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.0.0"
6
+
7
+ group :test do
8
+ gem "simplecov"
9
+ end
10
+
11
+ gemspec path: "../"
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Loga
2
- VERSION = '2.5.0'.freeze
2
+ VERSION = '2.5.1'.freeze
3
3
  end
@@ -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 exception } }
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(StandardError)
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.0
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: 2019-11-13 00:00:00.000000000 Z
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