blsk_ruby_core_api 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/decoractors/valid.rb +1 -1
- data/lib/model/model.rb +1 -1
- data/lib/rest/rest_base.rb +1 -1
- data/lib/rest/rest_error_handler.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91389e86201d1e77ba1a79c167b583a5258551bb3588ce379f591b5865e830b4
|
4
|
+
data.tar.gz: c46b2a42a6f40004fedb6ecb16a7ec11de02874fd7590ee98267a74462da999e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a721020d02694c89b45c38885c673ce1f5dc582e655da1a2ba08a46e96789fc570936bba2c9bfa69a2d3658e41f2f29b33754331212efc7fb7ebabcf10b6f8d3
|
7
|
+
data.tar.gz: 500ba3d2d185f5b892525861b9d728052f49d504d08b4ac59d2f5e9ecad9e11b6fd3c4c833f009844abfe7cd8dcaabe3c22ea6bf32e0d30992d7a8cc07306276
|
data/lib/decoractors/valid.rb
CHANGED
data/lib/model/model.rb
CHANGED
data/lib/rest/rest_base.rb
CHANGED
@@ -35,7 +35,7 @@ class RestBase < RestApplication
|
|
35
35
|
|
36
36
|
if request.env['CONTENT_TYPE'] == 'application/json'
|
37
37
|
body_content = JSON.load(request.body)
|
38
|
-
request[
|
38
|
+
request.params[:body] = JSON.parse( body_content ) unless body_content.nil?
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
@@ -8,22 +8,22 @@ class RestApplication < Sinatra::Base
|
|
8
8
|
|
9
9
|
error CommonError::InvalidToken do
|
10
10
|
status 401
|
11
|
-
|
11
|
+
RestApplication.error_response('InvalidToken')
|
12
12
|
end
|
13
13
|
|
14
14
|
error CommonError::PermissionDenied do
|
15
15
|
status 403
|
16
|
-
|
16
|
+
RestApplication.error_response('PermissionDenied')
|
17
17
|
end
|
18
18
|
|
19
19
|
error CommonError::EntityNotFound do
|
20
20
|
status 404
|
21
|
-
|
21
|
+
RestApplication.error_response('EntityNotFound')
|
22
22
|
end
|
23
23
|
|
24
24
|
error CommonError::InvalidData do
|
25
25
|
status 422
|
26
|
-
|
26
|
+
RestApplication.error_response('InvalidData', @errors)
|
27
27
|
end
|
28
28
|
|
29
29
|
def response_with_error(exception_class, errors=[])
|