2010-02-04 15:08:49 -05:00
|
|
|
require File.expand_path('../boot', __FILE__)
|
|
|
|
require 'rails/all'
|
2011-05-24 18:04:25 -04:00
|
|
|
|
2012-01-27 14:22:47 -05:00
|
|
|
if defined?(Bundler)
|
2014-04-14 17:32:01 -04:00
|
|
|
Bundler.require(:default, Rails.env)
|
2012-01-27 14:22:47 -05:00
|
|
|
end
|
2010-02-04 15:08:49 -05:00
|
|
|
|
2010-02-06 16:48:40 -05:00
|
|
|
module Danbooru
|
2010-02-04 15:08:49 -05:00
|
|
|
class Application < Rails::Application
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2011-07-16 20:16:34 -04:00
|
|
|
config.active_record.schema_format = :sql
|
2011-05-24 18:04:25 -04:00
|
|
|
config.encoding = "utf-8"
|
|
|
|
config.filter_parameters += [:password]
|
|
|
|
config.assets.enabled = true
|
2012-01-27 14:22:47 -05:00
|
|
|
config.assets.version = '1.0'
|
2011-07-17 16:42:26 -04:00
|
|
|
config.autoload_paths += %W(#{config.root}/app/presenters #{config.root}/app/logical #{config.root}/app/mailers)
|
2010-08-18 18:42:33 -04:00
|
|
|
config.plugins = [:all]
|
|
|
|
config.time_zone = 'Eastern Time (US & Canada)'
|
2011-09-15 18:21:42 -04:00
|
|
|
config.action_mailer.delivery_method = :smtp
|
2011-09-15 18:24:52 -04:00
|
|
|
config.action_mailer.smtp_settings = {:enable_starttls_auto => false}
|
2011-09-15 18:21:42 -04:00
|
|
|
config.action_mailer.perform_deliveries = true
|
2013-02-17 18:14:12 -05:00
|
|
|
config.log_tags = [lambda {|req| "PID:#{Process.pid}"}]
|
2015-08-18 20:50:27 -04:00
|
|
|
config.active_record.raise_in_transactional_callbacks = true
|
2016-09-07 21:45:21 -04:00
|
|
|
|
2016-09-07 21:51:25 -04:00
|
|
|
if File.exists?("#{config.root}/REVISION")
|
|
|
|
config.x.git_hash = File.read("#{config.root}/REVISION").strip
|
2016-12-03 21:09:58 -05:00
|
|
|
elsif system("type git > /dev/null && git rev-parse --show-toplevel > /dev/null")
|
2016-10-24 20:02:06 -04:00
|
|
|
config.x.git_hash = %x(git rev-parse --short HEAD).strip
|
2016-09-07 21:51:25 -04:00
|
|
|
else
|
|
|
|
config.x.git_hash = nil
|
|
|
|
end
|
2010-02-04 15:08:49 -05:00
|
|
|
end
|
2014-04-25 13:55:36 -04:00
|
|
|
|
|
|
|
I18n.enforce_available_locales = false
|
2010-02-04 15:08:49 -05:00
|
|
|
end
|