lib/guard/jasmine.rb in guard-jasmine-1.7.0 vs lib/guard/jasmine.rb in guard-jasmine-1.8.0

- old
+ new

@@ -21,10 +21,11 @@ attr_accessor :last_run_failed, :last_failed_paths, :run_all_options DEFAULT_OPTIONS = { :server => :auto, :server_env => ENV['RAILS_ENV'] || 'development', + :server_timeout => 15, :port => 8888, :jasmine_url => 'http://localhost:8888/jasmine', :timeout => 10000, :spec_dir => 'spec/javascripts', :notification => true, @@ -44,10 +45,11 @@ # # @param [Array<Guard::Watcher>] watchers the watchers in the Guard block # @param [Hash] options the options for the Guard # @option options [String] :server the server to use, either :auto, :none, :webrick, :mongrel, :thin, :jasmine_gem, or a custom rake task # @option options [String] :server_env the server environment to use, for example :development, :test + # @option options [Integer] :server_timeout the number of seconds to wait for the Jasmine spec server # @option options [String] :port the port for the Jasmine test server # @option options [String] :jasmine_url the url of the Jasmine test runner # @option options [String] :phantomjs_bin the location of the PhantomJS binary # @option options [Integer] :timeout the maximum time in milliseconds to wait for the spec runner to finish # @option options [String] :spec_dir the directory with the Jasmine specs @@ -86,10 +88,10 @@ def start if Jasmine.phantomjs_bin_valid?(options[:phantomjs_bin]) Server.start(options[:server], options[:port], options[:server_env], options[:spec_dir]) unless options[:server] == :none - if Jasmine.runner_available?(options[:jasmine_url]) + if Jasmine.runner_available?(options) run_all if options[:all_on_start] end else throw :task_has_failed end