Class: Guard::Soca
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Soca
constructor
A new instance of Soca.
- #reload ⇒ Object
- #run_all ⇒ Object
- #run_on_change(paths) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Soca
Returns a new instance of Soca.
8 9 10 11 12 13 14 15 16 |
# File 'lib/guard/soca.rb', line 8 def initialize(watchers = [], = {}) super appdir = [:appdir] || File.(Dir.pwd) env = [:env] || "default" config_file = [:config_file] @pusher = ::Soca::Pusher.new(appdir, env, config_file) @times = 0 end |
Instance Method Details
#reload ⇒ Object
26 27 28 |
# File 'lib/guard/soca.rb', line 26 def reload true end |
#run_all ⇒ Object
30 31 32 |
# File 'lib/guard/soca.rb', line 30 def run_all true end |
#run_on_change(paths) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/guard/soca.rb', line 34 def run_on_change(paths) @times += 1 print "Soca: push..." @pusher.push! puts "DONE" if @times % 5 == 0 print "Soca: Running a compact..." @pusher.compact! puts "DONE" end end |
#start ⇒ Object
18 19 20 |
# File 'lib/guard/soca.rb', line 18 def start true end |
#stop ⇒ Object
22 23 24 |
# File 'lib/guard/soca.rb', line 22 def stop true end |