Skip to content

Modernize repo to latest everything, to run on Heroku again #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 44 commits into
base: main
Choose a base branch
from

Conversation

veganstraightedge
Copy link
Contributor

@veganstraightedge veganstraightedge commented Aug 12, 2025

Demo running on Heroku

https://temp-mf-rb-b59ec22d01d4.herokuapp.com

Screenshots

(at the bottom of description)

Dependencies

  • Ruby: 3.2.23.4.5.
  • Rails: 5.2.08.0.2
  • Gems: everything → latest
  • Bootstrap: 4.1.35.3.7
  • Rubocop: 0.58.21.79.2
  • Contributor Covenant Code of Conduct: 1.43.0

GitHub Action CI

  • Added Dependabot to keep gems up to date
  • Added Rubocop PR check
  • Added ERB lint PR check
  • Added Brakeman PR check

Code changes

  • Rubocopped all of the things
    • Generated a .rubocop_todo.yml for the last TODO to make (a db schema change)
    • Added Rubocop extensions for: Rails, Rspec, Capybara
  • Updated everything to modern Rails-isms
  • Removed unneeded performance profiling and dev gems
  • Renamed submissions/_form.html.erb to submissions/_submission.html.erb, so render @submission pattern works
  • Removed the extra hidden field values from submitted form URL, using enforce_utf8: false
  • Added various binstubs, for CI and dev

Assets (Bootstrap)

  • Removed the asset pipeline related Bootstrap gems
  • Removed Bootstrap JS (no JS needed)
  • Linked to Bootstrap CSS from CDN directly
  • Removed the few CSS customizations
  • Made the design calmer (less boldness: headings, labels, etc)
  • Added dark mode, and auto switcher which uses the system's settings
  • Linted all of the HTML
  • Added a helper with constants to more easily update Bootstrap version
  • Updated some Bootstrap class names
  • TODO: Someone should add a good microformats logo SVG as favicon
module ApplicationHelper
  BOOTSTRAP_VERSION       = '5.3.7'.freeze
  BOOTSTRAP_CSS_INTEGRITY = 'sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr'.freeze

Tests

  • Removed the routing/view/controller tests which were testing implementation internals, not user experience external
  • Added Capybara system tests, which actually load and click around / submit forms in a (headless) browser (Chrome)

Screenshots

Light mode

image image

Dark mode

image image

@veganstraightedge veganstraightedge marked this pull request as ready for review August 12, 2025 21:14
@veganstraightedge veganstraightedge changed the title Modernize repo to latest everything, to run on Heroku latest again Modernize repo to latest everything, to run on Heroku again Aug 12, 2025
Copy link
Member

@jgarber623 jgarber623 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff here is too big for me to thoroughly review, but I did a quick test of the website at the link @veganstraightedge provided in the description and it appears to work just fine!

Tested with a URL and with an HTML snippet and validated that the results were as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants