colszowka / phantomjs-gem

Phantomjs via Rubygems: Auto-install phantomjs on demand for current platform. Comes with poltergeist integration.
Other
222 stars 106 forks source link

Document how to customize base dir #93

Open ggarnier opened 7 years ago

ggarnier commented 7 years ago

Adds a description on how to change the base directory where phantomjs will be installed.

tamaloa commented 6 years ago

We use this to be able to cache phantomjs binaries during CI builds on Gitlab (caching is limited to dirs under project root). Note that including the phantomjs version is also really easy:

require 'phantomjs'
Phantomjs.base_dir = "#{Rails.root}/vendor/phantomjs/#{Phantomjs.version}"
require 'phantomjs/poltergeist'