Fix Rubocop issues
This commit is contained in:
parent
a4a6306198
commit
d63a22c54e
34 changed files with 151 additions and 137 deletions
|
|
@ -68,9 +68,11 @@ module Osem
|
|||
|
||||
config.before_configuration do
|
||||
env_file = File.join(Rails.root, 'config', 'local_env.yml')
|
||||
YAML.load(File.open(env_file)).each do |key, value|
|
||||
ENV[key.to_s] = value
|
||||
end if File.exists?(env_file)
|
||||
if File.exist?(env_file)
|
||||
YAML.safe_load(File.open(env_file)).each do |key, value|
|
||||
ENV[key.to_s] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Devise.setup do |config|
|
|||
|
||||
# TODO-SNAPCON: This ought to be configurable. Use OSEM_DISCOURSE_KEY?
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ end
|
|||
lowlevel_error_handler do |ex, env|
|
||||
Sentry.capture_exception(
|
||||
ex,
|
||||
:message => ex.message,
|
||||
:extra => { :puma => env },
|
||||
:transaction => "Puma"
|
||||
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"]]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Osem::Application.routes.draw do
|
||||
|
||||
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
|
||||
mount LetterOpenerWeb::Engine, at: '/letter_opener' if Rails.env.development?
|
||||
|
||||
if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||
devise_for :users, controllers: { registrations: :registrations }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue