Class: Stool::Command::Util::Jenkins

Inherits:
Stool::Command::Util show all
Defined in:
lib/stool/Command/Util/Jenkins.rb

Instance Method Summary collapse

Methods inherited from Stool::Command

#checkConfigFile, options, #pp

Constructor Details

#initialize(argv) ⇒ Jenkins

Returns a new instance of Jenkins.



13
14
15
16
# File 'lib/stool/Command/Util/Jenkins.rb', line 13

def initialize(argv)
  @close = argv.shift_argument
  super
end

Instance Method Details

#runObject



18
19
20
21
22
23
24
# File 'lib/stool/Command/Util/Jenkins.rb', line 18

def run
  if @close
    `sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist`
  else
    `sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist`
  end
end