lib/hubspot/codegen/oauth/api_client.rb in hubspot-api-client-8.0.1 vs lib/hubspot/codegen/oauth/api_client.rb in hubspot-api-client-9.0.0
- old
+ new
@@ -4,11 +4,11 @@
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 4.2.3
+OpenAPI Generator version: 4.3.1
=end
require 'date'
require 'json'
@@ -300,16 +300,18 @@
request.on_body do |chunk|
chunk.force_encoding(encoding)
tempfile.write(chunk)
end
request.on_complete do |response|
- tempfile.close if tempfile
+ if tempfile
+ tempfile.close
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
"explicitly with `tempfile.delete`"
end
end
+ end
# Sanitize filename by removing path.
# e.g. ../../sun.gif becomes sun.gif
#
# @param [String] filename the filename to be sanitized