Class: Heploy::Configuration

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



19
20
21
22
23
# File 'lib/heploy/configuration.rb', line 19

def initialize
  @development_branch = "dev"
  @staging_branch = "staging"
  @production_branch = "production"   
end

Instance Attribute Details

#development_branchObject

Returns the value of attribute development_branch.



4
5
6
# File 'lib/heploy/configuration.rb', line 4

def development_branch
  @development_branch
end

#heroku_api_keyObject

Returns the value of attribute heroku_api_key.



4
5
6
# File 'lib/heploy/configuration.rb', line 4

def heroku_api_key
  @heroku_api_key
end

#production_app_nameObject

Returns the value of attribute production_app_name.



4
5
6
# File 'lib/heploy/configuration.rb', line 4

def production_app_name
  @production_app_name
end

#production_branchObject

Returns the value of attribute production_branch.



4
5
6
# File 'lib/heploy/configuration.rb', line 4

def production_branch
  @production_branch
end

#staging_app_nameObject

Returns the value of attribute staging_app_name.



4
5
6
# File 'lib/heploy/configuration.rb', line 4

def staging_app_name
  @staging_app_name
end

#staging_branchObject

Returns the value of attribute staging_branch.



4
5
6
# File 'lib/heploy/configuration.rb', line 4

def staging_branch
  @staging_branch
end

Class Method Details

.findObject



11
12
13
14
15
16
17
# File 'lib/heploy/configuration.rb', line 11

def self.find
  load Dir["config/heploy.rb"].first
  Heploy.configuration
rescue TypeError
  puts "Error: You don't have a configuration file."
  exit
end