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.



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

def config
  @config
end

Class Method Details

.git_usernameObject



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

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

.languageObject



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

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

.origin_branch(deploy_type) ⇒ Object



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

def origin_branch(deploy_type)
  read('branches')[deploy_type.full_name]['origin'] || 'master'
rescue StandardError
  'master'
end

.target_branch(deploy_type) ⇒ Object



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

def target_branch(deploy_type)
  read('branches')[deploy_type.full_name]['target'] || 'master'
rescue StandardError
  'master'
end

.version_pathObject



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

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