diff --git a/Dockerfile.dev b/Dockerfile.dev index 8b7e062d..8a2e0ceb 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -6,6 +6,9 @@ RUN apk update --no-cache && \ apk add build-base postgresql-dev git nodejs yarn tzdata bash sqlite-dev npm && \ mkdir -p /app +# https://github.com/pry/pry/issues/1248 +RUN apk --update add less + WORKDIR /app COPY ./lib/ /app/lib/ diff --git a/Dockerfile.test b/Dockerfile.test index ac7beb30..1d2d6fd4 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -6,6 +6,9 @@ RUN apk update --no-cache && \ apk add build-base postgresql-dev git nodejs yarn tzdata bash sqlite-dev npm && \ mkdir -p /app +# https://github.com/pry/pry/issues/1248 +RUN apk --update add less + WORKDIR /app COPY ./lib/ /app/lib/ diff --git a/Gemfile b/Gemfile index a7d3b66d..90a2c109 100644 --- a/Gemfile +++ b/Gemfile @@ -23,11 +23,11 @@ group :development, :test do gem 'simplecov', require: false, group: :test gem 'byebug' gem 'webmock' + gem 'pry-rails' + gem 'pry-byebug' end group :test do - gem 'pry-rails' - gem 'pry-byebug' gem "generator_spec" # gem "rspec-retry" # repeating flaky tests # gem "rspec-wait", "~> 0.0.9" diff --git a/spec/dummy/config/initializers/backtrace_silencers.rb b/spec/dummy/config/initializers/backtrace_silencers.rb index 59385cdf..8fa57b9d 100644 --- a/spec/dummy/config/initializers/backtrace_silencers.rb +++ b/spec/dummy/config/initializers/backtrace_silencers.rb @@ -1,7 +1,13 @@ # Be sure to restart your server when you modify this file. -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } +# https://api.rubyonrails.org/classes/ActiveSupport/BacktraceCleaner.html +# https://github.com/rails/rails/blob/main/activesupport/lib/active_support/backtrace_cleaner.rb -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! +# Show only stacktrace of matestack or the dummy app and not the other gems +Rails.backtrace_cleaner.remove_silencers! +Rails.backtrace_cleaner.add_silencer { |line| line.include? "/usr/local/bundle/gems" } + +# Remove docker-path prefix "/app/" from paths to allow advanced terminal features +# like iTerm's "semantic history" which would be broken by the docker path. +Rails.backtrace_cleaner.remove_filters! +Rails.backtrace_cleaner.add_filter { |line| line.gsub(/^\/app\//, '') }