Start running Rails from the main branch #16

Merged
atomaka merged 13 commits from rails-main into main 2024-06-21 23:35:37 -04:00
9 changed files with 28 additions and 23 deletions
Showing only changes of commit aa2df2e61d - Show all commits

5
.rubocop.yml Normal file
View file

@ -0,0 +1,5 @@
# Omakase Ruby styling for Rails
inherit_gem:
rubocop-rails-omakase: rubocop.yml
# Your own specialized rules go here

View file

@ -19,7 +19,7 @@ group :development, :test do
end end
group :development do group :development do
gem "standard" gem "rubocop-rails-omakase", require: false
gem "web-console" gem "web-console"
end end

View file

@ -142,7 +142,6 @@ GEM
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
json (2.7.2) json (2.7.2)
language_server-protocol (3.17.0.3) language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
logger (1.6.0) logger (1.6.0)
loofah (2.22.0) loofah (2.22.0)
crass (~> 1.0.2) crass (~> 1.0.2)
@ -218,9 +217,22 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3) rubocop-ast (1.31.3)
parser (>= 3.3.1.0) parser (>= 3.3.1.0)
rubocop-minitest (0.35.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.21.1) rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0) rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails-omakase (1.0.0)
rubocop
rubocop-minitest
rubocop-performance
rubocop-rails
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
rubyzip (2.3.2) rubyzip (2.3.2)
selenium-webdriver (4.10.0) selenium-webdriver (4.10.0)
@ -236,18 +248,6 @@ GEM
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (2.0.2-arm64-darwin) sqlite3 (2.0.2-arm64-darwin)
sqlite3 (2.0.2-x86_64-linux-gnu) sqlite3 (2.0.2-x86_64-linux-gnu)
standard (1.37.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.64.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.4)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.21.0)
stimulus-rails (1.3.3) stimulus-rails (1.3.3)
railties (>= 6.0.0) railties (>= 6.0.0)
stringio (3.1.1) stringio (3.1.1)
@ -296,10 +296,10 @@ DEPENDENCIES
jbuilder jbuilder
puma puma
rails! rails!
rubocop-rails-omakase
selenium-webdriver selenium-webdriver
sprockets-rails sprockets-rails
sqlite3 sqlite3
standard
stimulus-rails stimulus-rails
tailwindcss-rails (~> 2.0) tailwindcss-rails (~> 2.0)
turbo-rails turbo-rails

View file

@ -2,6 +2,6 @@ module ExpensesHelper
def expense_periods def expense_periods
Expense Expense
.periods .periods
.map { |key, value| [key.titleize, Expense.periods.key(value)] } .map { |key, value| [ key.titleize, Expense.periods.key(value) ] }
end end
end end

View file

@ -2,6 +2,6 @@ module IncomesHelper
def members def members
Member Member
.all .all
.map { |member, value| [member.name, member.id] } .map { |member, value| [ member.name, member.id ] }
end end
end end

View file

@ -24,7 +24,7 @@ Rails.application.configure do
config.action_controller.enable_fragment_cache_logging = true config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store 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 else
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
@ -39,7 +39,7 @@ Rails.application.configure do
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
config.action_mailer.default_url_options = {host: "localhost", port: 3000} config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
# Print deprecation notices to the Rails logger. # Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log config.active_support.deprecation = :log

View file

@ -60,7 +60,7 @@ Rails.application.configure do
.then { |logger| ActiveSupport::TaggedLogging.new(logger) } .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
# Prepend all log lines with the following tags. # 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 # "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 # information to avoid inadvertent exposure of personally identifiable information (PII). If you

View file

@ -18,7 +18,7 @@ Rails.application.configure do
config.eager_load = ENV["CI"].present? config.eager_load = ENV["CI"].present?
# Configure public file server for tests with Cache-Control for performance. # Configure public file server for tests with Cache-Control for performance.
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. # Show full error reports and disable caching.
config.consider_all_requests_local = true config.consider_all_requests_local = true
@ -43,7 +43,7 @@ Rails.application.configure do
# Unlike controllers, the mailer instance doesn't have any context about the # Unlike controllers, the mailer instance doesn't have any context about the
# incoming request so you'll need to provide the :host parameter yourself. # incoming request so you'll need to provide the :host parameter yourself.
config.action_mailer.default_url_options = {host: "www.example.com"} config.action_mailer.default_url_options = { host: "www.example.com" }
# Print deprecation notices to the stderr. # Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr config.active_support.deprecation = :stderr

View file

@ -3,5 +3,5 @@ require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :selenium, driven_by :selenium,
using: ENV["VISIBLE_SYSTEM_TESTS"].present? ? :chrome : :headless_chrome, using: ENV["VISIBLE_SYSTEM_TESTS"].present? ? :chrome : :headless_chrome,
screen_size: [1400, 1400] screen_size: [ 1400, 1400 ]
end end