fiveruns-dash-rails 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,20 +46,31 @@ Fiveruns::Dash.register_recipe :rails, :url => 'http://dash.fiveruns.com' do |re
46
46
  end
47
47
 
48
48
  recipe.add_exceptions_from 'ActionController::Base#perform_action_without_rescue' do |ex, controller|
49
- session_data = nil
49
+ info = {:name => "#{ex.class.name} in #{controller.class.name}##{controller.params[:action]}"}
50
50
  begin
51
51
  session_data = controller.request.session.instance_variable_get("@data")
52
+ info[:session] = Fiveruns::Dash::Rails::Hash.clean(session_data).to_json
52
53
  rescue Exception => e
53
- Fiveruns::Dash.logger.warn "Could not retrieve session data for exception: #{e.message}"
54
+ Fiveruns::Dash.logger.warn "Could not dump session data for exception: #{e.message}"
55
+ nil
54
56
  end
55
- {
56
- :name => "#{ex.class.name} in #{controller.class.name}##{controller.params[:action]}", # Override the standard name
57
- :session => Fiveruns::Dash::Rails::Hash.clean(session_data).to_json,
58
- :headers => Fiveruns::Dash::Rails::Hash.clean(controller.request.headers).to_json,
59
- :request => { :url => controller.request.url, :params => controller.params.inspect }.to_json,
60
- }
57
+ begin
58
+ request_data = { :url => controller.request.url, :params => controller.params.inspect }
59
+ info[:request] = Fiveruns::Dash::Rails::Hash.clean(request_data).to_json
60
+ rescue Exception => e
61
+ Fiveruns::Dash.logger.error "Could not dump request data for exception: #{e.message}"
62
+ nil
63
+ end
64
+ begin
65
+ header_data = controller.request.headers
66
+ info[:headers] = Fiveruns::Dash::Rails::Hash.clean(header_data).to_json
67
+ rescue Exception => e
68
+ Fiveruns::Dash.logger.error "Could not dump header data for exception: #{e.message}"
69
+ nil
70
+ end
71
+ info
61
72
  end
62
-
73
+
63
74
  # Same classes as the exception_notification plugin
64
75
  IGNORE = [ActiveRecord::RecordNotFound, ActionController::RoutingError, ActionController::UnknownController, ActionController::UnknownAction]
65
76
 
data/version.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 7
4
- :patch: 1
4
+ :patch: 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiveruns-dash-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - FiveRuns Development Team