Merge branch 'master' of git.workaround.org:chaas/debshots
This commit is contained in:
commit
773548afc3
22 changed files with 303 additions and 75 deletions
|
|
@ -9,9 +9,13 @@ Debshots::Application.configure do
|
|||
# Do not eager load code on boot.
|
||||
config.eager_load = false
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
# Show full error reports
|
||||
config.consider_all_requests_local = true
|
||||
|
||||
# Disable caching (except for working on caching)
|
||||
config.action_controller.perform_caching = false
|
||||
# config.action_controller.perform_caching = true
|
||||
# config.cache_store = :file_store, "#{Rails.root.to_s}/tmp/cache/filestore"
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
|
|
|||
|
|
@ -13,9 +13,12 @@ Debshots::Application.configure do
|
|||
# ActiveRecord errors propagate normally (forward deprecation to Rails 5)
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
|
||||
# Full error reports are disabled and caching is turned on.
|
||||
# Full error reports are disabled
|
||||
config.consider_all_requests_local = false
|
||||
|
||||
# Caching turned on
|
||||
config.action_controller.perform_caching = true
|
||||
config.cache_store = :file_store, "#{Rails.root.to_s}/tmp/cache/filestore"
|
||||
|
||||
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
||||
# Add `rack-cache` to your Gemfile before enabling this.
|
||||
|
|
|
|||
|
|
@ -28,6 +28,18 @@ Debshots::Application.routes.draw do
|
|||
get 'approve_screenshot/:id' => 'packages#approve_screenshot', as: :approve_screenshot
|
||||
get 'about' => 'welcome#about'
|
||||
get 'thumbnail/:name' => 'packages#thumbnail', as: :thumbnail_image, name: /[^\/]+/
|
||||
get 'thumbnail-with-version/:name/:version' => 'packages#thumbnail', name: /[^\/]+/, version: /\S+/
|
||||
get 'screenshot/:name' => 'packages#screenshot', as: :screenshot_image, name: /[^\/]+/
|
||||
get 'screenshot-with-version/:name/:version' => 'packages#screenshot', name: /[^\/]+/, version: /\S+/
|
||||
|
||||
# Legacy URLs
|
||||
get 'with_screenshots', to: redirect('/packages?show=with')
|
||||
get 'without_screenshots', to: redirect('/packages?show=without')
|
||||
|
||||
get 'json/package/:name' => 'json#package', as: :json_package, defaults: { format: :json }
|
||||
get 'json/packages' => 'json#packages', as: :json_packages, defaults: { format: :json }
|
||||
get 'json/screenshots' => 'json#screenshots', as: :json_screenshots, defaults: { format: :json }
|
||||
get 'json/packages-without-screenshots' => 'json#packages_without_screenshots', defaults: { format: :json }
|
||||
|
||||
# The priority is based upon order of creation: first created -> highest priority.
|
||||
# See how all your routes lay out with "rake routes".
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue