From 815ca02aa4ec2a4f85de071179c0222b10709ff9 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 23 Nov 2018 01:04:28 +0500 Subject: [PATCH] Fix code style --- config/application.rb | 4 +-- config/environments/development.rb | 6 ++-- config/environments/production.rb | 29 ++++++++++++------- config/environments/test.rb | 3 +- config/initializers/backtrace_silencers.rb | 6 ++-- .../initializers/content_security_policy.rb | 3 +- config/initializers/wrap_parameters.rb | 3 +- config/puma.rb | 3 +- 8 files changed, 37 insertions(+), 20 deletions(-) diff --git a/config/application.rb b/config/application.rb index 5d8d4a1..b3fb8f8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,8 +24,8 @@ module Partynest # Initialize configuration defaults for originally generated Rails version. config.load_defaults 5.2 - # Settings in config/environments/* take precedence over those specified here. - # Application configuration can go into files in config/initializers + # Settings in config/environments/* take precedence over those specified + # here. Application configuration can go into files in config/initializers # -- all .rb files in that directory are automatically loaded after loading # the framework and any gems in your application. diff --git a/config/environments/development.rb b/config/environments/development.rb index 0c771e4..8803494 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. + # Settings specified here will take precedence over those + # in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development @@ -29,7 +30,8 @@ Rails.application.configure do config.cache_store = :null_store end - # Store uploaded files on the local file system (see config/storage.yml for options) + # Store uploaded files on the local file system + # (see config/storage.yml for options). config.active_storage.service = :local # Don't care if the mailer can't send. diff --git a/config/environments/production.rb b/config/environments/production.rb index d457728..bc380df 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. + # Settings specified here will take precedence over those + # in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true @@ -16,8 +17,9 @@ Rails.application.configure do config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] - # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # Ensures that a master key has been made available in either + # ENV["RAILS_MASTER_KEY"] or in config/master.key. This key is used + # to decrypt credentials (and other encrypted files). # config.require_master_key = true # Disable serving static files from the `/public` folder by default since @@ -31,7 +33,8 @@ Rails.application.configure do # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + # `config.assets.precompile` and `config.assets.version` have moved + # to config/initializers/assets.rb # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' @@ -40,15 +43,18 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - # Store uploaded files on the local file system (see config/storage.yml for options) + # Store uploaded files on the local file system + # (see config/storage.yml for options). config.active_storage.service = :local # Mount Action Cable outside main process or domain # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + # config.action_cable.allowed_request_origins = + # ['http://example.com', /http:\/\/example.*/] - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # Force all access to the app over SSL, use Strict-Transport-Security, + # and use secure cookies. # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information @@ -61,14 +67,16 @@ Rails.application.configure do # Use a different cache store in production. # config.cache_store = :mem_cache_store - # Use a real queuing backend for Active Job (and separate queues per environment) + # Use a real queuing backend for Active Job + # (and separate queues per environment). # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "partynest_#{Rails.env}" config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # Set this to true and configure the email server for immediate delivery + # to raise delivery errors. # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to @@ -83,7 +91,8 @@ Rails.application.configure do # Use a different logger for distributed setups. # require 'syslog/logger' - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + # config.logger = + # ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') if ENV['RAILS_LOG_TO_STDOUT'].present? logger = ActiveSupport::Logger.new(STDOUT) diff --git a/config/environments/test.rb b/config/environments/test.rb index 87c2b9b..2f3f972 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. + # Settings specified here will take precedence over those + # in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index 4b63f28..6d9c890 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -2,8 +2,10 @@ # Be sure to restart your server when you modify this file. -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# You can add backtrace silencers for libraries that you're using +# but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# You can also remove all the silencers if you're trying to debug a problem +# that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index e3c9649..8daac31 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -19,7 +19,8 @@ # end # If you are using UJS then enable automatic nonce generation -# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } +# Rails.application.config.content_security_policy_nonce_generator = +# -> request { SecureRandom.base64(16) } # Report CSP violations to a specified URI # For further information see the following documentation: diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 2f3c0db..ca4ecfa 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -5,7 +5,8 @@ # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +# Enable parameter wrapping for JSON. You can disable this by setting :format +# to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end diff --git a/config/puma.rb b/config/puma.rb index 940c8ba..b48370a 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -9,7 +9,8 @@ threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 } threads threads_count, threads_count -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# Specifies the `port` that Puma will listen on to receive requests; +# default is 3000. # port ENV.fetch('PORT') { 3000 }