about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/boot.rb2
-rw-r--r--config/environments/production.rb2
-rw-r--r--config/initializers/1_hosts.rb2
-rw-r--r--config/initializers/http_client_proxy.rb2
-rw-r--r--config/initializers/omniauth.rb5
-rw-r--r--config/initializers/open_uri_redirection.rb2
-rw-r--r--config/initializers/rack_attack.rb2
-rw-r--r--config/initializers/sidekiq.rb2
-rw-r--r--config/initializers/twitter_regex.rb1
-rw-r--r--config/initializers/vapid.rb1
-rw-r--r--config/locales/de.yml6
-rw-r--r--config/locales/en.yml1
-rw-r--r--config/puma.rb2
13 files changed, 14 insertions, 16 deletions
diff --git a/config/boot.rb b/config/boot.rb
index 593f575e9..beb45a5ee 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,6 +1,6 @@
 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
 
-require 'bundler/setup'  # Set up gems listed in the Gemfile.
+require 'bundler/setup' # Set up gems listed in the Gemfile.
 require 'bootsnap' # Speed up boot time by caching expensive operations.
 
 Bootsnap.setup(
diff --git a/config/environments/production.rb b/config/environments/production.rb
index a2f5e6864..bff423f7f 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -42,7 +42,7 @@ Rails.application.configure do
   config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
 
   # Allow to specify public IP of reverse proxy if it's needed
-  config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split.map { |item| IPAddr.new(item) } unless ENV['TRUSTED_PROXY_IP'].blank?
+  config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split.map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present?
 
   # Use the lowest log level to ensure availability of diagnostic information
   # when problems arise.
diff --git a/config/initializers/1_hosts.rb b/config/initializers/1_hosts.rb
index 5773b7290..757f1f735 100644
--- a/config/initializers/1_hosts.rb
+++ b/config/initializers/1_hosts.rb
@@ -7,7 +7,7 @@ web_host = ENV.fetch('WEB_DOMAIN') { host }
 alternate_domains = ENV.fetch('ALTERNATE_DOMAINS') { '' }
 
 Rails.application.configure do
-  https    = Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true'
+  https = Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true'
 
   config.x.local_domain = host
   config.x.web_domain   = web_host
diff --git a/config/initializers/http_client_proxy.rb b/config/initializers/http_client_proxy.rb
index e607aff3c..9d7b16e69 100644
--- a/config/initializers/http_client_proxy.rb
+++ b/config/initializers/http_client_proxy.rb
@@ -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
 
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index 85fb81250..254e751d4 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -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'
 
@@ -38,7 +38,7 @@ Devise.setup do |config|
     saml_options = options
     saml_options[:assertion_consumer_service_url] = ENV['SAML_ACS_URL'] if ENV['SAML_ACS_URL']
     saml_options[:issuer] = ENV['SAML_ISSUER'] if ENV['SAML_ISSUER']
-    saml_options[:idp_sso_target_url] = ENV['SAML_IDP_SSO_TARGET_URL']  if ENV['SAML_IDP_SSO_TARGET_URL']
+    saml_options[:idp_sso_target_url] = ENV['SAML_IDP_SSO_TARGET_URL'] if ENV['SAML_IDP_SSO_TARGET_URL']
     saml_options[:idp_sso_target_url_runtime_params] = ENV['SAML_IDP_SSO_TARGET_PARAMS'] if ENV['SAML_IDP_SSO_TARGET_PARAMS'] # FIXME: Should be parsable Hash
     saml_options[:idp_cert] = ENV['SAML_IDP_CERT'] if ENV['SAML_IDP_CERT']
     saml_options[:idp_cert_fingerprint] = ENV['SAML_IDP_CERT_FINGERPRINT'] if ENV['SAML_IDP_CERT_FINGERPRINT']
@@ -62,5 +62,4 @@ Devise.setup do |config|
     saml_options[:uid_attribute] = ENV['SAML_UID_ATTRIBUTE'] if ENV['SAML_UID_ATTRIBUTE']
     config.omniauth :saml, saml_options
   end
-
 end
diff --git a/config/initializers/open_uri_redirection.rb b/config/initializers/open_uri_redirection.rb
index e24fdecab..ea2dcffea 100644
--- a/config/initializers/open_uri_redirection.rb
+++ b/config/initializers/open_uri_redirection.rb
@@ -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
diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb
index 0ca0a7e7f..8756b8fbf 100644
--- a/config/initializers/rack_attack.rb
+++ b/config/initializers/rack_attack.rb
@@ -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|
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 05c804100..7f8a40d7b 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -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)
diff --git a/config/initializers/twitter_regex.rb b/config/initializers/twitter_regex.rb
index 76b23f416..0e8f5bfeb 100644
--- a/config/initializers/twitter_regex.rb
+++ b/config/initializers/twitter_regex.rb
@@ -1,6 +1,5 @@
 module Twitter
   class Regex
-
     REGEXEN[:valid_general_url_path_chars] = /[^\p{White_Space}\(\)\?]/iou
     REGEXEN[:valid_url_path_ending_chars] = /[^\p{White_Space}\(\)\?!\*';:=\,\.\$%\[\]~&\|@]|(?:#{REGEXEN[:valid_url_balanced_parens]})/iou
     REGEXEN[:valid_url_balanced_parens] = /
diff --git a/config/initializers/vapid.rb b/config/initializers/vapid.rb
index 618f5a3fb..7dd870c8b 100644
--- a/config/initializers/vapid.rb
+++ b/config/initializers/vapid.rb
@@ -1,7 +1,6 @@
 # frozen_string_literal: true
 
 Rails.application.configure do
-
   # You can generate the keys using the following command (first is the private key, second is the public one)
   # You should only generate this once per instance. If you later decide to change it, all push subscription will
   # be invalidated, requiring the users to access the website again to resubscribe.
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 0dcd86e98..e6f9da808 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -31,9 +31,9 @@ de:
     privacy_policy: Datenschutzerklärung
     source_code: Quellcode
     status_count_after:
-      one: Status
-      other: Status
-    status_count_before: die
+      one: Statusmeldung
+      other: Statusmeldungen
+    status_count_before: mit
     terms: Nutzungsbedingungen
     user_count_after:
       one: Benutzer
diff --git a/config/locales/en.yml b/config/locales/en.yml
index d1df0cc2b..5b46401e9 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -919,6 +919,7 @@ en:
       tips: Tips
       title: Welcome aboard, %{name}!
   users:
+    follow_limit_reached: You cannot follow more than %{limit} people
     invalid_email: The e-mail address is invalid
     invalid_otp_token: Invalid two-factor code
     otp_lost_help_html: If you lost access to both, you may get in touch with %{email}
diff --git a/config/puma.rb b/config/puma.rb
index 0397b8920..5ebf5ed19 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,7 +1,7 @@
 threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i
 threads threads_count, threads_count
 
-if ENV['SOCKET'] then
+if ENV['SOCKET']
   bind 'unix://' + ENV['SOCKET']
 else
   port ENV.fetch('PORT') { 3000 }