Created
February 27, 2015 23:10
-
-
Save ferventcoder/47cf61727c78685f2f6e to your computer and use it in GitHub Desktop.
Downloading the RubyGems updated cert automatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/luislavena/f064211759ee0f806c88 | |
$rubygems = &gem which rubygems | |
$ssl_cert_location = $rubygems.Replace(".rb","/ssl_certs/AddTrustExternalCARoot-2048.pem") | |
$ssl_cert_url = 'https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem' | |
# with curl installed | |
#&curl.exe -o "$ssl_cert_location" "$ssl_cert_url" | |
# without curl installed | |
(New-Object Net.WebClient).DownloadFile("$ssl_cert_url","$ssl_cert_location") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've also thought about making this a chocolatey package.