Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Adding support for Phantom 2.5.0 beta #689

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion install.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ function getRequestOptions() {

var proxyUrl = process.env.npm_config_https_proxy ||
process.env.npm_config_http_proxy ||
process.env.npm_config_proxy
process.env.npm_config_proxy ||
process.env.http_proxy;


if (proxyUrl) {

// Print using proxy
Expand Down
2 changes: 1 addition & 1 deletion lib/phantomjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ try {
* The version of phantomjs installed by this package.
* @type {number}
*/
exports.version = '2.1.1'
exports.version = '2.5.0'


/**
Expand Down
17 changes: 7 additions & 10 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var helper = require('./phantomjs')
var kew = require('kew')
var path = require('path')

var DEFAULT_CDN = 'https://github.com/Medium/phantomjs/releases/download/v2.1.1'
var DEFAULT_CDN = 'https://bitbucket.org/ariya/phantomjs/downloads'
var libPath = __dirname

/**
Expand Down Expand Up @@ -98,17 +98,14 @@ function getDownloadSpec() {
var platform = getTargetPlatform()
var arch = getTargetArch()
if (platform === 'linux' && arch === 'x64') {
downloadUrl += 'linux-x86_64.tar.bz2'
checksum = '86dd9a4bf4aee45f1a84c9f61cf1947c1d6dce9b9e8d2a907105da7852460d2f'
} else if (platform === 'linux' && arch == 'ia32') {
downloadUrl += 'linux-i686.tar.bz2'
checksum = '80e03cfeb22cc4dfe4e73b68ab81c9fdd7c78968cfd5358e6af33960464f15e3'
downloadUrl += 'beta-linux-ubuntu-trusty-x86_64.tar.gz'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work, because not all linux distros are ubuntu trusty.

checksum = '00E75A5A359A777DB95E4EDEDD4C5E8755D5852CB016CBCCFCA6F5E2A08C4A09'
} else if (platform === 'darwin') {
downloadUrl += 'macosx.zip'
checksum = '538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1'
downloadUrl += 'beta-macos.zip'
checksum = '8183EAAAC1BF73EDBE2414870FFA4B6262B42AB97D3F252CEE073746CA272ACC'
} else if (platform === 'win32') {
downloadUrl += 'windows.zip'
checksum = 'd9fb05623d6b26d3654d008eab3adafd1f6350433dfd16138c46161f42c7dcc8'
downloadUrl += 'beta-windows.zip'
checksum = '3E0D684E7564862CBF43E38B9E29DD087052DE19D76C525D6F08C37D211A4381'
} else {
return null
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phantomjs-prebuilt",
"version": "2.1.14",
"version": "2.5.0",
"keywords": [
"phantomjs",
"headless",
Expand Down