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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/dial/middleware/panel.rb +3 -3
- data/lib/dial/middleware.rb +7 -1
- data/lib/dial/prosopite.rb +2 -2
- data/lib/dial/util.rb +5 -0
- data/lib/dial/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f031fc01faa56b398ae3c74ab7c9f803d31c02710dc95baef1fd8815a640787c
|
|
4
|
+
data.tar.gz: 37f49d3bc90f0afbcab4340452def212bd96b48b6702485fbc66a0b054c94264
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09bc71b30275bf9f8529b8a497cf35e82932ce5601b188d9e94536e948f740a10a4a9f1a6e2f3ae0a4b736841b1dbf81f387969a22fee862444751f2731b0a37'
|
|
7
|
+
data.tar.gz: 0aad61e2ad881dadc3f293ed1ccc771a60d42b32d60ea60ef8a1da094a3aa4b3b9c83e939ffa9635ea3832ea7f7018057c30d35303650ee8a6f680d119e07fec
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Dial
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
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
|
data/lib/dial/middleware.rb
CHANGED
|
@@ -106,7 +106,10 @@ module Dial
|
|
|
106
106
|
case line
|
|
107
107
|
when /N\+1 queries detected/
|
|
108
108
|
[[[],[]], :queries, 0]
|
|
109
|
-
when
|
|
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]
|
data/lib/dial/prosopite.rb
CHANGED
|
@@ -32,8 +32,8 @@ module Dial
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def send_notifications
|
|
35
|
-
tc[:prosopite_notifications] = tc[:prosopite_notifications].
|
|
36
|
-
[queries.map { |query| query.squish }
|
|
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
data/lib/dial/version.rb
CHANGED
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.
|
|
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.
|
|
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: []
|