Class: Lilypad::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/lilypad/config.rb,
lib/lilypad/config/request.rb

Defined Under Namespace

Modules: Methods Classes: Request

Class Method Summary collapse

Class Method Details

.api_key(api_key = nil, &block) ⇒ Object



5
6
7
8
9
# File 'lib/lilypad/config.rb', line 5

def api_key(api_key=nil, &block)
  @api_key = api_key unless api_key.nil?
  @api_key_block = block if block_given?
  @api_key || @api_key_block
end

.deploy_url(url = nil) ⇒ Object



11
12
13
14
# File 'lib/lilypad/config.rb', line 11

def deploy_url(url=nil)
  @deploy_url = url unless url.nil?
  @deploy_url || "http://hoptoadapp.com:80/deploys.txt"
end

.environments(environments = nil) ⇒ Object



16
17
18
19
# File 'lib/lilypad/config.rb', line 16

def environments(environments=nil)
  @environments = environments unless environments.nil?
  @environments || %w(production staging)
end

.filters(filters = nil) ⇒ Object



21
22
23
24
# File 'lib/lilypad/config.rb', line 21

def filters(filters=nil)
  @filters = filters unless filters.nil?
  @filters || []
end

.log(log = nil) ⇒ Object



26
27
28
29
# File 'lib/lilypad/config.rb', line 26

def log(log=nil)
  @log = log unless log.nil?
  @log
end

.notify_url(url = nil) ⇒ Object



31
32
33
34
# File 'lib/lilypad/config.rb', line 31

def notify_url(url=nil)
  @notify_url = url unless url.nil?
  @notify_url || "http://hoptoadapp.com:80/notifier_api/v2/notices"
end

.railsObject



36
37
38
# File 'lib/lilypad/config.rb', line 36

def rails
  require "#{File.dirname(__FILE__)}/adapters/rails"
end

.sinatraObject



40
41
42
# File 'lib/lilypad/config.rb', line 40

def sinatra
  require "#{File.dirname(__FILE__)}/adapters/sinatra"
end