Use concise method for both header and headers

This commit is contained in:
Chris Tompkinson 2020-03-12 11:32:47 +00:00
parent af3010758a
commit 278bba0523

View File

@ -423,7 +423,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
args += ["--header", meta.fetch(:header)] if meta.key?(:header)
meta.fetch(:headers).each { |h| args += ["--header", h.strip] } if meta.key?(:headers)
args += [meta.fetch(:header), *meta.fetch(:headers)].compact.flat_map { |h| ["--header", h.strip] }
args
end