Merge remote-tracking branch 'origin/disable-airbrake-in-test' into git-ignore-assets

This commit is contained in:
Artur Beljajev 2018-10-29 01:06:50 +02:00
commit 470250146a
2 changed files with 28 additions and 0 deletions

View file

@ -152,3 +152,9 @@ same_site_session_cookies: 'false' # false|strict|lax
test:
payments_seb_bank_certificate: 'test/fixtures/files/seb_bank_cert.pem'
payments_seb_seller_private: 'test/fixtures/files/seb_seller_key.pem'
# Airbrake // Errbit:
airbrake_host: "https://your-errbit-host.ee"
# airbrake_env: "staging", defaults to Rails.env
airbrake_project_id: "1"
airbrake_project_key: "api_key"

View file

@ -0,0 +1,22 @@
module Patches
module Airbrake
module SyncSender
def build_https(uri)
super.tap do |req|
req.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
end
end
end
end
Airbrake::SyncSender.prepend(::Patches::Airbrake::SyncSender)
Airbrake.configure do |config|
config.host = ENV['airbrake_host']
config.project_id = ENV['airbrake_project_id']
config.project_key = ENV['airbrake_project_key']
config.environment = ENV['airbrake_env'] || Rails.env
config.ignore_environments = %w(development test)
end