<NME> routes.rb
<BEF> Clahub::Application.routes.draw do
  root to: "pages#home", :as => :home
  match "/pages/*id" => 'pages#show', as: :page, format: false

  match 'auth/github/callback' => 'github_oauth#callback', :as => :github_oauth_callback
  resources :repos, only: [:index]
  resources :licenses, only: [:new, :create]

  get 'licenses/:user_name/:repo_name' => 'licenses#show', :as => :license
  post 'licenses/:user_name/:repo_name/agreements' => 'agreements#create', :as => :license_agreement
end
    get 'agreements/:user_name/:repo_name.csv' => 'agreements#show', :as => :agreement, :format => :csv
    get 'agreements/:user_name/:repo_name' => 'agreements#show', :as => :agreement
    delete 'agreements/:user_name/:repo_name' => 'agreements#destroy', :as => :agreement
    put 'agreements/:user_name/:repo_name' => 'agreements#update', :as => :agreement
    post 'agreements/:user_name/:repo_name/signatures' => 'signatures#create', :as => :agreement_signature
  end

  post 'repo_hook' => 'github_webhooks#repo_hook'

  resource :markdown_preview
end

<MSG> repo_name may contain dots
<DFF> @@ -6,6 +6,8 @@ Clahub::Application.routes.draw do
   resources :repos, only: [:index]
   resources :licenses, only: [:new, :create]
 
-  get 'licenses/:user_name/:repo_name' => 'licenses#show', :as => :license
-  post 'licenses/:user_name/:repo_name/agreements' => 'agreements#create', :as => :license_agreement
+  constraints :repo_name => /[^\/]+/ do
+    get 'licenses/:user_name/:repo_name' => 'licenses#show', :as => :license
+    post 'licenses/:user_name/:repo_name/agreements' => 'agreements#create', :as => :license_agreement
+  end
 end

repo_name may contain dots