Sha256: 329fb01f065ca5e3ba73c280655b0da32cf8cb730d2a8977ac9739b81fb57b1c
Contents?: true
Size: 949 Bytes
Versions: 2
Compression:
Stored size: 949 Bytes
Contents
module VagrantPlugins module Ventriloquist module Cap module Debian module PhantomjsInstall def self.phantomjs_install(machine, version) return if machine.communicate.test('which phantomjs > /dev/null') src = "https://phantomjs.googlecode.com/files/phantomjs-#{version}-linux-x86_64.tar.bz2" executable = "/usr/local/share/phantomjs-#{version}-linux-x86_64/bin/phantomjs" machine.env.ui.info("Installing phantomjs #{version}") machine.communicate.tap do |comm| comm.sudo('apt-get install -y fontconfig libfreetype6 curl -y -q') # TODO: Use download + untar capability and leverage vagrant-cachier comm.execute("cd /usr/local/share && curl #{src} | sudo tar xjfv -") comm.sudo("ln -s #{executable} /usr/local/bin/phantomjs") end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ventriloquist-0.4.1 | lib/ventriloquist/cap/platforms/debian/phantomjs_install.rb |
ventriloquist-0.4.0 | lib/ventriloquist/cap/platforms/debian/phantomjs_install.rb |