Skip to content

Instantly share code, notes, and snippets.

@tonyfg
Last active February 9, 2022 18:56
Show Gist options
  • Save tonyfg/1aa085e60223f8b25ba598985ac60070 to your computer and use it in GitHub Desktop.
Save tonyfg/1aa085e60223f8b25ba598985ac60070 to your computer and use it in GitHub Desktop.
Gems
Code quality:
rubocop - linter
https://github.com/prettier/plugin-ruby - (NOT A GEM!) Prettier for ruby
overcommit - git hooks to run linting before commits, etc
bundler-audit - check your gemfile for outdated gems with security issues
bundler-leak - check your gemfile for gems with known memory leaks
brakeman - rails static code analyzer with a focus on security
sqlint - linter for SQL code (I know, not ruby, but useful for a lot of ruby apps)
Background jobs:
good_job - uses the DB as a queue just like delayed_job, but it's multithreaded :D
delayed_job - Shopify's background processor. A bit slower than sidekiq, but doesn't need redis, is more robust, and adaptable to specific scenarios
Database:
sequel - Lightweight ORM
dexter - auto indexer for postgres
immigrant - check for missing foreign key constraints
indexter - check for missing indexes on foreign keys
rein - add extra constraints support to activerecord migrations
database_consistency - find inconsistencies between model validations and database constraints
database_validations - validations that use db constraints instead of just validating at the model level
active_record_doctor - auto detect a bunch of issues in your models/db
with_advisory_lock - use PG advisory locks from ruby. great as a cross-host semaphore!
Pagination:
pagy - full featured but performant and lightweight pagination (ORM-independent)
Testing:
database_cleaner - reset database state between tests
fabrication - sane test factories
formulaic - Simple form fililng for capybara tests
ffaker - generate fake test data easily
rack_test - test helpers for rack apps
undercover - automatically find untested code in recent changes
crystalball - run only the minimum necessary tests to cover your changes
Monitoring:
notable - log errors, timeouts, etc to the database and look at the data on an admin page
ahoy_matey - opensource analytics. stores data in your own DB
ahoy_email - ahoy for tracking emails
app_perf (https://github.com/randy-girard/app_perf) - WIP on a new-relic-like APM platform
Data analysis:
blazer - easy BI dashboards for rails (good to query ahoy data p.ex)
Authentication:
doorkeeper - Oauth provider for ruby apps. https://github.com/doorkeeper-gem/doorkeeper
Authorization:
pundit - modular authorization library
File uploads:
shrine - flexible file upload handling for rack (doesn't depend on rails)
Deployment:
capistrano - the oldie but goodie
tomo (https://tomo-deploy.com/) - like capistrano, but can also install ruby, node, set up puma systemd units, etc
Misc:
noticed (https://github.com/excid3/noticed) - multi-medium notifications for rails
truemail - validate e-mail addresses by regex, DNS records, and actually checking on the SMTP server if the email exists
phony / phony_rails - phone number validation
autoload_reloader - autoloader with better behaviour than activesupport's autoloader
runbook - progressive automation based on checklists
ruby-prof - performance profiling
test-prof - test profiling (great to find out why a test is slow)
premailer-rails - easier CSS styling of action_mailer mails
active_merchant - unified API to abstract payments using dozens of payment gateways
alba (https://github.com/okuramasafumi/alba) - simple, small, and extremely fast serializer for ruby objects
invoice_printer (https://github.com/strzibny/invoice_printer) - easy invoice PDF creator/generator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment