Commit 7554eae26ed91859a4c30d5c5b4c4c57bad544f4
Exists in
master
and in
1 other branch
Merge branch 'master' of github.com:errbit/errbit
Showing
4 changed files
with
46 additions
and
47 deletions
Show diff stats
app/models/issue_trackers/mingle_tracker.rb
| ... | ... | @@ -25,8 +25,7 @@ class MingleTracker < IssueTracker |
| 25 | 25 | end |
| 26 | 26 | |
| 27 | 27 | def body_template |
| 28 | - # Mingle also uses textile markup, so the redmine template is perfect. | |
| 29 | - @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/redmine_body.txt.erb")) | |
| 28 | + @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/textile_body.txt.erb")) | |
| 30 | 29 | end |
| 31 | 30 | |
| 32 | 31 | def ticket_properties_hash | ... | ... |
app/models/issue_trackers/redmine_tracker.rb
| ... | ... | @@ -22,7 +22,7 @@ class RedmineTracker < IssueTracker |
| 22 | 22 | end |
| 23 | 23 | |
| 24 | 24 | def body_template |
| 25 | - @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/redmine_body.txt.erb")) | |
| 25 | + @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/textile_body.txt.erb")) | |
| 26 | 26 | end |
| 27 | 27 | end |
| 28 | 28 | ... | ... |
app/views/issue_trackers/redmine_body.txt.erb
| ... | ... | @@ -1,44 +0,0 @@ |
| 1 | -<% if notice = err.notices.first %> | |
| 2 | -h1. <%= notice.message %> | |
| 3 | - | |
| 4 | -h3. "See this exception on Errbit":<%= app_err_url err.app, err %> | |
| 5 | - | |
| 6 | -h2. Summary | |
| 7 | -<% if notice.request['url'].present? %> | |
| 8 | -h3. URL | |
| 9 | - | |
| 10 | -"<%= notice.request['url'] %>":<%= notice.request['url'] %> | |
| 11 | -<% end %> | |
| 12 | -h3. Where | |
| 13 | - | |
| 14 | -<%= notice.err.where %> | |
| 15 | - | |
| 16 | -h3. Occured | |
| 17 | - | |
| 18 | -<%= notice.created_at.to_s(:micro) %> | |
| 19 | - | |
| 20 | -h3. Similar | |
| 21 | - | |
| 22 | -<%= (notice.err.notices_count - 1).to_s %> | |
| 23 | - | |
| 24 | -h2. Params | |
| 25 | - | |
| 26 | -<pre><%= pretty_hash(notice.params) %></pre> | |
| 27 | - | |
| 28 | -h2. Session | |
| 29 | - | |
| 30 | -<pre><%= pretty_hash(notice.session) %></pre> | |
| 31 | - | |
| 32 | -h2. Backtrace | |
| 33 | - | |
| 34 | -| Line | File | Method | | |
| 35 | -<% for line in notice.backtrace %>| <%= line['number'] %> | <%= line['file'].sub(/^\[PROJECT_ROOT\]/, '') %> | *<%= line['method'] %>* | | |
| 36 | -<% end %> | |
| 37 | - | |
| 38 | -h2. Environment | |
| 39 | - | |
| 40 | -<% for key, val in notice.env_vars %>| <%= key %> | <%= val %> | | |
| 41 | -<% end %> | |
| 42 | - | |
| 43 | -<% end %> | |
| 44 | - |
| ... | ... | @@ -0,0 +1,44 @@ |
| 1 | +<% if notice = err.notices.first %> | |
| 2 | +h1. <%= notice.message %> | |
| 3 | + | |
| 4 | +h3. "See this exception on Errbit":<%= app_err_url err.app, err %> | |
| 5 | + | |
| 6 | +h2. Summary | |
| 7 | +<% if notice.request['url'].present? %> | |
| 8 | +h3. URL | |
| 9 | + | |
| 10 | +"<%= notice.request['url'] %>":<%= notice.request['url'] %> | |
| 11 | +<% end %> | |
| 12 | +h3. Where | |
| 13 | + | |
| 14 | +<%= notice.err.where %> | |
| 15 | + | |
| 16 | +h3. Occurred | |
| 17 | + | |
| 18 | +<%= notice.created_at.to_s(:micro) %> | |
| 19 | + | |
| 20 | +h3. Similar | |
| 21 | + | |
| 22 | +<%= (notice.err.notices_count - 1).to_s %> | |
| 23 | + | |
| 24 | +h2. Params | |
| 25 | + | |
| 26 | +<pre><%= pretty_hash(notice.params) %></pre> | |
| 27 | + | |
| 28 | +h2. Session | |
| 29 | + | |
| 30 | +<pre><%= pretty_hash(notice.session) %></pre> | |
| 31 | + | |
| 32 | +h2. Backtrace | |
| 33 | + | |
| 34 | +| Line | File | Method | | |
| 35 | +<% for line in notice.backtrace %>| <%= line['number'] %> | <%= line['file'].sub(/^\[PROJECT_ROOT\]/, '') %> | *<%= line['method'] %>* | | |
| 36 | +<% end %> | |
| 37 | + | |
| 38 | +h2. Environment | |
| 39 | + | |
| 40 | +<% for key, val in notice.env_vars %>| <%= key %> | <%= val %> | | |
| 41 | +<% end %> | |
| 42 | + | |
| 43 | +<% end %> | |
| 44 | + | ... | ... |