class IISAppPoolBuilder
Used to manage IIS App Pool
Public Class Methods
new(siteName, iisAppCmd = IISAppCmd.new)
click to toggle source
Params:
siteName
-
siteName string used to identify site (e.g)
# File lib/IIS_apppool_builder.rb, line 9 def initialize(siteName, iisAppCmd = IISAppCmd.new) @siteName = siteName @iisAppCmd = iisAppCmd end
Public Instance Methods
assign()
click to toggle source
# File lib/IIS_apppool_builder.rb, line 26 def assign puts "assigning app pool : #{@siteName} to site #{@siteName}" @iisAppCmd.execute("SET SITE /site.name:#{@siteName} /applicationDefaults.applicationPool:#{@siteName}") self end
create()
click to toggle source
# File lib/IIS_apppool_builder.rb, line 14 def create puts "creating app pool : #{@siteName}" @iisAppCmd.execute("ADD APPPOOL /name:#{@siteName} /managedRuntimeVersion:v4.0") self end
delete()
click to toggle source
# File lib/IIS_apppool_builder.rb, line 20 def delete puts "deleting app pool : #{@siteName}" @iisAppCmd.execute("DELETE APPPOOL #{@siteName}") self end