vsphere-automation-runtime 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 635d90cff8682a1ac1fc64e1ecb8039d8d992cbe1d293e0255cbd226ef3ecd48
4
- data.tar.gz: ff95ca7ff8caeb8cf739cfed9fc7fb96cb98068aefd66a754bdfc8717e47eba0
3
+ metadata.gz: 7917a709ed7c07abb03fd5d416bc813cb9c040bc18ca4ca63ecb2099d2a38ffc
4
+ data.tar.gz: 065b4e123527b960e8874d654660e170c94a172e998f270c5f8e0f7db32bdc1a
5
5
  SHA512:
6
- metadata.gz: bf831afa4b0ae268dad0bc223aacdc3fdfdd8a525bd01a971cf8def98bcd72b8b10e87ae8e6a03409a315820f6d35c21631f10a59fa7bbe24339451058635092
7
- data.tar.gz: 0f26812a7823a952373f4c13d1bf4da587e07ff17091e630badc613d84e808bea4ff23f0187f163cb5d3ddf396d97e86847831d36ba73fd46765f396ae6af2a8
6
+ metadata.gz: f4786d59a399fb0f5970ce6349b39772d570711bc34947a46a352b1618dfad6355074e8a6d1e3a4e83fe89fc40eec22d506eca615c92ee0c2133b133b1986e3e
7
+ data.tar.gz: 4df41a168d9008563d9602dd3b2e19b3e89a7d864258d4ffd91b028d05870b7fda6a9701974a38e2d05e9abaef8294bd3d13992046bc0db197c6da68215d15ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vsphere-automation-runtime (0.4.2)
4
+ vsphere-automation-runtime (0.4.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  The Ruby gem for the vSphere Runtime API
4
4
 
5
5
  - API version: 2.0.0
6
- - Package version: 0.4.2
6
+ - Package version: 0.4.3
7
7
 
8
8
  ## Installation
9
9
 
@@ -142,6 +142,9 @@ module VSphereAutomation
142
142
  path = "/#{path}".gsub(%r{/+}, '/')
143
143
  uri = URI.parse(@config.base_url + path)
144
144
  add_query_params(uri, query_params)
145
+ forced_query_params = path.split('?')[1]
146
+ return URI.join(uri, '?' + forced_query_params) if forced_query_params
147
+
145
148
  uri
146
149
  end
147
150
 
@@ -8,6 +8,6 @@
8
8
 
9
9
  module VSphereAutomation
10
10
  module Runtime
11
- VERSION = '0.4.2'
11
+ VERSION = '0.4.3'
12
12
  end
13
13
  end
@@ -49,6 +49,19 @@ describe VSphereAutomation::ApiClient do
49
49
  expect(a_request(:get, url).with(query: query_params)).to have_been_made
50
50
  end
51
51
 
52
+ it 'keeps query parameters from the path to request' do
53
+ # The specs have some paths that contain query parameters already. This
54
+ # test is to make sure they don't get overwritten.
55
+ key = '~foo'
56
+ value = 'bar'
57
+ query_params = { key => value }
58
+ stub_request(:post, url).with(query: query_params)
59
+
60
+ subject.call_api(:POST, "/test?#{key}=#{value}")
61
+
62
+ expect(a_request(:post, url).with(query: query_params)).to have_been_made
63
+ end
64
+
52
65
  it 'adds form parameters to the request body' do
53
66
  form_params = { 'foo' => 'bar' }
54
67
  body = form_params.to_a.map { |e| e.join('=') }.join('&')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vsphere-automation-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.R. Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubygems_version: 3.0.6
181
+ rubygems_version: 3.0.3
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: A Ruby SDK for the vSphere APIs (Runtime)