exception_notification-rake 0.0.3 → 0.0.4
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.
data/README.md
CHANGED
@@ -42,7 +42,7 @@ If you are already using `ExceptionNotifier` anyway, you don't need to configure
|
|
42
42
|
|
43
43
|
Email sent upon a failure will include the Rake tasks executed and a stacktrace. This is the result from calling an undefined method `khaaaaan!` in a task called `failing_task`:
|
44
44
|
|
45
|
-
Subject: [
|
45
|
+
Subject: [ERROR] (NoMethodError) "undefined method `khaaaaan!' for main:Object"
|
46
46
|
From: "notifier" <sender.address@example.com>
|
47
47
|
To: <your.email@example.com>
|
48
48
|
|
@@ -51,7 +51,7 @@ Email sent upon a failure will include the Rake tasks executed and a stacktrace.
|
|
51
51
|
undefined method `khaaaaan!' for main:Object
|
52
52
|
lib/tasks/scheduler.rake:33:in `block in <top (required)>'
|
53
53
|
|
54
|
-
|
54
|
+
-------------------------------
|
55
55
|
Rake:
|
56
56
|
-------------------------------
|
57
57
|
|
@@ -88,9 +88,10 @@ Email sent upon a failure will include the Rake tasks executed and a stacktrace.
|
|
88
88
|
|
89
89
|
### Usage with Heroku Scheduler
|
90
90
|
|
91
|
-
If you're using Heroku, the [Scheduler add-on](http://addons.heroku.com/scheduler) is a very convenient and cheap
|
91
|
+
If you're using Heroku, the [Scheduler add-on](http://addons.heroku.com/scheduler) is a very convenient and cheap way to run scheduled batch jobs. In a Rails environment it's easiest to define batch jobs as Rake tasks. However, the only way to find out whether a task run by the scheduler succeeded or failed is generally reading the logs.
|
92
|
+
|
93
|
+
This gem fixes this issue. [Here is a detailed guide](http://blog.nikhaldimann.com/2013/02/19/failure-notifications-for-rake-tasks-on-the-heroku-scheduler/) about configuring it on Heroku. In summary: If you configure exception notification as described above it should work out of the box with the Heroku Scheduler. (Provided you have email delivery set up in your Heroku app - you could try the [SendGrid add-on](https://addons.heroku.com/sendgrid) which comes in a free version that should be good enough for notifications.)
|
92
94
|
|
93
|
-
This gem fixes this issue. If you configure exception notification as described above it should work out of the box with the Heroku Scheduler. (Provided you have email delivery set up in your Heroku app - you could try the [SendGrid add-on](https://addons.heroku.com/sendgrid) which comes in a free version that should be good enough for notifications.)
|
94
95
|
|
95
96
|
|
96
97
|
### Customization
|
@@ -100,7 +101,7 @@ You can pass configuration options to `ExceptionNotifier::Rake.configure`. It ac
|
|
100
101
|
The most likely options you'll want to use are `:email_prefix` and `:exception_recpients`. Example:
|
101
102
|
|
102
103
|
ExceptionNotifier::Rake.configure(
|
103
|
-
:email_prefix => "[
|
104
|
+
:email_prefix => "[Rake Failure] ",
|
104
105
|
:exception_recipients => %w{user1@example.com user2@example.com})
|
105
106
|
|
106
107
|
This will prefix the email subjects of Rake failure notifications with `[Cron Failure]` and will send them to the two given email addresses. Note that if you set the same options when you configure `ExceptionNotifier` itself, they will be overridden but for Rake failures only.
|
@@ -12,10 +12,11 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = 'An extension of the exception_notification gem to support' +
|
13
13
|
' sending mail upon failures in Rake tasks'
|
14
14
|
|
15
|
-
s.add_runtime_dependency 'exception_notification', '~> 3.0.
|
15
|
+
s.add_runtime_dependency 'exception_notification', '~> 3.0.1'
|
16
16
|
# NB: Rake before 0.9.0 won't support the exception hook we're using
|
17
17
|
s.add_runtime_dependency 'rake', '>= 0.9.0'
|
18
18
|
s.add_development_dependency 'rails', '~> 3.2.0'
|
19
|
+
s.add_development_dependency 'mocha', '~> 0.13.3'
|
19
20
|
|
20
21
|
s.files = `git ls-files`.split("\n")
|
21
22
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_notification-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: exception_notification
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.0.
|
21
|
+
version: 3.0.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.0.
|
29
|
+
version: 3.0.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rake
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 3.2.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: mocha
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.13.3
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 0.13.3
|
62
78
|
description: An extension of the exception_notification gem to support sending mail
|
63
79
|
upon failures in Rake tasks
|
64
80
|
email:
|
@@ -101,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
117
|
version: '0'
|
102
118
|
requirements: []
|
103
119
|
rubyforge_project:
|
104
|
-
rubygems_version: 1.8.
|
120
|
+
rubygems_version: 1.8.23
|
105
121
|
signing_key:
|
106
122
|
specification_version: 3
|
107
123
|
summary: Sending exception notifications upon Rake task failures
|