coaster 0.3.7 → 0.3.8

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: 2fc3cfb2616c8aea601ebf5e37a4d20edfb88162
4
- data.tar.gz: 9284b26f35af7d27e36bfd4a8ebe1414c39ceb35
3
+ metadata.gz: 2e1e575098fbc51c407b9c468333b7a649229a8d
4
+ data.tar.gz: 00c04fe33a382b7809d6b7dfb130c96214100fc4
5
5
  SHA512:
6
- metadata.gz: 5a22537ad7987fe86bb0a5cd30743e131525419bb527ebe98cba74bcadaea2236d7b40b999601df3e5a86a7f3b9a3e6f3a65c46448cd30fcde55c653d37dde06
7
- data.tar.gz: ff6e707b7b991aa271bd89d31ac644393d3a79ee103208dc241c6063d15491901ff8c556cf448c2d3bcebd774542de282ff6cc4f0398c2a324a718b142935016
6
+ metadata.gz: 6c821cee7a557d1dab3f14ab413f13bddf98f69d634d5bce8c65cec0455d6e685b3f4f8ff5f07a744408d5fb514bda7e79dcdc9f3f58a53c49542a8a16ffdd7d
7
+ data.tar.gz: afe30ace49d932415b3f61942dd2cc37f39396aaa6606c53903acfbc94c341465e942b96e80206ea0d7e9f50ab2beabc9b91704f7dd6cb4c68699c2ec32cc465
@@ -15,14 +15,14 @@ class StandardError
15
15
 
16
16
  def title
17
17
  t = _translate('.title')
18
- t.instance_variable_get(:@missing) ? nil : t
18
+ t.instance_variable_defined?(:@missing) ? nil : t
19
19
  end
20
20
  end
21
21
 
22
22
  attr_accessor :tags, :level, :tkey, :fingerprint
23
23
 
24
24
  def initialize(message = nil, cause = $!)
25
- @fingerprint = Coaster.default_fingerprint
25
+ @fingerprint = Coaster.default_fingerprint.dup
26
26
  @tags = {}
27
27
  @level = 'error'
28
28
  @attributes = HashWithIndifferentAccess.new
@@ -61,7 +61,7 @@ class StandardError
61
61
 
62
62
  @fingerprint = [] unless @fingerprint.is_a?(Array)
63
63
  @tags = {} unless @tags.is_a?(Hash)
64
- msg ||= ''
64
+ msg ||= self.class.title
65
65
  super(msg)
66
66
  end
67
67
 
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '0.3.7'
2
+ VERSION = '0.3.8'
3
3
  end
data/lib/coaster.rb CHANGED
@@ -8,7 +8,7 @@ module Coaster
8
8
  mattr_accessor :logger
9
9
  mattr_writer :default_fingerprint
10
10
 
11
- DEFAULT_FINGERPRINT = [:default, :class]
11
+ DEFAULT_FINGERPRINT = [:default, :class].freeze
12
12
 
13
13
  class << self
14
14
  def configure
@@ -44,13 +44,13 @@ module Coaster
44
44
  "type"=>"Coaster::TestStandardError::ExampleError",
45
45
  "status"=>20,
46
46
  "http_status"=>500,
47
- "message"=>"Coaster::TestStandardError::SampleError",
47
+ "message"=>"Test this title",
48
48
  "cause"=>{
49
49
  "frog"=>"rams",
50
50
  "type"=>"Coaster::TestStandardError::SampleError",
51
51
  "status"=>10,
52
52
  "http_status"=>500,
53
- "message"=>"Coaster::TestStandardError::SampleError"
53
+ "message"=>"Test this title"
54
54
  }
55
55
  }, e.to_hash)
56
56
  end
@@ -74,7 +74,7 @@ module Coaster
74
74
  rescue => e
75
75
  detail = <<-LOG
76
76
  [Coaster::TestStandardError::ExampleError] status:20
77
- MESSAGE: Coaster::TestStandardError::SampleError
77
+ MESSAGE: Test this title
78
78
  @fingerprint: []
79
79
  @tags: {}
80
80
  @level: \"error\"
@@ -82,7 +82,7 @@ module Coaster
82
82
  @tkey: nil
83
83
  @raven: {}
84
84
  CAUSE: [Coaster::TestStandardError::SampleError] status:10
85
- MESSAGE: Coaster::TestStandardError::SampleError
85
+ MESSAGE: Test this title
86
86
  @fingerprint: []
87
87
  @tags: {}
88
88
  @level: \"error\"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzz jung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-21 00:00:00.000000000 Z
11
+ date: 2016-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n