Class: Guard::Maven
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Maven
constructor
Initializes a Guard plugin.
-
#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
Default behaviour on file(s) changes that the Guard plugin watches.
-
#start ⇒ Object
Called once when Guard starts.
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Maven
Initializes a Guard plugin. Don’t do any work here, especially as Guard plugins get initialized even if they are not in an active group!
15 16 17 18 |
# File 'lib/guard/maven.rb', line 15 def initialize(watchers = [], = {}) super @options = end |
Instance Method Details
#run_all ⇒ Object
Called when just ‘enter` is pressed This method should be principally used for long action like running all specs/tests/…
35 36 37 |
# File 'lib/guard/maven.rb', line 35 def run_all run_maven_tests end |
#run_on_changes(paths) ⇒ Object
Default behaviour on file(s) changes that the Guard plugin watches.
44 45 46 47 48 49 50 51 |
# File 'lib/guard/maven.rb', line 44 def run_on_changes(paths) # for now run all if paths.include? 'all' run_all else run_maven_tests :classes => paths end end |
#start ⇒ Object
Called once when Guard starts. Please override initialize method to init stuff.
25 26 27 |
# File 'lib/guard/maven.rb', line 25 def start run_all if @options[:all_on_start] end |