lib/specinfra/command/windows/base/iis_website.rb in specinfra-2.0.0.beta23 vs lib/specinfra/command/windows/base/iis_website.rb in specinfra-2.0.0.beta24
- old
+ new
@@ -32,7 +32,28 @@
Backend::PowerShell::Command.new do
using 'find_iis_component.ps1'
exec "[System.Environment]::ExpandEnvironmentVariables( ( FindIISWebsite -name '#{name}' ).physicalPath ).replace('\\', '/' ) -eq ('#{path}'.trimEnd('/').replace('\\', '/'))"
end
end
+
+ def check_has_site_bindings(name, port, protocol, ipaddress, host_header)
+ Backend::PowerShell::Command.new do
+ using 'find_iis_component.ps1'
+ exec "(FindSiteBindings -name '#{name}' -protocol '#{protocol}' -hostHeader '#{host_header}' -port #{port} -ipAddress '#{ipaddress}').count -gt 0"
+ end
+ end
+
+ def check_has_virtual_dir(name, vdir, path)
+ Backend::PowerShell::Command.new do
+ using 'find_iis_component.ps1'
+ exec "(FindSiteVirtualDir -name '#{name}' -vdir '#{vdir}' -path '#{path}') -eq $true"
+ end
+ end
+
+ def check_has_site_application(name, app, pool, physical_path)
+ Backend::PowerShell::Command.new do
+ using 'find_iis_component.ps1'
+ exec "(FindSiteApplication -name '#{name}' -app '#{app}' -pool '#{pool}' -physicalPath '#{physical_path}') -eq $true"
+ end
+ end
end
end