The server cannot process the request due to a client error. Please check the request and try again. If you’re the application owner check the logs for more information.
+diff --git a/.ruby-version b/.ruby-version index be94e6f5..fa7adc7a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.2 +3.3.5 diff --git a/Gemfile b/Gemfile index 73135eb6..2aa51831 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,12 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.2.2' +ruby '3.3.5' -gem 'activeadmin', '4.0.0.beta6' +gem 'activeadmin', '4.0.0.beta13' gem 'aws-sdk-s3', require: false gem 'chartkick' -gem 'delayed' # delayed_job_active_record rails 7 fork: https://github.com/betterment/delayed +gem 'delayed', github: 'ryanckulp/delayed' # delayed_job_active_record rails 7 fork: https://github.com/betterment/delayed gem 'devise' gem 'groupdate' # used by Chartkick gem 'honeypot-captcha', github: 'founderhacker/honeypot-captcha' # prevent unauthenticated form spam @@ -21,7 +21,7 @@ gem 'postmark-rails' gem 'pretender' gem 'puma', '6.4.2' gem 'rack-cors', :require => 'rack/cors' -gem 'rails', '7.1.3.2' +gem 'rails', '8.0.0.rc1' gem 'redis' gem 'rename', '1.1.3', git: 'https://github.com/ryanckulp/rename' # remove this gem after use gem 'split', require: 'split/dashboard' @@ -55,7 +55,7 @@ group :test do gem 'capybara' gem 'factory_bot_rails' gem 'faker' - gem 'rspec-rails', '6.0.3' + gem 'rspec-rails', '7.0.1' gem 'selenium-webdriver' gem 'shoulda-callback-matchers' gem 'shoulda-matchers' diff --git a/Gemfile.lock b/Gemfile.lock index b44e04ec..279ca28b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,6 +4,14 @@ GIT specs: honeypot-captcha (1.0.2) +GIT + remote: https://github.com/ryanckulp/delayed.git + revision: 2051744a7cd33d0ad0afa441fe2861c90bd0949e + specs: + delayed (0.5.5) + activerecord (>= 5.2) + concurrent-ruby + GIT remote: https://github.com/ryanckulp/rename revision: c747f30cbd85f72d8c57ab9e0d1b1797ed444ccc @@ -16,118 +24,115 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.1.3.2) - actionpack (= 7.1.3.2) - activesupport (= 7.1.3.2) + actioncable (8.0.0.rc1) + actionpack (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.3.2) - actionpack (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activesupport (= 7.1.3.2) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (8.0.0.rc1) + actionpack (= 8.0.0.rc1) + activejob (= 8.0.0.rc1) + activerecord (= 8.0.0.rc1) + activestorage (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) + mail (>= 2.8.0) + actionmailer (8.0.0.rc1) + actionpack (= 8.0.0.rc1) + actionview (= 8.0.0.rc1) + activejob (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.3.2) - actionview (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionpack (8.0.0.rc1) + actionview (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) nokogiri (>= 1.8.5) - racc rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.2) - actionpack (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + useragent (~> 0.16) + actiontext (8.0.0.rc1) + actionpack (= 8.0.0.rc1) + activerecord (= 8.0.0.rc1) + activestorage (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.3.2) - activesupport (= 7.1.3.2) + actionview (8.0.0.rc1) + activesupport (= 8.0.0.rc1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activeadmin (4.0.0.beta6) + activeadmin (4.0.0.beta13) arbre (~> 2.0) csv formtastic (>= 3.1) formtastic_i18n (>= 0.4) - inherited_resources (~> 1.7) + inherited_resources (~> 2.0) kaminari (>= 1.2.1) railties (>= 6.1) ransack (>= 4.0) - activejob (7.1.3.2) - activesupport (= 7.1.3.2) + activejob (8.0.0.rc1) + activesupport (= 8.0.0.rc1) globalid (>= 0.3.6) - activemodel (7.1.3.2) - activesupport (= 7.1.3.2) - activerecord (7.1.3.2) - activemodel (= 7.1.3.2) - activesupport (= 7.1.3.2) + activemodel (8.0.0.rc1) + activesupport (= 8.0.0.rc1) + activerecord (8.0.0.rc1) + activemodel (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) timeout (>= 0.4.0) - activestorage (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activesupport (= 7.1.3.2) + activestorage (8.0.0.rc1) + actionpack (= 8.0.0.rc1) + activejob (= 8.0.0.rc1) + activerecord (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) marcel (~> 1.0) - activesupport (7.1.3.2) + activesupport (8.0.0.rc1) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - arbre (2.0.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + arbre (2.0.2) activesupport (>= 3.0.0) - ruby2_keywords (>= 0.0.2) ast (2.4.2) aws-eventstream (1.3.0) - aws-partitions (1.928.0) - aws-sdk-core (3.196.0) + aws-partitions (1.992.0) + aws-sdk-core (3.210.0) aws-eventstream (~> 1, >= 1.3.0) - aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.8) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.81.0) - aws-sdk-core (~> 3, >= 3.193.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.150.0) - aws-sdk-core (~> 3, >= 3.194.0) + aws-sdk-kms (1.95.0) + aws-sdk-core (~> 3, >= 3.210.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.169.0) + aws-sdk-core (~> 3, >= 3.210.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.8) - aws-sigv4 (1.8.0) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.10.0) aws-eventstream (~> 1, >= 1.0.2) base64 (0.2.0) bcrypt (3.1.20) - bigdecimal (3.1.7) + benchmark (0.3.0) + bigdecimal (3.1.8) bindex (0.8.1) - bootsnap (1.17.0) + bootsnap (1.18.4) msgpack (~> 1.2) - builder (3.2.4) + builder (3.3.0) capybara (3.40.0) addressable matrix @@ -137,9 +142,10 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (5.0.6) - childprocess (5.0.0) - concurrent-ruby (1.2.3) + chartkick (5.1.1) + childprocess (5.1.0) + logger (~> 1.5) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crack (1.0.0) bigdecimal @@ -150,60 +156,67 @@ GEM debug (1.9.2) irb (~> 1.10) reline (>= 0.3.8) - delayed (0.5.3) - activerecord (>= 5.2) - concurrent-ruby devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.5.0) - docile (1.4.0) + diff-lcs (1.5.1) + docile (1.4.1) drb (2.2.1) - erubi (1.12.0) - factory_bot (6.4.6) + erubi (1.13.0) + factory_bot (6.5.0) activesupport (>= 5.0.0) factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) - faker (3.3.1) + faker (3.5.1) i18n (>= 1.8.11, < 2) - ffi (1.16.3) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-aarch64-linux-musl) + ffi (1.17.0-arm-linux-gnu) + ffi (1.17.0-arm-linux-musl) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86-linux-gnu) + ffi (1.17.0-x86-linux-musl) + ffi (1.17.0-x86_64-darwin) + ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.0-x86_64-linux-musl) formtastic (5.0.0) actionpack (>= 6.0.0) formtastic_i18n (0.7.0) globalid (1.2.1) activesupport (>= 6.1) - groupdate (6.4.0) - activesupport (>= 6.1) + groupdate (6.5.1) + activesupport (>= 7) has_scope (0.8.2) actionpack (>= 5.2) activesupport (>= 5.2) - hashdiff (1.1.0) - httparty (0.21.0) + hashdiff (1.1.1) + httparty (0.22.0) + csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.14.4) + i18n (1.14.6) concurrent-ruby (~> 1.0) - image_processing (1.12.2) + image_processing (1.13.0) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) - inherited_resources (1.14.0) + inherited_resources (2.0.1) actionpack (>= 6.0) has_scope (>= 0.6) railties (>= 6.0) responders (>= 2) io-console (0.7.2) - irb (1.12.0) - rdoc + irb (1.14.1) + rdoc (>= 4.0.0) reline (>= 0.4.2) - jbuilder (2.11.5) + jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) jmespath (1.6.2) @@ -221,11 +234,12 @@ GEM kaminari-core (= 1.2.2) kaminari-core (1.2.2) language_server-protocol (3.17.0.3) - launchy (3.0.0) + launchy (3.0.1) addressable (~> 2.8) childprocess (~> 5.0) letter_opener (1.10.0) launchy (>= 2.2, < 4) + logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -239,15 +253,15 @@ GEM metamagic (3.1.7) rails (>= 3.0.0) methodz (0.1.8) - mini_magick (4.12.0) + mini_magick (4.13.2) mini_mime (1.1.5) - minitest (5.22.3) - msgpack (1.7.2) - multi_xml (0.6.0) - mustermann (3.0.0) + minitest (5.25.1) + msgpack (1.7.3) + multi_xml (0.7.1) + bigdecimal (~> 3.1) + mustermann (3.0.3) ruby2_keywords (~> 0.0.1) - mutex_m (0.2.0) - net-imap (0.4.10) + net-imap (0.5.0) date net-protocol net-pop (0.1.2) @@ -256,20 +270,26 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.1) - nokogiri (1.16.5-arm64-darwin) + nio4r (2.7.3) + nokogiri (1.16.7-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.7-arm-linux) + racc (~> 1.4) + nokogiri (1.16.7-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.7-x86-linux) racc (~> 1.4) - nokogiri (1.16.5-x86_64-darwin) + nokogiri (1.16.7-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.5-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) orm_adapter (0.5.0) - parallel (1.24.0) - parser (3.3.1.0) + parallel (1.26.3) + parser (3.3.5.0) ast (~> 2.4.1) racc - pg (1.5.6) - postmark (1.24.1) + pg (1.5.8) + postmark (1.25.1) json postmark-rails (0.22.1) actionmailer (>= 3.0.0) @@ -278,11 +298,11 @@ GEM actionpack (>= 6.1) psych (5.1.2) stringio - public_suffix (5.0.5) + public_suffix (6.0.1) puma (6.4.2) nio4r (~> 2.0) - racc (1.7.3) - rack (3.0.10) + racc (1.8.1) + rack (3.1.8) rack-cors (2.0.2) rack (>= 2.0.0) rack-protection (4.0.0) @@ -295,20 +315,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.1.3.2) - actioncable (= 7.1.3.2) - actionmailbox (= 7.1.3.2) - actionmailer (= 7.1.3.2) - actionpack (= 7.1.3.2) - actiontext (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activemodel (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + rails (8.0.0.rc1) + actioncable (= 8.0.0.rc1) + actionmailbox (= 8.0.0.rc1) + actionmailer (= 8.0.0.rc1) + actionpack (= 8.0.0.rc1) + actiontext (= 8.0.0.rc1) + actionview (= 8.0.0.rc1) + activejob (= 8.0.0.rc1) + activemodel (= 8.0.0.rc1) + activerecord (= 8.0.0.rc1) + activestorage (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) bundler (>= 1.15.0) - railties (= 7.1.3.2) + railties (= 8.0.0.rc1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -316,99 +336,97 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.3.2) - actionpack (= 7.1.3.2) - activesupport (= 7.1.3.2) - irb + railties (8.0.0.rc1) + actionpack (= 8.0.0.rc1) + activesupport (= 8.0.0.rc1) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - ransack (4.1.1) + ransack (4.2.1) activerecord (>= 6.1.5) activesupport (>= 6.1.5) i18n - rdoc (6.6.3.1) + rdoc (6.7.0) psych (>= 4.0.0) - redis (5.2.0) + redis (5.3.0) redis-client (>= 0.22.0) - redis-client (0.22.1) + redis-client (0.22.2) connection_pool - regexp_parser (2.9.1) - reline (0.5.4) + regexp_parser (2.9.2) + reline (0.5.10) io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.6) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rexml (3.3.8) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.0.3) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) - rspec-core (~> 3.12) - rspec-expectations (~> 3.12) - rspec-mocks (~> 3.12) - rspec-support (~> 3.12) - rspec-support (3.12.1) - rubocop (1.63.5) + rspec-support (~> 3.13.0) + rspec-rails (7.0.1) + actionpack (>= 7.0) + activesupport (>= 7.0) + railties (>= 7.0) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.1) + rubocop (1.67.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-capybara (2.20.0) + rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-factory_bot (2.24.0) - rubocop (~> 1.33) - rubocop-rails (2.24.1) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-rails (2.26.2) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (2.28.0) - rubocop (~> 1.40) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) - rubocop-rspec_rails (~> 2.28) - rubocop-rspec_rails (2.28.2) - rubocop (~> 1.40) + rubocop-rspec (3.1.0) + rubocop (~> 1.61) ruby-progressbar (1.13.0) - ruby-vips (2.2.0) + ruby-vips (2.2.2) ffi (~> 1.12) + logger ruby2_keywords (0.0.5) rubystats (0.4.1) matrix rubyzip (2.3.2) - selenium-webdriver (4.15.0) + securerandom (0.3.1) + selenium-webdriver (4.25.0) + base64 (~> 0.2) + logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) shoulda-callback-matchers (1.1.4) activesupport (>= 3) - shoulda-matchers (6.2.0) + shoulda-matchers (6.4.0) activesupport (>= 5.2.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov-tailwindcss (2.2.0) simplecov (~> 0.16) simplecov_json_formatter (0.1.4) @@ -426,30 +444,34 @@ GEM sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - stimulus-rails (1.3.3) - railties (>= 6.0.0) - stringio (3.1.0) - stripe (11.2.0) - tailwindcss-rails (2.5.0-arm64-darwin) - railties (>= 6.0.0) - tailwindcss-rails (2.5.0-x86_64-darwin) - railties (>= 6.0.0) - tailwindcss-rails (2.5.0-x86_64-linux) + stimulus-rails (1.3.4) railties (>= 6.0.0) - thor (1.3.1) - tilt (2.3.0) + stringio (3.1.1) + stripe (13.1.2) + tailwindcss-rails (3.0.0) + railties (>= 7.0.0) + tailwindcss-ruby + tailwindcss-ruby (3.4.14) + tailwindcss-ruby (3.4.14-aarch64-linux) + tailwindcss-ruby (3.4.14-arm-linux) + tailwindcss-ruby (3.4.14-arm64-darwin) + tailwindcss-ruby (3.4.14-x86_64-darwin) + tailwindcss-ruby (3.4.14-x86_64-linux) + thor (1.3.2) + tilt (2.4.0) timeout (0.4.1) - turbo-rails (2.0.5) + turbo-rails (2.0.11) actionpack (>= 6.0.0) - activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) + uri (0.13.1) + useragent (0.16.10) warden (1.2.9) rack (>= 2.0.9) web-console (4.2.1) @@ -457,33 +479,43 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.23.0) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.1) - websocket (1.2.10) + webrick (1.8.2) + websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.13) + zeitwerk (2.7.1) PLATFORMS - arm64-darwin-22 - arm64-darwin-23 - x86_64-darwin-21 + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86-linux + x86-linux-gnu + x86-linux-musl + x86_64-darwin x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES - activeadmin (= 4.0.0.beta6) + activeadmin (= 4.0.0.beta13) aws-sdk-s3 bootsnap capybara chartkick debug - delayed + delayed! devise factory_bot_rails faker @@ -501,10 +533,10 @@ DEPENDENCIES pretender puma (= 6.4.2) rack-cors - rails (= 7.1.3.2) + rails (= 8.0.0.rc1) redis rename (= 1.1.3)! - rspec-rails (= 6.0.3) + rspec-rails (= 7.0.1) rubocop rubocop-capybara rubocop-factory_bot @@ -526,7 +558,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.2.2p53 + ruby 3.3.5p100 BUNDLED WITH - 2.4.18 + 2.5.16 diff --git a/LICENSE b/LICENSE index e946fe6a..8d51bbf0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Ryan Kulp +Copyright (c) 2024 Ryan Kulp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index bef55e7f..11e21aba 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Speedrail -a Rails 7 template by [@ryanckulp](https://twitter.com/ryanckulp), created to ship SaaS apps quickly. +a Rails 8 template by [@ryanckulp](https://twitter.com/ryanckulp), created to ship SaaS apps quickly. learn to build 3 projects with Speedrail at [24 Hour MVP](https://founderhacker.com/24-hour-mvp), or check out the [premium documentation](https://gitpaywall.com/p/ryanckulp/speedrail-docs). diff --git a/app/assets/stylesheets/daisy.css b/app/assets/stylesheets/daisy.css deleted file mode 100644 index 1e204ec8..00000000 --- a/app/assets/stylesheets/daisy.css +++ /dev/null @@ -1,6 +0,0 @@ -/* override Daisy UI components here */ - -/* example - maintains default 'btn' styles but changes border to pill style */ -/* .btn { - border-radius: 9999px; -} */ diff --git a/app/controllers/billing_portal_controller.rb b/app/controllers/billing_portal_controller.rb index 62e7cd3b..305aa8f6 100644 --- a/app/controllers/billing_portal_controller.rb +++ b/app/controllers/billing_portal_controller.rb @@ -20,7 +20,7 @@ def create else respond_to do |format| format.html { redirect_to subscribe_index_path } # /account view - format.json { render json: create_subscription } # /subscribe view + format.json { render json: create_checkout } # /subscribe view end end end @@ -28,7 +28,7 @@ def create private # invoked from /subscribe during onboarding - def create_subscription + def create_checkout session = Stripe::Checkout::Session.create({ ui_mode: 'embedded', customer: current_user.stripe_customer_id, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d99b6f41..7c370182 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -6,8 +6,7 @@ <%= csrf_meta_tags %> <%= csp_meta_tag %> - - + diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb index df08cc32..b39ccef7 100644 --- a/app/views/shared/_header.html.erb +++ b/app/views/shared/_header.html.erb @@ -23,7 +23,7 @@ <% if current_user %> <%= link_to 'Dashboard', dashboard_index_path, class: nav_link_classes('dashboard') %> <%= link_to 'Account', account_index_path, class: nav_link_classes('account') %> - <%= link_to 'Logout', logout_path, class: nav_link_classes %> + <%= link_to 'Logout', logout_path, class: nav_link_classes, data: { turbo: false } %> <% else %> <%= link_to 'Contact', "mailto:#{Rails.application.credentials.admin_email}", target: '_blank', class: nav_link_classes('contact') %> <%= link_to 'Login', new_user_session_path, class: nav_link_classes('login') %> diff --git a/bin/dev b/bin/dev index 2daf7764..eff72761 100755 --- a/bin/dev +++ b/bin/dev @@ -1,7 +1,6 @@ #!/usr/bin/env bash -if ! command -v foreman &> /dev/null -then +if ! gem list foreman -i --silent; then echo "Installing foreman..." gem install foreman fi diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 00000000..40330c0f --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) + +load Gem.bin_path("rubocop", "rubocop") diff --git a/bin/setup b/bin/setup index 3cd5a9d7..8cb31286 100755 --- a/bin/setup +++ b/bin/setup @@ -14,7 +14,6 @@ FileUtils.chdir APP_ROOT do # Add necessary setup steps to this file. puts "== Installing dependencies ==" - system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" @@ -28,6 +27,11 @@ FileUtils.chdir APP_ROOT do puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" - puts "\n== Restarting application server ==" - system! "bin/rails restart" + unless ARGV.include?("--skip-server") + puts "\n== Restarting application server ==" + system! "bin/rails restart" + puts "\n== Starting development server ==" + STDOUT.flush # flush the output before exec(2) so that it displays + exec "bin/dev" + end end diff --git a/bin/speedrail b/bin/speedrail index bdde5349..f33f284e 100755 --- a/bin/speedrail +++ b/bin/speedrail @@ -25,6 +25,9 @@ FileUtils.chdir APP_ROOT do system! "cd ../#{new_app_name}" system! "bin/setup" + puts "== Dropping OSS License ==" + system! "rm LICENSE" + puts "== Initializing new Git Repository ==" system! "rm -rf .git && git init && git add . && git commit -m 'first commit'" diff --git a/bin/thrust b/bin/thrust new file mode 100755 index 00000000..36bde2d8 --- /dev/null +++ b/bin/thrust @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("thruster", "thrust") diff --git a/config/application.rb b/config/application.rb index a79a0898..f72e396d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,7 +9,7 @@ module Speedrail class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.1 + config.load_defaults 8.0 # 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. diff --git a/config/environments/development.rb b/config/environments/development.rb index 52afb903..c685191d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -45,6 +45,7 @@ # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + # Make template changes take effect immediately. config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. @@ -62,12 +63,12 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true + # Append comments with runtime information tags to SQL queries in logs. + config.active_record.query_log_tags_enabled = true + # Highlight code that enqueued background job in logs. config.active_job.verbose_enqueue_logs = true - # Suppress logger output for asset requests. - config.assets.quiet = true - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true @@ -79,4 +80,7 @@ # Raise error when a before_action's only/except options reference missing actions config.action_controller.raise_on_missing_callback_actions = true + + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! end diff --git a/config/environments/production.rb b/config/environments/production.rb index e4695b74..af635267 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -6,72 +6,53 @@ # Code is not reloaded between requests. config.enable_reloading = false - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both threaded web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. + # Eager load code on boot for better performance and memory savings (ignored by Rake tasks). config.eager_load = true - # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment - # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). - # config.require_master_key = true - - # Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it). - config.public_file_server.enabled = true + # Full error reports are disabled. + config.consider_all_requests_local = false - # Compress CSS using a preprocessor. - # config.assets.css_compressor = :sass + # Turn on fragment caching in view templates. + config.action_controller.perform_caching = true - # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false + # Cache assets for far-future expiry since they are all digest stamped. + config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" } # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.asset_host = "http://assets.example.com" - # Specifies the header that your server uses for sending files. - # 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). 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.*/ ] - # Assume all access to the app is happening through a SSL-terminating reverse proxy. - # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. - # config.assume_ssl = true + config.assume_ssl = true # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true - # Log to STDOUT by default + # Skip http-to-https redirect for the default health check endpoint. + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } + + # Log to STDOUT with the current request id as a default log tag. 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.logger = ActiveSupport::TaggedLogging.logger($stdout) - # Info include generic and useful information about system operation, but avoids logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). If you - # want to log everything, set the level to "debug". + # Change to "debug" to log everything (including potentially personally-identifiable information!) config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") - # Use a different cache store in production. + # Replace the default in-process memory cache store with a durable alternative. # config.cache_store = :mem_cache_store - # 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 = "speedrail_production" + # Prevent health checks from clogging up the logs. + config.silence_healthcheck_path = "/up" - config.action_mailer.perform_caching = false + # Replace the default in-process and non-durable queuing backend for Active Job. + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "speedrail_production" # 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. @@ -81,12 +62,12 @@ # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true - # Don't log any deprecations. - config.active_support.report_deprecations = false - # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + # Only use :id for inspections in production. + config.active_record.attributes_for_inspect = [:id] + # Enable DNS rebinding protection and other `Host` header attacks. # config.hosts = [ # "example.com", # Allow requests from example.com diff --git a/config/environments/test.rb b/config/environments/test.rb index 0dda9f9f..fcb079e5 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -19,16 +19,13 @@ # 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=3600" } - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false + # Show full error reports. + config.consider_all_requests_local = true config.cache_store = :null_store - # Raise exceptions instead of rendering exception templates. + # Render exception templates for rescuable exceptions and raise for other exceptions. config.action_dispatch.show_exceptions = :rescuable # Disable request forgery protection in test environment. @@ -37,28 +34,23 @@ # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test - config.action_mailer.perform_caching = false - # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Set host to be used by links generated in mailer templates. + config.action_mailer.default_url_options = { host: "example.com" } + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr - # Raise exceptions for disallowed deprecations. - config.active_support.disallowed_deprecation = :raise - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 2eeef966..48732442 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -5,8 +5,3 @@ # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index c2d89e28..c0b717f7 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -4,5 +4,5 @@ # 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 + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc ] diff --git a/config/puma.rb b/config/puma.rb index 94561f6c..3ddce9ff 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,46 +1,44 @@ -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers: a minimum and maximum. -# 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. +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. # -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 the `worker_timeout` threshold that Puma will use to wait before -# terminating a worker in development environments. +# Puma starts a configurable number of processes (workers) and each process +# serves each request in a thread from an internal thread pool. # -worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" - -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You +# should only set this value when you want to run 2 or more workers. The +# default is already 1. # -port ENV.fetch("PORT", 3000) - -# Specifies the `environment` that Puma will run in. +# The ideal number of threads per worker depends both on how much time the +# application spends waiting for IO operations and on how much you wish to +# prioritize throughput over latency. # -environment ENV.fetch("RAILS_ENV") { "development" } - -# Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } - -# Specifies the number of `workers` to boot in clustered mode. -# Workers are forked web server processes. If using threads and workers together -# the concurrency of the application would be max `threads` * `workers`. -# Workers do not work on JRuby or Windows (both of which do not support -# processes). +# As a rule of thumb, increasing the number of threads will increase how much +# traffic a given process can handle (throughput), but due to CRuby's +# Global VM Lock (GVL) it has diminishing returns and will degrade the +# response time (latency) of the application. # -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } - -# Use the `preload_app!` method when specifying a `workers` number. -# This directive tells Puma to first boot the application and load code -# before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. +# The default is set to 3 threads as it's deemed a decent compromise between +# throughput and latency for the average Rails application. # -# preload_app! +# Any libraries that use a connection pool or another resource pool should +# be configured to provide at least as many connections as the number of +# threads. This includes Active Record's `pool` parameter in `database.yml`. +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +port ENV.fetch("PORT", 3000) # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart +# Run the Solid Queue supervisor inside of Puma for single-server deployments +plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] + +# Specify the PID file. Defaults to tmp/pids/server.pid in development. +# In other environments, only set the PID file if requested. +pidfile ENV["PIDFILE"] if ENV["PIDFILE"] + # Allow tailwindcss:watch to integrate w/ "rails server", removing a separate process plugin :tailwindcss if ENV.fetch("RAILS_ENV", "development") == "development" diff --git a/config/routes.rb b/config/routes.rb index fe472254..79e287e8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,7 +24,7 @@ end # admin panels - authenticated :user, ->(user) { user.admin? } do + authenticated :user, lambda(&:admin?) do # insert sidekiq etc mount Split::Dashboard, at: 'admin/split' end diff --git a/db/schema.rb b/db/schema.rb index 4659cd2d..b8ef1a90 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_04_11_204440) do +ActiveRecord::Schema[7.2].define(version: 2024_04_11_204440) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/lib/tasks/scheduler.rake b/lib/tasks/scheduler.rake index f643383d..ae65ba6c 100644 --- a/lib/tasks/scheduler.rake +++ b/lib/tasks/scheduler.rake @@ -23,6 +23,6 @@ end # task :sync_with_stripe => :environment do # User.subscribed.each do |user| # subscription = Stripe::Subscription.retrieve(user.stripe_subscription_id) -# user.update(paying_customer: false) unless ['trialing', 'active', 'past_due'].include?(subscription.status) +# user.update(paying_customer: false) unless ['trialing', 'active', 'past_due'].include?(subscription&.status) # end # end diff --git a/lib/templates/rails/credentials/credentials.yml.tt b/lib/templates/rails/credentials/credentials.yml.tt index a4c0b4a9..231d22d8 100644 --- a/lib/templates/rails/credentials/credentials.yml.tt +++ b/lib/templates/rails/credentials/credentials.yml.tt @@ -5,3 +5,8 @@ admin_email: support@localhost.com base_url: http://localhost:3000 company_name: <%= Rails.application.class.module_parent_name %> postmark_api_token: xxxx-qqqq-yyyy-zzzz + +stripe: + api_key: + product_price_id: + publishable_key: \ No newline at end of file diff --git a/public/400.html b/public/400.html new file mode 100644 index 00000000..282dbc8c --- /dev/null +++ b/public/400.html @@ -0,0 +1,114 @@ + + + + +
+ +The server cannot process the request due to a client error. Please check the request and try again. If you’re the application owner check the logs for more information.
+You may have mistyped the address or the page may have moved.
-If you are the application owner check the logs for more information.
-The page you were looking for doesn’t exist. You may have mistyped the address or the page may have moved. If you’re the application owner check the logs for more information.
+Your browser is not supported.
Please upgrade your browser to continue.
Maybe you tried to change something you didn't have access to.
-If you are the application owner check the logs for more information.
-The change you wanted was rejected. Maybe you tried to change something you didn’t have access to. If you’re the application owner check the logs for more information.
+If you are the application owner check the logs for more information.
-We’re sorry, but something went wrong.
If you’re the application owner check the logs for more information.