Class: Guard::CalabashiOS
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ CalabashiOS
constructor
Initialize a Guard.
-
#reload ⇒ Object
Called when ‘reload|r|z + enter` is pressed.
-
#run_all ⇒ Object
Called when just ‘enter` is pressed This method should be principally used for long action like running all specs/tests/…
-
#run_on_changes(paths) ⇒ Object
Called on file(s) modifications that the Guard watches.
-
#run_on_removal(paths) ⇒ Object
Called on file(s) deletions that the Guard watches.
-
#start ⇒ Object
Call once when Guard starts.
-
#stop ⇒ Object
Called when ‘stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
Constructor Details
#initialize(watchers = [], options = {}) ⇒ CalabashiOS
Initialize a Guard.
12 13 14 15 16 17 |
# File 'lib/guard/calabash-ios.rb', line 12 def initialize(watchers = [], = {}) super @options = { :all_on_start => true, }.update() end |
Instance Method Details
#reload ⇒ Object
Called when ‘reload|r|z + enter` is pressed. This method should be mainly used for “reload” (really!) actions like reloading passenger/spork/bundler/…
38 39 |
# File 'lib/guard/calabash-ios.rb', line 38 def reload end |
#run_all ⇒ Object
Called when just ‘enter` is pressed This method should be principally used for long action like running all specs/tests/…
44 45 46 |
# File 'lib/guard/calabash-ios.rb', line 44 def run_all run("features") end |
#run_on_changes(paths) ⇒ Object
Called on file(s) modifications that the Guard watches.
51 52 53 |
# File 'lib/guard/calabash-ios.rb', line 51 def run_on_changes(paths) run(paths) end |
#run_on_removal(paths) ⇒ Object
Called on file(s) deletions that the Guard watches.
58 59 60 |
# File 'lib/guard/calabash-ios.rb', line 58 def run_on_removal(paths) super end |
#start ⇒ Object
Call once when Guard starts. Please override initialize method to init stuff.
21 22 23 24 25 26 27 28 |
# File 'lib/guard/calabash-ios.rb', line 21 def start @runner = Runner.new @options if @runner.nil? @raise [:task_has_failed] end notify_start run_all if @options[:all_on_start] end |
#stop ⇒ Object
Called when ‘stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
32 33 |
# File 'lib/guard/calabash-ios.rb', line 32 def stop end |