Skip to content

Commit

Permalink
Fix version parsing for phantomjs 1.5 (development)
Browse files Browse the repository at this point in the history
  • Loading branch information
Antono Vasiljev committed Jan 11, 2012
1 parent 35ad652 commit f09c045
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/guard/jasmine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ def jasmine_runner_available?(url)
def phantomjs_bin_valid?(bin)
if bin && !bin.empty?
version = `#{ bin } --version`
# remove all but version from "1.5 (development)"
version = version.match(/(\d\.\d)/)[0]

if !version
notify_failure('PhantomJS executable missing', "PhantomJS executable doesn't exist at #{ bin }")
Expand Down

0 comments on commit f09c045

Please sign in to comment.