octopus-serverspec-extensions 0.12.2 → 0.13.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 180513c90df8315a4711115fa70c09959f4caf48
|
4
|
+
data.tar.gz: 33687667fc4c37c49df29a1d41d5de104ffc0c33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eda0eb511245d03c0ca1271c6be045e0fcc47cd84043cabd20d7cdfb16c2d8c87c9b5de6f24ee44dbcbb1c5aa5c4294f99a1e147b3a4653895f7baac8930d89
|
7
|
+
data.tar.gz: ff089f43593cc97d396e2cf6ef0721f20873681ada3c04a4ca2f98977b6638ff6612a9d1d2a15114aaaae0f5464a75fbd89dd63c980787f238e7831e8838824a
|
@@ -3,6 +3,7 @@ require 'octopus_serverspec_extensions/type/npm_package.rb'
|
|
3
3
|
require 'octopus_serverspec_extensions/type/java_property_file.rb'
|
4
4
|
require 'octopus_serverspec_extensions/type/octopus_deploy_tentacle.rb'
|
5
5
|
require 'octopus_serverspec_extensions/type/octopus_deploy_environment.rb'
|
6
|
+
require 'octopus_serverspec_extensions/type/windows_dsc.rb'
|
6
7
|
require 'octopus_serverspec_extensions/type/windows_firewall.rb'
|
7
8
|
require 'octopus_serverspec_extensions/type/windows_scheduled_task.rb'
|
8
9
|
require 'octopus_serverspec_extensions/matcher/have_version.rb'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'serverspec'
|
2
|
+
require 'serverspec/type/base'
|
3
|
+
|
4
|
+
module Serverspec::Type
|
5
|
+
class WindowsDSC < Base
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@runner = Specinfra::Runner
|
9
|
+
end
|
10
|
+
|
11
|
+
def able_to_get_dsc_configuration?(port)
|
12
|
+
command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; try { Get-DSCConfiguration -Force -ErrorAction Stop; write-output "Get-DSCConfiguration succeeded"; $true } catch { write-output "Get-DSCConfiguration failed"; write-output $_; $false }')
|
13
|
+
command_result.stdout.gsub(/\n/, '').match /Get-DSCConfiguration succeeded/
|
14
|
+
end
|
15
|
+
|
16
|
+
def able_to_test_dsc_configuration?(port)
|
17
|
+
command_result = @runner.run_command('$ProgressPreference = "SilentlyContinue"; try { if (-not (Test-DSCConfiguration -Force -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
|
+
command_result.stdout.gsub(/\n/, '').match /Test-DSCConfiguration succeeded/
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_s
|
22
|
+
"Windows DSC"
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
def windows_dsc
|
28
|
+
WindowsDSC.new
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
include Serverspec::Type
|
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.
|
4
|
+
version: 0.13.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: 2017-11-
|
11
|
+
date: 2017-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serverspec
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- lib/octopus_serverspec_extensions/type/npm_package.rb
|
149
149
|
- lib/octopus_serverspec_extensions/type/octopus_deploy_environment.rb
|
150
150
|
- lib/octopus_serverspec_extensions/type/octopus_deploy_tentacle.rb
|
151
|
+
- lib/octopus_serverspec_extensions/type/windows_dsc.rb
|
151
152
|
- lib/octopus_serverspec_extensions/type/windows_firewall.rb
|
152
153
|
- lib/octopus_serverspec_extensions/type/windows_scheduled_task.rb
|
153
154
|
- lib/octopus_serverspec_extensions/version.rb
|