Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lib/java_buildpack/framework/dynatrace_one_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def supports?
:FILTER, :NETWORKZONE, :SKIP_ERRORS

def agent_download_url
download_uri = "#{api_base_url(credentials)}/v1/deployment/installer/agent/unix/paas/latest?#{technologies(credentials)}" \
download_uri = "#{api_base_url(credentials)}" \
"/v1/deployment/installer/agent/unix/paas/latest?#{technologies(credentials)}" \
'&bitness=64' \
"&Api-Token=#{credentials[APITOKEN]}"

Expand All @@ -130,13 +131,13 @@ def agent_download_url
end

def technologies(credentials)
code_modules = "include=java"
if not credentials[ADDTECHNOLOGIES].empty?
credentials[ADDTECHNOLOGIES].split(",").each do |tech|
code_modules = 'include=java'
if credentials.key?(ADDTECHNOLOGIES)
credentials[ADDTECHNOLOGIES].split(',').each do |tech|
code_modules += "&include=#{tech}"
end
end
return code_modules
code_modules
end

def agent_manifest
Expand Down
10 changes: 4 additions & 6 deletions lib/java_buildpack/util/sanitizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ def handle_params(params)

query_params = ''

params.split("&").each do |single_param|
k, v = single_param.split("=")
if k.match(keywords)
v = "***"
end
query_params += k + '=' +v + '&'
params.split('&').each do |single_param|
k, v = single_param.split('=')
v = '***' if k.match(keywords)
query_params += k + '=' + v + '&'
end
query_params
end
Expand Down