From f2b9af95ee46a799901bf3c686a28b2a0039403f Mon Sep 17 00:00:00 2001 From: Barry Hess Date: Mon, 27 Jun 2011 15:55:38 -0500 Subject: [PATCH] Add backtrace to emails, add awesome_print, update err notification style. --- Gemfile | 1 + Gemfile.lock | 77 ++++++++++++++++++++++++++++++++++++++++------------------------------------- app/views/mailer/err_notification.text.erb | 4 ++++ 3 files changed, 45 insertions(+), 37 deletions(-) diff --git a/Gemfile b/Gemfile index 725d4c6..3ae0bfd 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,7 @@ platform :ruby do end group :development, :test do + gem 'awesome_print' gem 'rspec-rails', '~> 2.5' gem 'webmock', :require => false end diff --git a/Gemfile.lock b/Gemfile.lock index 73cb831..53780aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,11 +35,12 @@ GEM activemodel (= 3.0.5) activesupport (= 3.0.5) activesupport (3.0.5) - addressable (2.2.5) - arel (2.0.9) + addressable (2.2.6) + arel (2.0.10) + awesome_print (0.4.0) bcrypt-ruby (2.1.4) - bson (1.3.0) - bson_ext (1.3.0) + bson (1.3.1) + bson_ext (1.3.1) builder (2.1.2) crack (0.1.8) database_cleaner (0.6.7) @@ -47,7 +48,8 @@ GEM bcrypt-ruby (~> 2.1.2) warden (~> 1.0.2) diff-lcs (1.1.2) - email_spec (1.1.1) + email_spec (1.2.1) + mail (~> 2.2) rspec (~> 2.0) erubis (2.6.6) abstract (>= 1.0.0) @@ -55,40 +57,40 @@ GEM factory_girl_rails (1.0.1) factory_girl (~> 1.3) railties (>= 3.0.0) - haml (3.0.25) + haml (3.1.2) happymapper (0.3.2) libxml-ruby (~> 1.1.3) - i18n (0.5.0) + i18n (0.6.0) libxml-ruby (1.1.4) lighthouse-api (2.0) activeresource (>= 3.0.0) activesupport (>= 3.0.0) - mail (2.2.17) + mail (2.2.19) activesupport (>= 2.3.6) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.16) - mongo (1.3.0) - bson (>= 1.3.0) + mongo (1.3.1) + bson (>= 1.3.1) mongoid (2.0.0.rc.8) activemodel (~> 3.0) mongo (~> 1.2) tzinfo (~> 0.3.22) will_paginate (~> 3.0.pre) - mongoid_rails_migrations (0.0.10) - activesupport (~> 3.0.0) - bundler (>= 0.9.19) - rails (~> 3.0.0) - railties (~> 3.0.0) - nokogiri (1.4.4) - pivotal-tracker (0.2.0) + mongoid_rails_migrations (0.0.14) + activesupport (>= 3.0.0) + bundler (>= 1.0.0) + rails (>= 3.0.0) + railties (>= 3.0.0) + nokogiri (1.4.3.1) + pivotal-tracker (0.3.1) builder - happymapper (>= 0.2.4) - nokogiri (~> 1.4.1) - rest-client (~> 1.5.1) + happymapper (>= 0.3.2) + nokogiri (~> 1.4.3.1) + rest-client (~> 1.6.0) polyglot (0.3.1) - rack (1.2.2) + rack (1.2.3) rack-mount (0.6.14) rack (>= 1.0.0) rack-test (0.5.7) @@ -106,31 +108,31 @@ GEM activesupport (= 3.0.5) rake (>= 0.8.7) thor (~> 0.14.4) - rake (0.8.7) - rest-client (1.5.1) + rake (0.9.2) + rest-client (1.6.3) mime-types (>= 1.16) - rspec (2.5.0) - rspec-core (~> 2.5.0) - rspec-expectations (~> 2.5.0) - rspec-mocks (~> 2.5.0) - rspec-core (2.5.1) - rspec-expectations (2.5.0) + rspec (2.6.0) + rspec-core (~> 2.6.0) + rspec-expectations (~> 2.6.0) + rspec-mocks (~> 2.6.0) + rspec-core (2.6.4) + rspec-expectations (2.6.0) diff-lcs (~> 1.1.2) - rspec-mocks (2.5.0) - rspec-rails (2.5.0) + rspec-mocks (2.6.0) + rspec-rails (2.6.1) actionpack (~> 3.0) activesupport (~> 3.0) railties (~> 3.0) - rspec (~> 2.5.0) + rspec (~> 2.6.0) thor (0.14.6) treetop (1.4.9) polyglot (>= 0.3.1) - tzinfo (0.3.26) + tzinfo (0.3.28) useragent (0.3.1) - warden (1.0.3) - rack (>= 1.0.0) - webmock (1.6.2) - addressable (>= 2.2.2) + warden (1.0.4) + rack (>= 1.0) + webmock (1.6.4) + addressable (~> 2.2, > 2.2.5) crack (>= 0.1.7) will_paginate (3.0.pre2) @@ -138,6 +140,7 @@ PLATFORMS ruby DEPENDENCIES + awesome_print bson_ext (~> 1.2) database_cleaner (~> 0.6.0) devise (~> 1.1.8) diff --git a/app/views/mailer/err_notification.text.erb b/app/views/mailer/err_notification.text.erb index 554bf37..441ad0c 100644 --- a/app/views/mailer/err_notification.text.erb +++ b/app/views/mailer/err_notification.text.erb @@ -4,4 +4,8 @@ This err has occurred <%= pluralize @notice.err.notices_count, 'time' %>. You sh <%= app_err_url(@app, @notice.err) %> +Backtrace follows: + +<%= @notice.backtrace.collect { |l| l ? " #{l['file']}:#{l['number']}" : nil }.compact.join("\n") %> + <%= render :partial => 'signature' %> -- libgit2 0.21.2