Module: RedmineWithGitHelper

Defined in:
app/helpers/redmine_with_git_helper.rb

Instance Method Summary collapse

Instance Method Details

#export_api_curl_commandObject



2
3
4
# File 'app/helpers/redmine_with_git_helper.rb', line 2

def export_api_curl_command
  curl_command("curl -JLO '#{export_redmine_with_git_url(key: User.current.api_key)}'")
end

#import_api_curl_commandObject



6
7
8
9
10
11
12
13
# File 'app/helpers/redmine_with_git_helper.rb', line 6

def import_api_curl_command
  curl_command(<<IMPORT_CURL)
curl -X POST \\
-F '#{import_param_key}=@<PATH_TO_BACKUP_FILE>' \\
-F 'key=#{User.current.api_key}' \\
#{import_redmine_with_git_url(format: 'json')}
IMPORT_CURL
end