Skip to content

Commit

Permalink
Only use the lazy rubygem name matcher on API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarkow authored and nickrivadeneira committed Jun 4, 2011
1 parent 8218523 commit 21a45d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config/routes.rb
@@ -1,4 +1,5 @@
RUBYGEM_NAME_MATCHER = /[A-Za-z0-9\-\_\.]+?/
RUBYGEM_NAME_MATCHER = /[A-Za-z0-9\-\_\.]+/
LAZY_RUBYGEM_NAME_MATCHER = /[A-Za-z0-9\-\_\.]+?/

Gemcutter::Application.routes.draw do

Expand Down Expand Up @@ -29,7 +30,7 @@

resources :dependencies, :only => :index

resources :rubygems, :path => "gems", :only => [:create, :show, :index], :id => RUBYGEM_NAME_MATCHER, :format => /json|xml/ do
resources :rubygems, :path => "gems", :only => [:create, :show, :index], :id => LAZY_RUBYGEM_NAME_MATCHER, :format => /json|xml/ do
collection do
delete :yank
put :unyank
Expand Down

0 comments on commit 21a45d7

Please sign in to comment.