diff --git a/.gitignore b/.gitignore index 0dc4677e..e200dc5c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ /coverage /db/*.db /db/*.sqlite3 +/db/*.sqlite3-journal /log/*.log /public/assets/ /tmp diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 7fe46587..4ad38323 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -5,10 +5,10 @@ // 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 -// the compiled file. +// compiled file. // -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. +// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details +// about supported directives. // //= require jquery //= require jquery_ujs diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index e9eecf54..971df467 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -5,10 +5,12 @@ * 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. * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * 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_tree ../../../vendor/assets/stylesheets *= require tracks -*/ + */ diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bd50b0bd..24e10e27 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 "tracks/source_view" diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 07c95e87..21ecc65f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,3 @@ -# The methods added to this helper will be available to all templates in the -# application. module ApplicationHelper def group_view_by_menu_entry diff --git a/config/application.rb b/config/application.rb index aa266912..02ddd0c8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -18,13 +18,6 @@ module Tracksapp # Custom directories with classes and modules you want to be autoloadable. # config.autoload_paths += %W(#{config.root}/extras) 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. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. @@ -37,14 +30,6 @@ module Tracksapp # Configure the default encoding used in templates for Ruby 1.9. 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 config.active_record.default_timezone = :utc diff --git a/config/environments/development.rb b/config/environments/development.rb index a94c65d4..529dd7ce 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -9,14 +9,14 @@ Rails.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 and disable caching. config.consider_all_requests_local = true 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 - # Print deprecation notices to the Rails logger + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Debug mode disables concatenation and preprocessing of assets. @@ -35,4 +35,6 @@ Rails.application.configure do config.rack_dev_mark.enable = true + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true end diff --git a/config/environments/production.rb b/config/environments/production.rb index f7d1d824..a8836c36 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -5,7 +5,7 @@ Rails.application.configure do config.cache_classes = true # 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. # Rake tasks automatically ignore this option for performance. config.eager_load = true @@ -65,7 +65,7 @@ Rails.application.configure do # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found). + # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. @@ -76,4 +76,7 @@ Rails.application.configure do # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false end diff --git a/config/environments/test.rb b/config/environments/test.rb index 8e4c34fc..458acf1e 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -14,7 +14,7 @@ Rails.application.configure do # Configure static asset server for tests with Cache-Control for performance. 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. config.consider_all_requests_local = true @@ -41,4 +41,7 @@ Rails.application.configure do SITE_CONFIG['salt'] ||= 'change-me' config.time_zone = 'UTC' + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true end diff --git a/public/404.html b/public/404.html index 9a48320a..b612547f 100644 --- a/public/404.html +++ b/public/404.html @@ -2,25 +2,66 @@ The page you were looking for doesn't exist (404) -
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

diff --git a/public/422.html b/public/422.html index 83660ab1..a21f82b3 100644 --- a/public/422.html +++ b/public/422.html @@ -2,25 +2,66 @@ The change you wanted was rejected (422) -
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

diff --git a/public/500.html b/public/500.html index 2d13a43d..061abc58 100644 --- a/public/500.html +++ b/public/500.html @@ -2,25 +2,65 @@ We're sorry, but something went wrong (500) -
-

We're sorry, but something went wrong.

-

The Tracks application failed with error 500. More details can be found in the log file of Tracks

+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

diff --git a/public/robots.txt b/public/robots.txt index 8e1d4206..740f7fef 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -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: User-Agent: * diff --git a/test/test_helper.rb b/test/test_helper.rb index 6e7a07e6..aff9ee3c 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,4 @@ -ENV["RAILS_ENV"] ||= "test" +ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'