tzispa 0.5.15 → 0.5.16
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/CHANGELOG.md +5 -0
- data/lib/tzispa/api/handler.rb +1 -1
- data/lib/tzispa/controller/api.rb +5 -2
- data/lib/tzispa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a66c42c350fb07b86a732e2f6c3a392cf567f54c
|
|
4
|
+
data.tar.gz: 84f80906ff6210b0143bfa4814f4d1c0541428e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a2ce3fa70593ab56c1a53cfb2998ffb7c55309f5aaaeef354a506f429c34e26d56911dbf082fd52a87e93cf6b5e38770b9031ebf827d3031a9e79d291d41e39
|
|
7
|
+
data.tar.gz: 05402a9069993d25422e91205a16f2b9b827980415c00ecbd6f0d38479c9295a8415da28ee015605fd944cb6a4b0c57f4f2398b0be0ff6cf43b5d8459d764cd6
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@ Tzispa
|
|
|
2
2
|
|
|
3
3
|
General purpose web framework
|
|
4
4
|
|
|
5
|
+
## v0.5.16
|
|
6
|
+
- controller/api: not populate body with the handler data if error? at json response
|
|
7
|
+
- api/handler: fix i18n key in api handler error message builder
|
|
8
|
+
- controller/api: add handler error status in the json response when error
|
|
9
|
+
|
|
5
10
|
## v0.5.15
|
|
6
11
|
- add thor gem missing dependency in gemspec
|
|
7
12
|
|
data/lib/tzispa/api/handler.rb
CHANGED
|
@@ -51,8 +51,11 @@ module Tzispa
|
|
|
51
51
|
def json(handler)
|
|
52
52
|
content_type :json
|
|
53
53
|
data = ::String === handler.data ? JSON.parse(handler.data) : handler.data.to_json
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
unless handler.error?
|
|
55
|
+
response.body << data
|
|
56
|
+
else
|
|
57
|
+
response.body << Hash[:__error, true, :__error_msg, handler.message, :__error_code, handler.status].to_json
|
|
58
|
+
end
|
|
56
59
|
set_api_headers handler.status
|
|
57
60
|
end
|
|
58
61
|
|
data/lib/tzispa/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tzispa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Antonio Piñero
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-11-
|
|
11
|
+
date: 2016-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|