Class: UcbDeployer::ConfigTasks::Jira::ConfigAppProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/ucb_deployer/config_tasks/jira/config_app_properties.rb

Instance Method Summary collapse

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

#executeObject



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_pathObject



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_tokenObject



24
25
26
# File 'lib/ucb_deployer/config_tasks/jira/config_app_properties.rb', line 24

def jira_home_token()
  "jira.home ="
end