Getting the project working again

Replace Twitter Bootstrap by Zurb Foundation
Used @import in SCSS instad of require_tree for proper order and use of variables like $debian_color
Moved old files out of the way (renamed them to xx*)
Welcome controller (/) works
Moved templates from ERB to SLIM format
Fixed database settings
Reduced routes to working ones
Tidied up Gemfile
Checked in experimental lab files

Tried to find a good description for this massive commit :)
This commit is contained in:
Christoph Haas 2014-11-16 18:26:03 +01:00
parent a7e05b2b78
commit 87f545414f
38 changed files with 3341 additions and 156 deletions

View file

@ -18,13 +18,19 @@ development:
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
adapter: postgresql
database: debshots
username: debshots
password: shootme
host: torf
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
adapter: postgresql
database: debshots
username: debshots
password: shootme
host: torf
pool: 5
timeout: 5000

View file

@ -20,7 +20,8 @@ Debshots::Application.configure do
# config.action_dispatch.rack_cache = true
# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = false
# config.serve_static_assets = false
config.serve_static_assets = true
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
@ -43,7 +44,8 @@ Debshots::Application.configure do
# config.force_ssl = true
# Set to :debug to see everything in the log.
config.log_level = :info
# config.log_level = :info
config.log_level = :warn
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
@ -60,6 +62,7 @@ Debshots::Application.configure do
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )
config.assets.precompile += %w( vendor/modernizr.js )
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
@ -77,4 +80,7 @@ Debshots::Application.configure do
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# URL prefix leading to the static images that should get delivered by the web server
config.images_path_prefix = '/screenshots'
end

View file

@ -0,0 +1,32 @@
Debshots::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# URL prefix leading to the static images that should get delivered by the web server
config.images_path_prefix = '/screenshots'
end

View file

@ -33,4 +33,7 @@ Debshots::Application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# URL prefix leading to the static images that should get delivered by the web server
config.images_path_prefix = '/screenshots'
end

View file

@ -1,21 +1,26 @@
Debshots::Application.routes.draw do
#get "packages/index"
#get "packages" => "packages#index"
#get "packages/:page/:display" => "packages#index"
get 'packages' => 'packages#index', defaults: { display: 'grid' }, as: :package_list
#get "packages/list" => "packages#index", display: 'list', as: :package_list
get 'packages' => 'packages#index', display: 'grid', as: :package_grid
#get "packages(/:display)", to: "packages#index", defaults: { display: 'grid' }
get 'packages/with_screenshots'
get 'packages/without_screenshots'
get 'packages/moderate'
get 'welcome/index'
##get "packages/index"
##get "packages" => "packages#index"
##get "packages/:page/:display" => "packages#index"
#get 'packages' => 'packages#index', defaults: { display: 'grid' }, as: :package_list
##get "packages/list" => "packages#index", display: 'list', as: :package_list
#get 'packages' => 'packages#index', display: 'grid', as: :package_grid
##get "packages(/:display)", to: "packages#index", defaults: { display: 'grid' }
#get 'packages/with_screenshots'
#get 'packages/without_screenshots'
#get 'packages/moderate'
#get 'welcome/index'
get 'packages' => 'packages#index'
get 'package/:name' => 'packages#details', as: :package
get 'upload/:packagename' => 'packages#upload', as: :upload_package
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
root to: 'packages#index'
root 'welcome#home'
#root to: 'packages#home'
# Example of regular route:
# get 'products/:id' => 'catalog#view'