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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8009d4b65ef8eebd12ff94fda60e1462cde417d5
4
- data.tar.gz: 9f2dece8418c93729badd012a8ac9da44a78f861
3
+ metadata.gz: 6fa8ad571e7bfbc2e32974d05a6a59b2b5c97d78
4
+ data.tar.gz: 2e776641780937e3f20905ca04f512ff8975e2cb
5
5
  SHA512:
6
- metadata.gz: fafbb00dfebed3d4a8a74414aff9f277eae153fd0d50f1004d8fe0b1484191ecd457784066ad45008c8ef3d222a580f8deb507268e2df344329406346960bf70
7
- data.tar.gz: b1b623322d051e1083a715bb1009253428ea3444b0a3a14019ee5d075a6a86680396a8444729671bc2667b5449c15bb07cda2aec42178752db3d53bd8bdccbb0
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, html_markup(RorVsWild.agent.queue.requests))
39
+ html.insert(index, markup)
37
40
  end
38
41
  if index = html.index("</head>")
39
- html.insert(index, "<style type='text/css'> #{concatenate_stylesheet}</style>")
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RorVsWild
2
- VERSION = "1.3.4".freeze
2
+ VERSION = "1.3.5".freeze
3
3
  end
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
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-07 00:00:00.000000000 Z
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: