rack-mini-profiler 0.1.8 → 0.1.9
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 +8 -0
- data/README.md +7 -0
- data/lib/mini_profiler/profiler.rb +9 -1
- data/rack-mini-profiler.gemspec +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -30,3 +30,11 @@
|
|
30
30
|
* Bug fix to ensure non Rails installs have mini profiler
|
31
31
|
* Version 0.1.7
|
32
32
|
|
33
|
+
30-July-2012 - Sam
|
34
|
+
|
35
|
+
* Made compliant with ancient versions of Rack (including Rack used by Rails2)
|
36
|
+
* Fixed broken share link
|
37
|
+
* Fixed crashes on startup (in MemoryStore and FileStore)
|
38
|
+
* Version 0.1.8
|
39
|
+
* Unicode fix
|
40
|
+
* Version 0.1.9
|
data/README.md
CHANGED
@@ -85,11 +85,18 @@ Rack::MiniProfiler.config.position = 'right'
|
|
85
85
|
|
86
86
|
In a Rails app, this can be done conveniently in an initializer such as config/initializers/mini_profiler.rb.
|
87
87
|
|
88
|
+
## Rails 2.X support
|
89
|
+
|
90
|
+
MiniProfiler uses [railtie](https://github.com/SamSaffron/MiniProfiler/blob/master/Ruby/lib/mini_profiler_rails/railtie.rb) to bootstrap itself. This will not be called in a Rails 2 app. You are going to need to hook it up manually. (TODO: document this - pull request please)
|
91
|
+
|
88
92
|
## Available Options
|
89
93
|
|
90
94
|
* pre_authorize_cb - A lambda callback you can set to determine whether or not mini_profiler should be visible on a given request. Default in a Rails environment is only on in development mode. If in a Rack app, the default is always on.
|
91
95
|
* position - Can either be 'right' or 'left'. Default is 'left'.
|
92
96
|
* skip_schema_queries - Whether or not you want to log the queries about the schema of your tables. Default is 'false', 'true' in rails development.
|
97
|
+
* use_existing_jquery - Use the version of jQuery on the page as opposed to the self contained one
|
98
|
+
* auto_inject (default true) - when false the miniprofiler script is not injected in the page
|
99
|
+
* backtrace_filter - a regex you can use to filter out unwanted lines from the backtraces
|
93
100
|
|
94
101
|
## Special query strings
|
95
102
|
|
@@ -318,7 +318,15 @@ module Rack
|
|
318
318
|
end
|
319
319
|
|
320
320
|
def inject(fragment, script)
|
321
|
-
fragment.sub(/<\/body>/i
|
321
|
+
fragment.sub(/<\/body>/i) do
|
322
|
+
# if for whatever crazy reason we dont get a utf string,
|
323
|
+
# just force the encoding, no utf in the mp scripts anyway
|
324
|
+
if script.respond_to?(:encoding) && script.respond_to?(:force_encoding)
|
325
|
+
(script + "</body>").force_encoding(fragment.encoding)
|
326
|
+
else
|
327
|
+
script + "</body>"
|
328
|
+
end
|
329
|
+
end
|
322
330
|
end
|
323
331
|
|
324
332
|
def dump_env(env)
|
data/rack-mini-profiler.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "rack-mini-profiler"
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.9"
|
4
4
|
s.summary = "Profiles loading speed for rack applications."
|
5
5
|
s.authors = ["Aleks Totic","Sam Saffron", "Robin Ward"]
|
6
6
|
s.description = "Page loading speed displayed on every page. Optimize while you develop, performance is a feature."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-mini-profiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
segments:
|
132
132
|
- 0
|
133
|
-
hash:
|
133
|
+
hash: 663723709
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
none: false
|
136
136
|
requirements:
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
segments:
|
141
141
|
- 0
|
142
|
-
hash:
|
142
|
+
hash: 663723709
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
145
|
rubygems_version: 1.8.24
|