specinfra 2.19.2 → 2.19.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77242905a70512dc47b7ca8c28e7febd18cf91d8
4
- data.tar.gz: 71cf440c0549c5f08e659fb3d6a45ee599c2559e
3
+ metadata.gz: 65edb36210c9509bf45cb93c1482f00ef3694c58
4
+ data.tar.gz: 478b31d70f28ae90cbcb1a086214e1edca6b493b
5
5
  SHA512:
6
- metadata.gz: 0f2aa107b5badfd6010e1b36d50f5ca424802fad7054216650171c8ae0373013224b2dfec2887fbf6c3a748b5792cca54c85096c7fb1c9b620d1d7cc20c6c209
7
- data.tar.gz: 3ba44715cd89f879d630cfaa7b1ef2809b4524036b68dd2618c68089d743dbba687cf55f96634dff2a4fb4b0caed3818f3173928d862bdad360d3c665030eb52
6
+ metadata.gz: 56a05e3f6432cb6dc09a4950012e79445bb755ebd05ea73fcdd9f8176ca29a1bcfbbee1f6eb0f23efba92ee0be5a209fcfd4fa1d935c95e15c77bba9819f94b7
7
+ data.tar.gz: 35e90405016975cbb90c8ea986b521395d4222e65f47c3752b4179bfb4241d1c2382d005789b1720206b7af61a9c0ddc61dea01b2b22bffde526a6e9935dce33
@@ -3,9 +3,8 @@ class Specinfra::Helper::DetectOs::Esxi < Specinfra::Helper::DetectOs
3
3
  if run_command('vmware -v').success?
4
4
  line = run_command('vmware -v').stdout
5
5
  if line =~ /VMware ESXi (.*)/
6
- release = $1
6
+ { :family => 'esxi', :release => $1 }
7
7
  end
8
- { :family => 'esxi', :release => release }
9
8
  end
10
9
  end
11
10
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.19.2"
2
+ VERSION = "2.19.3"
3
3
  end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+ require 'specinfra/helper/detect_os/esxi'
3
+
4
+ describe Specinfra::Helper::DetectOs::Esxi do
5
+ it 'Should return esxi when esxi is installed.' do
6
+ allow(Specinfra::Helper::DetectOs::Esxi).to receive(:run_command) { CommandResult.new(:stdout => 'VMware ESXi 5.0.0 build-123445', :exit_status => 0) }
7
+ expect(Specinfra::Helper::DetectOs::Esxi.detect).to include(:family => 'esxi', :release => '5.0.0 build-123445')
8
+ end
9
+
10
+ it 'Should not return esxi when VMware Workstation is installed.' do
11
+ allow(Specinfra::Helper::DetectOs::Esxi).to receive(:run_command) { CommandResult.new(:stdout => 'VMware Workstation', :exit_status => 0) }
12
+ expect(Specinfra::Helper::DetectOs::Esxi.detect).to be_nil
13
+ end
14
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.2
4
+ version: 2.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -391,6 +391,7 @@ files:
391
391
  - spec/command/redhat7/service_spec.rb
392
392
  - spec/command/ubuntu/ppa_spec.rb
393
393
  - spec/configuration_spec.rb
394
+ - spec/helper/detect_os/esxi_spec.rb
394
395
  - spec/helper/os_spec.rb
395
396
  - spec/helper/properties_spec.rb
396
397
  - spec/helper/set_spec.rb
@@ -450,6 +451,7 @@ test_files:
450
451
  - spec/command/redhat7/service_spec.rb
451
452
  - spec/command/ubuntu/ppa_spec.rb
452
453
  - spec/configuration_spec.rb
454
+ - spec/helper/detect_os/esxi_spec.rb
453
455
  - spec/helper/os_spec.rb
454
456
  - spec/helper/properties_spec.rb
455
457
  - spec/helper/set_spec.rb