utopia 0.11.4 → 0.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/utopia/middleware/mail_exceptions.rb +9 -3
- data/lib/utopia/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZWI3NDM0Y2E3NDI3ZTUxMzg3Njc2NGM0ODUyNDJhYWViNzkyZDc3OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmM1MTA3ZGVlZWMwMWZmZDU3Y2Q5Y2FlMmIxNDNmMjkxNDBlN2JiNA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWU5ZTBkOTlhZTExYjM2NzA5NzUzZjg1YjUxNDhjOTJjNmE1NTRjYTNlZTU2
|
10
|
+
Njc5YTdlNzAxZTg2YTk5YWE2NzUzYmZjM2Y3MjY5ODUyNGY3MDNjOTEzMGM5
|
11
|
+
YmUzNzg3Zjk1YTJhNGNlM2YxNTMyNDk0NDQxYjE0OGMyMmJkNjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTVlMmE0OWM2YWFlMmQwZGM3ZWU0NTM2NTgwOThhNGRkNmEwZmQ3ZmU3MTAw
|
14
|
+
ZDE3NzlhN2MyOTFjZjkyNTY4Y2UxMmRkYjg1NzA5ZTkwNzE4NWU5YWZlOTA3
|
15
|
+
NDJhYjVhN2E1OWUzMmE4YWY0NjczYTU5OGE3YzZkMzk0MzViNjY=
|
@@ -39,6 +39,8 @@ module Utopia
|
|
39
39
|
@from = config.fetch(:from) {(ENV['USER'] || 'rack') + "@localhost"}
|
40
40
|
@subject = config[:subject] || '%{exception} [PID %{pid} : %{cwd}]'
|
41
41
|
@delivery_method = config.fetch(:delivery_method, LOCAL_SMTP)
|
42
|
+
|
43
|
+
@dump_environment = config.fetch(:dump_environment, false)
|
42
44
|
end
|
43
45
|
|
44
46
|
def call(env)
|
@@ -76,6 +78,8 @@ module Utopia
|
|
76
78
|
|
77
79
|
io.puts
|
78
80
|
|
81
|
+
io.puts "#{exception.class.name}: #{exception.to_s}"
|
82
|
+
|
79
83
|
if exception.respond_to?(:backtrace)
|
80
84
|
io.puts exception.backtrace
|
81
85
|
else
|
@@ -87,7 +91,7 @@ module Utopia
|
|
87
91
|
|
88
92
|
def generate_mail(exception, env)
|
89
93
|
attributes = {
|
90
|
-
exception: exception.
|
94
|
+
exception: exception.class.name,
|
91
95
|
pid: $$,
|
92
96
|
cwd: Dir.getwd,
|
93
97
|
}
|
@@ -104,8 +108,10 @@ module Utopia
|
|
104
108
|
if body = extract_body(env) and body.size > 0
|
105
109
|
mail.attachments['body.bin'] = body
|
106
110
|
end
|
107
|
-
|
108
|
-
|
111
|
+
|
112
|
+
if @dump_environment
|
113
|
+
mail.attachments['environment.yaml'] = YAML::dump(env)
|
114
|
+
end
|
109
115
|
|
110
116
|
return mail
|
111
117
|
end
|
data/lib/utopia/version.rb
CHANGED