<commit_before>RUBYGEM_NAME_MATCHER = /[A-Za-z0-9\-\_\.]+/

Gemcutter::Application.routes.draw do

  ################################################################################
  # API v1

  namespace :api do
    namespace :v1 do
      resource :api_key, :only => :show do
        put :reset
      end

      resources :downloads, :only => :index

      constraints :id => RUBYGEM_NAME_MATCHER do
        resources :downloads, :only => :show

        resources :downloads, :only => :show

        resources :versions, :only => :show do
          resources :downloads, :only => :index, :controller => "versions/downloads" do
            collection do
              get :search
            end
          end
        end
      end

      resources :dependencies, :only => :index

      resources :rubygems, :path => "gems", :only => [:create, :show, :index], :id => /.+?/, :format => /json|xml/ do
        collection do
          delete :yank
          put :unyank
        end
        constraints :rubygem_id => RUBYGEM_NAME_MATCHER do
          resource :owners, :only => [:show, :create, :destroy]
        end<commit_msg>Update RUBYGEM_NAME_MATCHER to be less greedy<commit_after>RUBYGEM_NAME_MATCHER = /[A-Za-z0-9\-\_\.]+?/

Gemcutter::Application.routes.draw do

  ################################################################################
  # API v1

  namespace :api do
    namespace :v1 do
      resource :api_key, :only => :show do
        put :reset
      end

      resources :downloads, :only => :index

      constraints :id => RUBYGEM_NAME_MATCHER do
        resources :downloads, :only => :show

        resources :downloads, :only => :show

        resources :versions, :only => :show do
          resources :downloads, :only => :index, :controller => "versions/downloads" do
            collection do
              get :search
            end
          end
        end
      end

      resources :dependencies, :only => :index

      resources :rubygems, :path => "gems", :only => [:create, :show, :index], :id => RUBYGEM_NAME_MATCHER, :format => /json|xml/ do
        collection do
          delete :yank
          put :unyank
        end
        constraints :rubygem_id => RUBYGEM_NAME_MATCHER do
          resource :owners, :only => [:show, :create, :destroy]
        end
{'fraction_non_alphanumeric': 0.1801566579634465, 'fraction_numerical': 0.0034812880765883376, 'mean_word_length': 2.298421807747489, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4845060', 'n_tokens_mistral': 705, 'n_tokens_neox': 659, 'n_words': 185}