rack-mini-profiler 0.1.6 → 0.1.11.pre
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rack-mini-profiler might be problematic. Click here for more details.
- data/CHANGELOG +23 -0
- data/README.md +25 -0
- data/lib/html/includes.css +75 -1
- data/lib/html/includes.js +14 -2
- data/lib/html/includes.less +1 -1
- data/lib/html/profile_handler.js +9 -9
- data/lib/mini_profiler/client_timer_struct.rb +5 -3
- data/lib/mini_profiler/config.rb +2 -1
- data/lib/mini_profiler/page_timer_struct.rb +1 -1
- data/lib/mini_profiler/profiler.rb +91 -23
- data/lib/mini_profiler/storage/file_store.rb +9 -7
- data/lib/mini_profiler/storage/memory_store.rb +0 -4
- data/lib/mini_profiler/timer_struct.rb +3 -1
- data/lib/mini_profiler_rails/railtie.rb +3 -1
- data/lib/patches/sql_patches.rb +82 -30
- data/lib/rack-mini-profiler.rb +3 -3
- data/rack-mini-profiler.gemspec +3 -4
- metadata +6 -11
- data/lib/html/MiniProfilerHandler.cs +0 -419
- data/lib/mini_profiler/body_add_proxy.rb +0 -45
@@ -1,45 +0,0 @@
|
|
1
|
-
module Rack
|
2
|
-
class MiniProfiler
|
3
|
-
|
4
|
-
# This class acts as a proxy to the Body so that we can
|
5
|
-
# safely append to the end without knowing about the internals
|
6
|
-
# of the body class.
|
7
|
-
class BodyAddProxy
|
8
|
-
def initialize(body, additional_text)
|
9
|
-
@body = body
|
10
|
-
@additional_text = additional_text
|
11
|
-
end
|
12
|
-
|
13
|
-
def respond_to?(*args)
|
14
|
-
super or @body.respond_to?(*args)
|
15
|
-
end
|
16
|
-
|
17
|
-
def method_missing(*args, &block)
|
18
|
-
@body.__send__(*args, &block)
|
19
|
-
end
|
20
|
-
|
21
|
-
# In the case of to_str we don't want to use method_missing as it might avoid
|
22
|
-
# a call to each (such as in Rack::Test)
|
23
|
-
def to_str
|
24
|
-
result = ""
|
25
|
-
each {|token| result << token}
|
26
|
-
result
|
27
|
-
end
|
28
|
-
|
29
|
-
def each(&block)
|
30
|
-
|
31
|
-
# In ruby 1.9 we don't support String#each
|
32
|
-
if @body.is_a?(String)
|
33
|
-
yield @body
|
34
|
-
else
|
35
|
-
@body.each(&block)
|
36
|
-
end
|
37
|
-
|
38
|
-
yield @additional_text
|
39
|
-
self
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
45
|
-
end
|