dtk-common-core 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/dtk-common-core/version.rb +1 -1
- data/lib/response.rb +1 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OWVmM2Y4M2Y1NGYyMjgzYzI0ODYxODNkMzdhMjZjMzE2OTQ0Y2UyYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MzEyYmRiNWQwZmZhNTljYTFjNjMwMDMwMDEwMzExNTkzMzNkMDg4Mg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDViMTMzODgxNjcyN2IzZTA5Yzg2MjI3NTA2Njk3OWEzZmI3ZTY5NTUwNGZk
|
10
|
+
OWJkYzJlMWQ4OGI0NjQ1MTljMzYwNTU1NzAyNTJmYmRlYzM2ZmJhZjBhZjRl
|
11
|
+
YWQ2OTRhZWY4NmI5ODk5MGExMDE5NjFjNjE3MTFlZjA1ZTUzOTY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
Yjk2ZDgzNTMyOTBmYTI0ZDcxOThmMjBjMGUyYmIwNTQ3MGUzMTUxYTRhMzUy
|
14
|
+
NGE2MmFhOTc0M2E1MzA5MzdmNjI3OThkNjQ3YmMxMjNkYjFmM2RmNTAxMGU2
|
15
|
+
NTZhY2IxYTBjZTlmODE4ZTExZDRlMDAyMzk4ZGZjYzk0ZmMxMmY=
|
data/lib/response.rb
CHANGED
@@ -198,9 +198,7 @@ module DTK
|
|
198
198
|
def error_handling(opts={},&block)
|
199
199
|
begin
|
200
200
|
block.call
|
201
|
-
rescue
|
202
|
-
Response.new(StatusField => StatusNotok, ErrorsField => errors_field('Resource not found'))
|
203
|
-
rescue RestClient::Request::Unauthorized, RestClient::BadRequest,::RestClient::InternalServerError => e
|
201
|
+
rescue ::RestClient::ResourceNotFound, RestClient::Request::Unauthorized, RestClient::BadRequest,::RestClient::InternalServerError => e
|
204
202
|
# with latest set of changes we will consider this as special case since most of legacy code is expecting Response class
|
205
203
|
errors = (safe_json_parse(e.response)||{})['errors']||errors_field('Server Error')
|
206
204
|
Response.new(StatusField => StatusNotok, ErrorsField => errors)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dtk-common-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rich PELAVIN
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -55,12 +55,12 @@ require_paths:
|
|
55
55
|
- lib
|
56
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - '>='
|
58
|
+
- - ! '>='
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
|
-
- - '>='
|
63
|
+
- - ! '>='
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|