rails_error_dashboard 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1cc76e092da14b5ec94ca8b6977837fdd10b87946d46249bfd8c5f5e300874a
4
- data.tar.gz: 5dab8f740555c28018905a9b031df6bff749cddd470d131ba0a807dbe16710e2
3
+ metadata.gz: 3b2e35c8edb61946295bbd2bb05ae2707e6fa00dc185decf62cb3fa938cdf44d
4
+ data.tar.gz: 5b511e0c7a0c1c4fc545a8369ceb1f8cbd32a8cf678a3b55df3607b98c03d5dd
5
5
  SHA512:
6
- metadata.gz: fee35c5ab9248ab74aed67f2171fec3cc1acb143f6bf84c3f2c017027d1b4825bb2b77b6d6d9e6d93422065c0257bd6b8c3e6fcca7c51fc1a79d68639159d8bd
7
- data.tar.gz: 9407c784ed243265cf34970d1deac082e4d5748c1e9899984370735e48eb93e3519ce09ed597054d9f26564ee079222a65e518eb885e8b92e9c6d39fe6922f64
6
+ metadata.gz: 64458bad098e19081d3000a2ecede576586713bf8fe523f5ca19b98752935eea1338447c69890ece067a818c012377c90bf1a8b97b20d7bbcabdd62564ab6fb0
7
+ data.tar.gz: 510f01f55a766042854c0105840a7de4b33c23a704bb036c95c9c663263143c725b7ff0ec5ab32c4347a3be608068f4d1eed3ac747b0d3bda5221a1b443984c4
@@ -144,6 +144,8 @@
144
144
  </h6>
145
145
  <div class="cause-chain">
146
146
  <% cause_chain.each_with_index do |cause, index| %>
147
+ <% cause_bt = cause["backtrace"] %>
148
+ <% cause_bt = cause_bt.is_a?(String) ? cause_bt.split("\n") : Array(cause_bt) %>
147
149
  <div class="card mb-2 border-warning">
148
150
  <div class="card-header bg-warning bg-opacity-10 py-2">
149
151
  <div class="d-flex justify-content-between align-items-center">
@@ -151,7 +153,7 @@
151
153
  <small class="text-muted">Caused by<%= " (##{index + 1})" if cause_chain.length > 1 %>:</small>
152
154
  <strong class="ms-1"><code><%= cause["class_name"] %></code></strong>
153
155
  </div>
154
- <% if cause["backtrace"].present? %>
156
+ <% if cause_bt.any? %>
155
157
  <button class="btn btn-sm btn-outline-secondary py-0" type="button"
156
158
  data-bs-toggle="collapse"
157
159
  data-bs-target="#cause-backtrace-<%= index %>"
@@ -164,11 +166,11 @@
164
166
  <div class="card-body py-2">
165
167
  <small><%= cause["message"] %></small>
166
168
  </div>
167
- <% if cause["backtrace"].present? %>
169
+ <% if cause_bt.any? %>
168
170
  <div class="collapse" id="cause-backtrace-<%= index %>">
169
171
  <div class="card-body p-0 border-top">
170
172
  <div class="code-block p-2" style="max-height: 200px; overflow-y: auto; overflow-x: auto; font-size: 0.8rem;">
171
- <pre class="mb-0"><code><% cause["backtrace"].each do |line| %><%= line %>
173
+ <pre class="mb-0"><code><% cause_bt.each do |line| %><%= line %>
172
174
  <% end %></code></pre>
173
175
  </div>
174
176
  </div>
@@ -1,3 +1,3 @@
1
1
  module RailsErrorDashboard
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_error_dashboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anjan Jagirdar
@@ -403,7 +403,7 @@ metadata:
403
403
  documentation_uri: https://AnjanJ.github.io/rails_error_dashboard
404
404
  bug_tracker_uri: https://github.com/AnjanJ/rails_error_dashboard/issues
405
405
  post_install_message: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n
406
- \ Rails Error Dashboard v0.2.2\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n\U0001F195
406
+ \ Rails Error Dashboard v0.2.3\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n\U0001F195
407
407
  First time? Quick start:\n rails generate rails_error_dashboard:install\n rails
408
408
  db:migrate\n # Add to config/routes.rb:\n mount RailsErrorDashboard::Engine
409
409
  => '/error_dashboard'\n\n\U0001F504 Upgrading from v0.1.x?\n rails db:migrate\n