Sha256: ce6e33e1315b7cd3357e2371638ade83f0f6269a533a4fcd4637c8e8fd752728

Contents?: true

Size: 641 Bytes

Versions: 3

Compression:

Stored size: 641 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..')
require 'cotta/cotta'
require 'cotta/in_memory_system'

module BuildMaster
class IisDriver
  def initialize(cotta=Cotta.new)
    @cotta = cotta
#    @executable = 'C:\\WINDOWS\\system32\\iisreset.exe'
#    if (not cotta.file(@executable).exists?)
#      raise "#{@executable} not found"
#    end
  end

  def status
    execute('query')
  end

  def start
    execute('start')
  end

  def stop
    execute('stop')
  end

  private
  def execute(command)
    #@cotta.shell("#{@executable} /#{command}")
    @cotta.shell("sc #{command} W3SVC")
  end
end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
BuildMaster-1.0.6 lib/buildmaster/project/windows/iis_driver.rb
BuildMaster-1.0.9 lib/buildmaster/project/windows/iis_driver.rb
BuildMaster-1.1.9 lib/buildmaster/project/windows/iis_driver.rb