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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6cb8a7613142458e4bf5c15502e7db79cd58a58
4
- data.tar.gz: 1e911e13d9cdd10139ea996cea880ce248f66831
3
+ metadata.gz: 3b3488c51946c8ca81848716ba4a10bb6e04143f
4
+ data.tar.gz: a134a2a13ba6306c7524ede717a153db476979da
5
5
  SHA512:
6
- metadata.gz: d9ce279a8a3967c17ae0de23cff806592229b9587b104fd320bdb7d515388d4fc790edeac80827e72b092434377321705077e3d79dc542ec6cc6611ab4a0d1e0
7
- data.tar.gz: 41f2e945a3c68b3356fe90a56ae41603d61e234a50cbaad1e4033cb8d09493e69e5dbba73fc4496c745cfa653dddd5fb75bcd8dd7f5f2532f88ee96227ecb39c
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 = ['[ERROR]']
9
+ messages = []
10
10
  messages << ([exception.inspect] + (exception&.backtrace || [])).compact.join("\n").gsub("\n", '\n')
11
11
 
12
12
  Rails.logger.error(messages.join(' '))
@@ -1,7 +1,7 @@
1
1
  module Moromi
2
2
  module Error
3
3
  module Loggerable
4
- def write(status, title, exception, options, locals)
4
+ def write(controller, status, title, exception, options, locals)
5
5
  raise NotImplementedError
6
6
  end
7
7
  end
@@ -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)
@@ -1,5 +1,5 @@
1
1
  module Moromi
2
2
  module Error
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.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-14 00:00:00.000000000 Z
11
+ date: 2016-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails