This commit is contained in:
Jimmy 2021-03-11 21:28:17 -08:00
commit 11d4255c67
75 changed files with 529 additions and 502 deletions

View file

@ -115,4 +115,5 @@ Osem::Application.configure do
end
config.assets.precompile += ['mailbot.css']
config.active_record.verbose_query_logs = true
end

View file

@ -97,7 +97,7 @@ Osem::Application.configure do
domain: ENV['OSEM_SMTP_DOMAIN'],
enable_starttls_auto: ENV['OSEM_SMTP_ENABLE_STARTTLS_AUTO'],
openssl_verify_mode: ENV['OSEM_SMTP_OPENSSL_VERIFY_MODE']
}
}.compact
# Set the secret_key_base from the env, if not set by any other means
config.secret_key_base ||= ENV["SECRET_KEY_BASE"]

View file

@ -1,17 +0,0 @@
# http://www.jkfill.com/2015/02/14/log-which-line-caused-a-query/
module LogQuerySource
def debug(*args, &block)
return unless super
backtrace = Rails.backtrace_cleaner.clean caller
relevant_caller_line = backtrace.detect do |caller_line|
!caller_line.include?('/initializers/')
end
if relevant_caller_line
logger.debug("#{ relevant_caller_line.sub("#{ Rails.root }/", '') }")
end
end
end
ActiveRecord::LogSubscriber.send :prepend, LogQuerySource

View file

@ -1,5 +1,6 @@
CarrierWave.configure do |config|
config.storage = :file
config.cache_storage = :file
config.cache_dir = "#{Rails.root}/tmp/uploads"
config.enable_processing = false if Rails.env.test?
end

View file

@ -112,10 +112,10 @@ Devise.setup do |config|
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming his account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming his account,
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming his account.
# the user cannot access the website without confirming their account.
config.allow_unconfirmed_access_for = 2.days
# If true, requires any email changes to be confirmed (exactly the same way as

View file

@ -1,6 +1,7 @@
Sentry.init do |config|
config.enabled_environments = %|production staging|
config.dsn = ENV['SENTRY_DSN']
# config.dsn = ENV.fetch('OSEM_SENTRY_DSN', Rails.application.secrets.sentry_dsn)
config.breadcrumbs_logger = [:active_support_logger]
# To activate performance monitoring, set one of these options.
@ -8,6 +9,15 @@ Sentry.init do |config|
config.traces_sample_rate = 0.5
# or
# config.traces_sampler = lambda do |context|
# true
# true
# end
# During deployment we touch tmp/restart.txt, let's use its last access time as release.
# Unless someone has set a variable of course...
# osem_version_from_file = nil
# version_file = File.expand_path('../../tmp/restart.txt', __dir__)
# osem_version_from_file = File.new(version_file).atime.to_i if File.file?(version_file)
# osem_version = ENV.fetch('OSEM_SENTRY_RELEASE', osem_version_from_file)
osem_version = ENV['HEROKU_RELEASE_VERSION']
config.release = osem_version if osem_version
end

View file

@ -222,6 +222,8 @@ Osem::Application.routes.draw do
get '/admin' => redirect('/admin/conferences')
get '/calendar' => 'conferences#calendar'
unless ENV['OSEM_ROOT_CONFERENCE'].blank?
root to: redirect("/conferences/#{ENV['OSEM_ROOT_CONFERENCE']}")
else

View file

@ -31,8 +31,8 @@ production:
# Generate your own with rake secret or use the environment
# secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
# Your errbit API key
# errbit_key: '12345'
# Your sentry.io DSN key
# sentry_dsn: '12345'
########## OMNIAUTH Providers ##########
# Leave the variables' names empty, unless you use the providers, in which