Skip to content

Commit

Permalink
Add config directory to linter. Format other ruby files
Browse files Browse the repository at this point in the history
  • Loading branch information
binos30 committed Jul 21, 2024
1 parent d5ee04e commit e558dc4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Lint code for consistent style
run: |
bin/bundle exec stree check "{app,lib,spec,test}/**/*.rb"
bin/bundle exec stree check "{app,config,lib,spec,test}/**/*.rb"
bin/rubocop -f github
test:
Expand Down
6 changes: 3 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/integer/time"

Rails.application.configure do
Expand Down Expand Up @@ -31,9 +33,7 @@
config.action_controller.enable_fragment_cache_logging = true

config.cache_store = :memory_store
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}"
}
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false

Expand Down
6 changes: 3 additions & 3 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support/core_ext/integer/time"

# The test environment is used exclusively to run your application's
Expand All @@ -19,9 +21,7 @@

# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
}
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" }

# Show full error reports and disable caching.
config.consider_all_requests_local = true
Expand Down
3 changes: 1 addition & 2 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender =
"please-change-me-at-config-initializers-devise@example.com"
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"

# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
Expand Down
4 changes: 1 addition & 3 deletions config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
# 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
]
Rails.application.config.filter_parameters += %i[passw secret token _key crypt salt certificate otp ssn]
15 changes: 1 addition & 14 deletions config/initializers/friendly_id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,7 @@
# undesirable to allow as slugs. Edit this list as needed for your app.
config.use :reserved

config.reserved_words = %w[
new
edit
index
session
login
logout
users
admin
stylesheets
assets
javascripts
images
]
config.reserved_words = %w[new edit index session login logout users admin stylesheets assets javascripts images]

# This adds an option to treat reserved words as conflicts rather than exceptions.
# When there is no good candidate, a UUID will be appended, matching the existing
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"postinstall": "husky"
},
"lint-staged": {
"{app,lib,spec,test}/**/*.rb": [
"{app,config,lib,spec,test}/**/*.rb": [
"./bin/bundle exec stree write",
"./bin/rubocop -a"
],
"spec/**/*_spec.rb": "./bin/rspec",
"app/**/*.{json,js,jsx,ts,tsx,css,scss}": "./node_modules/.bin/prettier --write --ignore-unknown"
"{app,config}/**/*.{json,js,jsx,ts,tsx,css,scss}": "./node_modules/.bin/prettier --write --ignore-unknown"
},
"packageManager": "yarn@4.3.1"
}

0 comments on commit e558dc4

Please sign in to comment.