rack-mini-profiler 0.9.1 → 0.9.2

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d38192262a50a132bef944ea6508e5c2edd65d30
4
- data.tar.gz: 3f9c5065465f08cdf643b701185b383eaa04b182
3
+ metadata.gz: 8b3ee0b3863448cab4aa77a7d21a6660cd864fdd
4
+ data.tar.gz: 84d03ff97e66376542b2ad7862abcb1e5fee280b
5
5
  SHA512:
6
- metadata.gz: 47dc4effcf2bbd0d46a0be9738e761783a23bb6f2a35778913f02fc01910ee3b143d72b858007ef0e7dcb0e3570f7637b86ef6f1e3d013b7b71715cc6919c5b8
7
- data.tar.gz: ac388ffaa4ea593ac4f96dd507d5d638a35bae9e526dffb772bacf0c8afd4f0f8639e8b255ff186e5e358ed921ed8cdce1d6a95fb152271462c97ab31610ae74
6
+ metadata.gz: e31c6eacf0d6fa8b01f1c11ef4be1f16a86e1f08843ef79ff8051c5029b78460aa9c23802b1cdc1be8e1b4d19dc19e6644c621740bec0c8578aed6a04bb52ede
7
+ data.tar.gz: cf86b40baacdd86a5e90f641a4ec9e2367ddfef55c3f1810aeed774fd55950b86c428ab9df7eabcd08f09a1dc093b142f270ac3bad4ff7acba4a4b87e1d52826
@@ -0,0 +1,149 @@
1
+ # CHANGELOG
2
+ ## 0.9.2 - 2014-06-26 (Sam Saffron)
3
+ - [CHANGE] staging and other environments behave like production (Cedric Felizard)
4
+ - [DOC] CHANGELOG reorg (Olivier Lacan)
5
+ - [FIXED] Double calls to Rack::MiniProfilerRails.initialize! now raise an exception (Julik Tarkhanov)
6
+ - [FIXED] Add no-store header (George Mendoza)
7
+
8
+ ## 0.9.1 - 2014-03-13 (Sam Saffron)
9
+ - [ADDED] Added back Ruby 1.8 support (thanks Malet)
10
+ - [IMPROVED] Amended Railstie so MiniProfiler can be launched with action view or action controller (Thanks Akira)
11
+ - [FIXED] Rails 3.0 support (thanks Zlatko)
12
+ - [FIXED] Possible XSS (admin only)
13
+ - [FIXED] Corrected Sql patching to avoid setting instance vars on nil which is frozen (thanks Andy, huoxito)
14
+
15
+ ## 0.9.0.pre - 2013-12-12 (Sam Saffron)
16
+ - Bumped up version to reflect the stability of the project
17
+ - [IMPROVED] Reports for pp=profile-gc
18
+ - [IMPROVED] pp=flamegraph&flamegraph_sample_rate=1 , allow you to specify sampling rates
19
+
20
+ ## 2013-09-17 (Ross Wilson)
21
+ - [IMPROVED] Instead of supressing all "/assets/" requests we now check the configured
22
+ config.assets.prefix path since developers can rename the path to serve Asset Pipeline
23
+ files from
24
+
25
+ ## 2013-09-03
26
+ - [IMPROVED] Flamegraph now has much increased fidelity
27
+ - [REMOVED] Ripped out flamegraph so it can be isolated into a gem
28
+ - [REMOVED] Ripped out pp=sample it just was never really used
29
+
30
+ ## 1.30 - 2013-08-30
31
+ - [ADDED] Rack::MiniProfiler.counter_method(klass,name) for injecting counters
32
+ - [FIXED] Counters were not shifting the table correctly
33
+
34
+ ## 1.29 - 2013-08-20
35
+ - [ADDED] Implemented exception tracing using TracePoint see pp=trace-exceptions
36
+ - [FIXED] SOLR patching had an incorrect monkey patch
37
+
38
+ ## 1.28 - 2012-07-18
39
+ - [FIXED] Diagnostics in abstract storage was raising not implemented killing
40
+ ?pp=env and others
41
+ - [FIXED] SOLR xml unescaped by mistake
42
+
43
+ ## 1.27 - 2013-06-26
44
+ - [ADDED] Rack::MiniProfiler.config.backtrace_threshold_ms
45
+ - [ADDED] jQuery 2.0 support
46
+ - [FIXED] Disabled global ajax handlers on MP requests @JP
47
+
48
+ ## 1.26 - 2013-04-11
49
+ - [IMPROVED] Allow Rack::MiniProfilerRails.initialize!(Rails.application), for post config intialization
50
+
51
+ ## 1.25 - 2013-04-08
52
+ - [FIXED] Missed flamegraph.html from build
53
+
54
+ ## 1.24 - 2013-04-08
55
+ - [ADDED] Flame Graph Support see: http://samsaffron.com/archive/2013/03/19/flame-graphs-in-ruby-miniprofiler
56
+ - [ADDED] New toggle_shortcut and start_hidden options
57
+ - [ADDED] Mongoid support
58
+ - [ADDED] Rack::MiniProfiler.counter counter_name {}
59
+ - [ADDED] Net:HTTP profiling
60
+ - [ADDED] Ruby 1.8.7 support ... grrr
61
+ - [IMPROVED] More robust gc profiling
62
+ - [IMPROVED] Script tag initialized via data-attributes
63
+ - [IMPROVED] Allow usage of existing jQuery if its already loaded
64
+ - [IMPROVED] Pre-authorize to run in all non development? and production? modes
65
+ - [FIXED] AngularJS support and MooTools
66
+ - [FIXED] File retention leak in file_store
67
+ - [FIXED] HTML5 implicit <body> tags
68
+ - [FIXED] pp=enable
69
+
70
+ ## 1.22 - 2012-09-20
71
+ - [FIXED] Permission issue in the gem
72
+
73
+ ## 17-September-2012
74
+ - [IMPROVED] Allow rack-mini-profiler to be sourced from github
75
+ - [IMPROVED] Extracted the pp=profile-gc-time out, the object space profiler needs to disable gc
76
+
77
+ ## 1.21 - 2012-09-17
78
+ - [ADDED] New MemchacedStore
79
+ - [ADDED] Rails 4 support
80
+
81
+ ## 2012-09-12 (Sam Saffron)
82
+ - [ADDED] pp=profile-gc: allows you to profile the GC in Ruby 1.9.3
83
+
84
+ ## 1.19 - 2012-09-10 (Sam Saffron)
85
+ - [FIXED] Compatibility issue with Ruby 1.8.7
86
+
87
+ ## 1.17 - 2012-09-09 (Sam Saffron)
88
+ - [FIXED] pp=sample was bust unless stacktrace was installed
89
+
90
+ ## 1.16 - 2012-09-05 (Sam Saffron)
91
+ - [IMPROVED] Implemented stacktrace properly
92
+ - [FIXED] Long standing problem specs (issue with memory store)
93
+ - [FIXED] Issue where profiler would be dumped when you got a 404 in production (and any time rails is bypassed)
94
+
95
+ ## 1.15.pre - 2012-09-04 (Sam Saffron)
96
+ - [FIXED] Annoying bug where client settings were not sticking
97
+ - [FIXED] Long standing issue with Rack::ConditionalGet stopping MiniProfiler from working properly
98
+
99
+ ## 1.13.pre - 2012-09-03 (Sam Saffron)
100
+ - [ADDED] Setting: config.backtrace_ignores = [] - an array of regexes that match on caller lines that get ignored
101
+ - [ADDED] Setting: config.backtrace_includes = [] - an array of regexes that get included in the trace by default
102
+ - [ADDED] pp=normal-backtrace to clear the "sticky" state
103
+ - [IMPROVED] Cleaned up the way client settings are stored
104
+ - [IMPROVED] Made pp=full-backtrace "sticky"
105
+ - [IMPROVED] Changed "pp=sample" to work with "caller" no need for stack trace gem
106
+ - [FIXED] pg gem prepared statements were not being logged correctly
107
+
108
+ ## 1.12.pre - 2012-08-20 (Sam Saffron)
109
+ - [IMPROVED] Cap X-MiniProfiler-Ids at 10, otherwise the header can get killed
110
+
111
+ ## 2012-08-10 (Sam Saffron)
112
+ - [ADDED] Basic prepared statement profiling for Postgres
113
+
114
+ ## 2012-08-07 (Sam Saffron)
115
+ - [ADDED] Option to disable profiler for the current session (pp=disable / pp=enable)
116
+ - [ADDED] yajl compatability contributed by Sven Riedel
117
+
118
+ ## 0.1.9 - 2012-07-30 (Sam Saffron)
119
+ - [IMPROVED] Made compliant with ancient versions of Rack (including Rack used by Rails2)
120
+ - [FIXED] Broken share link
121
+ - [FIXED] Crashes on startup (in MemoryStore and FileStore)
122
+ - [FIXED] Unicode issue
123
+
124
+ ## 0.1.7 - 2012-07-18 (Sam Saffron)
125
+ - [ADDED] First Paint time for Google Chrome
126
+ - [FIXED] Ensure non Rails installs have mini profiler
127
+
128
+ ## 2012-07-12 (Sam Saffron)
129
+ - [ADDED] Native PG and MySql2 interceptors, this gives way more accurate times
130
+ - [ADDED] some more client probing built in to rails
131
+ - [IMPROVED] Refactored context so its a proper class and not a hash
132
+ - [IMPROVED] More tests
133
+ - [FIXED] Incorrect profiling steps (was not indenting or measuring start time right
134
+
135
+ ## 0.1.3 - 2012-07-09 (Sam Saffron)
136
+ - [ADDED] New option to display full backtraces pp=full-backtrace
137
+ - [IMPROVED] Cleaned up mechanism for profiling in production, all you need to do now
138
+ is call Rack::MiniProfiler.authorize_request to get profiling working in
139
+ production
140
+ - [IMPROVED] Cleaned up railties, got rid of the post authorize callback
141
+
142
+ ## 2012-06-28 (Sam Saffron)
143
+ - [ADDED] Started change log
144
+ - [ADDED] added MemcacheStore
145
+ - [IMPROVED] Corrected profiler so it properly captures POST requests (was supressing non 200s)
146
+ - [IMPROVED] Amended Rack.MiniProfiler.config[:user_provider] to use ip addres for identity
147
+ - [IMPROVED] Supress all '/assets/' in the rails tie (makes debugging easier)
148
+ - [FIXED] Issue where unviewed missing ids never got cleared
149
+ - [FIXED] record_sql was mega buggy
data/README.md CHANGED
@@ -49,6 +49,8 @@ Or you want to execute some code before rack_mini_profiler required.
49
49
  ```ruby
50
50
  gem 'rack-mini-profiler', require: false
51
51
  ```
52
+ Note the `require: false` part - if omitted, it will cause the Railtie for the mini-profiler to
53
+ be loaded outright, and an attempt to re-initialize it manually will raise an exception.
52
54
 
53
55
  Then put initialize code in file like `config/initializers/rack_profiler.rb`
54
56
 
@@ -375,7 +375,7 @@ module Rack
375
375
 
376
376
  headers.delete('ETag')
377
377
  headers.delete('Date')
378
- headers['Cache-Control'] = 'must-revalidate, private, max-age=0'
378
+ headers['Cache-Control'] = 'no-store, must-revalidate, private, max-age=0'
379
379
 
380
380
  # inject header
381
381
  if headers.is_a? Hash
@@ -4,6 +4,9 @@ module Rack::MiniProfilerRails
4
4
 
5
5
  # call direct if needed to do a defer init
6
6
  def self.initialize!(app)
7
+
8
+ raise "MiniProfilerRails initialized twice. Set `require: false' for rack-mini-profiler in your Gemfile" if @already_initialized
9
+
7
10
  c = Rack::MiniProfiler.config
8
11
 
9
12
  # By default, only show the MiniProfiler in development mode, in production allow profiling if post_authorize_cb is set
@@ -21,7 +24,7 @@ module Rack::MiniProfilerRails
21
24
  c.skip_schema_queries = true
22
25
  end
23
26
 
24
- if Rails.env.production?
27
+ unless Rails.env.development? || Rails.env.test?
25
28
  c.authorization_mode = :whitelist
26
29
  end
27
30
 
@@ -40,7 +43,7 @@ module Rack::MiniProfilerRails
40
43
  # Quiet the SQL stack traces
41
44
  c.backtrace_remove = Rails.root.to_s + "/"
42
45
  c.backtrace_includes = [/^\/?(app|config|lib|test)/]
43
- c.skip_schema_queries = Rails.env != 'production'
46
+ c.skip_schema_queries = (Rails.env.development? || Rails.env.test?)
44
47
 
45
48
  # Install the Middleware
46
49
  app.middleware.insert(0, Rack::MiniProfiler)
@@ -52,6 +55,8 @@ module Rack::MiniProfilerRails
52
55
  ActiveSupport.on_load(:action_view) do
53
56
  ::Rack::MiniProfiler.profile_method(ActionView::Template, :render) {|x,y| "Rendering: #{@virtual_path}"}
54
57
  end
58
+
59
+ @already_initialized = true
55
60
  end
56
61
 
57
62
  class Railtie < ::Rails::Railtie
@@ -1,20 +1,20 @@
1
1
  Gem::Specification.new do |s|
2
- s.name = "rack-mini-profiler"
3
- s.version = "0.9.1"
4
- s.summary = "Profiles loading speed for rack applications."
5
- s.authors = ["Sam Saffron", "Robin Ward","Aleks Totic"]
6
- s.description = "Profiling toolkit for Rack applications with Rails integration. Client Side profiling, DB profiling and Server profiling."
7
- s.email = "sam.saffron@gmail.com"
8
- s.homepage = "http://miniprofiler.com"
2
+ s.name = "rack-mini-profiler"
3
+ s.version = "0.9.2"
4
+ s.summary = "Profiles loading speed for rack applications."
5
+ s.authors = ["Sam Saffron", "Robin Ward","Aleks Totic"]
6
+ s.description = "Profiling toolkit for Rack applications with Rails integration. Client Side profiling, DB profiling and Server profiling."
7
+ s.email = "sam.saffron@gmail.com"
8
+ s.homepage = "http://miniprofiler.com"
9
9
  s.license = "MIT"
10
- s.files = [
11
- 'rack-mini-profiler.gemspec',
12
- ].concat( Dir.glob('lib/**/*').reject {|f| File.directory?(f) || f =~ /~$/ } )
13
- s.extra_rdoc_files = [
14
- "README.md",
15
- "CHANGELOG"
16
- ]
17
- s.add_runtime_dependency 'rack', '>= 1.1.3'
10
+ s.files = [
11
+ 'rack-mini-profiler.gemspec',
12
+ ].concat( Dir.glob('lib/**/*').reject {|f| File.directory?(f) || f =~ /~$/ } )
13
+ s.extra_rdoc_files = [
14
+ "README.md",
15
+ "CHANGELOG.md"
16
+ ]
17
+ s.add_runtime_dependency 'rack', '>= 1.1.3'
18
18
  if RUBY_VERSION < "1.9"
19
19
  s.add_runtime_dependency 'json', '>= 1.6'
20
20
  end
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.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-03-13 00:00:00.000000000 Z
13
+ date: 2014-06-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -187,9 +187,9 @@ executables: []
187
187
  extensions: []
188
188
  extra_rdoc_files:
189
189
  - README.md
190
- - CHANGELOG
190
+ - CHANGELOG.md
191
191
  files:
192
- - CHANGELOG
192
+ - CHANGELOG.md
193
193
  - README.md
194
194
  - lib/html/includes.css
195
195
  - lib/html/includes.js
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  requirements: []
247
247
  rubyforge_project:
248
- rubygems_version: 2.2.0
248
+ rubygems_version: 2.2.2
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: Profiles loading speed for rack applications.
data/CHANGELOG DELETED
@@ -1,181 +0,0 @@
1
- 28-June-2012 - Sam
2
-
3
- * Started change log
4
- * Corrected profiler so it properly captures POST requests (was supressing non 200s)
5
- * Amended Rack.MiniProfiler.config[:user_provider] to use ip addres for identity
6
- * Fixed bug where unviewed missing ids never got cleared
7
- * Supress all '/assets/' in the rails tie (makes debugging easier)
8
- * record_sql was mega buggy
9
- * added MemcacheStore
10
-
11
- 9-July-2012 - Sam
12
-
13
- * Cleaned up mechanism for profiling in production, all you need to do now
14
- is call Rack::MiniProfiler.authorize_request to get profiling working in
15
- production
16
- * Added option to display full backtraces pp=full-backtrace
17
- * Cleaned up railties, got rid of the post authorize callback
18
- * Version 0.1.3
19
-
20
- 12-July-2012 - Sam
21
-
22
- * Fixed incorrect profiling steps (was not indenting or measuring start time right
23
- * Implemented native PG and MySql2 interceptors, this gives way more accurate times
24
- * Refactored context so its a proper class and not a hash
25
- * Added some more client probing built in to rails
26
- * More tests
27
-
28
- 18-July-2012 - Sam
29
-
30
- * Added First Paint time for chrome
31
- * Bug fix to ensure non Rails installs have mini profiler
32
- * Version 0.1.7
33
-
34
- 30-July-2012 - Sam
35
-
36
- * Made compliant with ancient versions of Rack (including Rack used by Rails2)
37
- * Fixed broken share link
38
- * Fixed crashes on startup (in MemoryStore and FileStore)
39
- * Version 0.1.8
40
- * Unicode fix
41
- * Version 0.1.9
42
-
43
- 7-August-2012 - Sam
44
-
45
- * Added option to disable profiler for the current session (pp=disable / pp=enable)
46
- * yajl compatability contributed by Sven Riedel
47
-
48
- 10-August-2012 - Sam
49
-
50
- * Added basic prepared statement profiling for postgres
51
-
52
- 20-August-2012 - Sam
53
-
54
- * 1.12.pre
55
- * Cap X-MiniProfiler-Ids at 10, otherwise the header can get killed
56
-
57
- 3-September-2012 - Sam
58
-
59
- * 1.13.pre
60
- * pg gem prepared statements were not being logged correctly
61
- * added setting config.backtrace_ignores = [] - an array of regexes that match on caller lines that get ignored
62
- * added setting config.backtrace_includes = [] - an array of regexes that get included in the trace by default
63
- * cleaned up the way client settings are stored
64
- * made pp=full-backtrace "sticky"
65
- * added pp=normal-backtrace to clear the "sticky" state
66
- * change "pp=sample" to work with "caller" no need for stack trace gem
67
-
68
- 4-September-2012 - Sam
69
-
70
- * 1.15.pre
71
- * fixed annoying bug where client settings were not sticking
72
- * fixed long standing issue with Rack::ConditionalGet stopping MiniProfiler from working properly
73
-
74
- 5-September-2012 - Sam
75
-
76
- * 1.16
77
- * fixed long standing problem specs (issue with memory store)
78
- * fixed issue where profiler would be dumped when you got a 404 in production (and any time rails is bypassed)
79
- * implemented stacktrace properly
80
-
81
- 9-September-2012 - Sam
82
-
83
- * 1.17
84
- * pp=sample was bust unless stacktrace was installed
85
-
86
- 10-September-2012 - Sam
87
-
88
- * 1.19
89
- * fix compat issue with 1.8.7
90
-
91
- 12-September-2012 - Sam
92
-
93
- * 1.20
94
- * Added pp=profile-gc , it allows you to profile the GC in Ruby 1.9.3
95
-
96
- 17-September-2012
97
- * 1.21
98
- * New MemchacedStore
99
- * Rails 4 support
100
-
101
- 17-September-2012
102
- * Allow rack-mini-profiler to be sourced from github
103
- * Extracted the pp=profile-gc-time out, the object space profiler needs to disable gc
104
-
105
- 20-September-2012
106
- * 1.22
107
- * Fix permission issue in the gem
108
-
109
- 8-April-2013
110
- * 1.24
111
- * Flame Graph Support see: http://samsaffron.com/archive/2013/03/19/flame-graphs-in-ruby-miniprofiler
112
- * Fix file retention leak in file_store
113
- * New toggle_shortcut and start_hidden options
114
- * Fix for AngularJS support and MooTools
115
- * More robust gc profiling
116
- * Mongoid support
117
- * Fix for html5 implicit body tags
118
- * script tag initialized via data-attributes
119
- * new - Rack::MiniProfiler.counter counter_name {}
120
- * Allow usage of existing jQuery if its already loaded
121
- * Fix pp=enable
122
- * 1.8.7 support ... grrr
123
- * Net:HTTP profiling
124
- * pre authorize to run in all non development? and production? modes
125
-
126
- 8-April-2013
127
- * 1.25
128
- * Missed flamegraph.html from build
129
-
130
- 11-April-2013
131
- * 1.26
132
- * (minor) allow Rack::MiniProfilerRails.initialize!(Rails.application), for post config intialization
133
-
134
- 26-June-2013
135
- * 1.27
136
- * Disable global ajax handlers on MP requests @JP
137
- * Add Rack::MiniProfiler.config.backtrace_threshold_ms
138
- * jQuery 2.0 support
139
-
140
- 18-July-2013
141
- * 1.28
142
- * diagnostics in abstract storage was raising not implemented killing
143
- ?pp=env and others
144
- * SOLR xml unescaped by mistake
145
-
146
- 20-August-2013
147
- * 1.29
148
- * Bugfix: SOLR patching had an incorrect monkey patch
149
- * Implemented exception tracing using TracePoint see pp=trace-exceptions
150
-
151
- 30-August-2013
152
-
153
- * 1.30
154
- * Feature: Added Rack::MiniProfiler.counter_method(klass,name) for injecting counters
155
- * Bug: Counters were not shifting the table correctly
156
-
157
- 3-September-2013
158
-
159
- * Ripped out flamegraph so it can be isolated into a gem
160
- * Flamegraph now has much increased fidelity
161
- * Ripped out pp=sample it just was never really used
162
-
163
- 17-September-2013 - Ross Wilson
164
- * Instead of supressing all "/assets/" requests we now check the configured
165
- config.assets.prefix path since developers can rename the path to serve Asset Pipeline
166
- files from
167
-
168
- 12-December-2013 - Sam Saffron
169
- * Version 0.9.0.pre (bumped up to reflect the stability of the project)
170
- * Improved reports for pp=profile-gc
171
- * pp=flamegraph&flamegraph_sample_rate=1 , allow you to specify sampling rates
172
-
173
- 13-March-2013 - Sam Saffron
174
- * Version 0.9.1
175
- * Added back Ruby 1.8 support (thanks Malet)
176
- * Corrected Rails 3.0 support (thanks Zlatko)
177
- * Corrected fix possible XSS (admin only)
178
- * Amend Railstie so MiniProfiler can be launched with action view or action controller (Thanks Akira)
179
- * Corrected Sql patching to avoid setting instance vars on nil which is frozen (thanks Andy, huoxito)
180
-
181
-