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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDlhNmM0MzcwM2VlMWUxNTJlM2YzYzMzMTk4ODczYjZiMTkwYjBjNg==
4
+ ZWI3NDM0Y2E3NDI3ZTUxMzg3Njc2NGM0ODUyNDJhYWViNzkyZDc3OQ==
5
5
  data.tar.gz: !binary |-
6
- Y2YxYzAxNzc3NjY3ZWI5MjU5NDI4YzgxMzFjODg5MmM4M2YyZGRlYQ==
6
+ MmM1MTA3ZGVlZWMwMWZmZDU3Y2Q5Y2FlMmIxNDNmMjkxNDBlN2JiNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NjJlODdhODQ3MjM0MzAwMDNmZDczNGQ2Mzg5ZjIzYjQwODE3NzJmMWI0MDFh
10
- MGQ0NDU5MzJiNDQ1NDU0OTcxNjdhMTM4YmQ3ODBjNzgzNDY0MWRmYmZkNmRi
11
- MDJkMzdkMGVkOWY5OTQyZDE3NGZjNzFlYzZlYzI0OTA1Mzg2NzA=
9
+ NWU5ZTBkOTlhZTExYjM2NzA5NzUzZjg1YjUxNDhjOTJjNmE1NTRjYTNlZTU2
10
+ Njc5YTdlNzAxZTg2YTk5YWE2NzUzYmZjM2Y3MjY5ODUyNGY3MDNjOTEzMGM5
11
+ YmUzNzg3Zjk1YTJhNGNlM2YxNTMyNDk0NDQxYjE0OGMyMmJkNjU=
12
12
  data.tar.gz: !binary |-
13
- MzJjZjcwNWNhY2JlZjljMzVhNzk5NDM0MTIzZTQyYzViZGM4ODY4NGY1Yzdk
14
- ZTUzYzBiMDNmOTVjMDk2YmVmYTIzNTE1N2NlOTNjMmM5Y2FjZDA5MmJiODYw
15
- Y2JmNTg0MWFkNDc0MWNhYjA5ZjdiMDBlOWRkZjliODA5OGNiZDA=
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.to_s,
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
- mail.attachments['environment.yaml'] = YAML::dump(env)
111
+
112
+ if @dump_environment
113
+ mail.attachments['environment.yaml'] = YAML::dump(env)
114
+ end
109
115
 
110
116
  return mail
111
117
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Utopia
22
- VERSION = "0.11.4"
22
+ VERSION = "0.11.5"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams