service_caller 1.0.7 → 1.1.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
  SHA256:
3
- metadata.gz: b493de0bcf6aaff3c0daba2ccefc261c47153963dfa134fff6a6816d48db3e1e
4
- data.tar.gz: 65a47a73a42b6bf314deef26778f0ac097f3157b864cd9262b5fbfed9712626b
3
+ metadata.gz: 4270b7ad52ef57a18ba599c31496415626a298ab824884c416c1b5ff51af75c2
4
+ data.tar.gz: 627575a83678d20e7ec951b1ac9c4777acdcf91e2ae620e2b99c59ccef5b46c6
5
5
  SHA512:
6
- metadata.gz: 41c351b6befc131da9f7ac025d2d5c299b7ea5dbf5a68966592c4c80f4c83953e0c8a8443b38c38a9e5113cdfc946a84efef5465f3a73433e7b83d49eaf96158
7
- data.tar.gz: edde6d3efef4f44f94a16485317ee87be423d8970e6e2d8fe26fb96aa70410f59fc1a3792af1386a8780b4df6b2b4d94fba562db55d0f21930fcbf77664c51aa
6
+ metadata.gz: 1ce323d5562bb0fb08d42121858dfa19c4cf691f5afe27a11c3781ce8475b190ea7b5c4593f71a924908317c2447c2b03b3e6adbcd81471dea41b956970df2ea
7
+ data.tar.gz: 796dd3b3e3b64fc4e58b76a12778e2436758b62f4305bda9c2896a3278a340d45c12b220f1379933e0dd43d6aebbcb3319cdb6b1c07832af28611c0d6ea7b657
@@ -4,7 +4,7 @@ class ServiceError < StandardError
4
4
 
5
5
  class << self
6
6
  def generate_from_exception(exception, append_info={})
7
- error_obj = {error_msg: "#{exception.class.name}: #{exception.message}"}
7
+ error_obj = {error_message: "#{exception.class.name}: #{exception.message}"}
8
8
  error_obj.merge!(append_info)
9
9
  service_err = new(:internal_error, error_obj)
10
10
  service_err.set_backtrace(exception.backtrace)
@@ -14,8 +14,8 @@ class ServiceError < StandardError
14
14
 
15
15
  def initialize(key, error_obj={})
16
16
  @key = key
17
- error_msg = error_obj.delete(:error_msg) || key
17
+ error_message = error_obj.delete(:error_message) || key
18
18
  @error_obj = error_obj
19
- super(error_msg)
19
+ super(error_message)
20
20
  end
21
21
  end
@@ -8,7 +8,7 @@ module ServiceExtend
8
8
  rescue ServiceError => e
9
9
  @error = e
10
10
  rescue ActiveRecord::RecordNotFound => e
11
- @error = ServiceError.new(:record_not_found, error_msg: e.message)
11
+ @error = ServiceError.new(:record_not_found, error_message: e.message)
12
12
  @error.set_backtrace(e.backtrace)
13
13
  rescue Exception => e
14
14
  @error = ServiceError.generate_from_exception(e)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: service_caller
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiaRou Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-21 00:00:00.000000000 Z
11
+ date: 2020-08-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: basic implement of service object
14
14
  email: laura34963@kdanmobile.com
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.0.6
45
+ rubygems_version: 3.0.3
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: Ruby Service Basic Class