Skip to content

Commit

Permalink
Update RUBYGEM_NAME_MATCHER to be less greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarkow authored and nickrivadeneira committed Jun 4, 2011
1 parent c82be50 commit 8218523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUBYGEM_NAME_MATCHER = /[A-Za-z0-9\-\_\.]+/
RUBYGEM_NAME_MATCHER = /[A-Za-z0-9\-\_\.]+?/

Gemcutter::Application.routes.draw do

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

resources :dependencies, :only => :index

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

0 comments on commit 8218523

Please sign in to comment.