Class: Guard::Puppet
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Puppet
- Defined in:
- lib/guard/puppet.rb,
lib/guard/puppet/runner.rb
Defined Under Namespace
Classes: Runner
Class Attribute Summary collapse
-
.is_wrapping_exit ⇒ Object
Returns the value of attribute is_wrapping_exit.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Puppet
constructor
A new instance of Puppet.
- #run_all ⇒ Object
- #run_on_change(files = []) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Puppet
Returns a new instance of Puppet.
9 10 11 12 13 14 15 |
# File 'lib/guard/puppet.rb', line 9 def initialize( = {}) super = UI.info "Guard::Puppet is watching for changes..." run_all if [:run_on_start] end |
Class Attribute Details
.is_wrapping_exit ⇒ Object
Returns the value of attribute is_wrapping_exit.
6 7 8 |
# File 'lib/guard/puppet.rb', line 6 def is_wrapping_exit @is_wrapping_exit end |
Instance Method Details
#run_all ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# 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().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 = []) ⇒ Object
28 29 30 |
# File 'lib/guard/puppet.rb', line 28 def run_on_change(files = []) run_all end |