flame 4.0.3 → 4.0.4

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: 856a5d7a43fbc93748bb0ab1f93ef2b2812fa13c
4
- data.tar.gz: 0a176c950b8d5e420a4c661ba2ce302187d66eac
3
+ metadata.gz: 822d755cbdcceea040e12eb3a7c016621037792c
4
+ data.tar.gz: 6ce5ee4d6fc9a667548ccebd0f88fb5d7fde8094
5
5
  SHA512:
6
- metadata.gz: e9da0c327851c1a4af6aabe03dc5c6f68067dfd4ff5c791e4e7ea339e02e10842b3285b53e4cc98a88225f04c46f864291ed3f8485bcac931480d79baa1fb490
7
- data.tar.gz: 748083588e7a2d53cb7a91c532d141fa2e3e6748743c1828a81e37f84bb29436c9e849530d3403eb1089f27eeb0533d32bae5de03bbbcc09ded4f6b31b4c6eac
6
+ metadata.gz: cbaa1fd260ec10224ae6d68a7d7f7bf7f2657c0c73b2fe070853987abddec6a8aaf840fe82468331bbcd0c121875b7249549067c7f0dd8af337ce7448343030b
7
+ data.tar.gz: b379caa8e57e6ef2fcd9011b8156f9b0761100c793ed01b8fce1855d5d9f2d03ea5dcb934aad937a643c7d0ed61c7c148c8abb6c5c0e668deaf97ac12cd47e47
@@ -1,2 +1,3 @@
1
1
  require_relative 'flame/application'
2
2
  require_relative 'flame/controller'
3
+ require_relative 'flame/version'
@@ -118,12 +118,12 @@ module Flame
118
118
  ## Add error's backtrace to @env['rack.errors'] (terminal or file)
119
119
  ## @param error [Exception] exception for class, message and backtrace
120
120
  def dump_error(error)
121
- msg = [
121
+ @error_message = [
122
122
  "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} - " \
123
123
  "#{error.class} - #{error.message}:",
124
124
  *error.backtrace
125
125
  ].join("\n\t")
126
- @env['rack.errors'].puts(msg)
126
+ @env['rack.errors'].puts(@error_message)
127
127
  end
128
128
 
129
129
  private
@@ -153,8 +153,9 @@ module Flame
153
153
  params.merge!(route.arguments(request.path_parts))
154
154
  # route.execute(self)
155
155
  route[:controller].new(self).execute(route[:action])
156
- rescue => _exception
156
+ rescue => exception
157
157
  # p 'rescue from dispatcher'
158
+ dump_error(exception) unless @error_message
158
159
  halt 500
159
160
 
160
161
  # p 're raise exception from dispatcher'
@@ -0,0 +1,3 @@
1
+ module Flame
2
+ VERSION = '4.0.4'.freeze
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flame
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-02 00:00:00.000000000 Z
11
+ date: 2016-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -85,6 +85,7 @@ files:
85
85
  - lib/flame/router.rb
86
86
  - lib/flame/static.rb
87
87
  - lib/flame/validators.rb
88
+ - lib/flame/version.rb
88
89
  - public/favicon.ico
89
90
  homepage: https://gitlab.com/AlexWayfer/flame
90
91
  licenses: