Class: Guard::Spin::Runner
- Inherits:
-
Object
- Object
- Guard::Spin::Runner
- Defined in:
- lib/guard/spin/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_spin ⇒ Object
- #launch_spin(action) ⇒ Object
- #run(paths) ⇒ Object
- #run_all ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Runner
Returns a new instance of Runner.
11 12 13 14 |
# File 'lib/guard/spin/runner.rb', line 11 def initialize( = {}) @options = UI.info "Guard::Spin Initialized" end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/guard/spin/runner.rb', line 9 def @options end |
Instance Method Details
#kill_spin ⇒ Object
21 22 23 |
# File 'lib/guard/spin/runner.rb', line 21 def kill_spin stop_spin end |
#launch_spin(action) ⇒ Object
16 17 18 19 |
# File 'lib/guard/spin/runner.rb', line 16 def launch_spin(action) UI.info "#{action}ing Spin", :reset => true spawn_spin spin_serve_command, end |
#run(paths) ⇒ Object
25 26 27 |
# File 'lib/guard/spin/runner.rb', line 25 def run(paths) run_command spin_push_command(paths), end |
#run_all ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/guard/spin/runner.rb', line 29 def run_all if rspec? run(['spec']) elsif test_unit? run(Dir['test/**/*_test.rb']+Dir['test/**/test_*.rb']) end end |