class Guard::Jetty

Public Instance Methods

jetty_config() click to toggle source
# File lib/guard/jetty.rb, line 7
def jetty_config
  @jetty_config ||= Jettywrapper.load_config.merge(options)
end
reload() click to toggle source

Called when ‘reload|r|z + enter` is pressed. This method should be mainly used for “reload” (really!) actions like reloading passenger/spork/bundler/…

@raise [:task_has_failed] when reload has failed @return [Object] the task result

# File lib/guard/jetty.rb, line 48
def reload
  restart_jetty
end
restart_jetty() click to toggle source
# File lib/guard/jetty.rb, line 19
def restart_jetty
  stop_jetty
  start_jetty
end
run_on_changes(paths) click to toggle source

Default behaviour on file(s) changes that the Guard plugin watches. @param [Array<String>] paths the changes files or paths @raise [:task_has_failed] when run_on_change has failed @return [Object] the task result

# File lib/guard/jetty.rb, line 57
def run_on_changes(paths)
  restart_jetty
end
start() click to toggle source

Called once when Guard starts. Please override initialize method to init stuff.

@raise [:task_has_failed] when start has failed @return [Object] the task result

# File lib/guard/jetty.rb, line 29
def start
  start_jetty
end
start_jetty() click to toggle source
# File lib/guard/jetty.rb, line 11
def start_jetty
  Jettywrapper.start(jetty_config)
end
stop() click to toggle source

Called when ‘stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).

@raise [:task_has_failed] when stop has failed @return [Object] the task result

# File lib/guard/jetty.rb, line 38
def stop
  stop_jetty
end
stop_jetty() click to toggle source
# File lib/guard/jetty.rb, line 15
def stop_jetty
  Jettywrapper.stop(jetty_config)
end