error_response 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/error_response.rb +1 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2bffc5e8ad94e430ac4e12de4670f3de41f3ee29d1912ff74b20a228869da54
4
- data.tar.gz: ac9b4d2a3345caf6651e745c6f4deab4476a8ceb5fc234fe04e080f8d5173afe
3
+ metadata.gz: cc3fa7849140a231dbc285ef371838efe21a45ec99ae156524a0f54bef763300
4
+ data.tar.gz: e586365e16c38a5283dd20949d173262710cc1f04102b2e5a5da313a5ae524ff
5
5
  SHA512:
6
- metadata.gz: aa3c405b6dd31b1eb09fb59d7a72296b9f85144de3da26c3cce84b0a0d6a8879fa44318dfe841fc00baf2e89efc3d37906f204a870a35248bc49a717b1ec4f59
7
- data.tar.gz: 61d25463d13501d958c31193c51a943c6b6fae3b2f5953c7091e6e1f0a50d5a0a67a233583bfb85f2dd7018a39f522d61fe0261c8da739b3b199afa2b34b01fc
6
+ metadata.gz: 97c32d812b6815bae358426cec75d0e5f6bb8872e05e282de3bc43a3c0d0be6c38e72ce99cf1de4df5bd8177cd9a64cbf77db93817a93f7230d13dc9606d9a4b
7
+ data.tar.gz: 553814f93c8bfdb03149f4eaf76c9fbe5b39307eab899941b56f5d840c6ae2044b9c08035ed0036dbc7d6d4f4b504cd5ed9d263cdd30732f8bc46e607d11c74b
@@ -3,7 +3,7 @@ class ErrorResponse
3
3
  YAML_PATH = 'config/error_response.yml'
4
4
 
5
5
  def self.to_api(key, message=nil)
6
- err_json = yaml_hash[key.to_s]
6
+ err_json = yaml_hash[key.to_s]&.dup
7
7
  if err_json.nil?
8
8
  err_json = {'error_code' => 500000, 'error_message' => message}
9
9
  elsif !message.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: error_response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - jameslee
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []
39
- rubygems_version: 3.0.1
39
+ rubygems_version: 3.0.6
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: A tool for API error response