Sha256: 3e102e45f250d02c3ce17f670da24d8f7b6b11ace06e9a1abd738e8e1ae3320d

Contents?: true

Size: 773 Bytes

Versions: 33

Compression:

Stored size: 773 Bytes

Contents

require 'sinatra/base'

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

Version data entries

33 entries across 33 versions & 4 rubygems

Version Path
geminabox-0.11.1 lib/hostess.rb
geminabox-inflection-0.12.0 lib/hostess.rb
geminabox-inflection-0.11.0 lib/hostess.rb
geminabox-0.11.0 lib/hostess.rb
geminabox-bootstrap-0.10.3 lib/hostess.rb
geminabox-0.10.1 lib/hostess.rb
geminabox-0.10.0 lib/hostess.rb
geminabox-0.9.0 lib/hostess.rb
geminabox-0.8.0 lib/hostess.rb
geminabox-0.7.0 lib/hostess.rb
geminabox-0.6.1 lib/hostess.rb
geminabox-0.6.1pre1 lib/hostess.rb
geminabox-0.6.0 lib/hostess.rb
geminabox-0.5.2 lib/hostess.rb
geminabox-0.5.1 lib/hostess.rb
geminabox-0.5.0 lib/hostess.rb
geminabox-0.4.0 lib/hostess.rb
geminabox-0.3.3 lib/hostess.rb
geminabox-0.3.2 lib/hostess.rb
geminabox-secure-0.3.6 lib/hostess.rb