From 4bd0dbdf2d27672dc941746e06b647ea26fe63ee Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 11 Oct 2012 09:16:51 +0000 Subject: Rakefile: fm_update task updated for HTTPS Freecode.com now requires HTTPS. --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 44c5694..9f36a74 100644 --- a/Rakefile +++ b/Rakefile @@ -49,7 +49,7 @@ task :fm_update do require 'net/netrc' require 'json' version = ENV['VERSION'] or abort "VERSION= needed" - uri = URI.parse('http://freecode.com/projects/unicorn/releases.json') + uri = URI.parse('https://freecode.com/projects/unicorn/releases.json') rc = Net::Netrc.locate('unicorn-fm') or abort "~/.netrc not found" api_token = rc.password _, subject, body = `git cat-file tag v#{version}`.split(/\n\n/, 3) @@ -71,7 +71,7 @@ task :fm_update do }.to_json if ! changelog.strip.empty? && version =~ %r{\A[\d\.]+\d+\z} - Net::HTTP.start(uri.host, uri.port) do |http| + Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http| p http.post(uri.path, req, {'Content-Type'=>'application/json'}) end else -- cgit v1.2.3-24-ge0c7