Compare commits

..

4 commits

Author SHA1 Message Date
8068bf2ad4
bin/rails tailwindcss:upgrade
All checks were successful
Ruby CI / test (pull_request) Successful in 26s
2025-02-11 20:25:35 -05:00
9f8d3bcc06
Prepare to run upgrader 2025-02-11 20:23:19 -05:00
3b47ce3db5
Bump tailwind 2025-02-11 20:19:20 -05:00
9f06cf6a7e
Use new node version 2025-02-11 20:14:40 -05:00
24 changed files with 140 additions and 210 deletions

2
.gitignore vendored
View file

@ -36,3 +36,5 @@
/app/assets/builds/* /app/assets/builds/*
!/app/assets/builds/.keep !/app/assets/builds/.keep
/node_modules

1
.node-version Normal file
View file

@ -0,0 +1 @@
22.14.0

View file

@ -51,9 +51,6 @@ group :development, :test do
# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
gem "rubocop-rails-omakase", require: false gem "rubocop-rails-omakase", require: false
# Audit bundle for known vulnerabilities
gem "bundler-audit", require: false
end end
group :development do group :development do
@ -64,7 +61,7 @@ end
group :test do group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara" gem "capybara"
gem "cuprite" gem "selenium-webdriver"
end end
gem "tailwindcss-rails", "~> 3.3.1" gem "tailwindcss-rails"

View file

@ -1,6 +1,6 @@
GIT GIT
remote: https://github.com/rails/rails.git remote: https://github.com/rails/rails.git
revision: 4b7fb1d14b954d2348d2065ff955466479509656 revision: 57c24948eb5cc9e5f9a4cecb6f2060f53e2246e1
branch: main branch: main
specs: specs:
actioncable (8.1.0.alpha) actioncable (8.1.0.alpha)
@ -34,7 +34,6 @@ GIT
rails-html-sanitizer (~> 1.6) rails-html-sanitizer (~> 1.6)
useragent (~> 0.16) useragent (~> 0.16)
actiontext (8.1.0.alpha) actiontext (8.1.0.alpha)
action_text-trix (~> 2.1.15)
actionpack (= 8.1.0.alpha) actionpack (= 8.1.0.alpha)
activerecord (= 8.1.0.alpha) activerecord (= 8.1.0.alpha)
activestorage (= 8.1.0.alpha) activestorage (= 8.1.0.alpha)
@ -101,24 +100,19 @@ GIT
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
action_text-trix (2.1.15)
railties
addressable (2.8.7) addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0) public_suffix (>= 2.0.2, < 7.0)
ast (2.4.3) ast (2.4.2)
base64 (0.3.0) base64 (0.2.0)
bcrypt (3.1.20) bcrypt (3.1.20)
benchmark (0.4.1) benchmark (0.4.0)
bigdecimal (3.2.2) bigdecimal (3.1.9)
bindex (0.8.1) bindex (0.8.1)
bootsnap (1.18.6) bootsnap (1.18.4)
msgpack (~> 1.2) msgpack (~> 1.2)
brakeman (7.0.2) brakeman (7.0.0)
racc racc
builder (3.3.0) builder (3.3.0)
bundler-audit (0.9.2)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
capybara (3.40.0) capybara (3.40.0)
addressable addressable
matrix matrix
@ -129,26 +123,16 @@ GEM
regexp_parser (>= 1.5, < 3.0) regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2) xpath (~> 3.2)
concurrent-ruby (1.3.5) concurrent-ruby (1.3.5)
connection_pool (2.5.3) connection_pool (2.5.0)
crass (1.0.6) crass (1.0.6)
cuprite (0.17)
capybara (~> 3.0)
ferrum (~> 0.17.0)
date (3.4.1) date (3.4.1)
debug (1.10.0) debug (1.10.0)
irb (~> 1.10) irb (~> 1.10)
reline (>= 0.3.8) reline (>= 0.3.8)
drb (2.2.3) drb (2.2.1)
erb (5.0.1)
erubi (1.13.1) erubi (1.13.1)
et-orbi (1.2.11) et-orbi (1.2.11)
tzinfo tzinfo
ferrum (0.17.1)
addressable (~> 2.5)
base64 (~> 0.2)
concurrent-ruby (~> 1.1)
webrick (~> 1.7)
websocket-driver (~> 0.7)
fugit (1.11.1) fugit (1.11.1)
et-orbi (~> 1, >= 1.2.11) et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4) raabro (~> 1.4)
@ -161,18 +145,17 @@ GEM
activesupport (>= 6.0.0) activesupport (>= 6.0.0)
railties (>= 6.0.0) railties (>= 6.0.0)
io-console (0.8.0) io-console (0.8.0)
irb (1.15.2) irb (1.15.1)
pp (>= 0.6.0) pp (>= 0.6.0)
rdoc (>= 4.0.0) rdoc (>= 4.0.0)
reline (>= 0.4.2) reline (>= 0.4.2)
jbuilder (2.13.0) jbuilder (2.13.0)
actionview (>= 5.0.0) actionview (>= 5.0.0)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
json (2.12.2) json (2.10.1)
language_server-protocol (3.17.0.5) language_server-protocol (3.17.0.4)
lint_roller (1.1.0) logger (1.6.5)
logger (1.7.0) loofah (2.24.0)
loofah (2.24.1)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.12.0)
mail (2.8.1) mail (2.8.1)
@ -183,9 +166,9 @@ GEM
marcel (1.0.4) marcel (1.0.4)
matrix (0.4.2) matrix (0.4.2)
mini_mime (1.1.5) mini_mime (1.1.5)
minitest (5.25.5) minitest (5.25.4)
msgpack (1.8.0) msgpack (1.8.0)
net-imap (0.5.8) net-imap (0.5.6)
date date
net-protocol net-protocol
net-pop (0.1.2) net-pop (0.1.2)
@ -195,42 +178,41 @@ GEM
net-smtp (0.5.1) net-smtp (0.5.1)
net-protocol net-protocol
nio4r (2.7.4) nio4r (2.7.4)
nokogiri (1.18.8-aarch64-linux-gnu) nokogiri (1.18.2-aarch64-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.8-arm64-darwin) nokogiri (1.18.2-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.8-x86_64-linux-gnu) nokogiri (1.18.2-x86_64-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
parallel (1.27.0) parallel (1.26.3)
parser (3.3.8.0) parser (3.3.7.1)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
pp (0.6.2) pp (0.6.2)
prettyprint prettyprint
prettyprint (0.2.0) prettyprint (0.2.0)
prism (1.4.0)
propshaft (1.1.0) propshaft (1.1.0)
actionpack (>= 7.0.0) actionpack (>= 7.0.0)
activesupport (>= 7.0.0) activesupport (>= 7.0.0)
rack rack
railties (>= 7.0.0) railties (>= 7.0.0)
psych (5.2.6) psych (5.2.3)
date date
stringio stringio
public_suffix (6.0.2) public_suffix (6.0.1)
puma (6.6.0) puma (6.6.0)
nio4r (~> 2.0) nio4r (~> 2.0)
raabro (1.4.0) raabro (1.4.0)
racc (1.8.1) racc (1.8.1)
rack (3.1.16) rack (3.1.9)
rack-session (2.1.1) rack-session (2.1.0)
base64 (>= 0.1.0) base64 (>= 0.1.0)
rack (>= 3.0.0) rack (>= 3.0.0)
rack-test (2.2.0) rack-test (2.2.0)
rack (>= 1.3) rack (>= 1.3)
rackup (2.2.1) rackup (2.2.1)
rack (>= 3) rack (>= 3)
rails-dom-testing (2.3.0) rails-dom-testing (2.2.0)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
minitest minitest
nokogiri (>= 1.6) nokogiri (>= 1.6)
@ -238,44 +220,51 @@ GEM
loofah (~> 2.21) loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rainbow (3.1.1) rainbow (3.1.1)
rake (13.3.0) rake (13.2.1)
rdoc (6.14.0) rdoc (6.12.0)
erb
psych (>= 4.0.0) psych (>= 4.0.0)
regexp_parser (2.10.0) regexp_parser (2.10.0)
reline (0.6.1) reline (0.6.0)
io-console (~> 0.5) io-console (~> 0.5)
rubocop (1.76.0) rexml (3.4.0)
rubocop (1.71.2)
json (~> 2.3) json (~> 2.3)
language_server-protocol (~> 3.17.0.2) language_server-protocol (>= 3.17.0)
lint_roller (~> 1.1.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0) regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.45.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0) unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.45.0) rubocop-ast (1.38.0)
parser (>= 3.3.7.2) parser (>= 3.3.1.0)
prism (~> 1.4) rubocop-minitest (0.36.0)
rubocop-performance (1.25.0) rubocop (>= 1.61, < 2.0)
lint_roller (~> 1.1) rubocop-ast (>= 1.31.1, < 2.0)
rubocop (>= 1.75.0, < 2.0) rubocop-performance (1.23.1)
rubocop-ast (>= 1.38.0, < 2.0) rubocop (>= 1.48.1, < 2.0)
rubocop-rails (2.32.0) rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.29.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 1.75.0, < 2.0) rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails-omakase (1.1.0) rubocop-rails-omakase (1.0.0)
rubocop (>= 1.72) rubocop
rubocop-performance (>= 1.24) rubocop-minitest
rubocop-rails (>= 2.30) rubocop-performance
rubocop-rails
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
rubyzip (2.4.1)
securerandom (0.4.1) securerandom (0.4.1)
solid_cable (3.0.8) selenium-webdriver (4.28.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
solid_cable (3.0.7)
actioncable (>= 7.2) actioncable (>= 7.2)
activejob (>= 7.2) activejob (>= 7.2)
activerecord (>= 7.2) activerecord (>= 7.2)
@ -284,50 +273,50 @@ GEM
activejob (>= 7.2) activejob (>= 7.2)
activerecord (>= 7.2) activerecord (>= 7.2)
railties (>= 7.2) railties (>= 7.2)
solid_queue (1.1.5) solid_queue (1.1.3)
activejob (>= 7.1) activejob (>= 7.1)
activerecord (>= 7.1) activerecord (>= 7.1)
concurrent-ruby (>= 1.3.1) concurrent-ruby (>= 1.3.1)
fugit (~> 1.11.0) fugit (~> 1.11.0)
railties (>= 7.1) railties (>= 7.1)
thor (~> 1.3.1) thor (~> 1.3.1)
sqlite3 (2.6.0-aarch64-linux-gnu) sqlite3 (2.5.0-aarch64-linux-gnu)
sqlite3 (2.6.0-arm64-darwin) sqlite3 (2.5.0-arm64-darwin)
sqlite3 (2.6.0-x86_64-linux-gnu) sqlite3 (2.5.0-x86_64-linux-gnu)
stimulus-rails (1.3.4) stimulus-rails (1.3.4)
railties (>= 6.0.0) railties (>= 6.0.0)
stringio (3.1.7) stringio (3.1.2)
tailwindcss-rails (3.3.2) tailwindcss-rails (4.0.0)
railties (>= 7.0.0) railties (>= 7.0.0)
tailwindcss-ruby (~> 3.0) tailwindcss-ruby (~> 4.0)
tailwindcss-ruby (3.4.17-aarch64-linux) tailwindcss-ruby (4.0.6-aarch64-linux-gnu)
tailwindcss-ruby (3.4.17-arm64-darwin) tailwindcss-ruby (4.0.6-arm64-darwin)
tailwindcss-ruby (3.4.17-x86_64-linux) tailwindcss-ruby (4.0.6-x86_64-linux-gnu)
thor (1.3.2) thor (1.3.2)
timeout (0.4.3) timeout (0.4.3)
turbo-rails (2.0.16) turbo-rails (2.0.11)
actionpack (>= 7.1.0) actionpack (>= 6.0.0)
railties (>= 7.1.0) railties (>= 6.0.0)
tzinfo (2.0.6) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unicode-display_width (3.1.4) unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4) unicode-emoji (4.0.4)
uri (1.0.3) uri (1.0.2)
useragent (0.16.11) useragent (0.16.11)
web-console (4.2.1) web-console (4.2.1)
actionview (>= 6.0.0) actionview (>= 6.0.0)
activemodel (>= 6.0.0) activemodel (>= 6.0.0)
bindex (>= 0.4.0) bindex (>= 0.4.0)
railties (>= 6.0.0) railties (>= 6.0.0)
webrick (1.9.1) websocket (1.2.11)
websocket-driver (0.8.0) websocket-driver (0.7.7)
base64 base64
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
xpath (3.2.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
zeitwerk (2.7.3) zeitwerk (2.7.1)
PLATFORMS PLATFORMS
aarch64-linux aarch64-linux
@ -339,9 +328,7 @@ DEPENDENCIES
bcrypt bcrypt
bootsnap bootsnap
brakeman brakeman
bundler-audit
capybara capybara
cuprite
debug debug
importmap-rails importmap-rails
jbuilder jbuilder
@ -349,12 +336,13 @@ DEPENDENCIES
puma (>= 5.0) puma (>= 5.0)
rails! rails!
rubocop-rails-omakase rubocop-rails-omakase
selenium-webdriver
solid_cable solid_cable
solid_cache solid_cache
solid_queue solid_queue
sqlite3 (>= 1.4) sqlite3 (>= 1.4)
stimulus-rails stimulus-rails
tailwindcss-rails (~> 3.3.1) tailwindcss-rails
turbo-rails turbo-rails
tzinfo-data tzinfo-data
web-console web-console

View file

@ -1,19 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
.msg-notice {
@apply bg-green-300 text-green-900;
}
.msg-alert {
@apply bg-red-300 text-red-900;
}
/*
@layer components {
.btn-primary {
@apply py-2 px-4 bg-blue-200;
}
}
*/

View file

@ -0,0 +1,39 @@
@import 'tailwindcss';
@plugin '@tailwindcss/forms';
@plugin '@tailwindcss/aspect-ratio';
@plugin '@tailwindcss/typography';
/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}
.msg-notice {
@apply bg-green-300 text-green-900;
}
.msg-alert {
@apply bg-red-300 text-red-900;
}
/*
@layer components {
.btn-primary {
@apply py-2 px-4 bg-blue-200;
}
}
*/

View file

@ -12,12 +12,12 @@
<div class="my-5"> <div class="my-5">
<%= form.label :description %> <%= form.label :description %>
<%= form.text_field :description, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :description, class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
<%= form.label :amount %> <%= form.label :amount %>
<%= form.text_field :amount, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :amount, class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="inline"> <div class="inline">

View file

@ -13,12 +13,12 @@
<div class="my-5"> <div class="my-5">
<%= form.label :description %> <%= form.label :description %>
<%= form.text_field :description, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :description, class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
<%= form.label :payment %> <%= form.label :payment %>
<%= form.text_field :payment, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :payment, class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
@ -27,7 +27,7 @@
form.select :period, form.select :period,
options_for_select(expense_periods, expense.period), options_for_select(expense_periods, expense.period),
{}, {},
class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full"
%> %>
</div> </div>

View file

@ -13,7 +13,7 @@
<div class="my-5"> <div class="my-5">
<%= form.label :description %> <%= form.label :description %>
<%= form.text_field :description, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :description, class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
@ -23,7 +23,7 @@
<div class="my-5"> <div class="my-5">
<%= form.label :amount %> <%= form.label :amount %>
<%= form.text_field :amount, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :amount, class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
@ -32,7 +32,7 @@
form.select :member_id, form.select :member_id,
options_for_select(members, income.member_id), options_for_select(members, income.member_id),
{}, {},
class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full"
%> %>
</div> </div>

View file

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %> <%= javascript_importmap_tags %>

View file

@ -13,7 +13,7 @@
<div class="my-5"> <div class="my-5">
<%= form.label :name %> <%= form.label :name %>
<%= form.text_field :name, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :name, class: "block shadow-sm rounded-md border border-gray-200 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">

View file

@ -13,12 +13,12 @@
<div class="my-5"> <div class="my-5">
<%= form.label :email %> <%= form.label :email %>
<%= form.text_field :email, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :email, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
<%= form.label :password %> <%= form.label :password %>
<%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> <%= form.password_field :password, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="inline"> <div class="inline">

View file

@ -13,17 +13,17 @@
<div class="my-5"> <div class="my-5">
<%= form.label :email %> <%= form.label :email %>
<%= form.text_field :email, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> <%= form.text_field :email, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
<%= form.label :password %> <%= form.label :password %>
<%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> <%= form.password_field :password, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="my-5"> <div class="my-5">
<%= form.label :password_confirmation %> <%= form.label :password_confirmation %>
<%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> <%= form.password_field :password_confirmation, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden px-3 py-2 mt-2 w-full" %>
</div> </div>
<div class="inline"> <div class="inline">

View file

@ -1,6 +0,0 @@
#!/usr/bin/env ruby
require_relative "../config/boot"
require "bundler/audit/cli"
ARGV.concat %w[ --config config/bundler-audit.yml ] if ARGV.empty? || ARGV.include?("check")
Bundler::Audit::CLI.start

6
bin/ci
View file

@ -1,6 +0,0 @@
#!/usr/bin/env ruby
require_relative "../config/boot"
require "active_support/continuous_integration"
CI = ActiveSupport::ContinuousIntegration
require_relative "../config/ci.rb"

View file

@ -22,7 +22,6 @@ FileUtils.chdir APP_ROOT do
puts "\n== Preparing database ==" puts "\n== Preparing database =="
system! "bin/rails db:prepare" system! "bin/rails db:prepare"
system! "bin/rails db:reset" if ARGV.include?("--reset")
puts "\n== Removing old logs and tempfiles ==" puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear" system! "bin/rails log:clear tmp:clear"

View file

@ -9,7 +9,7 @@ Bundler.require(*Rails.groups)
module FamilyBudget module FamilyBudget
class Application < Rails::Application class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version. # Initialize configuration defaults for originally generated Rails version.
config.load_defaults 8.1 config.load_defaults 8.0
# Please, add to the `ignore` list any other `lib` subdirectories that do # Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded. # not contain `.rb` files, or that should not be reloaded or eager loaded.

View file

@ -1,5 +0,0 @@
# Audit all gems listed in the Gemfile for known security problems by running bin/bundler-audit.
# CVEs that are not relevant to the application can be enumerated on the ignore list below.
ignore:
- CVE-THAT-DOES-NOT-APPLY

View file

@ -1,23 +0,0 @@
# Run using bin/ci
CI.run do
step "Setup", "bin/setup --skip-server"
step "Style: Ruby", "bin/rubocop"
step "Security: Gem audit", "bin/bundler-audit"
step "Security: Importmap vulnerability audit", "bin/importmap audit"
step "Security: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error"
step "Tests: Rails", "bin/rails test"
step "Tests: System", "bin/rails test:system"
step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant"
# Optional: set a green GitHub commit status to unblock PR merge.
# Requires the `gh` CLI and and `gh extension install basecamp/gh-signoff`.
# if success?
# step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff"
# else
# failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again."
# end
end

View file

@ -59,7 +59,7 @@ Rails.application.configure do
# Set host to be used by links generated in mailer templates. # Set host to be used by links generated in mailer templates.
config.action_mailer.default_url_options = { host: "example.com" } config.action_mailer.default_url_options = { host: "example.com" }
# Specify outgoing SMTP server. Remember to add smtp/* credentials via bin/rails credentials:edit. # Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
# config.action_mailer.smtp_settings = { # config.action_mailer.smtp_settings = {
# user_name: Rails.application.credentials.dig(:smtp, :user_name), # user_name: Rails.application.credentials.dig(:smtp, :user_name),
# password: Rails.application.credentials.dig(:smtp, :password), # password: Rails.application.credentials.dig(:smtp, :password),

View file

@ -20,10 +20,6 @@
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
# config.content_security_policy_nonce_directives = %w(script-src style-src) # config.content_security_policy_nonce_directives = %w(script-src style-src)
# #
# # Automatically add `nonce` to `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag`
# # if the corresponding directives are specified in `content_security_policy_nonce_directives`.
# # config.content_security_policy_nonce_auto = true
#
# # Report violations without enforcing the policy. # # Report violations without enforcing the policy.
# # config.content_security_policy_report_only = true # # config.content_security_policy_report_only = true
# end # end

View file

@ -1,16 +0,0 @@
# Be sure to restart your server when you modify this file.
# Avoid CORS issues when API is called from the frontend app.
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests.
# Read more: https://github.com/cyu/rack-cors
# Rails.application.config.middleware.insert_before 0, Rack::Cors do
# allow do
# origins "example.com"
#
# resource "*",
# headers: :any,
# methods: [:get, :post, :put, :patch, :delete, :options, :head]
# end
# end

View file

@ -8,21 +8,3 @@
# #
# Read the Guide for Upgrading Ruby on Rails for more info on each option. # Read the Guide for Upgrading Ruby on Rails for more info on each option.
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
###
# Skips escaping HTML entities and line separators. When set to `false`, the
# JSON renderer no longer escapes these to improve performance.
#
# Example:
# class PostsController < ApplicationController
# def index
# render json: { key: "\u2028\u2029<>&" }
# end
# end
#
# Renders `{"key":"\u2028\u2029\u003c\u003e\u0026"}` with the previous default, but `{"key":"<>&"}` with the config
# set to `false`.
#
# Applications that want to keep the escaping behavior can set the config to `true`.
#++
# Rails.configuration.action_controller.escape_json_responses = false

View file

@ -1,8 +1,9 @@
require "test_helper" require "test_helper"
require "capybara/cuprite"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :cuprite, options: { headless: ENV["VISIBLE_SYSTEM_TESTS"].blank? } driven_by :selenium,
using: ENV["VISIBLE_SYSTEM_TESTS"].present? ? :chrome : :headless_chrome,
screen_size: [ 1400, 1400 ]
def login(email, password = "secret") def login(email, password = "secret")
visit new_session_url visit new_session_url