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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 563dc4afc43f55acb9a8730e85c36eb056bf8659
4
- data.tar.gz: 7cd1b95d64942372852164ae4a9d46d7b29eb102
3
+ metadata.gz: bc9e9d7665729a03331b9df0eb593c0eac98cd4f
4
+ data.tar.gz: 051f3872d7e61a010c9a7f3df03a7fd100f66f13
5
5
  SHA512:
6
- metadata.gz: bfd135e158d35ff715734115ba2185762d680b397e4488bb7d3afa4ff19a7c8cb64b58f244512d9c4d12d60f8822c349bc02e8dcc308cff5c9b3bac59e1006e3
7
- data.tar.gz: f32e242fe52fdb7596de59cf6d792f7097fd3b9a514e80204b608219b6f7799c15cd4f6f73db7b71d8c0c24797cfced5ceae64232ad5f68366c9db91ccab7b27
6
+ metadata.gz: 0fb315d6bfcfa59ecd74223d01c072e280998b052e39fde2ed3c5db0733ec092db4b11df841850c65b9c6d55126be3699d2ce5a877c52db21f771419245e024f
7
+ data.tar.gz: e1fb180fe23fe5ccc520b2e8b18c7afe2d01c9a67f2acfd3557514f2ed80e19b2854000e5bcc3ff11392085a919bc268d90818344feee48c35a1d80878d46fb1
@@ -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
 
@@ -23,7 +23,7 @@ require 'passwordmasker'
23
23
  module Vra
24
24
  # rubocop:disable ClassLength
25
25
  class Client
26
- attr_accessor :bearer_token, :page_size
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,
@@ -17,5 +17,5 @@
17
17
  #
18
18
 
19
19
  module Vra
20
- VERSION = '1.3.0'
20
+ VERSION = '1.4.0'
21
21
  end
@@ -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.value = '12345'
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.value = '12345'
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.value).to eq '12345'
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.3.0
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-12 00:00:00.000000000 Z
11
+ date: 2015-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client