vmware-vra 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/vra/client.rb +9 -1
- data/lib/vra/version.rb +1 -1
- data/spec/client_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc9e9d7665729a03331b9df0eb593c0eac98cd4f
|
4
|
+
data.tar.gz: 051f3872d7e61a010c9a7f3df03a7fd100f66f13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fb315d6bfcfa59ecd74223d01c072e280998b052e39fde2ed3c5db0733ec092db4b11df841850c65b9c6d55126be3699d2ce5a877c52db21f771419245e024f
|
7
|
+
data.tar.gz: e1fb180fe23fe5ccc520b2e8b18c7afe2d01c9a67f2acfd3557514f2ed80e19b2854000e5bcc3ff11392085a919bc268d90818344feee48c35a1d80878d46fb1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## v1.4.0
|
2
|
+
* [pr#14](https://github.com/chef-partners/vmware-vra-gem/pull/14) Adding appropriate methods for managing the bearer_token
|
3
|
+
|
1
4
|
## v1.3.0
|
2
5
|
* [pr#13](https://github.com/chef-partners/vmware-vra-gem/pull/13) Additional methods to support a vRA driver for Chef Provisioning
|
3
6
|
|
data/lib/vra/client.rb
CHANGED
@@ -23,7 +23,7 @@ require 'passwordmasker'
|
|
23
23
|
module Vra
|
24
24
|
# rubocop:disable ClassLength
|
25
25
|
class Client
|
26
|
-
attr_accessor :
|
26
|
+
attr_accessor :page_size
|
27
27
|
|
28
28
|
def initialize(opts)
|
29
29
|
@base_url = opts[:base_url]
|
@@ -59,6 +59,14 @@ module Vra
|
|
59
59
|
# client methods
|
60
60
|
#
|
61
61
|
|
62
|
+
def bearer_token
|
63
|
+
@bearer_token.value
|
64
|
+
end
|
65
|
+
|
66
|
+
def bearer_token=(value)
|
67
|
+
@bearer_token.value = value
|
68
|
+
end
|
69
|
+
|
62
70
|
def bearer_token_request_body
|
63
71
|
{
|
64
72
|
'username' => @username,
|
data/lib/vra/version.rb
CHANGED
data/spec/client_spec.rb
CHANGED
@@ -46,7 +46,7 @@ describe Vra::Client do
|
|
46
46
|
describe '#request_headers' do
|
47
47
|
context 'when bearer token exists' do
|
48
48
|
it 'has an Authorization header' do
|
49
|
-
client.bearer_token
|
49
|
+
client.bearer_token = '12345'
|
50
50
|
expect(client.request_headers.key?('Authorization')).to be true
|
51
51
|
end
|
52
52
|
end
|
@@ -101,7 +101,7 @@ describe Vra::Client do
|
|
101
101
|
|
102
102
|
context 'when token exists' do
|
103
103
|
before(:each) do
|
104
|
-
client.bearer_token
|
104
|
+
client.bearer_token = '12345'
|
105
105
|
end
|
106
106
|
|
107
107
|
url = '/identity/api/tokens/12345'
|
@@ -153,7 +153,7 @@ describe Vra::Client do
|
|
153
153
|
|
154
154
|
client.generate_bearer_token
|
155
155
|
|
156
|
-
expect(client.bearer_token
|
156
|
+
expect(client.bearer_token).to eq '12345'
|
157
157
|
end
|
158
158
|
end
|
159
159
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmware-vra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Leff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|