Class: HerokuHelper::DeploymentConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/heroku-helper/deployment_configuration.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



32
33
34
# File 'lib/heroku-helper/deployment_configuration.rb', line 32

def configuration
  @configuration
end

.current_environmentObject

Returns the value of attribute current_environment.



31
32
33
# File 'lib/heroku-helper/deployment_configuration.rb', line 31

def current_environment
  @current_environment
end

Class Method Details

.configuration_formatObject



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/heroku-helper/deployment_configuration.rb', line 40

def self.configuration_format
  <<-FORMAT
# heroku_deploy.rb
environment :production do
  set :app_name, 'heroku-application-name'
  set :domain,   'example.com'
  set :contributors, %w([email protected] [email protected])
  set :environment_variables, {
'REDIS_URL' => 'redis://localhost:6379/0'
  }
  set :addons, [
'custom_domains',
'gmail_smtp [email protected] password=sekret'
  ]

  before :share do
# run code before sharing
  end

  after :deploy do
# run code after deploy
  end
end
  FORMAT
end

.configure(conf_file) ⇒ Object



35
36
37
38
# File 'lib/heroku-helper/deployment_configuration.rb', line 35

def self.configure(conf_file)
  self.configuration ||= {}
  require conf_file
end