rack-insight 0.5.24 → 0.5.25
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.
- data/CHANGELOG +6 -0
- data/Gemfile.lock +33 -32
- data/README.md +56 -19
- data/lib/rack/insight/config.rb +1 -2
- data/lib/rack/insight/public/__insight__/insight.js +9 -9
- data/lib/rack/insight/version.rb +1 -1
- data/rack-insight.gemspec +2 -1
- metadata +21 -5
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rack-insight (0.5.
|
|
4
|
+
rack-insight (0.5.24)
|
|
5
5
|
rack
|
|
6
6
|
sqlite3 (>= 1.3.3)
|
|
7
7
|
uuidtools (>= 2.1.2)
|
|
@@ -10,51 +10,51 @@ GEM
|
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
12
|
columnize (0.3.6)
|
|
13
|
-
debugger (1.
|
|
13
|
+
debugger (1.5.0)
|
|
14
14
|
columnize (>= 0.3.1)
|
|
15
|
-
debugger-linecache (~> 1.
|
|
16
|
-
debugger-ruby_core_source (~> 1.
|
|
17
|
-
debugger-linecache (1.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
nokogiri (1.5.
|
|
22
|
-
rack (1.
|
|
23
|
-
rack-protection (1.
|
|
15
|
+
debugger-linecache (~> 1.2.0)
|
|
16
|
+
debugger-ruby_core_source (~> 1.2.0)
|
|
17
|
+
debugger-linecache (1.2.0)
|
|
18
|
+
debugger-ruby_core_source (1.2.0)
|
|
19
|
+
diff-lcs (1.2.1)
|
|
20
|
+
gem-release (0.5.2)
|
|
21
|
+
nokogiri (1.5.6)
|
|
22
|
+
rack (1.5.2)
|
|
23
|
+
rack-protection (1.5.0)
|
|
24
24
|
rack
|
|
25
|
-
rack-test (0.6.
|
|
25
|
+
rack-test (0.6.2)
|
|
26
26
|
rack (>= 1.0)
|
|
27
|
-
rake (0.
|
|
28
|
-
redcarpet (2.
|
|
29
|
-
reek (1.2.
|
|
27
|
+
rake (10.0.3)
|
|
28
|
+
redcarpet (2.2.2)
|
|
29
|
+
reek (1.2.13)
|
|
30
30
|
ripper_ruby_parser (~> 0.0.7)
|
|
31
31
|
ruby2ruby (~> 1.2.5)
|
|
32
32
|
ruby_parser (~> 2.0)
|
|
33
33
|
sexp_processor (~> 3.0)
|
|
34
34
|
ripper_ruby_parser (0.0.8)
|
|
35
35
|
sexp_processor (~> 3.0)
|
|
36
|
-
roodi (2.
|
|
37
|
-
ruby_parser
|
|
38
|
-
rspec (2.
|
|
39
|
-
rspec-core (~> 2.
|
|
40
|
-
rspec-expectations (~> 2.
|
|
41
|
-
rspec-mocks (~> 2.
|
|
42
|
-
rspec-core (2.
|
|
43
|
-
rspec-expectations (2.
|
|
44
|
-
diff-lcs (
|
|
45
|
-
rspec-mocks (2.
|
|
36
|
+
roodi (2.2.0)
|
|
37
|
+
ruby_parser (~> 2.3.0)
|
|
38
|
+
rspec (2.13.0)
|
|
39
|
+
rspec-core (~> 2.13.0)
|
|
40
|
+
rspec-expectations (~> 2.13.0)
|
|
41
|
+
rspec-mocks (~> 2.13.0)
|
|
42
|
+
rspec-core (2.13.1)
|
|
43
|
+
rspec-expectations (2.13.0)
|
|
44
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
|
45
|
+
rspec-mocks (2.13.0)
|
|
46
46
|
ruby2ruby (1.2.5)
|
|
47
47
|
ruby_parser (~> 2.0)
|
|
48
48
|
sexp_processor (~> 3.0)
|
|
49
49
|
ruby_parser (2.3.1)
|
|
50
50
|
sexp_processor (~> 3.0)
|
|
51
51
|
sexp_processor (3.2.0)
|
|
52
|
-
sinatra (1.
|
|
53
|
-
rack (~> 1.
|
|
54
|
-
rack-protection (~> 1.
|
|
55
|
-
tilt (~> 1.3, >= 1.3.
|
|
56
|
-
sqlite3 (1.3.
|
|
57
|
-
tilt (1.3.
|
|
52
|
+
sinatra (1.4.1)
|
|
53
|
+
rack (~> 1.5, >= 1.5.2)
|
|
54
|
+
rack-protection (~> 1.4)
|
|
55
|
+
tilt (~> 1.3, >= 1.3.4)
|
|
56
|
+
sqlite3 (1.3.7)
|
|
57
|
+
tilt (1.3.5)
|
|
58
58
|
uuidtools (2.1.3)
|
|
59
59
|
webrat (0.7.3)
|
|
60
60
|
nokogiri (>= 1.2.0)
|
|
@@ -65,7 +65,8 @@ PLATFORMS
|
|
|
65
65
|
ruby
|
|
66
66
|
|
|
67
67
|
DEPENDENCIES
|
|
68
|
-
debugger
|
|
68
|
+
debugger (>= 1.5.0)
|
|
69
|
+
gem-release (>= 0.5.2)
|
|
69
70
|
rack-insight!
|
|
70
71
|
rake
|
|
71
72
|
redcarpet
|
data/README.md
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
Rack::Insight [](https://gemnasium.com/pboling/rack-insight) [](https://codeclimate.com/github/pboling/rack-insight) [](https://travis-ci.org/pboling/rack-insight) [](http://coderwall.com/pboling)
|
|
2
2
|
=============
|
|
3
3
|
|
|
4
|
-
Rack::Insight began life as an fork of Logical::Insight by LRDesign.
|
|
5
|
-
|
|
6
|
-
* I started a fork because:
|
|
7
|
-
* LogicalInsight was namespaced as "Insight"
|
|
8
|
-
* Causing namespace collisions everywhere I have an Insight model. I had to re-namespace all the code.
|
|
9
|
-
* I also needed to build a few extension gems with additional panels, which didn't fully work in LI
|
|
10
|
-
* Added the Config class to allow for custom panel load paths
|
|
11
|
-
and many other extensions that don't work in the *use Middleware* declaration.
|
|
12
|
-
|
|
13
|
-
It should be *even* easier to extend than LogicalInsight was, because extension gems can access the Config class
|
|
14
|
-
and truly bolt-on cleanly.
|
|
15
4
|
|
|
16
|
-
Having made really significant architectural changes, I'll be keeping Rack::Insight
|
|
17
|
-
a separate project for the foreseeable future.
|
|
18
5
|
|
|
19
|
-
* Forked From: [logical-insight](http://github.com/LRDesign/logical-insight)
|
|
20
|
-
* Which Was Forked From: [rack-bug](http://github.com/brynary/rack-bug)
|
|
21
6
|
|
|
22
7
|
Description
|
|
23
8
|
-----------
|
|
@@ -41,7 +26,7 @@ Features
|
|
|
41
26
|
* Log (can configure which loggers to watch!)
|
|
42
27
|
* Memory
|
|
43
28
|
* SQL (Failing specs, and I don't use it, someone please pull me a fix!)
|
|
44
|
-
* Active Record (
|
|
29
|
+
* Active Record (Thanks to [Kevin Glowacz](https://github.com/kjg) for the fix!)
|
|
45
30
|
* Other bundled panels:
|
|
46
31
|
* Sphinx (thanks to Oggy for updating this to the rack-insight panel API)
|
|
47
32
|
* Redis
|
|
@@ -153,16 +138,17 @@ Specify the set of panels you want, in the order you want them to appear:
|
|
|
153
138
|
|
|
154
139
|
ActionController::Dispatcher.middleware.use "Rack::Insight::App",
|
|
155
140
|
:secret_key => "someverylongandveryhardtoguesspreferablyrandomstring",
|
|
156
|
-
:panel_files => %w
|
|
141
|
+
:panel_files => %w(
|
|
157
142
|
timer_panel
|
|
143
|
+
active_record_panel
|
|
158
144
|
request_variables_panel
|
|
159
145
|
redis_panel
|
|
160
146
|
templates_panel
|
|
161
147
|
cache_panel
|
|
162
148
|
log_panel
|
|
163
|
-
memory_panel
|
|
149
|
+
memory_panel
|
|
164
150
|
sphinx_panel
|
|
165
|
-
|
|
151
|
+
)
|
|
166
152
|
|
|
167
153
|
By default panel files are looked up by prepending "rack/insight/panels/" and requiring them.
|
|
168
154
|
Subclasses of Rack::Insight::Panel are loaded and added to the toolbar. This makes
|
|
@@ -260,12 +246,63 @@ Authors
|
|
|
260
246
|
-------
|
|
261
247
|
|
|
262
248
|
- Maintained by [Peter Boling](mailto:peter.boling@gmail.com)
|
|
249
|
+
- Contributions from [Kevin Glowacz](https://github.com/kjg) (Fixed Active Record Panel), [Piotr Usewicz](https://github.com/pusewicz) (Use on instead of live), [Nate Greene](https://github.com/natejgreene) (javascript fix), [George Ogata](https://github.com/oggy) (Fixed Redis & Sphinx panels and added AJAX support to them), and [Alif Rachmawadi](https://github.com/subosito) (persistent toolbar position)
|
|
263
250
|
- Based on LogicalInsight by Judson Lester
|
|
264
251
|
- Contributions from Luke Melia, Joey Aghion, Tim Connor, and more
|
|
265
252
|
- Which in turn was based on Rack::Bug by Bryan Helmkamp
|
|
266
253
|
|
|
254
|
+
A History of Forking
|
|
255
|
+
--------------------
|
|
256
|
+
|
|
257
|
+
Rack::Insight began life as an fork of Logical::Insight by LRDesign.
|
|
258
|
+
|
|
259
|
+
* I started a fork because:
|
|
260
|
+
* LogicalInsight was namespaced as "Insight"
|
|
261
|
+
* Causing namespace collisions everywhere I have an Insight model. I had to re-namespace all the code.
|
|
262
|
+
* I also needed to build a few extension gems with additional panels, which didn't fully work in LI
|
|
263
|
+
* Added the Config class to allow for custom panel load paths
|
|
264
|
+
and many other extensions that don't work in the *use Middleware* declaration.
|
|
265
|
+
|
|
266
|
+
It should be *even* easier to extend than LogicalInsight was, because extension gems can access the Config class
|
|
267
|
+
and truly bolt-on cleanly.
|
|
268
|
+
|
|
269
|
+
Having made really significant architectural changes, I'll be keeping Rack::Insight
|
|
270
|
+
a separate project for the foreseeable future.
|
|
271
|
+
|
|
272
|
+
* Forked From: [logical-insight](http://github.com/LRDesign/logical-insight)
|
|
273
|
+
* Which Was Forked From: [rack-bug](http://github.com/brynary/rack-bug)
|
|
274
|
+
|
|
275
|
+
## Contributing
|
|
276
|
+
|
|
277
|
+
1. Fork it
|
|
278
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
279
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
|
280
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
281
|
+
5. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
|
282
|
+
6. Create new Pull Request
|
|
283
|
+
|
|
284
|
+
## Versioning
|
|
285
|
+
|
|
286
|
+
This library aims to adhere to [Semantic Versioning 2.0.0][semver].
|
|
287
|
+
Violations of this scheme should be reported as bugs. Specifically,
|
|
288
|
+
if a minor or patch version is released that breaks backward
|
|
289
|
+
compatibility, a new version should be immediately released that
|
|
290
|
+
restores compatibility. Breaking changes to the public API will
|
|
291
|
+
only be introduced with new major versions.
|
|
292
|
+
|
|
293
|
+
As a result of this policy, you can (and should) specify a
|
|
294
|
+
dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision.
|
|
295
|
+
|
|
296
|
+
For example:
|
|
297
|
+
|
|
298
|
+
spec.add_dependency 'rack-insight', '~> 0.5'
|
|
299
|
+
|
|
300
|
+
[semver]: http://semver.org/
|
|
301
|
+
[pvc]: http://docs.rubygems.org/read/chapter/16#page74
|
|
302
|
+
|
|
267
303
|
Thanks
|
|
268
304
|
------
|
|
305
|
+
|
|
269
306
|
Rack::Insight owes a lot to both LogicalInsight and Rack::Bug, as the basis projects. There's a lot of smart
|
|
270
307
|
in there. Many thanks to Judson, and Bryan for building them.
|
|
271
308
|
|
data/lib/rack/insight/config.rb
CHANGED
|
@@ -12,13 +12,12 @@ module Rack::Insight
|
|
|
12
12
|
@rails_log_copy = true
|
|
13
13
|
@filtered_backtrace = true
|
|
14
14
|
@panel_configs = {
|
|
15
|
-
:active_record => {:probes => {'ActiveRecord' => [:class, :allocate]}},
|
|
15
|
+
:active_record => {:probes => {'ActiveRecord::Base' => [:class, :allocate]}},
|
|
16
16
|
:active_resource => {:probes => {'ActiveResource::Connection' => [:instance, :request]}},
|
|
17
17
|
:cache => {:probes => { 'Memcached' => [:instance, :decrement, :get, :increment, :set,
|
|
18
18
|
:add, :replace, :delete, :prepend, :append],
|
|
19
19
|
'MemCache' => [:instance, :decr, :get, :get_multi, :incr, :set, :add, :delete],
|
|
20
20
|
'Dalli::Client' => [:instance, :perform] } },
|
|
21
|
-
:active_record => {:probes => {'ActiveRecord' => [:class, :allocate]}},
|
|
22
21
|
# :log_panel => The log panel configures its probes in its initializer
|
|
23
22
|
:sphinx => {:probes => {'Riddle::Client' => [:instance, :request]}},
|
|
24
23
|
:sql => {:probes => Hash[%w{ PostgreSQLAdapter MysqlAdapter SQLiteAdapter
|
|
@@ -75,44 +75,44 @@ jQuery(function($) {
|
|
|
75
75
|
$(document).unbind('keydown.insight');
|
|
76
76
|
$('.panel_content').hide();
|
|
77
77
|
});
|
|
78
|
-
$('#rack-insight ul.panels li a').
|
|
78
|
+
$('#rack-insight ul.panels li a').on('click', function() {
|
|
79
79
|
$.insight.panel_id = this.className
|
|
80
80
|
$.insight.switchCurrentPanel()
|
|
81
81
|
$.insight.toggleCurrent()
|
|
82
82
|
return false;
|
|
83
83
|
});
|
|
84
|
-
$('#rack-insight_debug_window a.back').
|
|
84
|
+
$('#rack-insight_debug_window a.back').on('click',function() {
|
|
85
85
|
$(this).parent().hide();
|
|
86
86
|
return false;
|
|
87
87
|
});
|
|
88
|
-
$('#rack-insight a.remote_call').
|
|
88
|
+
$('#rack-insight a.remote_call').on('click',function() {
|
|
89
89
|
$('#rack-insight_debug_window').load(this.href, null, function() {
|
|
90
90
|
$('#rack-insight_debug_window').show();
|
|
91
91
|
})
|
|
92
92
|
return false;
|
|
93
93
|
});
|
|
94
|
-
$('#rack-insight a.reveal_backtrace').
|
|
94
|
+
$('#rack-insight a.reveal_backtrace').on('click',function() {
|
|
95
95
|
$(this).parents("tr").next().toggle();
|
|
96
96
|
return false;
|
|
97
97
|
});
|
|
98
|
-
$('#rack-insight a.reveal_response').
|
|
98
|
+
$('#rack-insight a.reveal_response').on('click',function() {
|
|
99
99
|
$(this).parents("tr").next().next().toggle();
|
|
100
100
|
return false;
|
|
101
101
|
});
|
|
102
|
-
$('#rack-insight a.insight_close').
|
|
102
|
+
$('#rack-insight a.insight_close').on('click',function() {
|
|
103
103
|
$(document).trigger('close.insight');
|
|
104
104
|
return false;
|
|
105
105
|
});
|
|
106
|
-
$('#request_id_menu').
|
|
106
|
+
$('#request_id_menu').on('change', function(){
|
|
107
107
|
$.insight.changeRequest($(this).val())
|
|
108
108
|
});
|
|
109
|
-
$('#rack-insight_debug_button').
|
|
109
|
+
$('#rack-insight_debug_button').on('click',function(){
|
|
110
110
|
new_position = ($('#rack-insight').attr('class')== 'rack-insight_top') ? 'bottom' : 'top';
|
|
111
111
|
document.createCookie('rack-insight_position', new_position);
|
|
112
112
|
$('#rack-insight').removeClass('rack-insight_top rack-insight_bottom').addClass('rack-insight_' + new_position);
|
|
113
113
|
return false;
|
|
114
114
|
});
|
|
115
|
-
$('#rack-insight_disable_button').
|
|
115
|
+
$('#rack-insight_disable_button').on('click',function(){
|
|
116
116
|
document.insightDisable();
|
|
117
117
|
return false;
|
|
118
118
|
});
|
data/lib/rack/insight/version.rb
CHANGED
data/rack-insight.gemspec
CHANGED
|
@@ -34,5 +34,6 @@ Gem::Specification.new do |s|
|
|
|
34
34
|
s.add_development_dependency "rspec", ">= 2.11.0"
|
|
35
35
|
s.add_development_dependency "sinatra"
|
|
36
36
|
s.add_development_dependency "webrat"
|
|
37
|
-
s.add_development_dependency "debugger"
|
|
37
|
+
s.add_development_dependency "debugger", ">= 1.5.0"
|
|
38
|
+
s.add_development_dependency "gem-release", ">= 0.5.2"
|
|
38
39
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rack-insight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.25
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -12,7 +12,7 @@ authors:
|
|
|
12
12
|
autorequire:
|
|
13
13
|
bindir: bin
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date: 2013-
|
|
15
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: rack
|
|
@@ -181,7 +181,7 @@ dependencies:
|
|
|
181
181
|
requirements:
|
|
182
182
|
- - ! '>='
|
|
183
183
|
- !ruby/object:Gem::Version
|
|
184
|
-
version:
|
|
184
|
+
version: 1.5.0
|
|
185
185
|
type: :development
|
|
186
186
|
prerelease: false
|
|
187
187
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -189,7 +189,23 @@ dependencies:
|
|
|
189
189
|
requirements:
|
|
190
190
|
- - ! '>='
|
|
191
191
|
- !ruby/object:Gem::Version
|
|
192
|
-
version:
|
|
192
|
+
version: 1.5.0
|
|
193
|
+
- !ruby/object:Gem::Dependency
|
|
194
|
+
name: gem-release
|
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
|
196
|
+
none: false
|
|
197
|
+
requirements:
|
|
198
|
+
- - ! '>='
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: 0.5.2
|
|
201
|
+
type: :development
|
|
202
|
+
prerelease: false
|
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
204
|
+
none: false
|
|
205
|
+
requirements:
|
|
206
|
+
- - ! '>='
|
|
207
|
+
- !ruby/object:Gem::Version
|
|
208
|
+
version: 0.5.2
|
|
193
209
|
description: ! "Debugging toolbar for Rack applications implemented as\n middleware.
|
|
194
210
|
\ Based on logical-insight and rack-bug. "
|
|
195
211
|
email:
|
|
@@ -357,7 +373,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
357
373
|
version: '0'
|
|
358
374
|
requirements: []
|
|
359
375
|
rubyforge_project:
|
|
360
|
-
rubygems_version: 1.8.
|
|
376
|
+
rubygems_version: 1.8.25
|
|
361
377
|
signing_key:
|
|
362
378
|
specification_version: 3
|
|
363
379
|
summary: Debugging toolbar for Rack applications implemented as middleware.
|