Browse files

Rakefile: fm_update task updated for HTTPS

Freecode.com now requires HTTPS.
  • Loading branch information...
1 parent f0a31e4 commit 4bd0dbdf2d27672dc941746e06b647ea26fe63ee Eric Wong committed Oct 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Rakefile
View
4 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

0 comments on commit 4bd0dbd

Please sign in to comment.