Method: TentD.new

Defined in:
lib/tentd.rb

.new(options = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/tentd.rb', line 11

def self.new(options={})
  if options[:database] || ENV['DATABASE_URL']
    DataMapper.setup(:default, options[:database] || ENV['DATABASE_URL'])
  end

  require "tentd/notifications/#{options[:job_backend] || 'girl_friday'}"

  @faraday_adapter = options[:faraday_adapter]
  API.new
end