Merge branch 'master' of github.com:snap-cloud/snapcon into admin-ticketing
* 'master' of github.com:snap-cloud/snapcon: (22 commits) Cleanup some Auth specs and weird haml syntax add sentry puma hooks fix user model spec Tweak Tickets Text fix missing ] Fix specs for omniauth providers? Update stripe mock gem remove airbrake Add sentry logging Update stripe gem Cleanup stripe stuff Fix the docker init script Cleanup specs Cleanup config file, ensure providers are set if present Fix format spec with new markdown options Try to update spec file with image in navbar Delint Delint helpers Lint: Sort gems Update user model spec ...
This commit is contained in:
commit
be991c53d3
18 changed files with 113 additions and 96 deletions
|
|
@ -1,22 +0,0 @@
|
|||
Airbrake.configure do |config|
|
||||
# Change this to some sensible data for your errbit instance
|
||||
config.project_id = ENV['OSEM_ERRBIT_ID'] || Rails.application.secrets.errbit_id || ''
|
||||
config.project_key = ENV['OSEM_ERRBIT_KEY'] || Rails.application.secrets.errbit_key || ''
|
||||
config.host = ENV['OSEM_ERRBIT_HOST']
|
||||
config.environment = Rails.env
|
||||
if config.project_key.blank? || config.host.blank?
|
||||
config.ignore_environments = [:production, :development, :test]
|
||||
else
|
||||
config.ignore_environments = [:development, :test]
|
||||
end
|
||||
end
|
||||
|
||||
Airbrake.add_filter do |notice|
|
||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActiveRecord::RecordNotFound' }
|
||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::InvalidAuthenticityToken' }
|
||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::UnknownAction' }
|
||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'AbstractController::ActionNotFound' }
|
||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionView::MissingTemplate' }
|
||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::UnknownFormat' }
|
||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::RoutingError' && error[:message] =~ %r{\[GET\]} }
|
||||
end
|
||||
|
|
@ -8,16 +8,23 @@ Devise.setup do |config|
|
|||
|
||||
# config.omniauth :open_id, name: 'suse', identifier: 'http://www.opensuse.org/openid/user'
|
||||
|
||||
config.omniauth :google_oauth2, (ENV['OSEM_GOOGLE_KEY'] || Rails.application.secrets.google_key), (ENV['OSEM_GOOGLE_SECRET'] || Rails.application.secrets.google_secret),
|
||||
config.omniauth :google_oauth2,
|
||||
(ENV['OSEM_GOOGLE_KEY'] || Rails.application.secrets.google_key),
|
||||
(ENV['OSEM_GOOGLE_SECRET'] || Rails.application.secrets.google_secret),
|
||||
name: 'google',
|
||||
scope: 'email'
|
||||
|
||||
config.omniauth :discourse,
|
||||
sso_url: "https://forum.snap.berkeley.edu/session/sso_provider",
|
||||
sso_url: 'https://forum.snap.berkeley.edu/session/sso_provider',
|
||||
sso_secret: ENV['OSEM_DISCOURSE_SECRET']
|
||||
|
||||
# config.omniauth :facebook, (ENV['OSEM_FACEBOOK_KEY'] || Rails.application.secrets.facebook_key), (ENV['OSEM_FACEBOOK_SECRET'] || Rails.application.secrets.facebook_secret)
|
||||
# config.omniauth :github, (ENV['OSEM_GITHUB_KEY'] || Rails.application.secrets.github_key), (ENV['OSEM_GITHUB_SECRET'] || Rails.application.secrets.github_secret)
|
||||
config.omniauth :facebook,
|
||||
(ENV['OSEM_FACEBOOK_KEY'] || Rails.application.secrets.facebook_key),
|
||||
(ENV['OSEM_FACEBOOK_SECRET'] || Rails.application.secrets.facebook_secret)
|
||||
|
||||
config.omniauth :github,
|
||||
(ENV['OSEM_GITHUB_KEY'] || Rails.application.secrets.github_key),
|
||||
(ENV['OSEM_GITHUB_SECRET'] || Rails.application.secrets.github_secret)
|
||||
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Stripe.api_key = Rails.application.secrets.stripe_secret_key
|
||||
Stripe.api_key = ENV['STRIPE_SECRET_KEY'] || Rails.application.secrets.stripe_secret_key
|
||||
|
|
|
|||
|
|
@ -43,5 +43,16 @@ on_worker_boot do
|
|||
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
||||
end
|
||||
|
||||
lowlevel_error_handler do |ex, env|
|
||||
Raven.capture_exception(
|
||||
ex,
|
||||
:message => ex.message,
|
||||
:extra => { :puma => env },
|
||||
:transaction => "Puma"
|
||||
)
|
||||
# note the below is just a Rack response
|
||||
[500, {}, ["An error has occurred, and engineers have been informed. Please reload the page. If you continue to have problems, contact conference@snap.berkeley.edu\n"]]
|
||||
end
|
||||
|
||||
# Allow puma to be restarted by `rails restart` command.
|
||||
plugin :tmp_restart
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue