Merge OSEM updates
This commit is contained in:
commit
d1ca21f479
50 changed files with 338 additions and 382 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
Sentry.init do |config|
|
||||
<<<<<<< HEAD
|
||||
config.enabled_environments = %|production staging|
|
||||
config.dsn = ENV['SENTRY_DSN']
|
||||
=======
|
||||
config.dsn = ENV.fetch('OSEM_SENTRY_DSN', Rails.application.secrets.sentry_dsn)
|
||||
>>>>>>> osem-master
|
||||
config.breadcrumbs_logger = [:active_support_logger]
|
||||
|
||||
# To activate performance monitoring, set one of these options.
|
||||
|
|
@ -8,6 +12,19 @@ Sentry.init do |config|
|
|||
config.traces_sample_rate = 0.5
|
||||
# or
|
||||
# config.traces_sampler = lambda do |context|
|
||||
<<<<<<< HEAD
|
||||
# true
|
||||
# end
|
||||
=======
|
||||
# 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)
|
||||
config.release = osem_version if osem_version
|
||||
>>>>>>> osem-master
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue