From 45a1e77452ef0f01a407b146a3c24143c9ed7026 Mon Sep 17 00:00:00 2001 From: Tom Lea Date: Fri, 12 Feb 2010 10:32:24 +0000 Subject: [PATCH] We are always uploading application/octet-streams, so why bother detecting it. At some point, when it's Hoe addiction has been solved, I'll just depend on multipart-post. --- Rakefile | 2 +- lib/rubygems/commands/inabox_command.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index b8a640a5..e6c3803e 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,7 @@ task :default => :package spec = Gem::Specification.new do |s| s.name = "geminabox" - s.version = "0.2.0" + s.version = "0.2.1" s.summary = "Really simple rubygem hosting" s.author = "Tom Lea" s.email = "contrib@tomlea.co.uk" diff --git a/lib/rubygems/commands/inabox_command.rb b/lib/rubygems/commands/inabox_command.rb index bc9ed77b..c78b0167 100644 --- a/lib/rubygems/commands/inabox_command.rb +++ b/lib/rubygems/commands/inabox_command.rb @@ -72,7 +72,6 @@ def geminabox_host=(host) end module Multipart - require 'mime/types' require 'net/http' require 'cgi' @@ -97,7 +96,7 @@ def initialize( k, filename, content ) end def to_multipart - return "Content-Disposition: form-data; name=\"#{k}\"; filename=\"#{filename}\"\r\n" + "Content-Transfer-Encoding: binary\r\n" + "Content-Type: #{MIME::Types.type_for(@filename)}\r\n\r\n" + content + "\r\n" + return "Content-Disposition: form-data; name=\"#{k}\"; filename=\"#{filename}\"\r\n" + "Content-Transfer-Encoding: binary\r\n" + "Content-Type: application/octet-stream\r\n\r\n" + content + "\r\n" end end