Ruby client: remove trailing slashes from base_url

Closes #1399
This commit is contained in:
xhh
2015-10-16 12:02:30 +08:00
parent 860b551e9b
commit e0dfc1b43d
3 changed files with 27 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ module Petstore
end
def base_url
url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}"
url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
URI.encode(url)
end