service_caller 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/service_extend/handler.rb +22 -5
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6afa477dd94592e09fc200d8168ffdb2c0217f4aa05b9b3082674d007bc44fab
|
4
|
+
data.tar.gz: e4e80bb81839255a0b976e6888aaf322d77615ae742c627df932540c57b9e9ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cc1cb1018e4e0760373b042b726edcd857aea0af38e2054551a321f8ea759e6c2cafc7fbaa26974ae2486fbdf7c17df048fd258cfcd0b34e005713f7552e4f1
|
7
|
+
data.tar.gz: db4b7f8aac96d0f3b6e0517fbb3f62c1d122de6c62dfb5eb3c4549843e6601393ee2e253dc92b2013f67c49c05193bbb6e9d207b32177eee5e3b291dd4cc5172
|
@@ -1,11 +1,28 @@
|
|
1
1
|
module ServiceExtend
|
2
2
|
module Handler
|
3
|
+
|
3
4
|
def call
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
if defined?(::Rails::Engine)
|
6
|
+
begin
|
7
|
+
super
|
8
|
+
rescue ServiceError => e
|
9
|
+
@error = e
|
10
|
+
rescue ActiveRecord::RecordNotFound => e
|
11
|
+
@error = ServiceError.new(404, e.message)
|
12
|
+
@error.set_backtrace(e.backtrace)
|
13
|
+
rescue Exception => e
|
14
|
+
@error = ServiceError.generate_from_exception(e)
|
15
|
+
end
|
16
|
+
else
|
17
|
+
begin
|
18
|
+
super
|
19
|
+
rescue ServiceError => e
|
20
|
+
@error = e
|
21
|
+
rescue Exception => e
|
22
|
+
@error = ServiceError.generate_from_exception(e)
|
23
|
+
end
|
24
|
+
end
|
9
25
|
end
|
26
|
+
|
10
27
|
end
|
11
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_caller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JiaRou Lee
|
@@ -42,8 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
44
|
requirements: []
|
45
|
-
|
46
|
-
rubygems_version: 2.7.8
|
45
|
+
rubygems_version: 3.0.1
|
47
46
|
signing_key:
|
48
47
|
specification_version: 4
|
49
48
|
summary: Ruby Service Basic Class
|