Skip to content

Commit

Permalink
use splat in routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewland committed Feb 9, 2009
1 parent 6d82cac commit c7e8bb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rack_rubygems.rb
Expand Up @@ -66,14 +66,14 @@ class RackRubygems < Sinatra::Base
Gem.deflate(source_index.latest_specs.map { |spec| spec.full_name }.sort.join("\n"))
end

get "/quick/:selector.gemspec.rz" do
get "/quick/*.gemspec.rz" do
content_type 'application/x-deflate'
Gem.deflate(quick(params[:selector]).to_yaml)
Gem.deflate(quick(params[:splat].first).to_yaml)
end

get "/quick/Marshal.#{Gem.marshal_version}/:selector.gemspec.rz" do
get "/quick/Marshal.#{Gem.marshal_version}/*.gemspec.rz" do
content_type 'application/x-deflate'
Gem.deflate(marshal(quick(params[:selector])))
Gem.deflate(marshal(quick(params[:splat].first)))
end

def source_index
Expand Down

0 comments on commit c7e8bb3

Please sign in to comment.