crashdesk-rails 0.1.2 → 0.1.3

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.
@@ -1,6 +1,10 @@
1
1
  module CrashdeskRails
2
2
  class Railtie < Rails::Railtie
3
3
 
4
+ initializer "crashdesk.middleware" do |app|
5
+ app.config.middleware.insert 0, "Crashdesk::Rack"
6
+ end
7
+
4
8
  config.after_initialize do |app|
5
9
  Crashdesk.configure do |config|
6
10
  config.logger ||= ::Rails.logger
@@ -8,19 +12,11 @@ module CrashdeskRails
8
12
  config.project_root ||= ::Rails.root
9
13
  end
10
14
 
11
- Crashdesk.log 'Crahsdesk initializing.'
15
+ Crashdesk.log 'Crashdesk initializing.'
12
16
 
13
- if defined? ::ActionDispatch::DebugExceptions
17
+ if defined? ::ActionDispatch::DebugExceptions || defined? ::ActionDispatch::ShowExceptions
14
18
  Crashdesk.log 'Crashdesk integrated via including DebugExceptions module.'
15
- # DebugException is middleware inside Rails
16
- # Would be nice to have our own with nice message rendering.
17
19
  ::ActionDispatch::DebugExceptions.send(:include, CrashdeskRails::DebugExceptions)
18
-
19
- # Also there's ShowException middleware we could override with much
20
- # nicer default rendering.
21
- else
22
- Crashdesk.log 'Crashdesk integrated via middleware.'
23
- app.config.middleware.use "CrashdeskRails::Middleware"
24
20
  end
25
21
  end
26
22
 
@@ -1,3 +1,3 @@
1
1
  module CrashdeskRails
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crashdesk-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-19 00:00:00.000000000 Z
13
+ date: 2012-09-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: crashdesk