Sha256: b44f9d5d4685ffe2652601990718c568e93e4016587b9be823f9dd7fbb814b39

Contents?: true

Size: 913 Bytes

Versions: 75

Compression:

Stored size: 913 Bytes

Contents

require 'daddy/itamae'

ENV['DAD_PHANTOMJS_VERSION'] ||= '2.1.1'
ENV['DAD_PHANTOMJS_PACKAGE'] ||= "phantomjs-#{ENV['DAD_PHANTOMJS_VERSION']}-linux-x86_64"

package 'fontconfig'

directory 'tmp'
directory 'tmp/daddy'

execute 'PhantomJSのダウンロード' do
  cwd 'tmp/daddy'
  command "wget https://bitbucket.org/ariya/phantomjs/downloads/#{ENV['DAD_PHANTOMJS_PACKAGE']}.tar.bz2"
  not_if "test `/usr/local/bin/phantomjs -v` = #{ENV['DAD_PHANTOMJS_VERSION']}"
end

execute 'PhantomJSのインストール' do
  cwd 'tmp/daddy'
  command <<-EOF
    rm -Rf #{ENV['DAD_PHANTOMJS_PACKAGE']}
    tar jxf #{ENV['DAD_PHANTOMJS_PACKAGE']}.tar.bz2
    sudo cp -f #{ENV['DAD_PHANTOMJS_PACKAGE']}/bin/phantomjs /usr/local/bin/phantomjs
    sudo chown root:root /usr/local/bin/phantomjs
    sudo chmod 755 /usr/local/bin/phantomjs
  EOF
  not_if "test `/usr/local/bin/phantomjs -v` = #{ENV['DAD_PHANTOMJS_VERSION']}"
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
daddy-0.9.19 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.18 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.17 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.16 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.15 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.14 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.13 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.12 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.11 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.10 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.9 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.8 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.7 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.6 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.5 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.4 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.3 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.2 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.1 itamae/cookbooks/phantomjs/install.rb
daddy-0.9.0 itamae/cookbooks/phantomjs/install.rb