class Geminabox::Server

def spec_for(gem_name, version, platform = default_platform)

def spec_for(gem_name, version, platform = default_platform)
  filename = [gem_name, version]
  filename.push(platform) if platform != default_platform
  spec_file = File.join(Geminabox.data, "quick", "Marshal.#{Gem.marshal_version}", "#{filename.join("-")}.gemspec.rz")
  File::open(spec_file, 'r') do |unzipped_spec_file|
    unzipped_spec_file.binmode
    Marshal.load(Gem::Util.inflate(unzipped_spec_file.read))
  end if File.exist? spec_file
end