octopus-serverspec-extensions 0.17.3 → 0.18.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
  SHA256:
3
- metadata.gz: 631aadbecd2bac8e048796a63248aa9831e765893dbffa5b65aaaf6231bde0bd
4
- data.tar.gz: 0bb1544494ca85393d5c0548251cfc8a33612b28210095d8449f541b8e9a969c
3
+ metadata.gz: c9ffaa67b8ec1ef39a35ddcb48371c502f6166e984c609a150413554617b2688
4
+ data.tar.gz: 941cf2db9d4cf04047362bc02e7fea479265c9ad119719a373b4c7d717a7721a
5
5
  SHA512:
6
- metadata.gz: 3bdf323f43aa87e1d12319d3dd8eaac647c98e35ed2dabd3731c6f3df75fb2a91916c73c5f7a7c3acb37e9a8923154de6f323a0dd538db0347f6ee2a5a608923
7
- data.tar.gz: 27dbff2822eceaec3f7466556251c22af9f2dd9a1715348ece9c9ce768d4d8e900c49e5374b2417894859d9a2017d3a3028e2a1c766ff545f57a2a0aab2fe596
6
+ metadata.gz: 45111168c31eb779c6f473b524e2c6fe98dfa21c631a327bb29d4feb5106d861475136201aec20aa07f4d0af9a0d689f5f0cc300e72043b1f0da25e2b206c818
7
+ data.tar.gz: 025b5cc4a4d645335ebbce61add6d0b5986e7aec3bbebc4c75d0c1bb40ae43e6c6878cb5a698faf5ea47d263728eb5a1bb410dfd98719c85e4707d56b3044a65
@@ -13,11 +13,16 @@ module Serverspec::Type
13
13
  command_result.stdout.gsub(/\n/, '').match /Get-DSCConfiguration succeeded/
14
14
  end
15
15
 
16
- def has_applied_dsc_configuration_successfully?
16
+ def return_true_for_test_dsc_configuration?
17
17
  command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; $state = ""; do { $state = (Get-DscLocalConfigurationManager).LCMState; write-host "LCM state is $state"; Start-Sleep -Seconds 2; } while ($state -ne "Idle"); try { if (-not (Test-DSCConfiguration -ErrorAction Stop)) { write-output "Test-DSCConfiguration returned false"; exit 1 } write-output "Test-DSCConfiguration succeeded"; exit 0 } catch { write-output "Test-DSCConfiguration failed"; write-output $_; exit 2 }')
18
18
  command_result.stdout.gsub(/\n/, '').match /Test-DSCConfiguration succeeded/
19
19
  end
20
20
 
21
+ def has_test_dsc_configuration_return_success?
22
+ command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; try { $statuses = @(Get-DSCConfigurationStatus -ErrorAction Stop -All); $status = $statuses[0].Status; write-host "Get-DSCConfigurationStatus is \'$status\'"; if ($status -eq "Success") { exit 0 } else { exit 1 } } catch { write-output "Get-DSCConfigurationStatus failed"; write-output $_; exit 2; }')
23
+ command_result.stdout.gsub(/\n/, '').match /Get-DSCConfigurationStatus is 'Success'/
24
+ end
25
+
21
26
  def to_s
22
27
  "Windows DSC"
23
28
  end
@@ -1,3 +1,3 @@
1
1
  module OctopusServerSpecExtensions
2
- VERSION = "0.17.3"
2
+ VERSION = "0.18.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopus-serverspec-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.3
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Richardson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-12 00:00:00.000000000 Z
11
+ date: 2020-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: serverspec