Skip to content

Commit

Permalink
Don't install PhantomJS on CI from BitBucket
Browse files Browse the repository at this point in the history
The gemified version of Jasmine uses the gemified version of PhantomJS
which auto-installs it if it can't find your installation in ~/.phantomjs
Travis already has a version of PhantomJS installed in a different
location, so the gem will auto-install even if it's pointless.  Also,
gemified PhantomJS hardcodes install URLs from BitBucket which times out
and causes failed builds.

TLDR: Don't install auto-install PhantomJS on CI. In Travis we trust.
  • Loading branch information
chrisarcand committed Oct 14, 2016
1 parent 5dff436 commit 445bad9
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions spec/javascripts/support/jasmine_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
# You can remove it if you don't need it.
# This file is loaded *after* jasmine.yml is interpreted.
#
# Example: using a different boot file.
# Jasmine.configure do |config|
# config.boot_dir = '/absolute/path/to/boot_dir'
# config.boot_files = lambda { ['/absolute/path/to/boot_dir/file.js'] }
# end
#
# Example: prevent PhantomJS auto install, uses PhantomJS already on your path.
# Jasmine.configure do |config|
# config.prevent_phantom_js_auto_install = true
# end
Jasmine.configure do |config|
# The gemified version of Jasmine uses the gemified version of PhantomJS
# which auto-installs it if it can't find your installation in ~/.phantomjs
# Travis already has a version of PhantomJS installed in a different
# location, so the gem will auto-install even if it's pointless. Also,
# gemified PhantomJS hardcodes install URLs from BitBucket which times out
# and causes failed builds.
#
# TLDR: Don't install auto-install PhantomJS on CI. In Travis we trust.
config.prevent_phantom_js_auto_install = true if ENV['CI']
end

0 comments on commit 445bad9

Please sign in to comment.