rack-exception_notifier 0.3.2 → 0.3.3

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: af68cee5a1ae828ca8d935a675800f38e13be954
4
- data.tar.gz: 099cd9b3e73574cb4c0e0d28498aa7468e3ff14a
3
+ metadata.gz: 822156c3da6de41412f29c2c55883d3962f392ff
4
+ data.tar.gz: 111e4fcc1b7ce50dc71048fd3e105a50de8a8a59
5
5
  SHA512:
6
- metadata.gz: 02d009be9296b8a13ee7c40ef78257ac9f52e338a020ac9b4160ef862824560e440bf70a5b3d7f556dbdd6be99385e5b9c52bb114cbbb32fe2c17d015ad38736
7
- data.tar.gz: 4a848d2870470ae92d7d6ab8c5192e0a1fe6b5158e2bae2459c10acbbacf1854d4b834aa9f969c761ffaf0593b561703fc708820b651818815c23a69710ca1a9
6
+ metadata.gz: f8d5e86119e579bbd5a23fcc72397e834d5b3212f765eabb626bca7b01b249f5b03ab050e584d620d74d381f4e450fd69ffbfa9387047ff54bdf25fc6168bc87
7
+ data.tar.gz: f913c417b5f1f5e92c48c5dabe1084cbff9818a3e79fa242f3c6bfb16ec2d400a6a4b60119a51bd46d1f72157494726098c41b31f0bcf0538c50bf6d23488206
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class ExceptionNotifier
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
5
  end
@@ -14,7 +14,6 @@ module Rack
14
14
  }
15
15
  @app = app
16
16
  @options = default_options.merge(options)
17
- @template = ERB.new(Template)
18
17
 
19
18
  if @options[:to].nil?
20
19
  raise ArgumentError.new('to address is required')
@@ -29,12 +28,14 @@ module Rack
29
28
  end
30
29
 
31
30
  def _send_notification(exception, env)
31
+ template = ERB.new(Template)
32
+
32
33
  mail = Mail.new
33
34
  mail.to(@options[:to])
34
35
  mail.reply_to(@options[:reply_to])
35
36
  mail.from(@options[:from])
36
37
  mail.subject(@options[:subject] % [exception.to_s])
37
- mail.body(@template.result(binding))
38
+ mail.body(template.result(binding))
38
39
  mail.deliver!
39
40
  end
40
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-exception_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Downey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-09 00:00:00.000000000 Z
11
+ date: 2013-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail