Ruby gem holds my permanent dependencies and configs I'm using in my Rails projects
MIT License
Ruby gem that holds permanent dependencies and configurations for Rails projects.
This gem is compatible with this Ruby on Rails DevContainer setup.
Add the gem to your Rails application's Gemfile by executing:
$ bundle add permadeps
Adding this gem to your Rails project provides you with the following gems and features:
The following gems will be automatically required:
ahoy_matey
: Analytics for Railsbetter_html
: Better HTML for Railsblazer
: Business intelligence made simpleflamegraph
: Flamegraph profilergeocoder
: Geocoding solutiongood_job
: Multithreaded, Postgres-based, Active Job backendmemory_profiler
: Memory profiling toolnotable
: Automatic tracking for requests and background jobspghero
: PostgreSQL insightsrack-mini-profiler
: Profiler for Rack applicationsrails_performance
: Self-hosted performance monitoringstackprof
: Sampling call-stack profilerAdditional production dependencies (not automatically required):
freezolite
: Automatic string freezingpg_query
: PostgreSQL query parsingannotaterb
: Annotate Rails modelsbetter_errors
: Better error page for Railsbinding_of_caller
: Retrieve the binding of a method's callerbrakeman
: Security vulnerability scannerbullet
: Help to kill N+1 queries (automatically required in development)bundler-audit
: Patch-level verification for Bundlerdotenv
: Load environment variables from .env
erb-formatter
: ERB formattererb_lint
: ERB linteri18n-tasks
: Manage translation and localizationrubocop
and related gems: Ruby static code analyzer and formatterTo use the rubocop
configuration provided by permadeps
, add the following to your .rubocop.yml
:
inherit_gem:
permadeps:
- rubocop.yml
For erb-formatter
and erb_lint
to work properly in VSCode, install these extensions:
The gem provides a generator to install necessary files and configurations:
$ rails g permadeps:install
This generator will perform the following actions:
Copy configuration files:
.annotaterb.yml
: Configuration for AnnotateRb.better-html.yml
: Configuration for Better HTML.env.example
: Example environment variables file.erb-lint.yml
: Configuration for ERB Lint.rubocop.yml
: Configuration for RuboCopCopy initializers:
config/initializers/better_html.rb
: Sets up Better HTMLconfig/initializers/blazer.rb
: Configures Blazerconfig/initializers/rack_mini_profiler.rb
: Sets up Rack Mini Profilerconfig/initializers/rails_performance.rb
: Sets up Rails PerformanceAdd background jobs for PgHero:
app/jobs/capture_query_stats_job.rb
: Captures query statisticsapp/jobs/capture_space_stats_job.rb
: Captures space usage statisticsapp/jobs/clean_query_stats_job.rb
: Cleans up old query statisticsapp/jobs/clean_space_stats_job.rb
: Cleans up old space usage statisticsAdd a rake task:
lib/tasks/annotate_rb.rake
: Task for running AnnotateRun generators for various gems:
ahoy:install
: Sets up Ahoy for analyticsblazer:install
: Installs Blazer for business intelligencebullet:install
: Installs Bullet for N+1 query detectiongood_job:install
: Sets up GoodJobnotable:requests
: Sets up Notable for request trackingnotable:jobs
: Sets up Notable for job trackingpghero:query_stats
: Installs PgHero query statspghero:space_stats
: Installs PgHero space statsSet up Freezolite:
require 'freezolite/auto'
to config/application.rb
for automatic string freezingRun database migrations:
rails db:migrate
to apply all pending migrationsAfter running the generator, your Rails application will be configured with all the necessary settings and files to use the gems provided by permadeps. Make sure to review the generated files and adjust them as needed for your specific project requirements.
The gem is available as open source under the terms of the MIT License.