Commit 0829cdfe04196bbccbbf8bb6ed6c196fdde6fda1

Authored by Nathan Broadbent
1 parent db790674
Exists in master and in 1 other branch production

Renamed user_info => user_attributes

app/models/error_report.rb
@@ -2,7 +2,7 @@ require 'digest/md5' @@ -2,7 +2,7 @@ require 'digest/md5'
2 require 'hoptoad_notifier' 2 require 'hoptoad_notifier'
3 3
4 class ErrorReport 4 class ErrorReport
5 - attr_reader :klass, :message, :backtrace, :request, :server_environment, :api_key, :notifier, :user_info 5 + attr_reader :klass, :message, :backtrace, :request, :server_environment, :api_key, :notifier, :user_attributes
6 6
7 def initialize(xml_or_attributes) 7 def initialize(xml_or_attributes)
8 @attributes = (xml_or_attributes.is_a?(String) ? Hoptoad.parse_xml!(xml_or_attributes) : xml_or_attributes).with_indifferent_access 8 @attributes = (xml_or_attributes.is_a?(String) ? Hoptoad.parse_xml!(xml_or_attributes) : xml_or_attributes).with_indifferent_access
@@ -36,7 +36,7 @@ class ErrorReport @@ -36,7 +36,7 @@ class ErrorReport
36 :request => request, 36 :request => request,
37 :server_environment => server_environment, 37 :server_environment => server_environment,
38 :notifier => notifier, 38 :notifier => notifier,
39 - :user_info => user_info) 39 + :user_attributes => user_attributes)
40 40
41 err = app.find_or_create_err!( 41 err = app.find_or_create_err!(
42 :klass => klass, 42 :klass => klass,
app/models/notice.rb
@@ -10,7 +10,7 @@ class Notice @@ -10,7 +10,7 @@ class Notice
10 field :server_environment, :type => Hash 10 field :server_environment, :type => Hash
11 field :request, :type => Hash 11 field :request, :type => Hash
12 field :notifier, :type => Hash 12 field :notifier, :type => Hash
13 - field :user_info, :type => Hash 13 + field :user_attributes, :type => Hash
14 field :klass 14 field :klass
15 15
16 belongs_to :err 16 belongs_to :err
app/views/errs/show.html.haml
@@ -50,8 +50,8 @@ @@ -50,8 +50,8 @@
50 %ul 50 %ul
51 %li= link_to 'Summary', '#summary', :rel => 'summary', :class => 'button' 51 %li= link_to 'Summary', '#summary', :rel => 'summary', :class => 'button'
52 %li= link_to 'Backtrace', '#backtrace', :rel => 'backtrace', :class => 'button' 52 %li= link_to 'Backtrace', '#backtrace', :rel => 'backtrace', :class => 'button'
53 - - if @notice.user_info.present?  
54 - %li= link_to 'Application User', '#user_info', :rel => 'user_info', :class => 'button' 53 + - if @notice.user_attributes.present?
  54 + %li= link_to 'Application User', '#user_attributes', :rel => 'user_attributes', :class => 'button'
55 %li= link_to 'Environment', '#environment', :rel => 'environment', :class => 'button' 55 %li= link_to 'Environment', '#environment', :rel => 'environment', :class => 'button'
56 %li= link_to 'Parameters', '#params', :rel => 'params', :class => 'button' 56 %li= link_to 'Parameters', '#params', :rel => 'params', :class => 'button'
57 %li= link_to 'Session', '#session', :rel => 'session', :class => 'button' 57 %li= link_to 'Session', '#session', :rel => 'session', :class => 'button'
@@ -65,10 +65,10 @@ @@ -65,10 +65,10 @@
65 %h3 Backtrace 65 %h3 Backtrace
66 = render 'notices/backtrace', :lines => @notice.backtrace 66 = render 'notices/backtrace', :lines => @notice.backtrace
67 67
68 - - if @notice.user_info.present?  
69 - #user_info 68 + - if @notice.user_attributes.present?
  69 + #user_attributes
70 %h3 User 70 %h3 User
71 - = render 'notices/user_info', :user => @notice.user_info 71 + = render 'notices/user_attributes', :user => @notice.user_attributes
72 72
73 #environment 73 #environment
74 %h3 Environment 74 %h3 Environment
app/views/notices/_user_info.html.haml
1 .window 1 .window
2 - %table.user_info 2 + %table.user_attributes
3 - user.each do |user_key, user_value| 3 - user.each do |user_key, user_value|
4 %tr 4 %tr
5 %th= user_key 5 %th= user_key
lib/hoptoad/v2.rb
@@ -59,7 +59,7 @@ module Hoptoad @@ -59,7 +59,7 @@ module Hoptoad
59 59
60 :api_key => notice['api-key'], 60 :api_key => notice['api-key'],
61 :notifier => notice['notifier'], 61 :notifier => notice['notifier'],
62 - :user_info => notice['user-info'] || {} 62 + :user_attributes => notice['user-attributes'] || {}
63 } 63 }
64 end 64 end
65 end 65 end