Sha256: ff2aee67d0a9a59a148078a757d0270d8998f7c464108815efa1020d1fbfa37e

Contents?: true

Size: 989 Bytes

Versions: 3

Compression:

Stored size: 989 Bytes

Contents

# Draw all of the routes that will be used in Hubstats
Hubstats::Engine.routes.draw do
  root to: "pull_requests#index" # sets default root to be the pulls page
  post "/handler" => "events#handler", :as => :handler
  resources :deploys, :only => [:create, :index, :show] # routes to index, show, and to create method
  get "/metrics" => "repos#dashboard", :as => :metrics # routes to list of repos and stats
  get "/pulls" => "pull_requests#index", :as => :pulls # routes to list of pulls
  get "/users" => "users#index", :as => :users # routes to list of users
  get "/user/:id" => "users#show", :as => :user # routes to specific user's contributions
  get "/repos" => "repos#index", :as => :repos # route is for the repo filter on the pull request and deploys page
  get "/:repo" => "repos#show", :as => :repo # routes to specific repo's stats
  scope "/:repo", :as => :repo do
    get '/pull/:id' => "pull_requests#show", :as => :pull # routes to the specific repo's pull id
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hubstats-0.4.4 config/routes.rb
hubstats-0.4.2 config/routes.rb
hubstats-0.4.1 config/routes.rb