<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/exceptional/api.rb</filename>
    </added>
    <added>
      <filename>lib/exceptional/bootstrap.rb</filename>
    </added>
    <added>
      <filename>spec/api_spec.rb</filename>
    </added>
    <added>
      <filename>spec/bootstrap_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,2 @@
 require 'exceptional'
-Exceptional.setup(RAILS_ENV, RAILS_ROOT)
\ No newline at end of file
+Exceptional.bootstrap(RAILS_ENV, RAILS_ROOT)
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,34 +6,16 @@ require 'exceptional/version'
 require 'exceptional/log'
 require 'exceptional/config'
 require 'exceptional/remote'
-require 'exceptional/handler'
-
+require 'exceptional/api'
+require 'exceptional/bootstrap'
 
 module Exceptional
 
   class &lt;&lt; self
     include Exceptional::Config
-    include Exceptional::ExceptionalHandler
+    include Exceptional::Api
     include Exceptional::Remote
     include Exceptional::Log
-    
-    # called from init.rb
-    def setup(environment, application_root)
-      begin
-        setup_config(environment, File.join(application_root,&quot;config&quot;, &quot;exceptional.yml&quot;))
-        setup_log(File.join(application_root, &quot;log&quot;), log_level)
-
-        if enabled?
-          if authenticate
-            require File.join('exceptional', 'integration', 'rails')
-          else
-            STDERR.puts &quot;Exceptional plugin not authenticated, check your API Key&quot;
-          end
-        end        
-      rescue Exception =&gt; e
-        STDERR.puts e
-        STDERR.puts &quot;Exceptional Plugin disabled.&quot;
-      end
-    end
+    include Exceptional::Bootstrap
   end
 end
\ No newline at end of file</diff>
      <filename>lib/exceptional.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,55 +22,4 @@ describe Exceptional do
     end
   end
   
-  describe &quot;setup&quot; do
-    
-    TEST_ENVIRONMENT= &quot;development&quot;
-    
-    it &quot;should initialize the config and log&quot; do
-      Exceptional.should_receive(:setup_config)
-      Exceptional.should_receive(:setup_log)
-      
-      Exceptional.setup(TEST_ENVIRONMENT, File.dirname(__FILE__))
-    end
-    
-    it &quot;should authenticate if enabled&quot; do
-      Exceptional.should_receive(:setup_config)
-      Exceptional.should_receive(:setup_log)
-      Exceptional.should_receive(:enabled?).and_return(true)
-      Exceptional.should_receive(:authenticate).and_return(true)
-      STDERR.should_not_receive(:puts) #Should be no errors to report
-      
-      Exceptional.setup(TEST_ENVIRONMENT, File.dirname(__FILE__))
-    end
-    
-    it &quot;should not authenticate if not enabled&quot; do
-      Exceptional.should_receive(:setup_config)
-      Exceptional.should_receive(:setup_log)
-      Exceptional.should_receive(:enabled?).and_return(false)
-      Exceptional.should_not_receive(:authenticate)
-      STDERR.should_not_receive(:puts) # Will silently not enable itself 
-
-      
-      Exceptional.setup(TEST_ENVIRONMENT, File.dirname(__FILE__))
-    end
-    
-    it &quot;should report to STDERR if authentication fails&quot; do
-      Exceptional.should_receive(:setup_config)
-      Exceptional.should_receive(:setup_log)
-      Exceptional.should_receive(:enabled?).and_return(true)
-      Exceptional.should_receive(:authenticate).and_return(false)
-      STDERR.should_receive(:puts) #Should be no errors to report
-      
-      Exceptional.setup(TEST_ENVIRONMENT, File.dirname(__FILE__))
-    end
-    
-    it &quot;should report to STDERR if error during config initialization&quot; do
-      Exceptional.should_receive(:setup_config).and_raise(Exceptional::Config::ConfigurationException)
-      Exceptional.should_not_receive(:setup_log)
-      Exceptional.should_not_receive(:authenticate).and_return(false)
-      STDERR.should_receive(:puts).twice() #Should be no errors to report
-      
-      Exceptional.setup(TEST_ENVIRONMENT, File.dirname(__FILE__))
-    end
-  end
 end
\ No newline at end of file</diff>
      <filename>spec/exceptional_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/exceptional/handler.rb</filename>
    </removed>
    <removed>
      <filename>spec/handler_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>9d164f715c07bfadc3c842300b0e967fcb18d5d6</id>
    </parent>
  </parents>
  <author>
    <name>wal</name>
    <email>walter.mcconnell@gmail.com</email>
  </author>
  <url>http://github.com/contrast/exceptional/commit/486bd5e3f3ebde4b779c483371516fb6e5ede5a0</url>
  <id>486bd5e3f3ebde4b779c483371516fb6e5ede5a0</id>
  <committed-date>2009-03-23T13:01:51-07:00</committed-date>
  <authored-date>2009-03-23T13:01:51-07:00</authored-date>
  <message>Third phase plugin refactor</message>
  <tree>7595de570606ba4f90eea0f8e3e3572aaf16da6b</tree>
  <committer>
    <name>wal</name>
    <email>walter.mcconnell@gmail.com</email>
  </committer>
</commit>
