Sha256: f756dc028973ee2a0ec04d7cef140a8d7149652d57ba9bdfb4a0d29b91f71427
Contents?: true
Size: 898 Bytes
Versions: 4
Compression:
Stored size: 898 Bytes
Contents
# frozen_string_literal: true require 'sinatra/base' module Geminabox class Hostess < Sinatra::Base def serve send_file(File.expand_path(File.join(Geminabox.data, *request.path_info)), :type => response['Content-Type']) end %w[/specs.4.8.gz /latest_specs.4.8.gz /prerelease_specs.4.8.gz ].each do |index| get index do content_type 'application/x-gzip' serve end end %w[/quick/Marshal.4.8/*.gemspec.rz /yaml.Z /Marshal.4.8.Z ].each do |deflated_index| get deflated_index do content_type('application/x-deflate') serve end end %w[/yaml /Marshal.4.8 /specs.4.8 /latest_specs.4.8 /prerelease_specs.4.8 ].each do |old_index| get old_index do serve end end get "/gems/*.gem" do serve end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
geminabox-1.5.0 | lib/geminabox/hostess.rb |
geminabox-1.5.0.rc.1 | lib/geminabox/hostess.rb |
geminabox-1.4.3 | lib/geminabox/hostess.rb |
geminabox-1.4.3.rc | lib/geminabox/hostess.rb |