class Guard::Puppet

Attributes

is_wrapping_exit[RW]

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method
# File lib/guard/puppet.rb, line 9
def initialize(options = {})
  super
  @options = options

  UI.info "Guard::Puppet is watching for changes..."
  run_all if options[:run_on_start]
end

Public Instance Methods

run_all() click to toggle source
# File lib/guard/puppet.rb, line 17
def run_all
  UI.info(msg = "Applying Puppet configuration...")
  Notifier.notify msg, :title => "Puppet Config", :image => :pending
  if Runner.new(@options).run != 0
    Notifier.notify(msg = "Puppet config failure!", :title => "Puppet Config", :image => :failed)
  else
    Notifier.notify(msg = "Puppet config reapplied successfully!", :title => "Puppet Config")
  end
  UI.info(msg)
end
run_on_change(files = []) click to toggle source
# File lib/guard/puppet.rb, line 28
def run_on_change(files = [])
  run_all
end