Sha256: e2fa8ae0e402f2c4a2cd33410b9e932baa7bbc1133119263330a396ca7930d0e

Contents?: true

Size: 452 Bytes

Versions: 5

Compression:

Stored size: 452 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', 'cotta')
module BuildMaster

class SqlServerDriver
  def initialize(cotta=Cotta.new)
    @instance_name = 'MSSQLSERVER'
    @cotta = cotta
  end

  def start
    execute('start')
  end
  
  def status
    execute('query')
  end
  
  def stop
    execute('stop')
  end
  
  private
  def execute(command)
    @cotta.shell("sc #{command} #{@instance_name}")
  end    
end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
BuildMaster-0.9.0 lib/buildmaster/windows/sql_server_driver.rb
BuildMaster-0.9.1 lib/buildmaster/windows/sql_server_driver.rb
BuildMaster-1.0.6 lib/buildmaster/project/windows/sql_server_driver.rb
BuildMaster-1.0.9 lib/buildmaster/project/windows/sql_server_driver.rb
BuildMaster-1.1.9 lib/buildmaster/project/windows/sql_server_driver.rb