Class: Guard::Spinoff::Runner
- Inherits:
-
Object
- Object
- Guard::Spinoff::Runner
- Defined in:
- lib/guard/spinoff/runner.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #kill ⇒ Object
- #launch(action) ⇒ Object
- #run(paths) ⇒ Object
- #run_all ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Runner
Returns a new instance of Runner.
12 13 14 15 16 17 |
# File 'lib/guard/spinoff/runner.rb', line 12 def initialize( = {}) Thread.abort_on_exception = true @options = @config = init_config(@options) UI.info 'Guard::Spinoff Initialized' end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/guard/spinoff/runner.rb', line 10 def @options end |
Instance Method Details
#kill ⇒ Object
24 25 26 |
# File 'lib/guard/spinoff/runner.rb', line 24 def kill @server.kill if @server end |
#launch(action) ⇒ Object
19 20 21 22 |
# File 'lib/guard/spinoff/runner.rb', line 19 def launch(action) UI.info "#{action}ing Spinoff", :reset => true start_server end |
#run(paths) ⇒ Object
28 29 30 |
# File 'lib/guard/spinoff/runner.rb', line 28 def run(paths) ::Spinoff::Client.start(Array(paths)) end |
#run_all ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/guard/spinoff/runner.rb', line 32 def run_all if rspec? run([:test_paths] || 'spec') elsif test_unit? run([:test_paths] || 'test') end end |