coaster 1.3.26 → 1.3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coaster/version.rb +1 -1
- data/lib/coaster.rb +1 -0
- data/test/test_standard_error.rb +8 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f6845ad78b984bcd3b7e731c99f301cbb9cf988d2252450b0e961af3de2f630
|
4
|
+
data.tar.gz: 00be20732649e4a1176873079b6d23a25bc0e2ead9b204fb7cc2da4ca2862219
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc1393903d6481ec4037b3cc71281fbb0d7ae998517065004d281c836effc2e9694e749d8bfe14aea8742e59c92b100002d6c3144cc8926f065d0f6149f13110
|
7
|
+
data.tar.gz: 8ed7983c0ffde2f9b0817367187d8b719978adf433f29c7584a2d838176813f204deee4406417f9d5d40f5f05b985230f3e4c60eb05c633accc1ac3055cd07d6
|
data/lib/coaster/version.rb
CHANGED
data/lib/coaster.rb
CHANGED
data/test/test_standard_error.rb
CHANGED
@@ -316,7 +316,7 @@ LOG
|
|
316
316
|
assert_equal 'NameError', e.to_hash['type']
|
317
317
|
assert_equal 999999, e.to_hash['status']
|
318
318
|
assert_equal 500, e.to_hash['http_status']
|
319
|
-
assert_equal "standard error translation (
|
319
|
+
assert_equal "standard error translation (bc1746 #{bt})", e.user_message
|
320
320
|
assert_match(/undefined local variable or method `aa'/, e.to_hash['message'])
|
321
321
|
end
|
322
322
|
|
@@ -327,6 +327,13 @@ LOG
|
|
327
327
|
assert_equal 1, e.descriptions['a']
|
328
328
|
end
|
329
329
|
|
330
|
+
def test_to_json
|
331
|
+
raise SampleError
|
332
|
+
rescue => e
|
333
|
+
json = ::JSON.dump({error: e})
|
334
|
+
assert_equal "{\"error\":{\"type\":\"Coaster::TestStandardError::SampleError\",\"status\":10,\"http_status\":500,\"message\":\"Coaster::TestStandardError::SampleError\"}}", json
|
335
|
+
end
|
336
|
+
|
330
337
|
class SampleErrorSub < SampleError; end
|
331
338
|
class SampleErrorSubSub < SampleErrorSub
|
332
339
|
def it_might_happen?; true end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- buzz jung
|
@@ -10,6 +10,20 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2023-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: oj
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: i18n
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|