From 09f5af608f7e91e0d6aba98d0538d42f821b9173 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Wed, 24 Apr 2024 14:35:21 +1000 Subject: [PATCH] DEV: Add pry-stack_explorer plugin gem (#26732) This is only required in rails_helper, otherwise it is not loaded. Allows for better debugging by allowing navigation of the call stack from the point of `binding.pry` c.f. https://github.com/pry/pry-stack_explorer --- Gemfile | 5 +++-- Gemfile.lock | 4 ++++ spec/rails_helper.rb | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 86c83728f90..b31fffbd1d9 100644 --- a/Gemfile +++ b/Gemfile @@ -86,8 +86,6 @@ gem "oj" gem "pg" gem "mini_sql" -gem "pry-rails", require: false -gem "pry-byebug", require: false gem "rtlcss", require: false gem "rake" @@ -146,6 +144,9 @@ group :test, :development do gem "shoulda-matchers", require: false gem "rspec-html-matchers" + gem "pry-rails", require: false + gem "pry-byebug", require: false + gem "pry-stack_explorer", require: false gem "byebug", require: ENV["RM_INFO"].nil?, platform: :mri gem "rubocop-discourse", require: false gem "parallel_tests" diff --git a/Gemfile.lock b/Gemfile.lock index 047b8b5919d..e3388b0dd9d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -308,6 +308,9 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) + pry-stack_explorer (0.6.1) + binding_of_caller (~> 1.0) + pry (~> 0.13) public_suffix (5.0.5) puma (6.4.2) nio4r (~> 2.0) @@ -623,6 +626,7 @@ DEPENDENCIES pg pry-byebug pry-rails + pry-stack_explorer puma rack rack-mini-profiler diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index a3fae4edbb5..16a2ec5866c 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -19,6 +19,7 @@ require "rbtrace" if RUBY_ENGINE == "ruby" require "pry" require "pry-byebug" require "pry-rails" +require "pry-stack_explorer" require "fabrication" require "mocha/api" require "certified"