exception-alarm 1.0.1 → 1.0.2

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.
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## Exception Alarm (unreleased)
4
+
5
+ * Put full exception report as attachment instead of placing it in message body
6
+
3
7
  ## Exception Alarm 1.0.1 (April 18, 2012)
4
8
 
5
9
  * Make it thread safe
@@ -13,10 +13,14 @@ module ExceptionAlarm
13
13
  @kontroller = env['action_controller.instance']
14
14
  @request = ActionDispatch::Request.new(env)
15
15
 
16
+ attachments["exception_#{@request.host.gsub(".", "_")}_#{Time.now.to_i}.txt"] = render(:alarm)
16
17
  mail(
17
18
  from: self.class.sender,
18
19
  to: self.class.recipients,
19
- subject: "#{self.class.prefix} (#{@exception.class}) #{@exception.message.inspect}"
20
+ subject: "#{self.class.prefix} (#{@exception.class}) #{@exception.message.inspect}",
21
+ body:
22
+ "A #{@exception.class} occurred in #{@kontroller.controller_name}##{@kontroller.action_name}:\n" +
23
+ @exception.backtrace.first.to_s
20
24
  )
21
25
  end
22
26
  end
@@ -1,3 +1,3 @@
1
1
  module ExceptionAlarm
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception-alarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-18 00:00:00.000000000 Z
12
+ date: 2012-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &83843320 !ruby/object:Gem::Requirement
16
+ requirement: &81331630 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *83843320
24
+ version_requirements: *81331630
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thread_local_accessor
27
- requirement: &83843110 !ruby/object:Gem::Requirement
27
+ requirement: &81331320 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *83843110
35
+ version_requirements: *81331320
36
36
  description: Send email on exception
37
37
  email:
38
38
  - vakhov@gmail.com
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  segments:
72
72
  - 0
73
- hash: -549689139
73
+ hash: 566532111
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  segments:
81
81
  - 0
82
- hash: -549689139
82
+ hash: 566532111
83
83
  requirements: []
84
84
  rubyforge_project:
85
85
  rubygems_version: 1.8.17