Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a Guardfile to specify a custom rake task as the server #44

Merged
merged 1 commit into from
Mar 9, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/guard/jasmine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Jasmine < Guard
#
# @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
# @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 [String] :port the port for the Jasmine test server
# @option options [String] :jasmine_url the url of the Jasmine test runner
Expand All @@ -65,7 +65,7 @@ def initialize(watchers = [], options = { })
options[:jasmine_url] = "http://localhost:#{ options[:port] }/jasmine" if options[:port] && !options[:jasmine_url]
options = DEFAULT_OPTIONS.merge(options)
options[:specdoc] = :failure if ![:always, :never, :failure].include? options[:specdoc]
options[:server] = :auto if ![:none, :webrick, :mongrel, :thin, :jasmine_gem].include? options[:server]
options[:server] ||= :auto
options[:phantomjs_bin] = Jasmine.which('phantomjs') unless options[:phantomjs_bin]

super(watchers, options)
Expand Down