Module: Exceptional::Bootstrap

Included in:
Exceptional
Defined in:
lib/exceptional/bootstrap.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap(environment, application_root) ⇒ Object

called from init.rb



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/exceptional/bootstrap.rb', line 5

def bootstrap(environment, application_root)
  begin
    setup_config(environment, File.join(application_root,"config", "exceptional.yml"))
    setup_log(File.join(application_root, "log"), log_level)

    if enabled?
      if authenticate
        require File.join('exceptional', 'integration', 'rails')
      else
        STDERR.puts "Exceptional plugin not authenticated, check your API Key"
      end
    end
  rescue Exception => e
    STDERR.puts e
    STDERR.puts "Exceptional Plugin disabled."
  end
end