super_exception_notifier 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/exception_notifier.rb +7 -7
  3. metadata +1 -1
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 0
4
- :patch: 5
4
+ :patch: 6
5
5
  :build:
@@ -79,8 +79,8 @@ class ExceptionNotifier < ActionMailer::Base
79
79
 
80
80
  # What is the path of the file we will render to the user based on a given exception class?
81
81
  def self.get_view_path_for_class(exception, verbose = false)
82
- return self.catch_all if exception.nil?
83
- return self.catch_all unless exception.is_a?(StandardError) || exception.is_a?(Class) # For some reason exception.is_a?(Class) works in console, but not when running in mongrel (ALWAYS returns false)?!?!?
82
+ return self.catch_all(verbose) if exception.nil?
83
+ #return self.catch_all(verbose) unless exception.is_a?(StandardError) || exception.is_a?(Class) # For some reason exception.is_a?(Class) works in console, but not when running in mongrel (ALWAYS returns false)?!?!?
84
84
  filepaths = ExceptionNotifier.exception_to_filenames(exception).map do |file|
85
85
  ExceptionNotifier.get_view_path(file, verbose)
86
86
  end.compact
@@ -95,20 +95,20 @@ class ExceptionNotifier < ActionMailer::Base
95
95
  # Check the usual suspects
96
96
  def self.get_view_path(file_name, verbose = false)
97
97
  if File.exist?("#{RAILS_ROOT}/public/#{file_name}.html")
98
- puts "[FOUND FILE] #{RAILS_ROOT}/public/#{file_name}.html" if verbose
98
+ puts "[FOUND FILE:A] #{RAILS_ROOT}/public/#{file_name}.html" if verbose
99
99
  "#{RAILS_ROOT}/public/#{file_name}.html"
100
100
  elsif !config[:view_path].nil? && File.exist?("#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb")
101
- puts "[FOUND FILE] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb" if verbose
101
+ puts "[FOUND FILE:B] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb" if verbose
102
102
  "#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html.erb"
103
103
  elsif !config[:view_path].nil? && File.exist?("#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html")
104
- puts "[FOUND FILE] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html" if verbose
104
+ puts "[FOUND FILE:C] #{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html" if verbose
105
105
  "#{RAILS_ROOT}/#{config[:view_path]}/#{file_name}.html"
106
106
  elsif File.exist?("#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb")
107
- puts "[FOUND FILE] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb" if verbose
107
+ puts "[FOUND FILE:D] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb" if verbose
108
108
  "#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html.erb"
109
109
  elsif File.exist?("#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html")
110
110
  #ExceptionNotifierHelper::COMPAT_MODE ? "#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html" : "#{status_cd}.html"
111
- puts "[FOUND FILE] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html" if verbose
111
+ puts "[FOUND FILE:E] #{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html" if verbose
112
112
  "#{File.dirname(__FILE__)}/../rails/app/views/exception_notifiable/#{file_name}.html"
113
113
  else
114
114
  nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_exception_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling