class Guard::FonesConfig

Public Class Methods

new(watchers=[], options={}) click to toggle source
Calls superclass method
# File lib/guard/fones/config.rb, line 6
def initialize(watchers=[], options={})
  super
end

Public Instance Methods

reload() click to toggle source

Called on Ctrl-Z signal This method should be mainly used for “reload” (really!) actions like reloading passenger/spork/bundler/…

# File lib/guard/fones/config.rb, line 12
def reload
  UI.info "Reloading project config"
  ::Fones::Guard.project.load_config
end
run_all() click to toggle source

Called on Ctrl-\ signal This method should be principally used for long action like running all specs/tests/…

# File lib/guard/fones/config.rb, line 19
def run_all
  UI.info "Reloading project config"
  ::Fones::Guard.project.load_config
  true
end
run_on_change(paths) click to toggle source

Called on file(s) modifications

# File lib/guard/fones/config.rb, line 26
def run_on_change(paths)
  UI.info "Project config changed, reloading"
  ::Fones::Guard.project.load_config
  ::Fones::Guard.builder = ::Fones::Builder.new(::Fones::Guard.project)
  # Rebuild everything if the config changes
  ::Fones::Guard.builder.build
end