development.rb 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. $stdout.sync = true
  2. Huginn::Application.configure do
  3. config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload
  4. # Settings specified here will take precedence over those in config/application.rb
  5. # In the development environment your application's code is reloaded on
  6. # every request. This slows down response time but is perfect for development
  7. # since you don't have to restart the web server when you make code changes.
  8. config.cache_classes = false
  9. # Eager load code on boot. This eager loads most of Rails and
  10. # your application in memory, allowing both threaded web servers
  11. # and those relying on copy on write to perform better.
  12. # Rake tasks automatically ignore this option for performance.
  13. config.eager_load = false
  14. # Show full error reports.
  15. config.consider_all_requests_local = true
  16. # Enable/disable caching. By default caching is disabled.
  17. # Run rails dev:cache to toggle caching.
  18. if Rails.root.join('tmp', 'caching-dev.txt').exist?
  19. config.action_controller.perform_caching = true
  20. config.cache_store = :memory_store
  21. config.public_file_server.headers = {
  22. 'Cache-Control' => "public, max-age=#{2.days.to_i}"
  23. }
  24. else
  25. config.action_controller.perform_caching = false
  26. config.cache_store = :null_store
  27. end
  28. # Print deprecation notices to the Rails logger
  29. config.active_support.deprecation = :log
  30. # Only use best-standards-support built into browsers
  31. config.action_dispatch.best_standards_support = :builtin
  32. # Raise exception for unpermitted parameters
  33. config.action_controller.action_on_unpermitted_parameters = :raise
  34. # Raise an error on page load if there are pending migrations.
  35. config.active_record.migration_error = :page_load
  36. # Highlight code that triggered database queries in logs.
  37. config.active_record.verbose_query_logs = true
  38. # Expands the lines which load the assets
  39. config.assets.debug = true
  40. # Suppress logger output for asset requests.
  41. config.assets.quiet = true
  42. config.action_mailer.default_url_options = { :host => ENV['DOMAIN'] }
  43. config.action_mailer.asset_host = ENV['DOMAIN']
  44. config.action_mailer.raise_delivery_errors = true
  45. if ENV['SEND_EMAIL_IN_DEVELOPMENT'] == 'true'
  46. config.action_mailer.delivery_method = :smtp
  47. else
  48. config.action_mailer.delivery_method = :letter_opener_web
  49. end
  50. config.action_mailer.perform_caching = false
  51. # smtp_settings moved to config/initializers/action_mailer.rb
  52. # Use an evented file watcher to asynchronously detect changes in source code,
  53. # routes, locales, etc. This feature depends on the listen gem.
  54. config.file_watcher = ActiveSupport::EventedFileUpdateChecker
  55. end