On Mon, Jan 24, 2011 at 4:01 AM, Tim Cuthbertson <t...@gfxmonk.net> wrote: > I'm doing a little bit of work on zero install (0install.net), which > is a dependency manager that can speak a bunch of archive formats > (.tgz, .deb, .rpm, etc). I'd like to add .gem to that list. > Internally, it distinguishes formats by their mime type. So you have > "application/x-bzip-compressed-tar" for a .tar.bz, etc... > > So I was wondering if there is an official or agreed-upon mime-type > for .gem files? I see rubygems serves them up as > application/octet-stream, but that isn't really enough to tell what it > is if you don't have the .gem extension. > > If not, does anyone have any suggestions? I've no idea how these > things are agreed upon, but how about I throw "application/x-rubygem" > out there for starters... > > While I'm at it, is there any spec for the format of a .gem file? From > looking at examples I've come across, I'm pretty sure I can get away > with `tar x` on the gem and then `tar xz` on the data.tar.gz contained > inside. Can anyone see a potential problem with that?
Well the gem format is a tar of a tar-gz-ball and some gzip compressed stuff. Rather than adding a new "x" mime type, what's wrong with just tar format? Not sure if that layering is formally specified anywhere, but that's what it is and has been forever. - Charlie _______________________________________________ Rubygems-developers mailing list http://rubyforge.org/projects/rubygems Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers