vsphere-automation-runtime 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/vsphere-automation-runtime/api_client.rb +3 -0
- data/lib/vsphere-automation-runtime/version.rb +1 -1
- data/pkg/vsphere-automation-runtime-0.4.2.gem +0 -0
- data/spec/api_client_spec.rb +13 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7917a709ed7c07abb03fd5d416bc813cb9c040bc18ca4ca63ecb2099d2a38ffc
|
4
|
+
data.tar.gz: 065b4e123527b960e8874d654660e170c94a172e998f270c5f8e0f7db32bdc1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4786d59a399fb0f5970ce6349b39772d570711bc34947a46a352b1618dfad6355074e8a6d1e3a4e83fe89fc40eec22d506eca615c92ee0c2133b133b1986e3e
|
7
|
+
data.tar.gz: 4df41a168d9008563d9602dd3b2e19b3e89a7d864258d4ffd91b028d05870b7fda6a9701974a38e2d05e9abaef8294bd3d13992046bc0db197c6da68215d15ca
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -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
|
|
Binary file
|
data/spec/api_client_spec.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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)
|