vcloud-core 2.0.0 → 2.0.1

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: d075c4e72f92d0b54e3855234a88de8ff0ee55b0
4
- data.tar.gz: 74c3dc522565a4c094012af88a199444522e0574
3
+ metadata.gz: c55d3be7b7b760212aaabfee1dfef3a0f9c83b1d
4
+ data.tar.gz: 375eea438b8daffe3af203b3b7875b8748fabec5
5
5
  SHA512:
6
- metadata.gz: c4c2953770b997c143a2e1b253f6fef898c50465021f74e58c00c0847de3fec21391c087db89fc826fdb440e7e72d6ebf4a49c825dc78573b13d0e4f663e361c
7
- data.tar.gz: 5c6b1a96ee539135e3697a23bda3575202ff0948c7775a1b6eefe9c86aa9c77d68fcec0581f1246e58738b921af63158e07e1c5af48cccaf29aa3196ff96cf52
6
+ metadata.gz: 112673e5157e732b33ba08d23c3d20b6ef31487ae126076b7d48eeeb0bfc29d69ce552cf5d53faf2274551d225960b4f7b3cd0113f635a7054b32a3573767e1e
7
+ data.tar.gz: e3ed4655ed88caeae05f7236e29495b4818ea11b00e3bf41970d8d573452591c0be062b969da95041c140c9b419fd92b20d1a4f97b1fa65caf0a2f6ff2697efc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.0.1 (2017-06-09)
2
+
3
+ - Bug fix related to the `last_comment` method being removed in Rake
4
+ - Pinned nokogiri to work with Ruby 2.0
5
+ - Upgraded rspec
6
+ - Various bug fixes
7
+
1
8
  ## 2.0.0 (2015-12-24)
2
9
 
3
10
  - Remove support for Ruby 1.9.3, which is now end-of-life.
data/CONTRIBUTING.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Contributing to vCloud Core
2
2
 
3
- We really welcome contributions.
3
+ We now consider vCloud Tools feature complete for our purposes. We'd be happy to consider pull requests for new features but please discuss them with us in the issues first so we can let you know if it's something we'd be likely to merge. We will continue to make maintenance and bug fixes.
4
4
 
5
5
  ## Issues list
6
6
 
@@ -40,11 +40,7 @@ Issues we know about are [listed here](https://github.com/gds-operations/vcloud-
40
40
 
41
41
  ## How soon will we respond?
42
42
 
43
- We will comment on your pull request within two working days. However, we might not be able to review it immediately.
44
-
45
- We may come back to you with comments and suggestions, and if we would like you to make changes, we will close the pull request as well as adding details of the changes we'd like you to make.
46
-
47
- If you feel your pull request has been outstanding too long, please feel free to bump it by making a comment on it.
43
+ We will comment on your issue as soon as we can. If you feel your issue is important, please feel free to bump it by making a comment on it or raise your issue on the [mailing list](https://groups.google.com/a/digital.cabinet-office.gov.uk/forum/#!forum/vcloud-tools).
48
44
 
49
45
  ## Guidelines for making a pull request
50
46
 
data/README.md CHANGED
@@ -148,10 +148,7 @@ default: # This is the fog credential that refers to your testing environment, e
148
148
  network_1: # The name of the primary network
149
149
  network_1_ip: # The IP address of the primary network
150
150
  ````
151
+
151
152
  ## Contributing
152
153
 
153
- 1. Fork it
154
- 2. Create your feature branch (`git checkout -b my-new-feature`)
155
- 3. Commit your changes (`git commit -am 'Add some feature'`)
156
- 4. Push to the branch (`git push origin my-new-feature`)
157
- 5. Create new Pull Request
154
+ Please see [CONTRIBUTING.md](/CONTRIBUTING.md).
@@ -49,8 +49,6 @@ module Vcloud
49
49
  pass
50
50
  end
51
51
 
52
- private
53
-
54
52
  # Check whether a plaintext password is in the Fog config
55
53
  # file
56
54
  #
@@ -164,6 +164,10 @@ module Vcloud
164
164
  running?
165
165
  end
166
166
 
167
+ def self.id_prefix
168
+ 'vapp'
169
+ end
170
+
167
171
  private
168
172
  def running?
169
173
  raise "Cannot call running? on a missing vApp." unless id
@@ -171,7 +175,7 @@ module Vcloud
171
175
  vapp[:status].to_i == STATUS::RUNNING ? true : false
172
176
  end
173
177
 
174
- def self.build_network_config(networks)
178
+ def build_network_config(networks)
175
179
  return {} unless networks
176
180
  instantiation = { NetworkConfigSection: {NetworkConfig: []} }
177
181
  networks.compact.each do |network|
@@ -186,14 +190,11 @@ module Vcloud
186
190
  instantiation
187
191
  end
188
192
 
189
- def self.id_prefix
190
- 'vapp'
191
- end
192
-
193
- def self.get_networks(network_names, vdc_name)
193
+ def get_networks(network_names, vdc_name)
194
194
  fsi = Vcloud::Core::Fog::ServiceInterface.new
195
195
  fsi.find_networks(network_names, vdc_name) if network_names
196
196
  end
197
+
197
198
  end
198
199
  end
199
200
  end
@@ -1,5 +1,5 @@
1
1
  module Vcloud
2
2
  module Core
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
@@ -195,6 +195,10 @@ module Vcloud
195
195
  })
196
196
  end
197
197
 
198
+ def self.id_prefix
199
+ 'vm'
200
+ end
201
+
198
202
  private
199
203
 
200
204
  def virtual_hardware_section
@@ -216,11 +220,6 @@ module Vcloud
216
220
  end
217
221
  end
218
222
 
219
- def self.id_prefix
220
- 'vm'
221
- end
222
-
223
223
  end
224
-
225
224
  end
226
225
  end
@@ -39,39 +39,39 @@ module Vcloud
39
39
  context "it supports all the vCloud entity types our tools need" do
40
40
 
41
41
  it "supports the vApp entity type" do
42
- expect(@query_types.include?("vApp")).to be_true
42
+ expect(@query_types.include?("vApp")).to be true
43
43
  end
44
44
 
45
45
  it "supports the vm entity type" do
46
- expect(@query_types.include?("vm")).to be_true
46
+ expect(@query_types.include?("vm")).to be true
47
47
  end
48
48
 
49
49
  it "supports the orgVdc entity type" do
50
- expect(@query_types.include?("orgVdc")).to be_true
50
+ expect(@query_types.include?("orgVdc")).to be true
51
51
  end
52
52
 
53
53
  it "supports the orgVdcNetwork entity type" do
54
- expect(@query_types.include?("orgVdcNetwork")).to be_true
54
+ expect(@query_types.include?("orgVdcNetwork")).to be true
55
55
  end
56
56
 
57
57
  it "supports the edgeGateway entity type" do
58
- expect(@query_types.include?("edgeGateway")).to be_true
58
+ expect(@query_types.include?("edgeGateway")).to be true
59
59
  end
60
60
 
61
61
  it "supports the task entity type" do
62
- expect(@query_types.include?("task")).to be_true
62
+ expect(@query_types.include?("task")).to be true
63
63
  end
64
64
 
65
65
  it "supports the catalog entity type" do
66
- expect(@query_types.include?("catalog")).to be_true
66
+ expect(@query_types.include?("catalog")).to be true
67
67
  end
68
68
 
69
69
  it "supports the catalogItem entity type" do
70
- expect(@query_types.include?("catalogItem")).to be_true
70
+ expect(@query_types.include?("catalogItem")).to be true
71
71
  end
72
72
 
73
73
  it "supports the vAppTemplate entity type" do
74
- expect(@query_types.include?("vAppTemplate")).to be_true
74
+ expect(@query_types.include?("vAppTemplate")).to be true
75
75
  end
76
76
 
77
77
  end
@@ -89,7 +89,7 @@ describe Vcloud::Core::Vapp do
89
89
 
90
90
  it "powers up a powered down Vapp" do
91
91
  expect(Integer(fixture_vapp.vcloud_attributes[:status])).to eq(Vcloud::Core::Vapp::STATUS::POWERED_OFF)
92
- expect(fixture_vapp.power_on).to be_true
92
+ expect(fixture_vapp.power_on).to be true
93
93
  expect(Integer(fixture_vapp.vcloud_attributes[:status])).to eq(Vcloud::Core::Vapp::STATUS::RUNNING)
94
94
  end
95
95
 
data/spec/spec_helper.rb CHANGED
@@ -9,11 +9,13 @@ if ENV['COVERAGE']
9
9
  end
10
10
  end
11
11
 
12
- SimpleCov.adapters.define 'gem' do
13
- add_filter '/spec/'
14
- add_filter '/vendor/'
12
+ if SimpleCov.profiles[:gem].nil?
13
+ SimpleCov.profiles.define 'gem' do
14
+ add_filter '/spec/'
15
+ add_filter '/vendor/'
15
16
 
16
- add_group 'Libraries', '/lib/'
17
+ add_group 'Libraries', '/lib/'
18
+ end
17
19
  end
18
20
 
19
21
  SimpleCov.minimum_coverage(84)
@@ -8,21 +8,21 @@ describe Vcloud::Core::ConfigValidator do
8
8
  data = "hello world"
9
9
  schema = { type: String }
10
10
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
11
- expect(v.valid?).to be_true
11
+ expect(v.valid?).to be true
12
12
  end
13
13
 
14
14
  it "should be ok with type as string 'String'" do
15
15
  data = "hello world"
16
16
  schema = { type: 'String' }
17
17
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
18
- expect(v.valid?).to be_true
18
+ expect(v.valid?).to be true
19
19
  end
20
20
 
21
21
  it "should be ok with type as string 'string'" do
22
22
  data = "hello world"
23
23
  schema = { type: 'string' }
24
24
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
25
- expect(v.valid?).to be_true
25
+ expect(v.valid?).to be true
26
26
  end
27
27
 
28
28
  end
@@ -33,14 +33,14 @@ describe Vcloud::Core::ConfigValidator do
33
33
  data = "hello world"
34
34
  schema = { type: 'string' }
35
35
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
36
- expect(v.valid?).to be_true
36
+ expect(v.valid?).to be true
37
37
  end
38
38
 
39
39
  it "should not validate a number as a basic string" do
40
40
  data = 42
41
41
  schema = { type: 'string' }
42
42
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
43
- expect(v.valid?).to be_false
43
+ expect(v.valid?).to be false
44
44
  end
45
45
 
46
46
  it "should log error with number as a basic string" do
@@ -68,7 +68,7 @@ describe Vcloud::Core::ConfigValidator do
68
68
  data = ""
69
69
  schema = { type: 'string', allowed_empty: true }
70
70
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
71
- expect(v.valid?).to be_true
71
+ expect(v.valid?).to be true
72
72
  end
73
73
 
74
74
  it "should return error for nil value with allowed_empty: true)" do
@@ -82,7 +82,7 @@ describe Vcloud::Core::ConfigValidator do
82
82
  data = "name-1234"
83
83
  schema = { type: 'string', matcher: /^name-\d+$/ }
84
84
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
85
- expect(v.valid?).to be_true
85
+ expect(v.valid?).to be true
86
86
  end
87
87
 
88
88
  it "should return errror with a :matcher regex not matching" do
@@ -106,7 +106,7 @@ describe Vcloud::Core::ConfigValidator do
106
106
  }
107
107
  }
108
108
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
109
- expect(v.valid?).to be_true
109
+ expect(v.valid?).to be true
110
110
  end
111
111
 
112
112
  it "should not validate a bogus hash" do
@@ -119,7 +119,7 @@ describe Vcloud::Core::ConfigValidator do
119
119
  }
120
120
  }
121
121
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
122
- expect(v.valid?).to be_false
122
+ expect(v.valid?).to be false
123
123
  end
124
124
 
125
125
  it "should return correct errors validating a bogus hash" do
@@ -156,7 +156,7 @@ describe Vcloud::Core::ConfigValidator do
156
156
  data = {}
157
157
  schema = { type: 'hash', allowed_empty: true }
158
158
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
159
- expect(v.valid?).to be_true
159
+ expect(v.valid?).to be true
160
160
  end
161
161
 
162
162
  it "should validate ok with a missing parameter, when marked :required => false" do
@@ -171,7 +171,7 @@ describe Vcloud::Core::ConfigValidator do
171
171
  }
172
172
  }
173
173
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
174
- expect(v.valid?).to be_true
174
+ expect(v.valid?).to be true
175
175
  end
176
176
 
177
177
  it "should return error with a missing :required => true param" do
@@ -222,7 +222,7 @@ describe Vcloud::Core::ConfigValidator do
222
222
  },
223
223
  }
224
224
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
225
- expect(v.valid?).to be_true
225
+ expect(v.valid?).to be true
226
226
  end
227
227
 
228
228
  end
@@ -236,7 +236,7 @@ describe Vcloud::Core::ConfigValidator do
236
236
  each_element_is: { type: "string" }
237
237
  }
238
238
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
239
- expect(v.valid?).to be_true
239
+ expect(v.valid?).to be true
240
240
  end
241
241
 
242
242
  it "should validate a bogus array" do
@@ -246,7 +246,7 @@ describe Vcloud::Core::ConfigValidator do
246
246
  each_element_is: { type: "string" }
247
247
  }
248
248
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
249
- expect(v.valid?).to be_false
249
+ expect(v.valid?).to be false
250
250
  end
251
251
 
252
252
  it "should return correct errors validating a bogus array" do
@@ -280,7 +280,7 @@ describe Vcloud::Core::ConfigValidator do
280
280
  data = []
281
281
  schema = { type: 'array', allowed_empty: true }
282
282
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
283
- expect(v.valid?).to be_true
283
+ expect(v.valid?).to be true
284
284
  end
285
285
 
286
286
  end
@@ -303,7 +303,7 @@ describe Vcloud::Core::ConfigValidator do
303
303
  }
304
304
  }
305
305
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
306
- expect(v.valid?).to be_true
306
+ expect(v.valid?).to be true
307
307
  end
308
308
 
309
309
  it "should correctly error on an invalid an array of hashes" do
@@ -351,7 +351,7 @@ describe Vcloud::Core::ConfigValidator do
351
351
  }
352
352
  }
353
353
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
354
- expect(v.valid?).to be_true
354
+ expect(v.valid?).to be true
355
355
  end
356
356
 
357
357
  it "should correctly error on an invalid hash of arrays" do
@@ -373,7 +373,7 @@ describe Vcloud::Core::ConfigValidator do
373
373
  },
374
374
  }
375
375
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
376
- expect(v.valid?).to be_true
376
+ expect(v.valid?).to be true
377
377
  end
378
378
 
379
379
  end
@@ -384,14 +384,14 @@ describe Vcloud::Core::ConfigValidator do
384
384
  data = 2
385
385
  schema = { type: 'string_or_number' }
386
386
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
387
- expect(v.valid?).to be_true
387
+ expect(v.valid?).to be true
388
388
  end
389
389
 
390
390
  it "should correctly validate a String" do
391
391
  data = '2'
392
392
  schema = { type: 'string_or_number' }
393
393
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
394
- expect(v.valid?).to be_true
394
+ expect(v.valid?).to be true
395
395
  end
396
396
 
397
397
  it "should correctly error if not a string or numeric" do
@@ -409,7 +409,7 @@ describe Vcloud::Core::ConfigValidator do
409
409
  data = '192.168.100.100'
410
410
  schema = { type: 'ip_address' }
411
411
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
412
- expect(v.valid?).to be_true
412
+ expect(v.valid?).to be true
413
413
  end
414
414
 
415
415
  it "should correctly error on an invalid IP address" do
@@ -434,14 +434,14 @@ describe Vcloud::Core::ConfigValidator do
434
434
  data = '192.168.100.100/24'
435
435
  schema = { type: 'ip_address_range' }
436
436
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
437
- expect(v.valid?).to be_true
437
+ expect(v.valid?).to be true
438
438
  end
439
439
 
440
440
  it "should return error if network bit value is greater than 32" do
441
441
  data = '192.168.100.100/33'
442
442
  schema = { type: 'ip_address_range' }
443
443
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
444
- expect(v.valid?).to be_false
444
+ expect(v.valid?).to be false
445
445
  expect(v.errors).to eq(["base: 192.168.100.100/33 is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
446
446
  end
447
447
 
@@ -449,7 +449,7 @@ describe Vcloud::Core::ConfigValidator do
449
449
  data = '192.168.100.100/33'
450
450
  schema = { type: 'ip_address_range' }
451
451
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
452
- expect(v.valid?).to be_false
452
+ expect(v.valid?).to be false
453
453
  expect(v.errors).to eq(["base: 192.168.100.100/33 is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
454
454
  end
455
455
 
@@ -457,7 +457,7 @@ describe Vcloud::Core::ConfigValidator do
457
457
  data = '192.168.100./33'
458
458
  schema = { type: 'ip_address_range' }
459
459
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
460
- expect(v.valid?).to be_false
460
+ expect(v.valid?).to be false
461
461
  expect(v.errors).to eq(["base: 192.168.100./33 is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
462
462
  end
463
463
  end
@@ -467,7 +467,7 @@ describe Vcloud::Core::ConfigValidator do
467
467
  it "should validate OK if IP range is '#{data}'" do
468
468
  schema = { type: 'ip_address_range' }
469
469
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
470
- expect(v.valid?).to be_true
470
+ expect(v.valid?).to be true
471
471
  expect(v.errors).to be_empty
472
472
  end
473
473
  end
@@ -476,7 +476,7 @@ describe Vcloud::Core::ConfigValidator do
476
476
  data = 'invalid_ip_range_string'
477
477
  schema = { type: 'ip_address_range' }
478
478
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
479
- expect(v.valid?).to be_false
479
+ expect(v.valid?).to be false
480
480
  expect(v.errors).to eq(["base: invalid_ip_range_string is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
481
481
  end
482
482
  end
@@ -486,7 +486,7 @@ describe Vcloud::Core::ConfigValidator do
486
486
  data = '192.168.100.100-192.168.100.110'
487
487
  schema = { type: 'ip_address_range' }
488
488
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
489
- expect(v.valid?).to be_true
489
+ expect(v.valid?).to be true
490
490
  expect(v.errors).to be_empty
491
491
  end
492
492
 
@@ -494,7 +494,7 @@ describe Vcloud::Core::ConfigValidator do
494
494
  data = '192.168.100-192.168.100.110'
495
495
  schema = { type: 'ip_address_range' }
496
496
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
497
- expect(v.valid?).to be_false
497
+ expect(v.valid?).to be false
498
498
  expect(v.errors).to eq(["base: 192.168.100-192.168.100.110 is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
499
499
  end
500
500
 
@@ -502,7 +502,7 @@ describe Vcloud::Core::ConfigValidator do
502
502
  data = '192.168.100.110-192.168.100'
503
503
  schema = { type: 'ip_address_range' }
504
504
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
505
- expect(v.valid?).to be_false
505
+ expect(v.valid?).to be false
506
506
  expect(v.errors).to eq(["base: 192.168.100.110-192.168.100 is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
507
507
  end
508
508
 
@@ -510,7 +510,7 @@ describe Vcloud::Core::ConfigValidator do
510
510
  data = '200.168.100.99-192.168.100'
511
511
  schema = { type: 'ip_address_range' }
512
512
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
513
- expect(v.valid?).to be_false
513
+ expect(v.valid?).to be false
514
514
  expect(v.errors).to eq(["base: 200.168.100.99-192.168.100 is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
515
515
  end
516
516
 
@@ -518,7 +518,7 @@ describe Vcloud::Core::ConfigValidator do
518
518
  data = '190.168.100.99:192.168.100'
519
519
  schema = { type: 'ip_address_range' }
520
520
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
521
- expect(v.valid?).to be_false
521
+ expect(v.valid?).to be false
522
522
  expect(v.errors).to eq(["base: 190.168.100.99:192.168.100 is not a valid IP address range. Valid values can be IP address, CIDR, IP range, 'Any','internal' and 'external'."])
523
523
  end
524
524
  end
@@ -527,7 +527,7 @@ describe Vcloud::Core::ConfigValidator do
527
527
  data = '190.168.100.99'
528
528
  schema = { type: 'ip_address_range' }
529
529
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
530
- expect(v.valid?).to be_true
530
+ expect(v.valid?).to be true
531
531
  expect(v.errors).to eq([])
532
532
  end
533
533
  end
@@ -550,7 +550,7 @@ describe Vcloud::Core::ConfigValidator do
550
550
  data = 'allow'
551
551
  schema = { type: 'enum', required: false, acceptable_values: ['allow', 'decline', 'none']}
552
552
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
553
- expect(v.valid?).to be_true
553
+ expect(v.valid?).to be true
554
554
  end
555
555
  end
556
556
 
@@ -566,7 +566,7 @@ describe Vcloud::Core::ConfigValidator do
566
566
  it "should validate ok if value is #{boolean_value}" do
567
567
  schema = { type: 'boolean' }
568
568
  v = Vcloud::Core::ConfigValidator.validate(:base, boolean_value, schema)
569
- expect(v.valid?).to be_true
569
+ expect(v.valid?).to be true
570
570
  end
571
571
  end
572
572
  end
@@ -589,7 +589,7 @@ describe Vcloud::Core::ConfigValidator do
589
589
  }
590
590
  }
591
591
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
592
- expect(v.valid?).to be_true
592
+ expect(v.valid?).to be true
593
593
  expect(v.warnings).to eq(["name: is deprecated by 'full_name'"])
594
594
  end
595
595
 
@@ -602,7 +602,7 @@ describe Vcloud::Core::ConfigValidator do
602
602
  }
603
603
  }
604
604
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
605
- expect(v.valid?).to be_true
605
+ expect(v.valid?).to be true
606
606
  expect(v.warnings).to eq(["name: is deprecated by 'full_name'"])
607
607
  end
608
608
 
@@ -615,7 +615,7 @@ describe Vcloud::Core::ConfigValidator do
615
615
  }
616
616
  }
617
617
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
618
- expect(v.valid?).to be_true
618
+ expect(v.valid?).to be true
619
619
  expect(v.warnings).to eq(["name: is deprecated by 'full_name'"])
620
620
  end
621
621
  end
@@ -633,7 +633,7 @@ describe Vcloud::Core::ConfigValidator do
633
633
  }
634
634
  }
635
635
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
636
- expect(v.valid?).to be_false
636
+ expect(v.valid?).to be false
637
637
  expect(v.errors).to eq(["base: missing 'full_name' parameter"])
638
638
  end
639
639
 
@@ -663,7 +663,7 @@ describe Vcloud::Core::ConfigValidator do
663
663
  }
664
664
  }
665
665
  v = Vcloud::Core::ConfigValidator.validate(:base, data, schema)
666
- expect(v.valid?).to be_false
666
+ expect(v.valid?).to be false
667
667
  expect(v.errors).to eq([
668
668
  "name: 123 is not a string",
669
669
  "full_name: 123 is not a string",
@@ -33,7 +33,7 @@ describe Vcloud::Core::MetadataHelper do
33
33
  expect(metadata[:role_name]).to eq('james-bond')
34
34
  expect(metadata[:server_number]).to eq(-10)
35
35
  expect(metadata[:created_at]).to eq(DateTime.parse("2013-12-16T14:30:05.000Z"))
36
- expect(metadata[:daily_shutdown]).to be_false
36
+ expect(metadata[:daily_shutdown]).to be false
37
37
  end
38
38
 
39
39
  it "should skip metadata entry if entry type is not application/vnd.vmware.vcloud.metadata.value+xml" do
@@ -140,7 +140,7 @@ describe Vcloud::Core::Vapp do
140
140
  )
141
141
  expect(@mock_fog_interface).to receive(:power_on_vapp).with(vapp.id)
142
142
  state = vapp.power_on
143
- expect(state).to be_true
143
+ expect(state).to be true
144
144
  end
145
145
 
146
146
  it "should not power on a vapp that is already powered on, but should return true" do
@@ -150,7 +150,7 @@ describe Vcloud::Core::Vapp do
150
150
  )
151
151
  expect(@mock_fog_interface).not_to receive(:power_on_vapp)
152
152
  state = vapp.power_on
153
- expect(state).to be_true
153
+ expect(state).to be true
154
154
  end
155
155
  end
156
156
 
data/vcloud-core.gemspec CHANGED
@@ -25,11 +25,12 @@ Gem::Specification.new do |s|
25
25
  s.add_runtime_dependency 'fog', '~> 1.36.0'
26
26
  s.add_runtime_dependency 'mustache', '~> 0.99.0'
27
27
  s.add_runtime_dependency 'highline'
28
+ s.add_runtime_dependency 'nokogiri', '~> 1.6.8.1'
28
29
  s.add_development_dependency 'gem_publisher', '1.2.0'
29
30
  s.add_development_dependency 'pry'
30
- s.add_development_dependency 'rake'
31
- s.add_development_dependency 'rspec', '~> 2.14.1'
32
- s.add_development_dependency 'rubocop', '~> 0.30.1'
33
- s.add_development_dependency 'simplecov', '~> 0.7.1'
31
+ s.add_development_dependency 'rake', '>= 12'
32
+ s.add_development_dependency 'rspec', '>= 3.6'
33
+ s.add_development_dependency 'rubocop', '~> 0.49.1'
34
+ s.add_development_dependency 'simplecov', '~> 0.14.1'
34
35
  s.add_development_dependency 'vcloud-tools-tester'
35
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcloud-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Infrastructure
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2017-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: nokogiri
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.6.8.1
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 1.6.8.1
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: gem_publisher
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,56 +100,56 @@ dependencies:
86
100
  requirements:
87
101
  - - '>='
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: '12'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - '>='
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
110
+ version: '12'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rspec
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ~>
115
+ - - '>='
102
116
  - !ruby/object:Gem::Version
103
- version: 2.14.1
117
+ version: '3.6'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - ~>
122
+ - - '>='
109
123
  - !ruby/object:Gem::Version
110
- version: 2.14.1
124
+ version: '3.6'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rubocop
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - ~>
116
130
  - !ruby/object:Gem::Version
117
- version: 0.30.1
131
+ version: 0.49.1
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - ~>
123
137
  - !ruby/object:Gem::Version
124
- version: 0.30.1
138
+ version: 0.49.1
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: simplecov
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - ~>
130
144
  - !ruby/object:Gem::Version
131
- version: 0.7.1
145
+ version: 0.14.1
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - ~>
137
151
  - !ruby/object:Gem::Version
138
- version: 0.7.1
152
+ version: 0.14.1
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: vcloud-tools-tester
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -262,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
276
  version: '0'
263
277
  requirements: []
264
278
  rubyforge_project:
265
- rubygems_version: 2.1.11
279
+ rubygems_version: 2.0.14.1
266
280
  signing_key:
267
281
  specification_version: 4
268
282
  summary: Core tools for interacting with VMware vCloud Director