Skip to content

Commit

Permalink
one of many
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>
  • Loading branch information
Jack12816 committed Jan 30, 2025
1 parent 7695b2f commit 0494dfc
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions spec/support/vcr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@
end

config.around_http_request do |request|
headers =
if request.body.include?('RubyMultipartPost')
request.headers.except('Content-Type', *ignore_req_headers)
else
request.headers.except(*ignore_req_headers)
end
headers = headers.map { |key, val| %("#{key}"=>#{val}) }.join(', ')
headers = "{#{headers}}"

tape_sha = Digest::SHA1.hexdigest [
request.method,
request.uri,
if request.body.include?('RubyMultipartPost')
request.headers.except('Content-Type', *ignore_req_headers).to_s
else
request.headers.except(*ignore_req_headers).to_s
end,
headers,
request.body.to_s.gsub(
/RubyMultipartPost-\w{32}/,
"RubyMultipartPost-#{'1' * 32}"
Expand Down

0 comments on commit 0494dfc

Please sign in to comment.