coaster 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 7bb245ac61cf472e066e9f33934edfb00b715b07a2745ba30dcee503d973fbee
4
- data.tar.gz: 133b5ae2c21130ff0b9ed27d03388b5f682b7ff95f31c2c455f2a36b62084cf4
3
+ metadata.gz: 388b2f2f69156f7344ddd198dc1a68a6a41c886db2dc23b881576ca06e48ad80
4
+ data.tar.gz: 45e1be2338d2fb185bfa6c7652d0e82a0342a961911503f6af133b0bfbcf6c66
5
5
  SHA512:
6
- metadata.gz: c26dfe88f571581a60fac9c5f7a4594ce6929e7dbee7aab4bd3b134e29e595ab8f3ee2dd912110625a810deef1bf5ef0c67e8935c4b9d9a5e1fd459a8a23b2ca
7
- data.tar.gz: 983374e824e12b9da051ec0a246e65a6aaa0fe35c1bb75561aaff3398f4ffcd9f63009b6db97f23ff163ba073563400be07368103f9595b28049e489a7f39e3c
6
+ metadata.gz: d35ee060873032921e4c165e529b99314e1115c083c3d616b5250975819c536f47df1b3c0de40272a990414273910f427013e5ff2d2705f3d807c87fd7cbf617
7
+ data.tar.gz: ccbd4fca13b51857c45ea9e5772375bc2019ba3cfcb5c730c54981618205a50f6e2f6bbfd2f51c2582977ad61703d19a70cd7ca71a0d4c382c7d5790c15f8c3c
@@ -125,7 +125,7 @@ class StandardError
125
125
  end
126
126
 
127
127
  def to_hash
128
- hash = @attributes.merge(
128
+ hash = attributes.merge(
129
129
  type: self.class.name, status: status,
130
130
  http_status: http_status, message: message
131
131
  )
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -139,5 +139,14 @@ LOG
139
139
  assert_equal e.notes(the_other: 'something')[:extra][:something], 'other'
140
140
  assert_equal e.notes(the_other: 'something')[:extra][:the_other], 'something'
141
141
  end
142
+
143
+ def test_to_hash
144
+ aa # raise NameError
145
+ rescue => e
146
+ assert_equal e.to_hash['type'], 'NameError'
147
+ assert_equal e.to_hash['status'], 999999
148
+ assert_equal e.to_hash['http_status'], 500
149
+ assert e.to_hash['message'] =~ /undefined local variable or method `aa'/
150
+ end
142
151
  end
143
152
  end
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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzz jung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n