Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Cleans up config files
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Pliszka committed Jul 12, 2013
1 parent b331cc1 commit f65359f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 147 deletions.
43 changes: 7 additions & 36 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,27 @@

require 'rails/all'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)

module ProjectMonitor
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.
config.from_file 'settings.yml'

# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W(#{config.root}/lib #{config.root}/lib/payload)
config.encoding = 'utf-8'
config.i18n.fallbacks = true

# 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.
# 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
config.serve_static_assets = true

# JavaScript files you want as :defaults (application.js is always included).
#config.action_view.javascript_expansions[:defaults] = %w(jquery.min jquery_ujs)

# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"

# Enable the asset pipeline
config.assets.compile = true
config.assets.enabled = true
config.assets.version = '1.1'
config.assets.initialize_on_precompile = false

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
config.assets.paths << Rails.root.join('app','assets','skins')

# Allow setting of mail options from the configuration
config.action_mailer.default_url_options = Rails.configuration.emailer_host.to_hash.symbolize_keys
config.secret_key_base = 'project_monitor'

# Secret key
config.secret_key_base = "project_monitor"

# Set rails cache to use memory
config.cache_store = :memory_store
config.static_cache_control = "public, max-age=3600"
end
end
29 changes: 6 additions & 23 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,19 @@
ProjectMonitor::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

# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

config.eager_load = false

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.consider_all_requests_local = true
config.action_controller.perform_caching = 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

# enable source maps for sass http://fonicmonkey.net/2013/03/25/native-sass-scss-source-map-support-in-chrome-and-rails/
config.sass.debug_info = true
config.sass.line_comments = false # source maps don't get output if this is true
config.sass.line_comments = false

# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.max_status = 15
config.active_record.migration_error = :page_load

config.action_mailer.raise_delivery_errors = false
end
69 changes: 3 additions & 66 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,79 +1,16 @@
ProjectMonitor::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# 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

# 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

# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = true

# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = 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'

# 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

# 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 ]

# 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

# 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 )

# 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

# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify

# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false
config.assets.compress = true
config.assets.digest = true

# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
config.log_level = :info
end
24 changes: 2 additions & 22 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
ProjectMonitor::Application.configure do
# 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

# 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"

# 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.active_support.deprecation = :stderr

config.action_dispatch.show_exceptions = 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

# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
end

0 comments on commit f65359f

Please sign in to comment.