Merge branch 'master' of https://github.com/google/google-api-ruby-client
This commit is contained in:
commit
d47e96c572
|
@ -13,6 +13,7 @@ script: "rake spec:all"
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get install idn
|
- sudo apt-get install idn
|
||||||
|
- gem update bundler
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
recipients:
|
recipients:
|
||||||
|
|
|
@ -144,7 +144,7 @@ module Google
|
||||||
def prepare!
|
def prepare!
|
||||||
header.update(options.header) if options && options.header
|
header.update(options.header) if options && options.header
|
||||||
self.url = url.expand(params) if url.is_a?(Addressable::Template)
|
self.url = url.expand(params) if url.is_a?(Addressable::Template)
|
||||||
url.query_values = query
|
url.query_values = query.merge(url.query_values || {})
|
||||||
end
|
end
|
||||||
|
|
||||||
# Release any resources used by this command
|
# Release any resources used by this command
|
||||||
|
|
|
@ -264,4 +264,12 @@ RSpec.describe Google::Apis::Core::HttpCommand do
|
||||||
command.query['a'] = [1,2,3]
|
command.query['a'] = [1,2,3]
|
||||||
command.execute(client)
|
command.execute(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should not remove initial query parameters' do
|
||||||
|
stub_request(:get, 'https://www.googleapis.com/zoo/animals?a=1&a=2&a=3&foo=bar')
|
||||||
|
.to_return(status: [200, ''])
|
||||||
|
command = Google::Apis::Core::HttpCommand.new(:get, 'https://www.googleapis.com/zoo/animals?foo=bar')
|
||||||
|
command.query['a'] = [1,2,3]
|
||||||
|
command.execute(client)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue