Sha256: e197f8e4abf7d5242c85891249cbfcb910e0fc3d92cf239df2763eb31fc83bad

Contents?: true

Size: 772 Bytes

Versions: 4

Compression:

Stored size: 772 Bytes

Contents

require "#{File.dirname(__FILE__)}/model/incoming_mail"

Application.class_eval do
  
  # Sinatra
  enable :raise_errors
  set :environment, $testing ? :test : environment
  set :root, File.expand_path("#{File.dirname(__FILE__)}/../../")
  set :public, "#{root}/public"
  set :logging, true
  set :static, true
  set :views, "#{root}/lib/sum/view"
    
  # Database, logging, and email
  $db, $log, $mail = ActiveWrapper.setup(
    :base => root,
    :env => environment,
    :stdout => environment != :test
  )
  $db.establish_connection
  if $mail.config
    ActionMailer::Base.raise_delivery_errors = true
    imap = { :receiver => IncomingMail, :type => :imap }
    $mail.config[:imap].merge!(imap)
  end
  
  # Secret key
  $secret_key = SecretKey.new(root).read
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
winton-sum-0.1.0 lib/sum/boot.rb
winton-sum-0.1.1 lib/sum/boot.rb
sum-0.1.2 lib/sum/boot.rb
sum-0.1.1 lib/sum/boot.rb