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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b119cddbf5c47a4c6491e1889f9679eb585146ae
4
- data.tar.gz: e8d676c05e9e38f09b0b3a0aeff5b79f95b65fd9
3
+ metadata.gz: ce38eca73b4e9cf4021f220361cb880eac3edb9d
4
+ data.tar.gz: 50885d9e8efe83222542fe3d4f43bf7fa56d8aa1
5
5
  SHA512:
6
- metadata.gz: 44c799320a2522396ba110f1fb77f2cb2abf0f62a128fc0a7983cf60ba54cb362c983b1ccf014700628b861783258983546848156f63242b2d2cef4b513552c8
7
- data.tar.gz: fda28a29ecdb5a7b7a59e2ec316ecf9b3a649130649b6727b08f44aedccc474fb72dc51c459070bcdc7c4f17859ccf27123e321162f4131f9fa2cff5ddc1fe67
6
+ metadata.gz: 76df8fd7e703f513f37d9ec2af73f5bc467eadb9a6aa5bf5c901c93b5941906111b7e4668e4d6745f81a8d51a8134e345b3b72ae11211724acdad733a625989f
7
+ data.tar.gz: ea96025a47e02b2a23582f7e6ded42d51249a4536b70a08b60e9d75ba730bf292d845a7ca8a4fd904bda93e816a65d40d62d851b427aa26ff5f74e125cf605ba
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@ Tzispa
2
2
 
3
3
  General purpose web framework
4
4
 
5
+ ## v0.7.3
6
+ - bug fix in controllers base prepare_response method
7
+
5
8
  ## v0.7.2
6
9
  - added before/after hooks in controllers and handlers
7
10
 
@@ -47,21 +47,18 @@ module Tzispa
47
47
  end
48
48
 
49
49
  def prepare_response(status, content = nil)
50
- if response.client_error?
50
+ response.status = status if status.is_a?(Integer)
51
+ if context.client_error?
51
52
  prepare_client_error(status)
52
- elsif response.server_error?
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)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tzispa
4
- VERSION = '0.7.2'
4
+ VERSION = '0.7.3'
5
5
  FRAMEWORK_NAME = 'Tzispa'
6
6
  GEM_NAME = 'tzispa'
7
7
  end
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.2
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-04-25 00:00:00.000000000 Z
11
+ date: 2017-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler