From 86fc6c706d987d74c369567b041d073c68009b85 Mon Sep 17 00:00:00 2001 From: Bruno Zanchet Date: Wed, 6 Jul 2016 09:50:46 -0300 Subject: [PATCH] enabling overwriting phantomjs binary package_url through an env variable --- lib/phantomjs/platform.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/phantomjs/platform.rb b/lib/phantomjs/platform.rb index 28df128..253e0cc 100644 --- a/lib/phantomjs/platform.rb +++ b/lib/phantomjs/platform.rb @@ -98,7 +98,7 @@ def platform end def package_url - 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2' + ENV['PHANTOMJS_CDNURL'] || 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2' end end end @@ -114,7 +114,7 @@ def platform end def package_url - 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2' + ENV['PHANTOMJS_CDNURL'] || 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2' end end end @@ -130,7 +130,7 @@ def platform end def package_url - 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip' + ENV['PHANTOMJS_CDNURL'] || 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip' end end end @@ -154,7 +154,7 @@ def phantomjs_path end def package_url - 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-windows.zip' + ENV['PHANTOMJS_CDNURL'] || 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-windows.zip' end end end