moromi-error 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moromi/error/default_logger.rb +2 -2
- data/lib/moromi/error/loggerable.rb +1 -1
- data/lib/moromi/error/renderer.rb +1 -1
- data/lib/moromi/error/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b3488c51946c8ca81848716ba4a10bb6e04143f
|
4
|
+
data.tar.gz: a134a2a13ba6306c7524ede717a153db476979da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41b6e64b0dacb938aff65776baea13db6b1de7eb209104823bd1498d6a58368984c0e8c01a2140af38d47c16d50d6552f3978c8c83420034ba88494ba8dd8a63
|
7
|
+
data.tar.gz: 6c5f2fccb3d3755bfc22af75d903e15afcaa1fd720ed4666618817f27e6d6d5592dfe453885d71a9aeacbf57af8e66698a0d14f520ce95c38d942d00f35b39b1
|
@@ -3,10 +3,10 @@ module Moromi
|
|
3
3
|
class DefaultLogger
|
4
4
|
include Loggerable
|
5
5
|
|
6
|
-
def write(status, title, exception, options, locals)
|
6
|
+
def write(controller, status, title, exception, options, locals)
|
7
7
|
return if exception.is_a? Moromi::Error::Default
|
8
8
|
|
9
|
-
messages = [
|
9
|
+
messages = []
|
10
10
|
messages << ([exception.inspect] + (exception&.backtrace || [])).compact.join("\n").gsub("\n", '\n')
|
11
11
|
|
12
12
|
Rails.logger.error(messages.join(' '))
|
@@ -51,7 +51,7 @@ module Moromi::Error
|
|
51
51
|
options = options || self.class::default_moromi_error_renderer_options
|
52
52
|
e = Moromi::Error::Default.make(exception)
|
53
53
|
|
54
|
-
self.class::moromi_error_logger.write(status, title, exception, options, locals)
|
54
|
+
self.class::moromi_error_logger.write(self, status, title, exception, options, locals)
|
55
55
|
|
56
56
|
options = {status: status}.merge(options)
|
57
57
|
locals = {status: status, title: title, exception: e}.merge(locals)
|
data/lib/moromi/error/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moromi-error
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro Ooishi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|