Class: IISAppPoolBuilder
- Inherits:
-
Object
- Object
- IISAppPoolBuilder
- Defined in:
- lib/IIS_apppool_builder.rb
Overview
Used to manage IIS App Pool
Instance Method Summary collapse
- #assign ⇒ Object
- #create ⇒ Object
- #delete ⇒ Object
-
#initialize(siteName, iisAppCmd = IISAppCmd.new) ⇒ IISAppPoolBuilder
constructor
- Params:
siteName
-
siteName string used to identify site (e.g).
- Params:
Constructor Details
#initialize(siteName, iisAppCmd = IISAppCmd.new) ⇒ IISAppPoolBuilder
Params:
siteName
-
siteName string used to identify site (e.g)
9 10 11 12 |
# File 'lib/IIS_apppool_builder.rb', line 9 def initialize(siteName, iisAppCmd = IISAppCmd.new) @siteName = siteName @iisAppCmd = iisAppCmd end |
Instance Method Details
#assign ⇒ Object
26 27 28 29 30 |
# 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 ⇒ Object
14 15 16 17 18 |
# 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 ⇒ Object
20 21 22 23 24 |
# File 'lib/IIS_apppool_builder.rb', line 20 def delete puts "deleting app pool : #{@siteName}" @iisAppCmd.execute("DELETE APPPOOL #{@siteName}") self end |