dao-gateway-active_resource 1.3.2 → 1.3.3

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
  SHA1:
3
- metadata.gz: 104686c19906ff13265bab019b1a0762526990f5
4
- data.tar.gz: 762d8fb55aa6f5bd35e5052262c52671ec567726
3
+ metadata.gz: aaeb11c0575fd403c6723922e64ea6ef22d5c98d
4
+ data.tar.gz: a5e75f7ba420c79b44bca687bf04dd264aa2e6c0
5
5
  SHA512:
6
- metadata.gz: ef4678db605aadc408f364e17f1357743850ba3fcbc17b8b5e78257fba5837eb870527de9a68d9318335b309363c21176bf3924140ee1e691467fa826f08518a
7
- data.tar.gz: 7423d0699427ada440b4d81fac2218d0a40381d6b2b2d1f8511c97a9e653492ae514700e406c609415b1a2ebd77ea503941c6191691eca298a69f2e9ed505338
6
+ metadata.gz: 9c4ff4ccd342d4dab805ce0ec7caf5cf155dba4f1c2cbc801ad52b973e1b5ee47cc7226bfd63b026b4233491a908e0f7deeb8eee19d462cc1dba1651adf9e0a9
7
+ data.tar.gz: 0744b9c54bd319994b4e491861da3f40c91b7490ac991c32b0736c49199121838de91449049906cd30193afc122cb76d06829f9f5503e4eaf1e24265b340227a
@@ -16,6 +16,11 @@ module Dao
16
16
  scope.public_send(method_name, *args, &block)
17
17
  rescue ::ActiveResource::ResourceNotFound => e
18
18
  raise Dao::Gateway::RecordNotFound, e.message
19
+ rescue ::ActiveResource::ResourceInvalid => e
20
+ errors = {}
21
+ errors = source.format.decode(e.response.body) if e.response.body.present?
22
+
23
+ raise Dao::Gateway::InvalidRecord.new(errors)
19
24
  end
20
25
 
21
26
  protected
@@ -1,7 +1,7 @@
1
1
  module Dao
2
2
  module Gateway
3
3
  module ActiveResource
4
- VERSION = '1.3.2'
4
+ VERSION = '1.3.3'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dao-gateway-active_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - llxff
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-08-23 00:00:00.000000000 Z
12
+ date: 2016-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dao-gateway