rorvswild 1.3.4 → 1.3.5
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/lib/rorvswild/local/middleware.rb +12 -2
- data/lib/rorvswild/section.rb +6 -0
- data/lib/rorvswild/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fa8ad571e7bfbc2e32974d05a6a59b2b5c97d78
|
4
|
+
data.tar.gz: 2e776641780937e3f20905ca04f512ff8975e2cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69731604ed10210a7fcc55f1d8e1e87743038065567ab4bb65dc2b17be7657be9dc8fda8758e90988788c76a3cd07ad60b45cdc6d98b6a912bb8f8466d0d1605
|
7
|
+
data.tar.gz: 87a73a718cfa90314e797b77d30e40c7eb4a8a2cf6e1a03826874e6ccc1c401849e8592d7856e6c8e89cd91892b4954188343ebde66cb6b9fd2f68684c4e621e
|
@@ -32,13 +32,18 @@ module RorVsWild
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def inject_into(html)
|
35
|
+
markup = html_markup(RorVsWild.agent.queue.requests).encode(html.encoding)
|
36
|
+
style = "<style type='text/css'> #{concatenate_stylesheet}</style>".encode(html.encoding)
|
37
|
+
|
35
38
|
if index = html.index("</body>")
|
36
|
-
html.insert(index,
|
39
|
+
html.insert(index, markup)
|
37
40
|
end
|
38
41
|
if index = html.index("</head>")
|
39
|
-
html.insert(index,
|
42
|
+
html.insert(index, style)
|
40
43
|
end
|
41
44
|
html
|
45
|
+
rescue Encoding::UndefinedConversionError => ex
|
46
|
+
log_incompatible_encoding_warning(ex)
|
42
47
|
end
|
43
48
|
|
44
49
|
LOCAL_FOLDER = File.expand_path(File.dirname(__FILE__))
|
@@ -69,6 +74,11 @@ module RorVsWild
|
|
69
74
|
" Try to disable Rack::Deflater in development only." +
|
70
75
|
" In the meantime just visit the /rorvswild page to see the profiler.")
|
71
76
|
end
|
77
|
+
|
78
|
+
def log_incompatible_encoding_warning(exception)
|
79
|
+
RorVsWild.logger.warn("RorVsWild::Local cannot be embeded into your HTML page because of incompatible #{exception.message}." +
|
80
|
+
" However you can just visit the /rorvswild page to see the profiler.")
|
81
|
+
end
|
72
82
|
end
|
73
83
|
end
|
74
84
|
end
|
data/lib/rorvswild/section.rb
CHANGED
@@ -59,5 +59,11 @@ module RorVsWild
|
|
59
59
|
def self_runtime
|
60
60
|
total_runtime - children_runtime
|
61
61
|
end
|
62
|
+
|
63
|
+
COMMAND_MAX_SIZE = 1000
|
64
|
+
|
65
|
+
def command=(value)
|
66
|
+
@command = value && value.size > COMMAND_MAX_SIZE ? value[0, COMMAND_MAX_SIZE] + " [TRUNCATED]" : value
|
67
|
+
end
|
62
68
|
end
|
63
69
|
end
|
data/lib/rorvswild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rorvswild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Bernard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Performances and quality insights for rails developers.
|
14
14
|
email:
|