dial 0.6.0 → 0.6.1

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: d3b2e0414c826c6c8e7237a5b1033b102ee9079491e1d2863db6ffb961a3fda2
4
- data.tar.gz: 859585a4e0bcf37eb6c36c2f71e1d16cad9e351c4435cc91981c9254704d21bd
3
+ metadata.gz: f031fc01faa56b398ae3c74ab7c9f803d31c02710dc95baef1fd8815a640787c
4
+ data.tar.gz: 37f49d3bc90f0afbcab4340452def212bd96b48b6702485fbc66a0b054c94264
5
5
  SHA512:
6
- metadata.gz: dd66117fe0e8c2fcfac7dacb5348cda5eee119e8f199ead4a5161a5af024e52c50f52765dcdcb0804fcbbd53c061d4f9073287322d0146300f7508d82c9c6823
7
- data.tar.gz: 6bad07093895c0e2c4d09fd53afecce8d344f189d07eb576d29202ba308009f67eff06a1263ac8d27c2587ca3d3c46f650ffafc499761d56d3f2a092d396d402
6
+ metadata.gz: '09bc71b30275bf9f8529b8a497cf35e82932ce5601b188d9e94536e948f740a10a4a9f1a6e2f3ae0a4b736841b1dbf81f387969a22fee862444751f2731b0a37'
7
+ data.tar.gz: 0aad61e2ad881dadc3f293ed1ccc771a60d42b32d60ea60ef8a1da094a3aa4b3b9c83e939ffa9635ea3832ea7f7018057c30d35303650ee8a6f680d119e07fec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.1] - 2026-11-12
4
+
5
+ - Fix prosopite notification parsing and grouping
6
+
3
7
  ## [0.6.0] - 2025-10-23
4
8
 
5
9
  - Stop suffixing mounted routes with 'dial/'
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Dial
2
2
 
3
3
  ![Version](https://img.shields.io/gem/v/dial)
4
- ![Build](https://img.shields.io/github/actions/workflow/status/joshuay03/dial/.github/workflows/main.yml?branch=main)
4
+ ![Build](https://badge.buildkite.com/2d2624def2501dd6dd7e1959de0bca4f3f6749afc67a94938b.svg)
5
5
 
6
6
  A modern profiler for your Rails application.
7
7
 
@@ -307,10 +307,10 @@ module Dial
307
307
  query_logs.map do |(queries, stack_lines)|
308
308
  <<~HTML
309
309
  <details>
310
- <summary>#{truncated_query queries.first}</summary>
310
+ <summary>#{Util.escape_html(truncated_query queries.first)}</summary>
311
311
  <div class="section query-logs">
312
- #{queries.map { |query| "<span>#{query}</span>" }.join}
313
- #{stack_lines.map { |stack_line| "<span>#{stack_line}</span>" }.join}
312
+ #{queries.map { |query| "<span>#{Util.escape_html query}</span>" }.join}
313
+ #{stack_lines.map { |stack_line| "<span>#{Util.escape_html stack_line}</span>" }.join}
314
314
  </div>
315
315
  </details>
316
316
  HTML
@@ -106,7 +106,10 @@ module Dial
106
106
  case line
107
107
  when /N\+1 queries detected/
108
108
  [[[],[]], :queries, 0]
109
- when /Call stack/
109
+ when /\A(?:Possible fix(?:es)?:|Context:)\s*\z/
110
+ entry.last << line.strip
111
+ [entry, :details, count]
112
+ when /\ACall stack:\s*\z/
110
113
  entry.first << "+ #{count - 1} more queries" if count > 1
111
114
  [entry, :call_stack, count]
112
115
  else
@@ -115,6 +118,9 @@ module Dial
115
118
  count += 1
116
119
  entry.first << line.strip if count == 1
117
120
  [entry, :queries, count]
121
+ when :details
122
+ entry.last << line.strip unless line.strip.empty?
123
+ [entry, section, count]
118
124
  when :call_stack
119
125
  if line.strip.empty?
120
126
  [entry, nil, count]
@@ -32,8 +32,8 @@ module Dial
32
32
  end
33
33
 
34
34
  def send_notifications
35
- tc[:prosopite_notifications] = tc[:prosopite_notifications].to_h do |queries, kaller|
36
- [queries.map { |query| query.squish }, kaller]
35
+ tc[:prosopite_notifications] = tc[:prosopite_notifications].each_with_object({}.compare_by_identity) do |(queries, kaller), notifications|
36
+ notifications[queries.map { |query| query.squish }] = kaller
37
37
  end
38
38
 
39
39
  super
data/lib/dial/util.rb CHANGED
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rack/utils"
3
4
  require "securerandom"
4
5
 
5
6
  module Dial
6
7
  module Util
7
8
  class << self
9
+ def escape_html text
10
+ ::Rack::Utils.escape_html text
11
+ end
12
+
8
13
  def uuid
9
14
  SecureRandom.uuid_v7
10
15
  end
data/lib/dial/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dial
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Young
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 4.0.0.dev
146
+ rubygems_version: 4.0.20
147
147
  specification_version: 4
148
148
  summary: A modern profiler for your Rails application
149
149
  test_files: []