specinfra 1.24.0 → 1.25.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 +4 -4
- data/lib/specinfra/backend/powershell/support/find_iis_component.ps1 +70 -9
- data/lib/specinfra/command/windows.rb +28 -0
- data/lib/specinfra/version.rb +1 -1
- data/wercker.yml +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b352bb1e25445757343ee15e75ead3eda56f66a
|
4
|
+
data.tar.gz: 305b731e380663f02ce97123fb40426406c07b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19a4b837e2c13e804b36266baa4f56cf072b7191581c61e8ca4510d7955a796031f0842d4c940ea5b8ff58c4c98d53d89d93cec79f28d8362bf015bb9b952f03
|
7
|
+
data.tar.gz: 831a8f49b9443373fe16003d8c866be9cde69bc3e642a9310d83cb02414787efbf0d65e6eb160195bc2f7fc077cca435c51bdd521e2125852e3cb1be53040913
|
@@ -1,19 +1,80 @@
|
|
1
1
|
function FindIISWebsite
|
2
2
|
{
|
3
3
|
param($name)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
|
5
|
+
Import-Module WebAdministration
|
6
|
+
|
7
|
+
Try {
|
8
|
+
Get-Item "IIS:\Sites\$name" -Erroraction silentlycontinue
|
9
|
+
}
|
10
|
+
Catch [System.IO.FileNotFoundException] {
|
11
|
+
Get-Item "IIS:\Sites\$name" -Erroraction silentlycontinue
|
12
|
+
}
|
12
13
|
}
|
13
14
|
|
14
15
|
function FindIISAppPool
|
15
16
|
{
|
16
17
|
param($name)
|
17
|
-
|
18
|
+
|
19
|
+
Import-Module WebAdministration
|
20
|
+
|
18
21
|
Get-Item "IIS:\AppPools\$name" -Erroraction silentlycontinue
|
22
|
+
}
|
23
|
+
|
24
|
+
function FindSiteBindings
|
25
|
+
{
|
26
|
+
param($name, $protocol, $hostHeader, $port, $ipAddress)
|
27
|
+
|
28
|
+
Import-Module WebAdministration
|
29
|
+
|
30
|
+
Get-WebBinding -Name $name -Protocol $protocol -HostHeader $hostHeader -Port $port -IPAddress $ipAddress
|
31
|
+
}
|
32
|
+
|
33
|
+
function FindSiteVirtualDir
|
34
|
+
{
|
35
|
+
param($name, $vdir, $path)
|
36
|
+
|
37
|
+
Import-Module WebAdministration
|
38
|
+
|
39
|
+
$webVirtDirPath = [string]::Format('IIS:\Sites\{0}\{1}',$name, $vdir);
|
40
|
+
if (Test-Path $webVirtDirPath)
|
41
|
+
{
|
42
|
+
if ([string]::IsNullOrEmpty($path))
|
43
|
+
{
|
44
|
+
$true
|
45
|
+
}
|
46
|
+
else
|
47
|
+
{
|
48
|
+
(Get-Item $webVirtDirPath).physicalPath -eq $path
|
49
|
+
}
|
50
|
+
}
|
51
|
+
else
|
52
|
+
{
|
53
|
+
$false
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
function FindSiteApplication
|
58
|
+
{
|
59
|
+
param($name, $app, $pool, $physicalPath)
|
60
|
+
|
61
|
+
Import-Module WebAdministration
|
62
|
+
|
63
|
+
$path = "IIS:\Sites\${name}\${app}"
|
64
|
+
$result = $false
|
65
|
+
if (Test-Path $path)
|
66
|
+
{
|
67
|
+
$result = $true
|
68
|
+
if ([string]::IsNullOrEmpty($pool) -eq $false)
|
69
|
+
{
|
70
|
+
$result = $result -and (Get-Item $path).applicationPool -eq $pool
|
71
|
+
}
|
72
|
+
|
73
|
+
if ([string]::IsNullOrEmpty($physicalPath) -eq $false)
|
74
|
+
{
|
75
|
+
$result = $result -and (Get-Item $path).physicalPath -eq $physicalPath
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
$result
|
19
80
|
}
|
@@ -290,6 +290,27 @@ module SpecInfra
|
|
290
290
|
exec "[System.Environment]::ExpandEnvironmentVariables( ( FindIISWebsite -name '#{name}' ).physicalPath ).replace('\\', '/' ) -eq ('#{path}'.trimEnd('/').replace('\\', '/'))"
|
291
291
|
end
|
292
292
|
end
|
293
|
+
|
294
|
+
def check_iis_website_binding(name, port, protocol, ipAddress, hostHeader)
|
295
|
+
Backend::PowerShell::Command.new do
|
296
|
+
using 'find_iis_component.ps1'
|
297
|
+
exec "(FindSiteBindings -name '#{name}' -protocol '#{protocol}' -hostHeader '#{hostHeader}' -port #{port} -ipAddress '#{ipAddress}').count -gt 0"
|
298
|
+
end
|
299
|
+
end
|
300
|
+
|
301
|
+
def check_iis_website_virtual_dir(name, vdir, path)
|
302
|
+
Backend::PowerShell::Command.new do
|
303
|
+
using 'find_iis_component.ps1'
|
304
|
+
exec "(FindSiteVirtualDir -name '#{name}' -vdir '#{vdir}' -path '#{path}') -eq $true"
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
def check_iis_website_application(name, app, pool, physicalPath)
|
309
|
+
Backend::PowerShell::Command.new do
|
310
|
+
using 'find_iis_component.ps1'
|
311
|
+
exec "(FindSiteApplication -name '#{name}' -app '#{app}' -pool '#{pool}' -physicalPath '#{physicalPath}') -eq $true"
|
312
|
+
end
|
313
|
+
end
|
293
314
|
|
294
315
|
def check_iis_app_pool(name)
|
295
316
|
Backend::PowerShell::Command.new do
|
@@ -312,6 +333,13 @@ module SpecInfra
|
|
312
333
|
end
|
313
334
|
end
|
314
335
|
|
336
|
+
def check_managed_pipeline_mode(name, mode)
|
337
|
+
Backend::PowerShell::Command.new do
|
338
|
+
using 'find_iis_component.ps1'
|
339
|
+
exec "(FindIISAppPool -name '#{name}').managedPipelineMode -eq '#{mode}'"
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
315
343
|
def check_idle_timeout(name, minutes)
|
316
344
|
Backend::PowerShell::Command.new do
|
317
345
|
using 'find_iis_component.ps1'
|
data/lib/specinfra/version.rb
CHANGED
data/wercker.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
box: mizzy/serverspec-base
|
1
|
+
box: mizzy/serverspec-base@0.0.2
|
2
2
|
build:
|
3
3
|
steps:
|
4
4
|
- script:
|
@@ -35,16 +35,16 @@ build:
|
|
35
35
|
code: rake spec:centos65
|
36
36
|
cwd: $WORKING_DIR
|
37
37
|
- script:
|
38
|
-
name: Run vagrant up
|
39
|
-
code: vagrant up
|
38
|
+
name: Run vagrant up ubuntu1404
|
39
|
+
code: vagrant up ubuntu1404 --provider=digital_ocean
|
40
40
|
cwd: $WORKING_DIR
|
41
41
|
- script:
|
42
|
-
name: Run vagrant reload
|
43
|
-
code: vagrant reload
|
42
|
+
name: Run vagrant reload ubuntu1404
|
43
|
+
code: vagrant reload ubuntu1404
|
44
44
|
cwd: $WORKING_DIR
|
45
45
|
- script:
|
46
|
-
name: Run rake spec:
|
47
|
-
code: rake spec:
|
46
|
+
name: Run rake spec:ubuntu1404
|
47
|
+
code: rake spec:ubuntu1404
|
48
48
|
cwd: $WORKING_DIR
|
49
49
|
|
50
50
|
after-steps:
|
@@ -53,8 +53,8 @@ build:
|
|
53
53
|
code: vagrant destroy centos65 --force
|
54
54
|
cwd: $WORKING_DIR
|
55
55
|
- script:
|
56
|
-
name: Run vagrant destroy
|
57
|
-
code: vagrant destroy
|
56
|
+
name: Run vagrant destroy ubuntu1404
|
57
|
+
code: vagrant destroy ubuntu1404 --force
|
58
58
|
cwd: $WORKING_DIR
|
59
59
|
- 1syo/idobata-notify@0.1.1:
|
60
60
|
token: $IDOBATA_TOKEN
|
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: 1.
|
4
|
+
version: 1.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|