Class: IISConfig::Runner
- Inherits:
-
Object
- Object
- IISConfig::Runner
- Defined in:
- lib/iisconfig/runner.rb
Class Method Summary collapse
Class Method Details
.execute_command(args) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/iisconfig/runner.rb', line 5 def self.execute_command(args) args.flatten! tool = :appcmd puts " #{tool.to_s} #{args.join(' ')}" result = `c:/windows/system32/inetsrv/appcmd #{args.join(' ')}"` raise Exception.new($?.exitstatus) unless $?.success? result end |
.run_commands(commands) ⇒ Object
15 16 17 18 19 |
# File 'lib/iisconfig/runner.rb', line 15 def self.run_commands(commands) commands.each do |c| Runner.execute_command c end end |