Class: StiDeploy::Configuration
- Inherits:
-
Object
- Object
- StiDeploy::Configuration
- Defined in:
- lib/sti_deploy/configuration.rb
Constant Summary collapse
- CONFIG_PATH =
'sti_deploy.yml'
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
- .commit_branch(deploy_type) ⇒ Object
- .git_username ⇒ Object
- .language ⇒ Object
- .merge_branch(deploy_type) ⇒ Object
- .version_path ⇒ Object
Class Attribute Details
.config ⇒ Object (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_username ⇒ Object
20 21 22 |
# File 'lib/sti_deploy/configuration.rb', line 20 def git_username read('git_username') || '' end |
.language ⇒ Object
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_path ⇒ Object
12 13 14 |
# File 'lib/sti_deploy/configuration.rb', line 12 def version_path read('version_path') || 'config/initializers/version.rb' end |