Class: UcbDeployer::ConfigTasks::Jira::ConfigAppProperties
- Inherits:
-
Object
- Object
- UcbDeployer::ConfigTasks::Jira::ConfigAppProperties
- Defined in:
- lib/ucb_deployer/config_tasks/jira/config_app_properties.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(config) ⇒ ConfigAppProperties
constructor
A new instance of ConfigAppProperties.
- #jira_app_properties_path ⇒ Object
- #jira_home_token ⇒ Object
Constructor Details
#initialize(config) ⇒ ConfigAppProperties
Returns a new instance of ConfigAppProperties.
5 6 7 |
# File 'lib/ucb_deployer/config_tasks/jira/config_app_properties.rb', line 5 def initialize(config) @config= config end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ucb_deployer/config_tasks/jira/config_app_properties.rb', line 9 def execute() file_data = File.readlines(self.jira_app_properties_path()).map do |line| if /(#{Regexp.quote(self.jira_home_token())})/.match(line) "#{self.jira_home_token()} #{@config.data_dir()}" else line end end File.open(self.jira_app_properties_path(), "w") do |io| file_data.each { |line| io.puts(line) } end end |
#jira_app_properties_path ⇒ Object
28 29 30 |
# File 'lib/ucb_deployer/config_tasks/jira/config_app_properties.rb', line 28 def jira_app_properties_path() "#{@config.build_dir()}/src/edit-webapp/WEB-INF/classes/jira-application.properties" end |
#jira_home_token ⇒ Object
24 25 26 |
# File 'lib/ucb_deployer/config_tasks/jira/config_app_properties.rb', line 24 def jira_home_token() "jira.home =" end |