Rubocop rules
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# rubocop:disable Metrics/BlockLength
|
||||
require "active_support/core_ext/integer/time"
|
||||
|
||||
Rails.application.configure do
|
||||
@@ -74,3 +75,4 @@ Rails.application.configure do
|
||||
# Raise error when a before_action's only/except options reference missing actions
|
||||
config.action_controller.raise_on_missing_callback_actions = true
|
||||
end
|
||||
# rubocop:enable Metrics/BlockLength
|
||||
|
||||
@@ -52,12 +52,12 @@ Rails.application.configure do
|
||||
config.force_ssl = true
|
||||
|
||||
# Log to STDOUT by default
|
||||
config.logger = ActiveSupport::Logger.new(STDOUT)
|
||||
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
|
||||
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
||||
config.logger = ActiveSupport::Logger.new($stdout)
|
||||
.tap { |logger| logger.formatter = Logger::Formatter.new }
|
||||
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
||||
|
||||
# Prepend all log lines with the following tags.
|
||||
config.log_tags = [ :request_id ]
|
||||
config.log_tags = [:request_id]
|
||||
|
||||
# "info" includes generic and useful information about system operation, but avoids logging too much
|
||||
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
|
||||
# Use this to limit dissemination of sensitive information.
|
||||
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
|
||||
Rails.application.config.filter_parameters += [
|
||||
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
||||
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
|
||||
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
|
||||
# notations and behaviors.
|
||||
Rails.application.config.filter_parameters += %i[
|
||||
passw secret token _key crypt salt certificate otp ssn
|
||||
]
|
||||
|
||||
@@ -29,3 +29,24 @@
|
||||
|
||||
en:
|
||||
hello: "Hello world"
|
||||
customers:
|
||||
create:
|
||||
customer_created: "Customer was successfully created."
|
||||
update:
|
||||
customer_updated: "Customer was successfully updated."
|
||||
destroy:
|
||||
customer_destroyed: "Customer was successfully destroyed."
|
||||
reservations:
|
||||
create:
|
||||
reservation_created: "Reservation was successfully created."
|
||||
update:
|
||||
reservation_updated: "Reservation was successfully updated."
|
||||
destroy:
|
||||
reservation_destroyed: "Reservation was successfully destroyed."
|
||||
teams:
|
||||
create:
|
||||
team_created: "Team was successfully created."
|
||||
update:
|
||||
team_updated: "Team was successfully updated."
|
||||
destroy:
|
||||
team_destroyed: "Team was successfully destroyed."
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
# Any libraries that use thread pools should be configured to match
|
||||
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
||||
# and maximum; this matches the default thread size of Active Record.
|
||||
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
||||
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
||||
max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
|
||||
min_threads_count = ENV.fetch("RAILS_MIN_THREADS", max_threads_count)
|
||||
threads min_threads_count, max_threads_count
|
||||
|
||||
# Specifies that the worker count should equal the number of processors in production.
|
||||
@@ -23,7 +23,7 @@ end
|
||||
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
||||
|
||||
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
||||
port ENV.fetch("PORT") { 3000 }
|
||||
port ENV.fetch("PORT", 3000)
|
||||
|
||||
# Specifies the `environment` that Puma will run in.
|
||||
environment ENV.fetch("RAILS_ENV") { "development" }
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
Rails.application.routes.draw do
|
||||
resources :teams
|
||||
root "reservations#index"
|
||||
resources :reservations
|
||||
resources :customers
|
||||
resources :teams
|
||||
resources :companies
|
||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user