Class: StiDeploy::Configuration

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

Constant Summary collapse

CONFIG_PATH =
'sti_deploy.yml'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.



10
11
12
# File 'lib/sti_deploy/configuration.rb', line 10

def config
  @config
end

Class Method Details

.commit_branch(deploy_type) ⇒ Object



24
25
26
27
28
# File 'lib/sti_deploy/configuration.rb', line 24

def commit_branch(deploy_type)
  read('branches')[deploy_type.to_s]['commit'] || 'master'
rescue StandardError
  'master'
end

.git_usernameObject



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

def git_username
  read('git_username') || ''
end

.languageObject



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

def language
  read('language') || 'en'
end

.merge_branch(deploy_type) ⇒ Object



30
31
32
33
34
# File 'lib/sti_deploy/configuration.rb', line 30

def merge_branch(deploy_type)
  read('branches')[deploy_type.to_s]['merge'] || 'master'
rescue StandardError
  'master'
end

.version_pathObject



12
13
14
# File 'lib/sti_deploy/configuration.rb', line 12

def version_path
  read('version_path') || 'config/initializers/version.rb'
end