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 c690e04
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 @@ -32,4 +32,5 @@ group :development, :test do
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
gem 'rubocop-rspec_rails', require: false
gem 'rack-mini-profiler', require: false
end
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 c690e04

Please sign in to comment.