src/helper-scripts/download_binaries/extconf.rb in passenger-5.3.4 vs src/helper-scripts/download_binaries/extconf.rb in passenger-5.3.5

- old
+ new

@@ -1,8 +1,8 @@ #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ -# Copyright (c) 2010-2017 Phusion Holding B.V. +# Copyright (c) 2010-2018 Phusion Holding B.V. # # "Passenger", "Phusion Passenger" and "Union Station" are registered # trademarks of Phusion Holding B.V. # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -93,10 +93,14 @@ abort "Cannot download #{name}, aborting" if ABORT_ON_ERROR return false end def really_download(site, name, logger, options) - url = "#{site[:url]}/#{PhusionPassenger::VERSION_STRING}/#{name}" + if site[:url].include?('{{VERSION}}') + url = site[:url].gsub('{{VERSION}}', PhusionPassenger::VERSION_STRING) + "/#{name}" + else + url = "#{site[:url]}/#{PhusionPassenger::VERSION_STRING}/#{name}" + end puts "Attempting to download #{url} into #{Dir.pwd}" File.unlink("#{name}.tmp") rescue nil options = { :cacert => site[:cert],