This is a Ruby on Rails application that helps users with benefits applications. The application uses:
- Ruby on Rails 8
- PostgreSQL database
- Bootstrap 5.3 for UI styling
- Hotwire (Turbo and Stimulus) for frontend interactivity
- RSpec for testing
| # frozen_string_literal: true | |
| # config/initializers/colorized_logger.rb | |
| # This initializer adds color to the Rails logger output. It's a nice way to | |
| # visually distinguish log levels. | |
| module ColorizedLogger | |
| COLOR_CODES = { | |
| debug: "\e[36m", # Cyan | |
| info: "\e[32m", # Green | |
| warn: "\e[33m", # Yellow |
| # THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
| # PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
| # | |
| # | |
| # Libraries and infrastructure | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| docker.io docker-buildx \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ |
| # Leverages the BroadcastLogger introduced in Rails 7.1 to wrap the current | |
| # logger in a new logger that broadcasts to both the current logger and $stdout | |
| # | |
| # (Announcement: https://rubyonrails.org/2023/9/29/this-week-in-rails) | |
| # | |
| # If the current logger already broadcasts to $stdout, it will not be wrapped, | |
| # making it safe to call this method multiple times without knowing the current | |
| # logging "sitch". | |
| # | |
| # Usage probably looks something like this: |
| #!/bin/bash | |
| # Colors | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| NO_COLOR='\033[0m' | |
| BLUE='\033[0;34m' | |
| YELLOW='\033[0;33m' | |
| NO_COLOR='\033[0m' |
| # frozen_string_literal: true | |
| module Fingerprinting | |
| def full_fingerprint | |
| generate_fingerprint( | |
| ip_fingerprint, | |
| browser_fingerprint | |
| ) | |
| end |
| [Hotwire on the thoughtbot Blog](https://thoughtbot.com/blog/tags/hotwire) | |
| [thoughtbot Hotwire Examples](https://github.com/thoughtbot/hotwire-example-template) | |
| [Hotrails Turbo Rails Tutorial](https://www.hotrails.dev/turbo-rails) | |
| [30 Days of Hotwire by @ilrock__ on Twitter](https://twitter.com/ilrock__/status/1631315562390519809) | |
| [Code Sample Image Tool](https://www.snappify.com) |
| --- | |
| include: | |
| - ".solargraph_definitions.rb" | |
| - "app/**/*.rb" | |
| - "config/**/*.rb" | |
| - "lib/**/*.rb" | |
| exclude: | |
| - test/**/* | |
| - vendor/**/* | |
| - ".bundle/**/*" |
| source "https://rubygems.org" | |
| gemspec |