exceptional 2.0.19 → 2.0.20

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.
data/init.rb CHANGED
@@ -14,13 +14,22 @@ if (defined?(Exceptional::VERSION::STRING) rescue nil) && %w(development test).i
14
14
  exit -1
15
15
  else
16
16
  begin
17
- Exceptional::Config.load(File.join(RAILS_ROOT, "/config/exceptional.yml"))
18
- Exceptional.logger.info("Loading Exceptional for #{Rails::VERSION::STRING}")
17
+
18
+ if (Rails::VERSION::MAJOR < 3)
19
+ Exceptional::Config.load(File.join(RAILS_ROOT, "/config/exceptional.yml"))
20
+ Exceptional.logger.info("Loading Exceptional for #{Rails::VERSION::STRING}")
19
21
 
20
- require File.join('exceptional', 'integration', 'rails')
21
- require File.join('exceptional', 'integration', 'dj') if defined?(Delayed::Job)
22
+ require File.join('exceptional', 'integration', 'rails')
23
+ require File.join('exceptional', 'integration', 'dj') if defined?(Delayed::Job)
24
+ else
25
+ if Exceptional::Config.should_send_to_api?
26
+ Exceptional.logger.info("Loading Exceptional for #{Rails::VERSION::STRING}")
27
+ Rails.configuration.middleware.use "Rack::RailsExceptional"
28
+ require File.join('exceptional', 'integration', 'dj') if defined?(Delayed::Job)
29
+ end
30
+ end
22
31
  rescue => e
23
- STDERR.puts "Problem starting Exceptional Plugin. Your app will run as normal."
32
+ STDERR.puts "Problem starting Exceptional Plugin. Your app will run as normal. #{e.message}"
24
33
  Exceptional.logger.error(e.message)
25
34
  Exceptional.logger.error(e.backtrace)
26
35
  end
@@ -56,7 +56,7 @@ module Exceptional
56
56
  end
57
57
 
58
58
  def application_root
59
- defined?(RAILS_ROOT) ? RAILS_ROOT : Dir.pwd
59
+ defined?(Rails) ? Rails.root : Dir.pwd
60
60
  end
61
61
 
62
62
  def ssl?
@@ -4,8 +4,9 @@ require 'rails'
4
4
  module Exceptional
5
5
  class Railtie < Rails::Railtie
6
6
 
7
+ Exceptional::Config.load(File.join(Rails.root, "/config/exceptional.yml"))
8
+
7
9
  initializer "exceptional.middleware" do |app|
8
- Exceptional::Config.load(File.join(Rails.root, "/config/exceptional.yml"))
9
10
  if Exceptional::Config.should_send_to_api?
10
11
  Exceptional.logger.info("Loading Exceptional for #{Rails::VERSION::STRING}")
11
12
  app.config.middleware.use "Rack::RailsExceptional"
@@ -1,3 +1,3 @@
1
1
  module Exceptional
2
- VERSION = '2.0.19'
2
+ VERSION = '2.0.20'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exceptional
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 39
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 19
10
- version: 2.0.19
9
+ - 20
10
+ version: 2.0.20
11
11
  platform: ruby
12
12
  authors:
13
13
  - Contrast
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-29 00:00:00 +01:00
18
+ date: 2010-08-09 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21