mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
Sync boilerplate with Rails 4.1.4
This commit is contained in:
parent
4125faf109
commit
9125355313
14 changed files with 186 additions and 74 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,6 +14,7 @@
|
||||||
/coverage
|
/coverage
|
||||||
/db/*.db
|
/db/*.db
|
||||||
/db/*.sqlite3
|
/db/*.sqlite3
|
||||||
|
/db/*.sqlite3-journal
|
||||||
/log/*.log
|
/log/*.log
|
||||||
/public/assets/
|
/public/assets/
|
||||||
/tmp
|
/tmp
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
||||||
//
|
//
|
||||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||||
// the compiled file.
|
// compiled file.
|
||||||
//
|
//
|
||||||
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
||||||
// GO AFTER THE REQUIRES BELOW.
|
// about supported directives.
|
||||||
//
|
//
|
||||||
//= require jquery
|
//= require jquery
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||||
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
||||||
*
|
*
|
||||||
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
||||||
* compiled file, but it's generally better to create a new file per style scope.
|
* compiled file so the styles you add here take precedence over styles defined in any styles
|
||||||
|
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
||||||
|
* file per style scope.
|
||||||
*
|
*
|
||||||
*= require_self
|
*= require_self
|
||||||
*= require_tree ../../../vendor/assets/stylesheets
|
*= require_tree ../../../vendor/assets/stylesheets
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# The filters added to this controller will be run for all controllers in the
|
|
||||||
# application. Likewise will all the methods added be available for all
|
|
||||||
# controllers.
|
|
||||||
|
|
||||||
require_dependency "login_system"
|
require_dependency "login_system"
|
||||||
require_dependency "tracks/source_view"
|
require_dependency "tracks/source_view"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# The methods added to this helper will be available to all templates in the
|
|
||||||
# application.
|
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
|
||||||
def group_view_by_menu_entry
|
def group_view_by_menu_entry
|
||||||
|
|
|
@ -19,13 +19,6 @@ module Tracksapp
|
||||||
# config.autoload_paths += %W(#{config.root}/extras)
|
# config.autoload_paths += %W(#{config.root}/extras)
|
||||||
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
||||||
|
|
||||||
# Only load the plugins named here, in the order given (default is alphabetical).
|
|
||||||
# :all can be used as a placeholder for all plugins not explicitly named.
|
|
||||||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
|
||||||
|
|
||||||
# Activate observers that should always be running.
|
|
||||||
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
|
||||||
|
|
||||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||||
# config.time_zone = 'Central Time (US & Canada)'
|
# config.time_zone = 'Central Time (US & Canada)'
|
||||||
|
@ -38,14 +31,6 @@ module Tracksapp
|
||||||
# Configure the default encoding used in templates for Ruby 1.9.
|
# Configure the default encoding used in templates for Ruby 1.9.
|
||||||
config.encoding = "utf-8"
|
config.encoding = "utf-8"
|
||||||
|
|
||||||
# Configure sensitive parameters which will be filtered from the log file.
|
|
||||||
config.filter_parameters += [:password]
|
|
||||||
|
|
||||||
# Use SQL instead of Active Record's schema dumper when creating the database.
|
|
||||||
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
|
||||||
# like if you have constraints or database-specific column types
|
|
||||||
# config.active_record.schema_format = :sql
|
|
||||||
|
|
||||||
# Set timezone of dates in database
|
# Set timezone of dates in database
|
||||||
config.active_record.default_timezone = :utc
|
config.active_record.default_timezone = :utc
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,14 @@ Rails.application.configure do
|
||||||
# Do not eager load code on boot.
|
# Do not eager load code on boot.
|
||||||
config.eager_load = false
|
config.eager_load = false
|
||||||
|
|
||||||
# Show full error reports and disable caching
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
# Don't care if the mailer can't send
|
# Don't care if the mailer can't send.
|
||||||
config.action_mailer.raise_delivery_errors = false
|
config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
# Print deprecation notices to the Rails logger
|
# Print deprecation notices to the Rails logger.
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
# Debug mode disables concatenation and preprocessing of assets.
|
# Debug mode disables concatenation and preprocessing of assets.
|
||||||
|
@ -35,4 +35,6 @@ Rails.application.configure do
|
||||||
|
|
||||||
config.rack_dev_mark.enable = true
|
config.rack_dev_mark.enable = true
|
||||||
|
|
||||||
|
# Raises error for missing translations
|
||||||
|
# config.action_view.raise_on_missing_translations = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ Rails.application.configure do
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
# Eager load code on boot. This eager loads most of Rails and
|
# Eager load code on boot. This eager loads most of Rails and
|
||||||
# your application in memory, allowing both thread web servers
|
# your application in memory, allowing both threaded web servers
|
||||||
# and those relying on copy on write to perform better.
|
# and those relying on copy on write to perform better.
|
||||||
# Rake tasks automatically ignore this option for performance.
|
# Rake tasks automatically ignore this option for performance.
|
||||||
config.eager_load = true
|
config.eager_load = true
|
||||||
|
@ -76,4 +76,7 @@ Rails.application.configure do
|
||||||
|
|
||||||
# Use default logging formatter so that PID and timestamp are not suppressed.
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
||||||
config.log_formatter = ::Logger::Formatter.new
|
config.log_formatter = ::Logger::Formatter.new
|
||||||
|
|
||||||
|
# Do not dump schema after migrations.
|
||||||
|
config.active_record.dump_schema_after_migration = false
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,7 @@ Rails.application.configure do
|
||||||
|
|
||||||
# Configure static asset server for tests with Cache-Control for performance.
|
# Configure static asset server for tests with Cache-Control for performance.
|
||||||
config.serve_static_assets = true
|
config.serve_static_assets = true
|
||||||
config.static_cache_control = "public, max-age=3600"
|
config.static_cache_control = 'public, max-age=3600'
|
||||||
|
|
||||||
# Show full error reports and disable caching.
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
@ -41,4 +41,7 @@ Rails.application.configure do
|
||||||
SITE_CONFIG['salt'] ||= 'change-me'
|
SITE_CONFIG['salt'] ||= 'change-me'
|
||||||
|
|
||||||
config.time_zone = 'UTC'
|
config.time_zone = 'UTC'
|
||||||
|
|
||||||
|
# Raises error for missing translations
|
||||||
|
# config.action_view.raise_on_missing_translations = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,25 +2,66 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>The page you were looking for doesn't exist (404)</title>
|
<title>The page you were looking for doesn't exist (404)</title>
|
||||||
<style type="text/css">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
<style>
|
||||||
div.dialog {
|
body {
|
||||||
width: 25em;
|
background-color: #EFEFEF;
|
||||||
padding: 0 4em;
|
color: #2E2F30;
|
||||||
margin: 4em auto 0 auto;
|
text-align: center;
|
||||||
border: 1px solid #ccc;
|
font-family: arial, sans-serif;
|
||||||
border-right-color: #999;
|
margin: 0;
|
||||||
border-bottom-color: #999;
|
}
|
||||||
|
|
||||||
|
div.dialog {
|
||||||
|
width: 95%;
|
||||||
|
max-width: 33em;
|
||||||
|
margin: 4em auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dialog > div {
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-right-color: #999;
|
||||||
|
border-left-color: #999;
|
||||||
|
border-bottom-color: #BBB;
|
||||||
|
border-top: #B00100 solid 4px;
|
||||||
|
border-top-left-radius: 9px;
|
||||||
|
border-top-right-radius: 9px;
|
||||||
|
background-color: white;
|
||||||
|
padding: 7px 12% 0;
|
||||||
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 100%;
|
||||||
|
color: #730E15;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dialog > p {
|
||||||
|
margin: 0 0 1em;
|
||||||
|
padding: 1em;
|
||||||
|
background-color: #F7F7F7;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-right-color: #999;
|
||||||
|
border-left-color: #999;
|
||||||
|
border-bottom-color: #999;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
border-top-color: #DADADA;
|
||||||
|
color: #666;
|
||||||
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
}
|
}
|
||||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- This file lives in public/404.html -->
|
<!-- This file lives in public/404.html -->
|
||||||
<div class="dialog">
|
<div class="dialog">
|
||||||
|
<div>
|
||||||
<h1>The page you were looking for doesn't exist.</h1>
|
<h1>The page you were looking for doesn't exist.</h1>
|
||||||
<p>You may have mistyped the address or the page may have moved.</p>
|
<p>You may have mistyped the address or the page may have moved.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<p>If you are the application owner check the logs for more information.</p>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,25 +2,66 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>The change you wanted was rejected (422)</title>
|
<title>The change you wanted was rejected (422)</title>
|
||||||
<style type="text/css">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
<style>
|
||||||
div.dialog {
|
body {
|
||||||
width: 25em;
|
background-color: #EFEFEF;
|
||||||
padding: 0 4em;
|
color: #2E2F30;
|
||||||
margin: 4em auto 0 auto;
|
text-align: center;
|
||||||
border: 1px solid #ccc;
|
font-family: arial, sans-serif;
|
||||||
border-right-color: #999;
|
margin: 0;
|
||||||
border-bottom-color: #999;
|
}
|
||||||
|
|
||||||
|
div.dialog {
|
||||||
|
width: 95%;
|
||||||
|
max-width: 33em;
|
||||||
|
margin: 4em auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dialog > div {
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-right-color: #999;
|
||||||
|
border-left-color: #999;
|
||||||
|
border-bottom-color: #BBB;
|
||||||
|
border-top: #B00100 solid 4px;
|
||||||
|
border-top-left-radius: 9px;
|
||||||
|
border-top-right-radius: 9px;
|
||||||
|
background-color: white;
|
||||||
|
padding: 7px 12% 0;
|
||||||
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 100%;
|
||||||
|
color: #730E15;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dialog > p {
|
||||||
|
margin: 0 0 1em;
|
||||||
|
padding: 1em;
|
||||||
|
background-color: #F7F7F7;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-right-color: #999;
|
||||||
|
border-left-color: #999;
|
||||||
|
border-bottom-color: #999;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
border-top-color: #DADADA;
|
||||||
|
color: #666;
|
||||||
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
}
|
}
|
||||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- This file lives in public/422.html -->
|
<!-- This file lives in public/422.html -->
|
||||||
<div class="dialog">
|
<div class="dialog">
|
||||||
|
<div>
|
||||||
<h1>The change you wanted was rejected.</h1>
|
<h1>The change you wanted was rejected.</h1>
|
||||||
<p>Maybe you tried to change something you didn't have access to.</p>
|
<p>Maybe you tried to change something you didn't have access to.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<p>If you are the application owner check the logs for more information.</p>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,25 +2,65 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>We're sorry, but something went wrong (500)</title>
|
<title>We're sorry, but something went wrong (500)</title>
|
||||||
<style type="text/css">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
<style>
|
||||||
div.dialog {
|
body {
|
||||||
width: 25em;
|
background-color: #EFEFEF;
|
||||||
padding: 0 4em;
|
color: #2E2F30;
|
||||||
margin: 4em auto 0 auto;
|
text-align: center;
|
||||||
border: 1px solid #ccc;
|
font-family: arial, sans-serif;
|
||||||
border-right-color: #999;
|
margin: 0;
|
||||||
border-bottom-color: #999;
|
}
|
||||||
|
|
||||||
|
div.dialog {
|
||||||
|
width: 95%;
|
||||||
|
max-width: 33em;
|
||||||
|
margin: 4em auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dialog > div {
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-right-color: #999;
|
||||||
|
border-left-color: #999;
|
||||||
|
border-bottom-color: #BBB;
|
||||||
|
border-top: #B00100 solid 4px;
|
||||||
|
border-top-left-radius: 9px;
|
||||||
|
border-top-right-radius: 9px;
|
||||||
|
background-color: white;
|
||||||
|
padding: 7px 12% 0;
|
||||||
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 100%;
|
||||||
|
color: #730E15;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dialog > p {
|
||||||
|
margin: 0 0 1em;
|
||||||
|
padding: 1em;
|
||||||
|
background-color: #F7F7F7;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-right-color: #999;
|
||||||
|
border-left-color: #999;
|
||||||
|
border-bottom-color: #999;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
border-top-color: #DADADA;
|
||||||
|
color: #666;
|
||||||
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
}
|
}
|
||||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- This file lives in public/500.html -->
|
<!-- This file lives in public/500.html -->
|
||||||
<div class="dialog">
|
<div class="dialog">
|
||||||
|
<div>
|
||||||
<h1>We're sorry, but something went wrong.</h1>
|
<h1>We're sorry, but something went wrong.</h1>
|
||||||
<p>The Tracks application failed with error 500. More details can be found in the log file of Tracks</p>
|
</div>
|
||||||
|
<p>If you are the application owner check the logs for more information.</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
|
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
||||||
#
|
#
|
||||||
# To ban all spiders from the entire site uncomment the next two lines:
|
# To ban all spiders from the entire site uncomment the next two lines:
|
||||||
User-Agent: *
|
User-Agent: *
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ENV["RAILS_ENV"] ||= "test"
|
ENV['RAILS_ENV'] ||= 'test'
|
||||||
require File.expand_path('../../config/environment', __FILE__)
|
require File.expand_path('../../config/environment', __FILE__)
|
||||||
require 'rails/test_help'
|
require 'rails/test_help'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue