tzispa 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/tzispa/controller/base.rb +3 -7
- 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: ce38eca73b4e9cf4021f220361cb880eac3edb9d
|
4
|
+
data.tar.gz: 50885d9e8efe83222542fe3d4f43bf7fa56d8aa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76df8fd7e703f513f37d9ec2af73f5bc467eadb9a6aa5bf5c901c93b5941906111b7e4668e4d6745f81a8d51a8134e345b3b72ae11211724acdad733a625989f
|
7
|
+
data.tar.gz: ea96025a47e02b2a23582f7e6ded42d51249a4536b70a08b60e9d75ba730bf292d845a7ca8a4fd904bda93e816a65d40d62d851b427aa26ff5f74e125cf605ba
|
data/CHANGELOG.md
CHANGED
@@ -47,21 +47,18 @@ module Tzispa
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def prepare_response(status, content = nil)
|
50
|
-
if
|
50
|
+
response.status = status if status.is_a?(Integer)
|
51
|
+
if context.client_error?
|
51
52
|
prepare_client_error(status)
|
52
|
-
elsif
|
53
|
+
elsif context.server_error?
|
53
54
|
prepare_server_error(status)
|
54
55
|
elsif content
|
55
|
-
response.status = status if status.is_a?(Integer)
|
56
56
|
response.body = content
|
57
|
-
elsif status.is_a?(Integer)
|
58
|
-
response.status = status
|
59
57
|
end
|
60
58
|
end
|
61
59
|
|
62
60
|
def prepare_client_error(status, error = nil)
|
63
61
|
status.tap do |code|
|
64
|
-
response.status = status if status.is_a?(Integer)
|
65
62
|
context.logger.info log_format(code, error.to_s) if error
|
66
63
|
response.body = error_page(context.domain, status: code)
|
67
64
|
end
|
@@ -69,7 +66,6 @@ module Tzispa
|
|
69
66
|
|
70
67
|
def prepare_server_error(status, error = nil)
|
71
68
|
status.tap do |code|
|
72
|
-
response.status = status if status.is_a?(Integer)
|
73
69
|
context.logger.error log_format(code, error_log(error)) if error
|
74
70
|
response.body = if error && Tzispa::Environment.development?
|
75
71
|
debug_info(error)
|
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.7.
|
4
|
+
version: 0.7.3
|
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: 2017-
|
11
|
+
date: 2017-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|