Sha256: 5814d31ba3d4ba4acb80833d317fc31188ca76e98e250568786aebe0133e3820

Contents?: true

Size: 738 Bytes

Versions: 10

Compression:

Stored size: 738 Bytes

Contents

require 'sinatra/base'

class Hostess < Sinatra::Base
  def serve
    send_file(File.expand_path(File.join(Geminabox.data, *request.path_info)))
  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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
geminabox-0.2.8 lib/hostess.rb
geminabox-0.2.7 lib/hostess.rb
geminabox-0.2.6 lib/hostess.rb
geminabox-0.2.5 lib/hostess.rb
geminabox-0.2.4 lib/hostess.rb
geminabox-0.2.3 lib/hostess.rb
geminabox-0.2.2 lib/hostess.rb
geminabox-0.2.1 lib/hostess.rb
geminabox-0.2.0 lib/hostess.rb
geminabox-0.1.0 lib/hostess.rb