Class: Guard::ZeusClient::Runner
- Inherits:
-
Object
- Object
- Guard::ZeusClient::Runner
- Defined in:
- lib/guard/zeus-client/runner.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #run(paths, options = {}) ⇒ Object
- #run_all ⇒ Object
- #zeus_executable ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Runner
Returns a new instance of Runner.
4 5 6 7 8 9 10 11 12 |
# File 'lib/guard/zeus-client/runner.rb', line 4 def initialize( = {}) @options = { :zeus_options => nil, :zeus_subcommand => 'test', :zeus_subcommand_options => nil, :run_all_test_dirs => nil, :notification => true }.merge() end |
Instance Method Details
#run(paths, options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/guard/zeus-client/runner.rb', line 14 def run(paths, = {}) return false if paths.empty? = [:message] || "Zeus running: #{paths.join(' ')}" UI.info(, :reset => true) = @options.merge() run_via_shell paths, end |
#run_all ⇒ Object
25 26 27 |
# File 'lib/guard/zeus-client/runner.rb', line 25 def run_all run(@options[:run_all_test_dirs] || test_dirs, :message => 'Zeus running all') end |
#zeus_executable ⇒ Object
29 30 31 |
# File 'lib/guard/zeus-client/runner.rb', line 29 def zeus_executable @zeus_executable ||= 'zeus' end |