tzispa 0.4.11 → 0.4.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b3b6df11ce0ea41a4e564ec835dd8c98a87218c
4
- data.tar.gz: 951f7c1e75d68514481c2f81cc5c92d461834bd3
3
+ metadata.gz: 10e8927b2000c2316f242eac3dd30516cdc177dc
4
+ data.tar.gz: 62f875ae215df9b1b409063021289256837ebaf0
5
5
  SHA512:
6
- metadata.gz: 031c851c6926cabb3ee2e8f2283b3701d842eba3fd9d607a75b5cfb39604a3acff2d9e9402905063ba6ffd65874c48373fd62eb41b04f22c2ad8ae58cfb930cc
7
- data.tar.gz: cd1a9dd768e7723b1ae6f50fe3d8a3b63ba8e523aae1dc827e83cc14543dd9755dbc958c3fcf8ca8bf26aca4b8acc3ae7efb36ca24fb9c9af80d84cce7c31fb4
6
+ metadata.gz: 5ecd98c3795c4581974fbe71a5ae219ed5b728f41410a9550a38aedb86354233a72246ed1bc3a88d3877c1f06675877f1b7e543ba45b7af06fad563de1013503
7
+ data.tar.gz: 8ba5244fc0bd592f2b2acb4418f4511a2481aa1174498ac3a9da9594aea2d68acc0807b529736d3053342f661e1da8c2e423a35a8178dce65e83d7d466912ca2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@ Tzispa
2
2
 
3
3
  General purpose web framework
4
4
 
5
+ ## v0.4.12
6
+ - Fix controller/base all errors go to error 500
7
+
5
8
  ## v0.4.11
6
9
  - Rescue exceptions and catch halts on controller/base
7
10
  - http/context error_500 not sets response.status
@@ -30,16 +30,22 @@ module Tzispa
30
30
  private
31
31
 
32
32
  def invoke(callmethod)
33
+ debug_info = nil
33
34
  status = catch(:halt) {
34
35
  begin
35
36
  send "#{@callmethod}"
36
37
  rescue StandardError, ScriptError => exx
37
- context.error_500( config.developing ? debug_info(exx) : nil )
38
+ debug_info = debug_info(exx) if config.developing
39
+ 500
38
40
  end
39
41
  }
40
42
  response.status = status if status.is_a?(Integer)
41
- if (response.client_error? || response.server_error?) && !config.developing
42
- response.body = error_page(context.domain)
43
+ if response.client_error?
44
+ response.body = error_page(context.domain, status: response.status)
45
+ elsif response.server_error?
46
+ response.body = debug_info ?
47
+ debug_info :
48
+ error_page(context.domain, status: response.status)
43
49
  end
44
50
  end
45
51
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tzispa
4
- VERSION = '0.4.11'
4
+ VERSION = '0.4.12'
5
5
  FRAMEWORK_NAME = 'Tzispa'
6
6
  GEM_NAME = 'tzispa'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzispa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.11
4
+ version: 0.4.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Antonio Piñero