Sha256: 8abf440a3090945d4207d065fe46f95337151385dd9f2c6da55e2337f2f4955c

Contents?: true

Size: 569 Bytes

Versions: 1

Compression:

Stored size: 569 Bytes

Contents

module IISConfig

  class Runner

    def self.execute_command(args)
      args.flatten!
      tool = :appcmd

      puts  "  #{tool.to_s} #{args.join(' ')}"

      unless IISConfiguration.dry_run?
        result = `c:/windows/system32/inetsrv/appcmd #{args.join(' ')}"`
        puts result if IISConfiguration.verbose?
        raise Exception.new($?.exitstatus) unless $?.success?
        result
      end
    end

    def self.run_commands(commands)
      commands.each do |c|
        Runner.execute_command c
      end
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iisconfig-0.5.0 lib/iisconfig/runner.rb