fix: Correctly handle absolute paths for simple commands (#895)

This commit is contained in:
Daniel Azuma authored and GitHub committed 2020-07-31 14:07:23 -07:00
1 parent 72edce10c1
commit d717b3b534
2 files changed
+22 -1

No files matched your search

+7 -1
View File
@@ -334,7 +334,13 @@ module Google
# Request-specific options
# @return [Google::Apis::Core::DownloadCommand]
def make_simple_command(method, path, options)
template = Addressable::Template.new(root_url + base_path + path)
full_path =
if path.start_with? "/"
path[1..-1]
else
base_path + path
end
template = Addressable::Template.new(root_url + full_path)
command = ApiCommand.new(method, template)
command.options = request_options.merge(options)
apply_command_defaults(command)