Class: Thincloud::Resque::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/thincloud/resque/configuration.rb

Overview

Public: Configuration options for the Thincloud::Resque module

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/thincloud/resque/configuration.rb', line 22

def initialize
  url       = ENV["REDIS_URL"] || "unix:///tmp/redis.sock"
  username  = ENV["RESQUE_WEB_USERNAME"] || "thincloud-resque"
  password  = ENV["RESQUE_WEB_PASSWORD"] || "thincloud-resque"

  @redis_url       ||= url
  @redis_namespace ||= "resque"
  @redis_driver    ||= "ruby"
  @web_username    ||= username
  @web_password    ||= password
  @mailer_environments ||= [:production]
end

Instance Attribute Details

#mailer_environmentsObject

Returns the value of attribute mailer_environments.



20
21
22
# File 'lib/thincloud/resque/configuration.rb', line 20

def mailer_environments
  @mailer_environments
end

#redis_driverObject

Returns the value of attribute redis_driver.



17
18
19
# File 'lib/thincloud/resque/configuration.rb', line 17

def redis_driver
  @redis_driver
end

#redis_namespaceObject

Returns the value of attribute redis_namespace.



16
17
18
# File 'lib/thincloud/resque/configuration.rb', line 16

def redis_namespace
  @redis_namespace
end

#redis_urlObject

Returns the value of attribute redis_url.



15
16
17
# File 'lib/thincloud/resque/configuration.rb', line 15

def redis_url
  @redis_url
end

#web_passwordObject

Returns the value of attribute web_password.



19
20
21
# File 'lib/thincloud/resque/configuration.rb', line 19

def web_password
  @web_password
end

#web_usernameObject

Returns the value of attribute web_username.



18
19
20
# File 'lib/thincloud/resque/configuration.rb', line 18

def web_username
  @web_username
end