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 +4 -4
- data/lib/flame.rb +1 -0
- data/lib/flame/dispatcher.rb +4 -3
- data/lib/flame/version.rb +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 822d755cbdcceea040e12eb3a7c016621037792c
|
4
|
+
data.tar.gz: 6ce5ee4d6fc9a667548ccebd0f88fb5d7fde8094
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbaa1fd260ec10224ae6d68a7d7f7bf7f2657c0c73b2fe070853987abddec6a8aaf840fe82468331bbcd0c121875b7249549067c7f0dd8af337ce7448343030b
|
7
|
+
data.tar.gz: b379caa8e57e6ef2fcd9011b8156f9b0761100c793ed01b8fce1855d5d9f2d03ea5dcb934aad937a643c7d0ed61c7c148c8abb6c5c0e668deaf97ac12cd47e47
|
data/lib/flame.rb
CHANGED
data/lib/flame/dispatcher.rb
CHANGED
@@ -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
|
-
|
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(
|
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 =>
|
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'
|
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.
|
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-
|
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:
|