0
0
Fork 0

lint pass 2 (#8878)

* Code quality pass

* Typofix

* Update applications_controller_spec.rb

* Update applications_controller_spec.rb
This commit is contained in:
aus-social 2018-10-05 01:38:04 +10:00 committed by Eugen Rochko
parent a46ab86adf
commit 0a4739c732
15 changed files with 47 additions and 46 deletions

View file

@ -6,7 +6,7 @@ Rails.application.configure do
raise "No proxy host" unless proxy.host
host = proxy.host
host = host[1...-1] if host[0] == '[' #for IPv6 address
host = host[1...-1] if host[0] == '[' # for IPv6 address
config.x.http_client_proxy[:proxy] = { proxy_address: host, proxy_port: proxy.port, proxy_username: proxy.user, proxy_password: proxy.password }.compact
end

View file

@ -3,7 +3,7 @@ Rails.application.config.middleware.use OmniAuth::Builder do
end
Devise.setup do |config|
# Devise omniauth strategies
# Devise omniauth strategies
options = {}
options[:redirect_at_sign_in] = ENV['OAUTH_REDIRECT_AT_SIGN_IN'] == 'true'

View file

@ -1,7 +1,7 @@
require 'open-uri'
module OpenURI
def OpenURI.redirectable?(uri1, uri2) # :nodoc:
def self.redirectable?(uri1, uri2) # :nodoc:
uri1.scheme.downcase == uri2.scheme.downcase ||
(/\A(?:http|https|ftp)\z/i =~ uri1.scheme && /\A(?:http|https|ftp)\z/i =~ uri2.scheme)
end

View file

@ -42,7 +42,7 @@ class Rack::Attack
# (blocklist & throttles are skipped)
Rack::Attack.safelist('allow from localhost') do |req|
# Requests are allowed if the return value is truthy
'127.0.0.1' == req.ip || '::1' == req.ip
req.ip == '127.0.0.1' || req.ip == '::1'
end
throttle('throttle_authenticated_api', limit: 300, period: 5.minutes) do |req|

View file

@ -19,4 +19,4 @@ Sidekiq.configure_client do |config|
config.redis = redis_params
end
Sidekiq::Logging.logger.level = ::Logger::const_get(ENV.fetch('RAILS_LOG_LEVEL', 'info').upcase.to_s)
Sidekiq::Logging.logger.level = ::Logger.const_get(ENV.fetch('RAILS_LOG_LEVEL', 'info').upcase.to_s)