Skip to content

Commit

Permalink
Integrate rack-mini-profiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
yamat47 committed Aug 15, 2024
1 parent b5bbeb8 commit 9cb11cb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ group :development, :test do
gem 'factory_bot_rails'
gem 'faker'
gem 'haml_lint', require: false
gem 'rack-mini-profiler', require: false
gem 'rspec-rails', require: false
gem 'rubocop', require: false
gem 'rubocop-factory_bot', require: false
Expand Down
3 changes: 3 additions & 0 deletions app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ GEM
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.7)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
Expand Down Expand Up @@ -381,6 +383,7 @@ DEPENDENCIES
pg
propshaft
puma
rack-mini-profiler
rails
rails_autolink
rspec-rails
Expand Down
8 changes: 8 additions & 0 deletions app/config/initializers/rack_mini_profiler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

if Rails.env.development?
require 'rack-mini-profiler'

# The initializer was required late, so initialize it manually.
Rack::MiniProfilerRails.initialize!(Rails.application)
end

0 comments on commit 9cb11cb

Please sign in to comment.