summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-23 10:58:41 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-23 10:58:41 -0400
commit8593bcdf2471ce8d818e7b83e93fbe2d850f5029 (patch)
treee64ea4aef665c5a172207d8f26737678a1c200a6 /config
parent33076ce4282d6dcb66fb83a2278668a6320b5845 (diff)
parentd7dd03e3b43510bc3a79e592f600d7cb239bc8ca (diff)
Merge branch 'clean2'
Conflicts: config/initializers/mailboxer.rb config/routes.rb
Diffstat (limited to 'config')
-rw-r--r--config/application.rb24
-rw-r--r--config/environments/development.rb40
-rw-r--r--config/environments/production.rb112
-rw-r--r--config/environments/test.rb52
-rw-r--r--config/initializers/wrap_parameters.rb2
-rw-r--r--config/routes.rb9
6 files changed, 118 insertions, 121 deletions
diff --git a/config/application.rb b/config/application.rb
index 57c9163..658e0aa 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -7,19 +7,19 @@ require 'rails/all'
Bundler.require(:default, Rails.env)
module Leaguer
- class Application < Rails::Application
- # Settings in config/environments/* take precedence over those specified here.
- # Application configuration should go into files in config/initializers
- # -- all .rb files in that directory are automatically loaded.
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
- I18n.enforce_available_locales = true
+ I18n.enforce_available_locales = true
- # 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.
- # config.time_zone = 'Central Time (US & Canada)'
+ # 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.
+ # config.time_zone = 'Central Time (US & Canada)'
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
- # config.i18n.default_locale = :de
- end
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+ end
end
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 0d643ca..1660315 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,29 +1,29 @@
Leaguer::Application.configure do
- # Settings specified here will take precedence over those in config/application.rb.
+ # 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
+ # 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
+ # 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
+ # 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
+ # 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
+ # 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
+ # 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
+ # 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
end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 55ace29..a3b2d98 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -1,80 +1,80 @@
Leaguer::Application.configure do
- # Settings specified here will take precedence over those in config/application.rb.
+ # Settings specified here will take precedence over those in config/application.rb.
- # Code is not reloaded between requests.
- config.cache_classes = true
+ # Code is not reloaded between requests.
+ 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
- # and those relying on copy on write to perform better.
- # Rake tasks automatically ignore this option for performance.
- config.eager_load = true
+ # Eager load code on boot. This eager loads most of Rails and
+ # your application in memory, allowing both thread web servers
+ # and those relying on copy on write to perform better.
+ # Rake tasks automatically ignore this option for performance.
+ config.eager_load = true
- # Full error reports are disabled and caching is turned on.
- config.consider_all_requests_local = false
- config.action_controller.perform_caching = true
+ # Full error reports are disabled and caching is turned on.
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
- # Add `rack-cache` to your Gemfile before enabling this.
- # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
- # config.action_dispatch.rack_cache = true
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
+ # Add `rack-cache` to your Gemfile before enabling this.
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
+ # config.action_dispatch.rack_cache = true
- # Disable Rails's static asset server (Apache or nginx will already do this).
- config.serve_static_assets = false
+ # Disable Rails's static asset server (Apache or nginx will already do this).
+ config.serve_static_assets = false
- # Compress JavaScripts and CSS.
- config.assets.js_compressor = :uglifier
- # config.assets.css_compressor = :sass
+ # Compress JavaScripts and CSS.
+ config.assets.js_compressor = :uglifier
+ # config.assets.css_compressor = :sass
- # Do not fallback to assets pipeline if a precompiled asset is missed.
- config.assets.compile = false
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
+ config.assets.compile = false
- # Generate digests for assets URLs.
- config.assets.digest = true
+ # Generate digests for assets URLs.
+ config.assets.digest = true
- # Version of your assets, change this if you want to expire all your assets.
- config.assets.version = '1.0'
+ # Version of your assets, change this if you want to expire all your assets.
+ config.assets.version = '1.0'
- # Specifies the header that your server uses for sending files.
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+ # Specifies the header that your server uses for sending files.
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
- # config.force_ssl = true
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
- # Set to :debug to see everything in the log.
- config.log_level = :info
+ # Set to :debug to see everything in the log.
+ config.log_level = :info
- # Prepend all log lines with the following tags.
- # config.log_tags = [ :subdomain, :uuid ]
+ # Prepend all log lines with the following tags.
+ # config.log_tags = [ :subdomain, :uuid ]
- # Use a different logger for distributed setups.
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+ # Use a different logger for distributed setups.
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
- # Use a different cache store in production.
- # config.cache_store = :mem_cache_store
+ # Use a different cache store in production.
+ # config.cache_store = :mem_cache_store
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
- # config.action_controller.asset_host = "http://assets.example.com"
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
+ # config.action_controller.asset_host = "http://assets.example.com"
- # 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 )
+ # 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 )
- # 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.
- # config.action_mailer.raise_delivery_errors = false
+ # 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.
+ # 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).
- config.i18n.fallbacks = true
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found).
+ config.i18n.fallbacks = true
- # Send deprecation notices to registered listeners.
- config.active_support.deprecation = :notify
+ # Send deprecation notices to registered listeners.
+ config.active_support.deprecation = :notify
- # Disable automatic flushing of the log to improve performance.
- # config.autoflush_log = false
+ # Disable automatic flushing of the log to improve performance.
+ # config.autoflush_log = false
- # Use default logging formatter so that PID and timestamp are not suppressed.
- config.log_formatter = ::Logger::Formatter.new
+ # Use default logging formatter so that PID and timestamp are not suppressed.
+ config.log_formatter = ::Logger::Formatter.new
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 679ae4a..f422a59 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,36 +1,36 @@
Leaguer::Application.configure do
- # Settings specified here will take precedence over those in config/application.rb.
+ # Settings specified here will take precedence over those in config/application.rb.
- # The test environment is used exclusively to run your application's
- # test suite. You never need to work with it otherwise. Remember that
- # your test database is "scratch space" for the test suite and is wiped
- # and recreated between test runs. Don't rely on the data there!
- config.cache_classes = true
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
- # Do not eager load code on boot. This avoids loading your whole application
- # just for the purpose of running a single test. If you are using a tool that
- # preloads Rails for running tests, you may have to set it to true.
- config.eager_load = false
+ # Do not eager load code on boot. This avoids loading your whole application
+ # just for the purpose of running a single test. If you are using a tool that
+ # preloads Rails for running tests, you may have to set it to true.
+ config.eager_load = false
- # Configure static asset server for tests with Cache-Control for performance.
- config.serve_static_assets = true
- config.static_cache_control = "public, max-age=3600"
+ # Configure static asset server for tests with Cache-Control for performance.
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
- # Show full error reports and disable caching.
- config.consider_all_requests_local = true
- config.action_controller.perform_caching = false
+ # Show full error reports and disable caching.
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
- # Raise exceptions instead of rendering exception templates.
- config.action_dispatch.show_exceptions = false
+ # Raise exceptions instead of rendering exception templates.
+ config.action_dispatch.show_exceptions = false
- # Disable request forgery protection in test environment.
- config.action_controller.allow_forgery_protection = false
+ # Disable request forgery protection in test environment.
+ config.action_controller.allow_forgery_protection = false
- # Tell Action Mailer not to deliver emails to the real world.
- # The :test delivery method accumulates sent emails in the
- # ActionMailer::Base.deliveries array.
- config.action_mailer.delivery_method = :test
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
- # Print deprecation notices to the stderr.
- config.active_support.deprecation = :stderr
+ # Print deprecation notices to the stderr.
+ config.active_support.deprecation = :stderr
end
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
index 33725e9..bf86da9 100644
--- a/config/initializers/wrap_parameters.rb
+++ b/config/initializers/wrap_parameters.rb
@@ -5,7 +5,7 @@
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
end
# To enable root element in JSON for ActiveRecord objects.
diff --git a/config/routes.rb b/config/routes.rb
index 97cc5c4..5d53c0e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,5 +1,4 @@
Leaguer::Application.routes.draw do
-
resources :brackets
resources :sessions, only: [:new, :create, :destroy]
@@ -12,16 +11,14 @@ Leaguer::Application.routes.draw do
resources :alerts
- resource :server, only: [:show, :edit, :update]
-
- #match 'simple_captcha/:id', :to => 'simple_captcha#show', :as => :simple_captcha
-
resources :teams
resources :tournaments do
resources :matches, only: [:index, :show, :update]
end
+ resource :server, only: [:show, :edit, :update]
+
root to: 'static#homepage'
get '/testsvg', to: 'static#test'
@@ -34,7 +31,7 @@ end
Leaguer::Application.routes.named_routes.module.module_eval do
def match_path(match, options={})
tournament_match_path(match.tournament_stage.tournament, match, options)
- end
+ end
def match_url(match, options={})
tournament_match_url(match.tournament_stage.tournament, match, options)
end