Fix Rubocop issues

This commit is contained in:
CactusPuppy 2021-02-18 21:03:28 -08:00
parent a4a6306198
commit d63a22c54e
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
34 changed files with 151 additions and 137 deletions

View file

@ -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

View file

@ -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,

View file

@ -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"]]

View file

@ -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 }