dolphindeploy 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +9 -0
- data/TODO +18 -0
- data/external/DolphinDeploy.IIS.IIS6.dll +0 -0
- data/external/Microsoft.Web.Administration.dll +0 -0
- data/external/TinySharpZip.dll +0 -0
- data/external/adsutil.vbs +2938 -0
- data/external/xunit/HTML.xslt +117 -0
- data/external/xunit/NUnitXml.xslt +121 -0
- data/external/xunit/xunit.console.exe +0 -0
- data/external/xunit/xunit.console.exe.config +21 -0
- data/external/xunit/xunit.console.x86.exe +0 -0
- data/external/xunit/xunit.console.x86.exe.config +21 -0
- data/external/xunit/xunit.dll +0 -0
- data/external/xunit/xunit.dll.tdnet +5 -0
- data/external/xunit/xunit.extensions.dll +0 -0
- data/external/xunit/xunit.extensions.xml +706 -0
- data/external/xunit/xunit.gui.exe +0 -0
- data/external/xunit/xunit.gui.x86.exe +0 -0
- data/external/xunit/xunit.installer.exe +0 -0
- data/external/xunit/xunit.runner.msbuild.dll +0 -0
- data/external/xunit/xunit.runner.tdnet.dll +0 -0
- data/external/xunit/xunit.runner.utility.dll +0 -0
- data/external/xunit/xunit.runner.utility.xml +1048 -0
- data/external/xunit/xunit.xml +2306 -0
- data/lib/IIS/IIS.rb +24 -0
- data/lib/IIS/IIS6.rb +145 -0
- data/lib/IIS/IIS7.rb +20 -0
- data/lib/IIS/IISVersion.rb +7 -0
- data/lib/configured_as/mvc_deployment.rb +174 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.5.1.ReSharper.user +39 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/AppPoolControllerTests.cs +39 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/DolphinDeploy.IIS.IIS6.Tests.csproj +69 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/DolphinDeploy.IIS.IIS6.Tests.csproj.user +6 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/Helper.cs +18 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/Properties/AssemblyInfo.cs +36 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/WebsiteControllerTests.cs +56 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/bin/Debug/DolphinDeploy.IIS.IIS6.Tests.dll +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/bin/Debug/DolphinDeploy.IIS.IIS6.Tests.pdb +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/bin/Debug/DolphinDeploy.IIS.IIS6.dll +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/bin/Debug/DolphinDeploy.IIS.IIS6.pdb +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/bin/Debug/test_site/index.htm +9 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/bin/Debug/xunit.dll +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/bin/Debug/xunit.xml +2306 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/obj/Debug/DolphinDeploy.IIS.IIS6.Tests.csproj.FileListAbsolute.txt +12 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/obj/Debug/DolphinDeploy.IIS.IIS6.Tests.dll +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/obj/Debug/DolphinDeploy.IIS.IIS6.Tests.pdb +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/obj/Debug/ResolveAssemblyReference.cache +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.Tests/test_site/index.htm +9 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.sln +26 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.suo +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/AppPoolController.cs +41 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6.csproj +56 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/IIS6Manager.cs +77 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/Properties/AssemblyInfo.cs +36 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/WebsiteController.cs +101 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/bin/Debug/DolphinDeploy.IIS.IIS6.dll +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/bin/Debug/DolphinDeploy.IIS.IIS6.pdb +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/obj/Debug/DolphinDeploy.IIS.IIS6.csproj.FileListAbsolute.txt +7 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/obj/Debug/DolphinDeploy.IIS.IIS6.dll +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/DolphinDeploy.IIS.IIS6/obj/Debug/DolphinDeploy.IIS.IIS6.pdb +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/BuildScriptCache/1/78fc7364.dat +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/ModuleIds.xml +4 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/NamedArguments/5/4b9722ad.dat +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/PdbInfo/61d4d5326252d9cd7476a391dfbbb2a47481ffa6 +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/ProjectModel/ProjectModel.dat +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/SymbolCache.bin +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/TodoCache/1/78fc7364.dat +0 -0
- data/lib/csharp/DolphinDeploy.IIS.IIS6/_ReSharper.DolphinDeploy.IIS.IIS6/WordIndex/1/72ab4678.dat +0 -0
- data/lib/deploycommandcreator.rb +34 -0
- data/lib/deploymentconfig.rb +15 -0
- data/lib/directory_cleanup.rb +16 -0
- data/lib/dolphindeploy.rb +12 -0
- data/lib/dolphindeploy_rake.rb +36 -0
- data/lib/file_manager.rb +30 -0
- data/lib/unzip.rb +11 -0
- data/spec/IIS/IIS6_spec.rb +24 -0
- data/spec/IIS/IIS_spec.rb +18 -0
- data/spec/config_spec.rb +170 -0
- data/spec/configured_as/mvc_deployment_spec.rb +103 -0
- data/spec/deploycommandcreator_spec.rb +162 -0
- data/spec/dolphindeploy_spec.rb +13 -0
- data/spec/file_manager_spec.rb +20 -0
- data/spec/support/spec_helper.rb +17 -0
- metadata +159 -0
data/lib/IIS/IIS.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'IISVersion'
|
2
|
+
|
3
|
+
class IIS
|
4
|
+
def self.server
|
5
|
+
if(IISVersion.current_version =~ /^6/)
|
6
|
+
require 'IIS6'
|
7
|
+
version = IIS6.new
|
8
|
+
else
|
9
|
+
# Temp
|
10
|
+
require 'IIS6'
|
11
|
+
version = IIS6.new
|
12
|
+
end
|
13
|
+
|
14
|
+
return version
|
15
|
+
end
|
16
|
+
### Will be executed on the local box, might be able to refactor 'server' out.
|
17
|
+
def deploy(server, location, deployment)
|
18
|
+
IIS.server.deploy(server, location, deployment)
|
19
|
+
end
|
20
|
+
|
21
|
+
def set_extra_header(header, deployment)
|
22
|
+
IIS.server.set_extra_header header,deployment
|
23
|
+
end
|
24
|
+
end
|
data/lib/IIS/IIS6.rb
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
$: << 'external'
|
2
|
+
load_assembly 'DolphinDeploy.IIS.IIS6'
|
3
|
+
load_assembly 'System.DirectoryServices'
|
4
|
+
include DolphinDeploy::IIS::IIS6
|
5
|
+
include System::DirectoryServices
|
6
|
+
|
7
|
+
class IIS6
|
8
|
+
def deploy(server, location, deployment)
|
9
|
+
unless apppool_exists?(server, deployment)
|
10
|
+
create_app_pool(server, deployment.site_name) #Server is only so we can pull out correct path to deploy too
|
11
|
+
end
|
12
|
+
|
13
|
+
if(website_exists?(server, deployment))
|
14
|
+
update_website_path(server, location, deployment)
|
15
|
+
else
|
16
|
+
create_website(server, location, deployment)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def website_exists?(server, deployment)
|
21
|
+
website = WebsiteController.new
|
22
|
+
website.server = server
|
23
|
+
website.name = deployment.site_name
|
24
|
+
|
25
|
+
return website.exists
|
26
|
+
end
|
27
|
+
|
28
|
+
def apppool_exists?(server, deployment)
|
29
|
+
app_pool = AppPoolController.new
|
30
|
+
app_pool.server = server
|
31
|
+
app_pool.name = get_app_pool_name(deployment.site_name)
|
32
|
+
|
33
|
+
return app_pool.exists
|
34
|
+
end
|
35
|
+
|
36
|
+
def set_extra_header(server, header, deployment)
|
37
|
+
site = get_website('localhost', deployment)
|
38
|
+
|
39
|
+
header.each do |h|
|
40
|
+
existing_headers = get_existing_headers(site)
|
41
|
+
header_arg = ""
|
42
|
+
|
43
|
+
existing_headers.each {|e| header_arg << "\"#{e}\" "}
|
44
|
+
|
45
|
+
ip = deployment.get_deploy_to_location(server)[0].ipaddress
|
46
|
+
|
47
|
+
cmd = "cscript /nologo external\\adsutil.vbs set w3svc/#{site.name}/ServerBindings \"#{ip}:#{h}\" #{header_arg}"
|
48
|
+
`#{cmd}`
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def create_virtual_directory(name, path, deployment)
|
53
|
+
site = get_website('localhost', deployment)
|
54
|
+
cmd = "cscript /nologo external\\adsutil.vbs CREATE w3svc/#{site.name}/root/#{name} \"IIsWebVirtualDir\""
|
55
|
+
`#{cmd}`
|
56
|
+
|
57
|
+
root_site = get_root_site(site)
|
58
|
+
full_path = File.join(root_site.Properties['Path'][0], path)
|
59
|
+
cmd = "cscript /nologo external\\adsutil.vbs SET w3svc/#{site.name}/root/#{name}/path #{convert_path_to_iis_format(full_path)}"
|
60
|
+
`#{cmd}`
|
61
|
+
end
|
62
|
+
|
63
|
+
def execute_admin(type, cmd, deployment)
|
64
|
+
site = get_website('localhost', deployment)
|
65
|
+
cmd = "cscript /nologo external\\adsutil.vbs #{type.to_s} w3svc/#{site.name}/#{cmd}"
|
66
|
+
`#{cmd}`
|
67
|
+
end
|
68
|
+
|
69
|
+
private
|
70
|
+
|
71
|
+
def get_existing_headers(site)
|
72
|
+
cmd = "cscript /nologo external\\adsutil.vbs get w3svc/#{site.name}/ServerBindings"
|
73
|
+
result = `#{cmd}`
|
74
|
+
headers = result.to_a[1..-1].join
|
75
|
+
|
76
|
+
headers = clean_output(headers)
|
77
|
+
|
78
|
+
return headers
|
79
|
+
end
|
80
|
+
|
81
|
+
def create_app_pool(server, name)
|
82
|
+
app_pool = AppPoolController.new
|
83
|
+
app_pool.server = server # Always executed on the local box
|
84
|
+
app_pool.name = get_app_pool_name(name)
|
85
|
+
app_pool.create
|
86
|
+
end
|
87
|
+
|
88
|
+
def update_website_path(server, location, deployment)
|
89
|
+
site = get_website(server, deployment)
|
90
|
+
|
91
|
+
root_site = get_root_site(site)
|
92
|
+
root_site.Properties['Path'][0] = convert_path_to_iis_format(location)
|
93
|
+
root_site.commit_changes()
|
94
|
+
end
|
95
|
+
|
96
|
+
def get_website(server, deployment)
|
97
|
+
website = WebsiteController.new
|
98
|
+
website.name = deployment.site_name
|
99
|
+
website.server = server
|
100
|
+
website.get_website()
|
101
|
+
end
|
102
|
+
|
103
|
+
def create_website(server, location, deployment)
|
104
|
+
website = WebsiteController.new
|
105
|
+
website.name = deployment.site_name
|
106
|
+
website.app_pool = get_app_pool_name(deployment.site_name)
|
107
|
+
website.home_directory = convert_path_to_iis_format(location)
|
108
|
+
website.port = deployment.port
|
109
|
+
website.IpAddress = deployment.get_deploy_to_location(server)[0].ipaddress
|
110
|
+
website.host_header = deployment.host
|
111
|
+
website.server = server
|
112
|
+
|
113
|
+
website.create
|
114
|
+
website.start
|
115
|
+
|
116
|
+
#set_isapi_filter(deployment)
|
117
|
+
end
|
118
|
+
|
119
|
+
def set_isapi_filter(deployment)
|
120
|
+
execute_admin(:set, "ScriptMaps \"*,C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_isapi.dll,1\"", deployment)
|
121
|
+
end
|
122
|
+
|
123
|
+
def get_app_pool_name(name)
|
124
|
+
"#{name}_AppPool"
|
125
|
+
end
|
126
|
+
|
127
|
+
def convert_path_to_iis_format(path)
|
128
|
+
path.gsub('/','\\').to_clr_string
|
129
|
+
end
|
130
|
+
|
131
|
+
def get_root_site(site)
|
132
|
+
path = "IIS://localhost/w3svc/#{site.name}/ROOT"
|
133
|
+
DirectoryEntry.new(path.to_clr_string)
|
134
|
+
end
|
135
|
+
|
136
|
+
def clean_output(output)
|
137
|
+
result = []
|
138
|
+
|
139
|
+
output.each do |o|
|
140
|
+
result << o.strip.gsub("\n", "")
|
141
|
+
end
|
142
|
+
|
143
|
+
return result
|
144
|
+
end
|
145
|
+
end
|
data/lib/IIS/IIS7.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
class IIS7
|
2
|
+
|
3
|
+
def deploy(server, location, deployment)
|
4
|
+
end
|
5
|
+
|
6
|
+
def exists?(server, deployment)
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def create_app_pool(server, name)
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_website(server, location, deployment)
|
15
|
+
end
|
16
|
+
|
17
|
+
def get_app_pool_name(name)
|
18
|
+
"#{name}_AppPool"
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,174 @@
|
|
1
|
+
class MvcDeployment
|
2
|
+
attr_accessor :environment
|
3
|
+
attr_accessor :host
|
4
|
+
attr_accessor :to
|
5
|
+
attr_accessor :port
|
6
|
+
attr_accessor :ipaddress
|
7
|
+
attr_accessor :description
|
8
|
+
attr_accessor :site_name
|
9
|
+
attr_accessor :deploy_zip_path
|
10
|
+
attr_accessor :before
|
11
|
+
attr_accessor :after
|
12
|
+
|
13
|
+
def initialize()
|
14
|
+
set_defaults
|
15
|
+
end
|
16
|
+
|
17
|
+
def set_defaults()
|
18
|
+
self.port = 80
|
19
|
+
self.description = "MvcDeployment"
|
20
|
+
end
|
21
|
+
|
22
|
+
def set_name(name)
|
23
|
+
self.site_name = name
|
24
|
+
end
|
25
|
+
|
26
|
+
def set_deploy(path)
|
27
|
+
self.deploy_zip_path = path
|
28
|
+
end
|
29
|
+
|
30
|
+
def set_description(desc)
|
31
|
+
self.description = desc
|
32
|
+
end
|
33
|
+
|
34
|
+
def set_host(header)
|
35
|
+
self.host = header
|
36
|
+
end
|
37
|
+
|
38
|
+
def set_ipaddress(address)
|
39
|
+
self.ipaddress = address
|
40
|
+
end
|
41
|
+
|
42
|
+
def set_port(num)
|
43
|
+
self.port = num
|
44
|
+
end
|
45
|
+
|
46
|
+
def set_environment(env)
|
47
|
+
self.environment = env
|
48
|
+
end
|
49
|
+
|
50
|
+
def set_to(locations)
|
51
|
+
self.to = []
|
52
|
+
|
53
|
+
i = 0
|
54
|
+
while i < locations.length
|
55
|
+
location = DeployTo.new
|
56
|
+
location.server = locations[i]
|
57
|
+
location.path = locations[i + 1]
|
58
|
+
location.ipaddress = locations[i + 2]
|
59
|
+
|
60
|
+
self.to << location
|
61
|
+
i = i + 3
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def set_before(block)
|
66
|
+
self.before = block
|
67
|
+
end
|
68
|
+
|
69
|
+
def set_after(block)
|
70
|
+
self.after = block
|
71
|
+
end
|
72
|
+
|
73
|
+
def add_machine_name_host_header(server, header)
|
74
|
+
hostname = `hostname`
|
75
|
+
updated_header = header.gsub("<machinename>", hostname.gsub("\n", ""))
|
76
|
+
|
77
|
+
iis = IIS.server
|
78
|
+
iis.set_extra_header(server, updated_header, self)
|
79
|
+
end
|
80
|
+
|
81
|
+
def extra_header(server, header) #Header will contain array of all the headers being added
|
82
|
+
iis = IIS.server
|
83
|
+
iis.set_extra_header(server, header, self)
|
84
|
+
end
|
85
|
+
|
86
|
+
def virtual_directory(server, vDirInfo) #Directories will contain array of all the virtual directories being added
|
87
|
+
iis = IIS.server
|
88
|
+
|
89
|
+
i = 0
|
90
|
+
while i < vDirInfo.length
|
91
|
+
name = vDirInfo[i]
|
92
|
+
path = vDirInfo[i + 1]
|
93
|
+
|
94
|
+
iis.create_virtual_directory(name, path, self)
|
95
|
+
i = i + 2
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def cmd(server, command)
|
100
|
+
`#{command}`
|
101
|
+
end
|
102
|
+
|
103
|
+
def iis(server, command)
|
104
|
+
iis = IIS.server
|
105
|
+
|
106
|
+
i = 0
|
107
|
+
while i < command.length
|
108
|
+
type = command[i]
|
109
|
+
cmd = command[i + 1]
|
110
|
+
|
111
|
+
iis.execute_admin(type, cmd, self)
|
112
|
+
i = i + 2
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
116
|
+
|
117
|
+
def get_deploy_to_location(server)
|
118
|
+
self.to.select{|t| t.server == server}
|
119
|
+
end
|
120
|
+
|
121
|
+
def get_location(server)
|
122
|
+
servers = get_deploy_to_location(server)
|
123
|
+
servers[0].path
|
124
|
+
end
|
125
|
+
|
126
|
+
def deploy(server)
|
127
|
+
execute_before_methods(server)
|
128
|
+
|
129
|
+
location = get_location(server)
|
130
|
+
|
131
|
+
fm = FileManager.new
|
132
|
+
latest_version_location = fm.get_latest_version(location, self.site_name)
|
133
|
+
|
134
|
+
fm.extract(latest_version_location, self.deploy_zip_path, self.environment)
|
135
|
+
|
136
|
+
iis = IIS.new
|
137
|
+
iis.deploy(server, latest_version_location, self)
|
138
|
+
|
139
|
+
execute_after_methods(server)
|
140
|
+
end
|
141
|
+
|
142
|
+
def execute_before_methods(server)
|
143
|
+
unless self.before.nil?
|
144
|
+
self.before.each do |k, v|
|
145
|
+
call_method(k, server, v)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
def execute_after_methods(server)
|
151
|
+
unless self.after.nil?
|
152
|
+
self.after.each do |k, v|
|
153
|
+
call_method(k, server, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
def call_method(method_name, server, param)
|
159
|
+
if self.respond_to?(method_name)
|
160
|
+
if self.method(method_name).arity == 2
|
161
|
+
self.send(method_name, server, param)
|
162
|
+
else
|
163
|
+
self.send(method_name, param)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
|
170
|
+
class DeployTo
|
171
|
+
attr_accessor :server
|
172
|
+
attr_accessor :path
|
173
|
+
attr_accessor :ipaddress
|
174
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<Configuration>
|
2
|
+
<SettingsComponent>
|
3
|
+
<string />
|
4
|
+
<integer />
|
5
|
+
<boolean>
|
6
|
+
<setting name="SolutionAnalysisEnabled">False</setting>
|
7
|
+
</boolean>
|
8
|
+
</SettingsComponent>
|
9
|
+
<CompletionStatisticsManager>
|
10
|
+
<ItemStatistics item="Default">
|
11
|
+
<Item value="prop" priority="0" />
|
12
|
+
</ItemStatistics>
|
13
|
+
</CompletionStatisticsManager>
|
14
|
+
<RecentFiles>
|
15
|
+
<RecentFiles>
|
16
|
+
<File id="42DA9D8E-0106-4875-896B-3B45C9EC0C01/f:IIS6Manager.cs" caret="242" fromTop="8" />
|
17
|
+
<File id="42DA9D8E-0106-4875-896B-3B45C9EC0C01/f:WebsiteController.cs" caret="2456" fromTop="15" />
|
18
|
+
<File id="d:Miscellaneous Files/f:~vs4EE2.xml/l:C!?Users?BENHAL~1?AppData?Local?Temp?~vs4EE2.xml" caret="10482" fromTop="30" />
|
19
|
+
<File id="d:Miscellaneous Files/f:postdeploy.xml/l:D!?Users?Ben Hall?Downloads?postdeploy.xml" caret="11967" fromTop="24" />
|
20
|
+
</RecentFiles>
|
21
|
+
<RecentEdits>
|
22
|
+
<File id="42DA9D8E-0106-4875-896B-3B45C9EC0C01/f:IIS6Manager.cs" caret="242" fromTop="8" />
|
23
|
+
<File id="42DA9D8E-0106-4875-896B-3B45C9EC0C01/f:WebsiteController.cs" caret="276" fromTop="9" />
|
24
|
+
<File id="42DA9D8E-0106-4875-896B-3B45C9EC0C01/f:WebsiteController.cs" caret="2747" fromTop="23" />
|
25
|
+
<File id="d:Miscellaneous Files/f:~vs4EE2.xml/l:C!?Users?BENHAL~1?AppData?Local?Temp?~vs4EE2.xml" caret="12535" fromTop="48" />
|
26
|
+
</RecentEdits>
|
27
|
+
</RecentFiles>
|
28
|
+
<NAntValidationSettings>
|
29
|
+
<NAntPath value="" />
|
30
|
+
</NAntValidationSettings>
|
31
|
+
<UnitTestRunner>
|
32
|
+
<Providers />
|
33
|
+
</UnitTestRunner>
|
34
|
+
<UnitTestRunnerNUnit>
|
35
|
+
<NUnitInstallDir IsNull="False">
|
36
|
+
</NUnitInstallDir>
|
37
|
+
<UseAddins>Never</UseAddins>
|
38
|
+
</UnitTestRunnerNUnit>
|
39
|
+
</Configuration>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
using Xunit;
|
2
|
+
|
3
|
+
namespace DolphinDeploy.IIS.IIS6.Tests
|
4
|
+
{
|
5
|
+
public class AppPoolControllerTests
|
6
|
+
{
|
7
|
+
[Fact]
|
8
|
+
public void Can_create_app_pool()
|
9
|
+
{
|
10
|
+
AppPoolController poolControllerController = CreateController();
|
11
|
+
poolControllerController.Create();
|
12
|
+
|
13
|
+
Assert.True(poolControllerController.Exists());
|
14
|
+
}
|
15
|
+
|
16
|
+
[Fact]
|
17
|
+
public void Exists_returns_false_if_not_created()
|
18
|
+
{
|
19
|
+
AppPoolController poolControllerController = CreateController();
|
20
|
+
Assert.False(poolControllerController.Exists());
|
21
|
+
}
|
22
|
+
|
23
|
+
[Fact]
|
24
|
+
public void Can_Delete_AppPool()
|
25
|
+
{
|
26
|
+
AppPoolController poolControllerController = CreateController();
|
27
|
+
Assert.DoesNotThrow(poolControllerController.Delete);
|
28
|
+
}
|
29
|
+
|
30
|
+
private AppPoolController CreateController()
|
31
|
+
{
|
32
|
+
var appController = new AppPoolController();
|
33
|
+
appController.Server = "localhost";
|
34
|
+
appController.Name = "MasterAppPool";
|
35
|
+
|
36
|
+
return appController;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|