Module: OpenX

Defined in:
lib/openx.rb,
lib/openx/image.rb,
lib/openx/services.rb,
lib/openx/invocation.rb,
lib/openx/persistance.rb,
lib/openx/services/base.rb,
lib/openx/services/zone.rb,
lib/openx/xmlrpc_client.rb,
lib/openx/targeting_rule.rb,
lib/openx/services/agency.rb,
lib/openx/services/banner.rb,
lib/openx/targeting_rules.rb,
lib/openx/services/channel.rb,
lib/openx/services/session.rb,
lib/openx/services/campaign.rb,
lib/openx/services/publisher.rb,
lib/openx/services/advertiser.rb

Defined Under Namespace

Modules: Persistance, Services Classes: Image, Invocation, TargetingRule, TargetingRules, XmlrpcClient, XmlrpcSessionClient

Constant Summary collapse

DEFAULT_OPTIONS =
{ 'retry' => true, 'timeout' => 10 }
@@env =
ENV['OPENX_ENV'] || 'production'
@@config_file =
File.join(ENV['HOME'], '.openx', 'credentials.yml')
@@configuration =
nil

Class Method Summary collapse

Class Method Details

.config_fileObject



35
36
37
# File 'lib/openx.rb', line 35

def config_file
  @@config_file
end

.config_file=(value) ⇒ Object



39
40
41
# File 'lib/openx.rb', line 39

def config_file=(value)
  @@config_file = value
end

.configurationObject



27
28
29
# File 'lib/openx.rb', line 27

def configuration
  @@configuration ||= DEFAULT_OPTIONS.merge(YAML.load_file(config_file)[env])
end

.configuration=(value) ⇒ Object



31
32
33
# File 'lib/openx.rb', line 31

def configuration=(value)
  @@configuration = value
end

.envObject



19
20
21
# File 'lib/openx.rb', line 19

def env
  @@env
end

.env=(value) ⇒ Object



23
24
25
# File 'lib/openx.rb', line 23

def env=(value)
  @@env = value
end