Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow requiring plugins

  • Loading branch information...
commit 3ec56b076a3923a2466aaae56452bf640d314a7e 1 parent 730e4a2
François Beausoleil authored November 17, 2009

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  lib/nestor/cli.rb
7  lib/nestor/cli.rb
@@ -16,7 +16,7 @@ class Cli < Thor # :nodoc:
16 16
       Use --quick to boot without running the full test suite on startup.
17 17
       --debug writes extra Watchr debug messages to STDOUT.
18 18
     EODESC
19  
-    method_options :framework => "rails", :testlib => "test/unit", :script => nil, :debug => false, :quick => false
  19
+    method_options :framework => "rails", :testlib => "test/unit", :script => nil, :debug => false, :quick => false, :require => []
20 20
     def start
21 21
       Watchr.options.debug = options[:debug]
22 22
 
@@ -33,6 +33,11 @@ def start
33 33
       script_path = options[:script] ? Pathname.new(options[:script]) : nil
34 34
       script      = Nestor::Script.new(script_path || mapper.class.default_script_path)
35 35
 
  36
+      options[:require].each do |path|
  37
+        puts "Loading #{path.inspect} plugin"
  38
+        require path
  39
+      end
  40
+
36 41
       script.nestor_machine = machine
37 42
       Watchr::Controller.new(script, Watchr.handler.new).run
38 43
     end

0 notes on commit 3ec56b0

Please sign in to comment.
Something went wrong with that request. Please try again.