lograge 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: a85786ea77c363233831965c6e03f24bca37cd24
4
- data.tar.gz: 9d1c277d2df5eda46969e444aa356ba99ea40e89
3
+ metadata.gz: 38604327cb4f55c74d123cffc28d5fc628f7c6a3
4
+ data.tar.gz: 98f4f1c943fce2365c6bc62df996945dcf46ba0a
5
5
  SHA512:
6
- metadata.gz: c008c958f766ae2a01360c5873320f13cb22065a3fe5b61ec873ef078d85bbcfba2f5d2a5f6e164ab996f565be1f73a7e48efe0c6fe4b210f94180b3904446cb
7
- data.tar.gz: eb3f7560580199ecde41d01740dc4a95b8b6a4d3e31c82035e0c8bc899009d29553fb649b46c8913981730bc1a7f33046080e423cd10655c1b0ccf1dcf7b4ca9
6
+ metadata.gz: 21d8263d547c05a350e4da8f56c61315364eb843ad340fdf7415b163cad06acb331a18a42ac6b63d43526b3cece891a5fb447648e57b4ef7c12ee7c6f06702f2
7
+ data.tar.gz: 966bdf892a46e78688f888e8f71d17d9b8f53866d6565802d09e8316405080eae96c89449bd1932bb62ef84089aaf1143099f32a2563eed624c55c952e5e6738
@@ -69,9 +69,8 @@ module Lograge
69
69
  end
70
70
 
71
71
  def get_error_status_code(exception)
72
- exception_object = exception.constantize.new
73
- exception_wrapper = ::ActionDispatch::ExceptionWrapper.new({}, exception_object)
74
- exception_wrapper.status_code
72
+ status = ActionDispatch::ExceptionWrapper.rescue_responses[exception]
73
+ Rack::Utils.status_code(status)
75
74
  end
76
75
 
77
76
  def custom_options(data, event)
@@ -7,7 +7,7 @@ module Lograge
7
7
  config.lograge = ActiveSupport::OrderedOptions.new
8
8
  config.lograge.enabled = false
9
9
 
10
- initializer :lograge do |app|
10
+ config.after_initialize do |app|
11
11
  Lograge.setup(app) if app.config.lograge.enabled
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Lograge
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lograge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Meyer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-13 00:00:00.000000000 Z
12
+ date: 2015-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec