exception_notification 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ == 2.6.1
2
+
3
+ * bug fixes
4
+ * Fix finding custom sections on Background notifications. Fixes [#68]
5
+
1
6
  == 2.6.0
2
7
 
3
8
  * enhancements
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exception_notification (2.5.2)
4
+ exception_notification (2.6.0)
5
5
  actionmailer (>= 3.0.4)
6
6
 
7
7
  GEM
@@ -46,7 +46,7 @@ GEM
46
46
  mime-types (~> 1.16)
47
47
  treetop (~> 1.4.8)
48
48
  mime-types (1.18)
49
- multi_json (1.2.0)
49
+ multi_json (1.3.2)
50
50
  polyglot (0.3.3)
51
51
  rack (1.4.1)
52
52
  rack-cache (1.2)
@@ -77,13 +77,13 @@ GEM
77
77
  hike (~> 1.2)
78
78
  rack (~> 1.0)
79
79
  tilt (~> 1.1, != 1.3.0)
80
- sqlite3 (1.3.5)
80
+ sqlite3 (1.3.6)
81
81
  thor (0.14.6)
82
82
  tilt (1.3.3)
83
83
  treetop (1.4.10)
84
84
  polyglot
85
85
  polyglot (>= 0.3.1)
86
- tzinfo (0.3.32)
86
+ tzinfo (0.3.33)
87
87
 
88
88
  PLATFORMS
89
89
  ruby
data/README.md CHANGED
@@ -11,6 +11,8 @@ environment, and also gives a backtrace of the exception.
11
11
  There's a great [Railscast about Exception Notifications](http://railscasts.com/episodes/104-exception-notifications-revised)
12
12
  you can see that may help you getting started.
13
13
 
14
+ [Follow us on Twitter](https://twitter.com/exception_notif) to get updates and notices about new releases.
15
+
14
16
  Installation
15
17
  ---
16
18
 
@@ -234,7 +236,11 @@ After an exception notification has been delivered the rack environment variable
234
236
  Versions
235
237
  ---
236
238
 
237
- NOTE: Master branch is currently set for v2.6.0
239
+ NOTE: Master branch is currently set for v2.6.1
240
+
241
+ For v2.6.0, see this tag:
242
+
243
+ <a href="http://github.com/smartinez87/exception_notification/tree/v2.6.0">http://github.com/smartinez87/exception_notification/tree/v2.6.0</a>
238
244
 
239
245
  For v2.5.2, see this tag:
240
246
 
@@ -244,13 +250,9 @@ For v2.5.0, see tag:
244
250
 
245
251
  <a href="http://github.com/smartinez87/exception_notification/tree/v2.5.0">http://github.com/smartinez87/exception_notification/tree/v2.5.0</a>
246
252
 
247
- For v2.4.1, see tag:
248
-
249
- <a href="http://github.com/smartinez87/exception_notification/tree/v2.4.1">http://github.com/smartinez87/exception_notification/tree/v2.4.1</a>
250
-
251
- For v2.4.0, see tag:
253
+ For previous releases, visit:
252
254
 
253
- <a href="http://github.com/smartinez87/exception_notification/tree/v2.4.0">http://github.com/smartinez87/exception_notification/tree/v2.4.0</a>
255
+ <a href="https://github.com/smartinez87/exception_notification/tags">https://github.com/smartinez87/exception_notification/tags</a>
254
256
 
255
257
  If you are running Rails 2.3 then see the branch for that:
256
258
 
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'exception_notification'
3
- s.version = '2.6.0'
3
+ s.version = '2.6.1'
4
4
  s.authors = ["Jamis Buck", "Josh Peek"]
5
- s.date = %q{2012-04-13}
5
+ s.date = %q{2012-04-21}
6
6
  s.summary = "Exception notification by email for Rails apps"
7
7
  s.homepage = "http://smartinez87.github.com/exception_notification"
8
8
  s.email = "smartinez87@gmail.com"
@@ -89,6 +89,8 @@ class ExceptionNotifier
89
89
  end
90
90
 
91
91
  def background_exception_notification(exception, options={})
92
+ self.append_view_path Rails.root.nil? ? "app/views" : "#{Rails.root}/app/views" if defined?(Rails)
93
+
92
94
  if @notifier = Rails.application.config.middleware.detect{ |x| x.klass == ExceptionNotifier }
93
95
  @options = (@notifier.args.first || {}).reverse_merge(self.class.default_options)
94
96
  @exception = exception
@@ -0,0 +1 @@
1
+ * New background section for testing
@@ -5,7 +5,8 @@ Dummy::Application.config.middleware.use ExceptionNotifier,
5
5
  :email_prefix => "[Dummy ERROR] ",
6
6
  :sender_address => %{"Dummy Notifier" <dummynotifier@example.com>},
7
7
  :exception_recipients => %w{dummyexceptions@example.com},
8
- :sections => ['new_section', 'request', 'session', 'environment', 'backtrace']
8
+ :sections => ['new_section', 'request', 'session', 'environment', 'backtrace'],
9
+ :background_sections => %w(new_bkg_section) + ExceptionNotifier::Notifier.default_background_sections
9
10
 
10
11
  # Initialize the rails application
11
12
  Dummy::Application.initialize!
@@ -165,3 +165,19 @@ class PostsControllerTestBadRequestData < ActionController::TestCase
165
165
  assert_match /ERROR: Failed to generate exception summary/, @mail.body.to_s
166
166
  end
167
167
  end
168
+
169
+ class PostsControllerTestBackgroundNotification < ActionController::TestCase
170
+ tests PostsController
171
+ setup do
172
+ begin
173
+ @post = posts(:one)
174
+ post :create, :post => @post.attributes
175
+ rescue => exception
176
+ @mail = ExceptionNotifier::Notifier.background_exception_notification(exception)
177
+ end
178
+ end
179
+
180
+ test "mail should contain the specified section" do
181
+ assert @mail.body.include? "* New background section for testing"
182
+ end
183
+ end
@@ -20,7 +20,9 @@ class ExceptionNotificationTest < ActiveSupport::TestCase
20
20
  end
21
21
 
22
22
  test "should have default background sections" do
23
- assert ExceptionNotifier::Notifier.default_background_sections == %w(backtrace data)
23
+ for section in %w(backtrace data)
24
+ assert ExceptionNotifier::Notifier.default_background_sections.include? section
25
+ end
24
26
  end
25
27
 
26
28
  test "should have verbose subject by default" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-04-13 00:00:00.000000000 Z
13
+ date: 2012-04-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionmailer
@@ -94,6 +94,7 @@ files:
94
94
  - test/dummy/app/helpers/application_helper.rb
95
95
  - test/dummy/app/helpers/posts_helper.rb
96
96
  - test/dummy/app/models/post.rb
97
+ - test/dummy/app/views/exception_notifier/_new_bkg_section.text.erb
97
98
  - test/dummy/app/views/exception_notifier/_new_section.text.erb
98
99
  - test/dummy/app/views/layouts/application.html.erb
99
100
  - test/dummy/app/views/posts/_form.html.erb
@@ -174,6 +175,7 @@ test_files:
174
175
  - test/dummy/app/helpers/application_helper.rb
175
176
  - test/dummy/app/helpers/posts_helper.rb
176
177
  - test/dummy/app/models/post.rb
178
+ - test/dummy/app/views/exception_notifier/_new_bkg_section.text.erb
177
179
  - test/dummy/app/views/exception_notifier/_new_section.text.erb
178
180
  - test/dummy/app/views/layouts/application.html.erb
179
181
  - test/dummy/app/views/posts/_form.html.erb