fiveruns_tuneup 0.8.3 → 0.8.4
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/History.rdoc +4 -0
- data/Manifest +1 -0
- data/README.rdoc +34 -6
- data/assets/images/edit.png +0 -0
- data/assets/images/magnify.png +0 -0
- data/assets/images/schema.png +0 -0
- data/assets/javascripts/tuneup.js +57 -9
- data/assets/stylesheets/tuneup.css +35 -44
- data/bin/fiveruns_tuneup +0 -0
- data/fiveruns_tuneup.gemspec +6 -6
- data/install.rb +3 -8
- data/lib/bumpspark_helper.rb +1 -1
- data/lib/fiveruns/tuneup.rb +45 -5
- data/lib/fiveruns/tuneup/asset_tags.rb +3 -0
- data/lib/fiveruns/tuneup/configuration.rb +15 -0
- data/lib/fiveruns/tuneup/custom_methods.rb +1 -1
- data/lib/fiveruns/tuneup/instrumentation/utilities.rb +1 -0
- data/lib/fiveruns/tuneup/runs.rb +1 -1
- data/lib/fiveruns/tuneup/step.rb +2 -1
- data/lib/fiveruns/tuneup/version.rb +1 -1
- data/lib/tuneup_controller.rb +6 -0
- data/lib/tuneup_helper.rb +5 -1
- data/rails/init.rb +18 -18
- data/views/tuneup/_data.html.erb +4 -5
- data/views/tuneup/_link.html.erb +1 -1
- data/views/tuneup/_step.html.erb +6 -5
- data/views/tuneup/panel/_unregistered.html.erb +1 -1
- metadata +5 -3
data/History.rdoc
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
= History
|
|
2
2
|
|
|
3
|
+
* v0.8.4. Fixes for forgery protection breaking the panel, significant work on display issues including CSS isolation concerns, and support for environmental configuration. Support for Rails 2.1 development mode as a gem dependency.
|
|
4
|
+
|
|
5
|
+
* v0.8.3. Beta release.
|
|
6
|
+
|
|
3
7
|
* v0.8.1. First gem package with basic functionality
|
data/Manifest
CHANGED
|
@@ -21,6 +21,7 @@ init.rb
|
|
|
21
21
|
install.rb
|
|
22
22
|
lib/bumpspark_helper.rb
|
|
23
23
|
lib/fiveruns/tuneup/asset_tags.rb
|
|
24
|
+
lib/fiveruns/tuneup/configuration.rb
|
|
24
25
|
lib/fiveruns/tuneup/custom_methods.rb
|
|
25
26
|
lib/fiveruns/tuneup/environment.rb
|
|
26
27
|
lib/fiveruns/tuneup/instrumentation/action_controller/base.rb
|
data/README.rdoc
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
= FiveRuns TuneUp Plugin
|
|
1
|
+
= FiveRuns TuneUp Plugin (panel)
|
|
2
2
|
|
|
3
3
|
== Requirements
|
|
4
4
|
|
|
@@ -9,14 +9,42 @@
|
|
|
9
9
|
|
|
10
10
|
Display call stack information on Rails requests.
|
|
11
11
|
|
|
12
|
-
THIS IS A BETA RELEASE
|
|
12
|
+
*THIS IS A BETA RELEASE*; the normal disclaimers apply.
|
|
13
|
+
|
|
14
|
+
== Installation
|
|
15
|
+
|
|
16
|
+
Install the gem:
|
|
17
|
+
|
|
18
|
+
sudo gem install fiveruns_tuneup
|
|
19
|
+
|
|
20
|
+
For Rails 2.0, install the plugin into +vendor/plugins+:
|
|
21
|
+
|
|
22
|
+
fiveruns_tuneup /path/to/app
|
|
23
|
+
(or you can clone the GitHub repo into vendor/plugins)
|
|
24
|
+
|
|
25
|
+
For Rails 2.1, you can use it as a gem dependency instead; in your +environment.rb+:
|
|
26
|
+
|
|
27
|
+
config.gem 'fiveruns_tuneup'
|
|
28
|
+
|
|
29
|
+
Note: At the current time (as of the 2.1 release) there are issues in Rails that prevent
|
|
30
|
+
the plugin running as an unpacked gem (via +rake gems:unpack+).
|
|
31
|
+
|
|
32
|
+
== Configuration
|
|
33
|
+
|
|
34
|
+
By default, TuneUp only displays the panel and instruments your application
|
|
35
|
+
in the +development+ environment. If you'd like to configure it to run in the +production+
|
|
36
|
+
environment (for testing), you can create a +RAILS_ROOT/config/tuneup.rb+ file:
|
|
37
|
+
|
|
38
|
+
Fiveruns::Tuneup.config do |config|
|
|
39
|
+
config.environments << :production
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Note: The TuneUp panel does NOT currently work *in production mode* for Rails 2.1 apps, due to some internal
|
|
43
|
+
changes to the way routes are handled. This will be addressed in a future TuneUp panel release.
|
|
13
44
|
|
|
14
45
|
== Known Issues
|
|
15
46
|
|
|
16
|
-
|
|
17
|
-
* Issues with fixed/absolute positioned elements overlapping the panel
|
|
18
|
-
and/or being pushed down too far.
|
|
19
|
-
* Panel not showing up on the `root' route.
|
|
47
|
+
See the notes at http://github.com/fiveruns/fiveruns_tuneup/wikis/known-issues
|
|
20
48
|
|
|
21
49
|
== License
|
|
22
50
|
|
data/assets/images/edit.png
CHANGED
|
File without changes
|
data/assets/images/magnify.png
CHANGED
|
File without changes
|
data/assets/images/schema.png
CHANGED
|
File without changes
|
|
@@ -10,17 +10,63 @@ TuneUp.Spinner = {
|
|
|
10
10
|
stop: function() { $('tuneup_spinner').hide(); }
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
TuneUp.adjustElement = function(e) {
|
|
14
|
+
var top = parseFloat(e.getStyle('top') || 0);
|
|
15
|
+
var adjust = 0;
|
|
16
|
+
|
|
17
|
+
if ($('tuneup-flash').hasClassName('tuneup-show')) {
|
|
18
|
+
if (!e.hasClassName('tuneup-flash-adjusted')) {
|
|
19
|
+
adjust = 27;
|
|
20
|
+
e.addClassName('tuneup-flash-adjusted');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
if (e.hasClassName('tuneup-flash-adjusted')) {
|
|
25
|
+
adjust = -27;
|
|
26
|
+
e.removeClassName('tuneup-flash-adjusted');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (e.hasClassName('tuneup-adjusted'))
|
|
31
|
+
e.style.top = (top + adjust) + 'px';
|
|
32
|
+
else {
|
|
33
|
+
e.style.top = (top + 50 + adjust) + 'px';
|
|
34
|
+
e.addClassName('tuneup-adjusted')
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
TuneUp.adjustFixedElements = function(e) {
|
|
39
|
+
document.body.descendants().each(function(e) {
|
|
40
|
+
var pos = e.getStyle('position');
|
|
41
|
+
if (pos == 'fixed') {
|
|
42
|
+
TuneUp.adjustElement(e);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
TuneUp.adjustAbsoluteElements = function(e) {
|
|
48
|
+
e.immediateDescendants().each(function (e) {
|
|
49
|
+
var pos = e.getStyle('position');
|
|
50
|
+
if (pos == 'absolute') {
|
|
51
|
+
TuneUp.adjustElement(e);
|
|
52
|
+
TuneUp.adjustAbsoluteElements(e);
|
|
53
|
+
}
|
|
54
|
+
else if (pos == 'relative') {
|
|
55
|
+
// do nothing
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
TuneUp.adjustAbsoluteElements(e);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
13
62
|
|
|
14
63
|
Event.observe(window, 'load', function() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
new Insertion.Top(document.body, "<div id='tuneup'><h1>FiveRuns TuneUp</h1><img id='tuneup_spinner' style='display:none' src='/images/tuneup/spinner.gif' alt=''/><div id='tuneup-content'></div></div><div id='tuneup-flash'></div>");
|
|
23
|
-
new Ajax.Request('/tuneup?uri=' + encodeURIComponent(document.location.href),
|
|
64
|
+
new Insertion.Top(document.body, "<div id='tuneup'><h1>FiveRuns TuneUp</h1><img id='tuneup_spinner' style='display:none' src='/images/tuneup/spinner.gif' alt=''/><div id='tuneup-content' style='display:block'></div></div><div id='tuneup-flash'></div>");
|
|
65
|
+
|
|
66
|
+
TuneUp.adjustAbsoluteElements(document.body);
|
|
67
|
+
TuneUp.adjustFixedElements();
|
|
68
|
+
|
|
69
|
+
new Ajax.Request('/tuneup?uri=' + encodeURIComponent(document.location.href),
|
|
24
70
|
{
|
|
25
71
|
asynchronous:true,
|
|
26
72
|
evalScripts:true,
|
|
@@ -28,3 +74,5 @@ Event.observe(window, 'load', function() {
|
|
|
28
74
|
onComplete: TuneUp.Spinner.stop
|
|
29
75
|
});
|
|
30
76
|
});
|
|
77
|
+
|
|
78
|
+
|
|
@@ -43,7 +43,7 @@ version: 2.5.1
|
|
|
43
43
|
/* END YUI RESET */
|
|
44
44
|
|
|
45
45
|
/* Styling */
|
|
46
|
-
#tuneup { height: 50px; color: #ddd; background: #000 url(/images/tuneup/head.gif) 0 100% repeat-x; padding: 0; font-family: "Helvetica Neue", "Lucida Grande", Calibri, Helvetica, Verdana, sans-serif; font-size: 12px; }
|
|
46
|
+
#tuneup { position: relative; height: 50px; color: #ddd; background: #000 url(/images/tuneup/head.gif) 0 100% repeat-x; padding: 0; font-family: "Helvetica Neue", "Lucida Grande", Calibri, Helvetica, Verdana, sans-serif; font-size: 12px; }
|
|
47
47
|
#tuneup #tuneup-content { margin-left: 170px; color: #ddd; height: 50px; vertical-align: middle; text-align: left; }
|
|
48
48
|
#tuneup #tuneup-root-bar { float: right; }
|
|
49
49
|
#tuneup a, #tuneup a:visited, #tuneup a:active { color: #fff; text-decoration: underline; font-size: 12px; border: 0; }
|
|
@@ -52,7 +52,7 @@ version: 2.5.1
|
|
|
52
52
|
#tuneup label { display: inline; font-size: 13px; font-weight: normal; color: #CCC; padding: 2px 2px; }
|
|
53
53
|
#tuneup label, #tuneup button { margin: 0 6px 0 20px; }
|
|
54
54
|
|
|
55
|
-
#tuneup #tuneup-content p.full { height: 50px; line-height: 50px; vertical-align: middle; padding: 0; }
|
|
55
|
+
#tuneup #tuneup-content p.tuneup-full { height: 50px; line-height: 50px; vertical-align: middle; padding: 0; background-color: transparent; }
|
|
56
56
|
#tuneup .small { font-size: 10px; color: #666; padding: 0 8px 0 8px;}
|
|
57
57
|
|
|
58
58
|
|
|
@@ -84,13 +84,13 @@ version: 2.5.1
|
|
|
84
84
|
-moz-border-radius: 6px;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
#tuneup #tuneup-details ul
|
|
88
|
-
#tuneup #tuneup-details
|
|
89
|
-
#tuneup #tuneup-details
|
|
90
|
-
#tuneup #tuneup-details
|
|
91
|
-
#tuneup #tuneup-details
|
|
87
|
+
#tuneup ul#tuneup-details ul.tuneup-step-info { margin: 0; padding: 0; }
|
|
88
|
+
#tuneup ul#tuneup-details li.tuneup-title { float: left; overflow: hidden; height: 20px; margin: 0 10px 0 0; padding: 0; color: #ddd; font-size: 12px; text-transform: none; font-weight: inherit;}
|
|
89
|
+
#tuneup ul#tuneup-details li.tuneup-title p { background-color: transparent; }
|
|
90
|
+
#tuneup ul#tuneup-details li.tuneup-title strong { color: #fff; font-weight: bold; }
|
|
91
|
+
#tuneup ul#tuneup-details li.tuneup-title span.time { float: right; text-transform: none; font-size: 11px; font-weight: normal; margin-right: 0px; }
|
|
92
92
|
|
|
93
|
-
#tuneup #tuneup-details
|
|
93
|
+
#tuneup ul#tuneup-details li.tuneup-title a, ul#tuneup-details li.tuneup-title a:active, ul#tuneup-details li.tuneup-title a:visited {
|
|
94
94
|
color: inherit;
|
|
95
95
|
font-size: inherit;
|
|
96
96
|
font-weight: inherit;
|
|
@@ -101,56 +101,45 @@ version: 2.5.1
|
|
|
101
101
|
|
|
102
102
|
#tuneup .tuneup-bar li { text-align: center; }
|
|
103
103
|
|
|
104
|
-
#tuneup #tuneup-details li.fiveruns_tuneup_step { padding
|
|
104
|
+
#tuneup #tuneup-details li.fiveruns_tuneup_step { clear: left; padding: 0 0 0 4px; background: url(/images/tuneup/pip.gif) 4px 0 no-repeat; margin: 2px 0; }
|
|
105
105
|
#tuneup #tuneup-details li.fiveruns_tuneup_step.with-children { background: url(/images/tuneup/arrows.gif) 4px 0 no-repeat;}
|
|
106
106
|
#tuneup #tuneup-details li.fiveruns_tuneup_step.with-children.tuneup-opened { background: url(/images/tuneup/arrows.gif) 4px -20px no-repeat; }
|
|
107
107
|
|
|
108
|
-
#tuneup #tuneup-details
|
|
109
|
-
#tuneup #tuneup-details ul span.time { margin-right: 12px; }
|
|
108
|
+
#tuneup ul#tuneup-details span.time { margin-right: 12px; }
|
|
110
109
|
|
|
111
110
|
#tuneup li .children { display: none; }
|
|
112
111
|
|
|
113
112
|
#tuneup_spinner { position: absolute; z-index: 11002; top: 15px; right: 30px; }
|
|
114
113
|
|
|
115
|
-
#tuneup #tuneup-details
|
|
116
|
-
|
|
114
|
+
#tuneup ul#tuneup-details li.tuneup-detail-bar {
|
|
115
|
+
float:left;
|
|
116
|
+
margin: 0 0 0 0;
|
|
117
117
|
height: 20px;
|
|
118
|
+
width: 300px;
|
|
118
119
|
padding: 0;
|
|
119
120
|
}
|
|
120
|
-
#tuneup #tuneup-details
|
|
121
|
+
#tuneup ul#tuneup-details li.tuneup-title { padding-left: 16px; width: 400px; }
|
|
121
122
|
|
|
122
|
-
#tuneup #tuneup-details ul
|
|
123
|
-
#tuneup #tuneup-details ul
|
|
124
|
-
#tuneup #tuneup-details ul ul dt { width: 396px; }
|
|
123
|
+
#tuneup ul#tuneup-details ul.fiveruns_tuneup_children { background: #111; }
|
|
124
|
+
#tuneup ul#tuneup-details ul li.tuneup-title { width: 396px; }
|
|
125
125
|
|
|
126
|
-
#tuneup #tuneup-details ul ul
|
|
127
|
-
#tuneup #tuneup-details ul ul
|
|
128
|
-
#tuneup #tuneup-details ul ul ul dt { width: 392px; }
|
|
126
|
+
#tuneup ul#tuneup-details ul ul.fiveruns_tuneup_children { background: #222;}
|
|
127
|
+
#tuneup ul#tuneup-details ul ul li.tuneup-title { width: 392px; }
|
|
129
128
|
|
|
129
|
+
#tuneup ul#tuneup-details ul ul ul.fiveruns_tuneup_children { background: #333;}
|
|
130
|
+
#tuneup ul#tuneup-details ul ul ul li.tuneup-title { width: 388px; }
|
|
130
131
|
|
|
131
|
-
#tuneup #tuneup-details ul ul ul ul.fiveruns_tuneup_children { background: #
|
|
132
|
-
#tuneup #tuneup-details ul ul ul ul
|
|
133
|
-
#tuneup #tuneup-details ul ul ul ul dt { width: 388px; }
|
|
132
|
+
#tuneup ul#tuneup-details ul ul ul ul.fiveruns_tuneup_children { background: #444;}
|
|
133
|
+
#tuneup ul#tuneup-details ul ul ul ul li.tuneup-title { width: 384px; }
|
|
134
134
|
|
|
135
|
+
#tuneup ul#tuneup-details ul ul ul ul ul.fiveruns_tuneup_children { background: #555;}
|
|
136
|
+
#tuneup ul#tuneup-details ul ul ul ul ul li.tuneup-title { width: 380px; }
|
|
135
137
|
|
|
136
|
-
#tuneup #tuneup-details ul ul ul ul ul.fiveruns_tuneup_children { background: #
|
|
137
|
-
#tuneup #tuneup-details ul ul ul ul ul dd { margin-left: 394px; }
|
|
138
|
-
#tuneup #tuneup-details ul ul ul ul ul dt { width: 384px; }
|
|
138
|
+
#tuneup ul#tuneup-details ul ul ul ul ul ul.fiveruns_tuneup_children { background: #666;}
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
#tuneup #tuneup-details ul ul ul ul ul ul.
|
|
142
|
-
#tuneup #tuneup-details ul ul ul ul ul ul
|
|
143
|
-
#tuneup #tuneup-details ul ul ul ul ul ul dt { width: 380px; }
|
|
144
|
-
|
|
145
|
-
#tuneup #tuneup-details ul ul ul ul ul ul ul.fiveruns_tuneup_children { background: #666;}
|
|
146
|
-
#tuneup #tuneup-details ul ul ul ul ul ul ul dd { margin-left: 386px; }
|
|
147
|
-
#tuneup #tuneup-details ul ul ul ul ul ul ul dt { width: 376px; }
|
|
148
|
-
|
|
149
|
-
#tuneup #tuneup-details ul ul ul ul ul ul ul ul dd { margin-left: 382px; }
|
|
150
|
-
#tuneup #tuneup-details ul ul ul ul ul ul ul ul dt { width: 372px; }
|
|
151
|
-
|
|
152
|
-
#tuneup #tuneup-details ul ul ul ul ul ul ul ul ul dd { margin-left: 378px; }
|
|
153
|
-
#tuneup #tuneup-details ul ul ul ul ul ul ul ul ul dt { width: 368px; }
|
|
140
|
+
#tuneup ul#tuneup-details ul ul ul ul ul ul li.tuneup-title { width: 376px; }
|
|
141
|
+
#tuneup ul#tuneup-details ul ul ul ul ul ul ul li.tuneup-title { width: 372px; }
|
|
142
|
+
#tuneup ul#tuneup-details ul ul ul ul ul ul ul ul li.tuneup-title { width: 368px; }
|
|
154
143
|
|
|
155
144
|
#tuneup-flash { display: none; text-align: left; font-size: 12px; padding: 5px; color: #000; border-bottom: 1px #000 solid; }
|
|
156
145
|
#tuneup-flash emph { color: #666; font-style: italic; }
|
|
@@ -161,8 +150,8 @@ version: 2.5.1
|
|
|
161
150
|
#tuneup-flash.tuneup-error p { background: url(/images/tuneup/warning.gif) 0 50% no-repeat; }
|
|
162
151
|
#tuneup-flash.tuneup-notice { padding-left: 0; background: #E4FFDE; }
|
|
163
152
|
|
|
164
|
-
#tuneup #tuneup-details .tuneup-bar { width: 300px; height: 20px; padding: 0; margin: 0 !important;
|
|
165
|
-
#tuneup #tuneup-details .tuneup-bar li { height:
|
|
153
|
+
#tuneup #tuneup-details .tuneup-bar { width: 300px; height: 20px; padding: 0; margin: 0 !important; }
|
|
154
|
+
#tuneup #tuneup-details .tuneup-bar li { height: 20px; padding: 0; margin: 0 !important; }
|
|
166
155
|
|
|
167
156
|
#tuneup #tuneup-details a.tuneup-sql { color: 001999; margin-left: 10px; }
|
|
168
157
|
#tuneup #tuneup-details a img { border: 0; }
|
|
@@ -175,7 +164,7 @@ version: 2.5.1
|
|
|
175
164
|
#tuneup th { background: #000; padding: 4px; color: #fff; font-size: 12px; text-align: left; border: 0; font-weight: bold; border: 1px #333 solid; border-left: 0; border-top: 0; }
|
|
176
165
|
#tuneup td { background: #111; padding: 4px; color: #ddd; font-size: 12px; text-align: left; border: 0; }
|
|
177
166
|
|
|
178
|
-
#tuneup #tuneup-schema { display: none; position: absolute; top: 46px; right:
|
|
167
|
+
#tuneup #tuneup-schema { display: none; position: absolute; top: 46px; right: 757px; padding: 9px; text-align: left; z-index: 10998; background: #000; opacity: 0.85; color: #ddd; overflow: hidden; -moz-border-radius: 6px; }
|
|
179
168
|
|
|
180
169
|
#tuneup h1 {
|
|
181
170
|
background: transparent url(/images/tuneup/logo_clear.png) center left no-repeat;
|
|
@@ -202,4 +191,6 @@ version: 2.5.1
|
|
|
202
191
|
#tuneup #tuneup-schema td { background: #000; font-family: monospace; color: #ddd; padding: 1px; font-size: 11px; }
|
|
203
192
|
#tuneup #tuneup-trend { float: right; width: 100px; }
|
|
204
193
|
|
|
205
|
-
#tuneup button { background: none; border: 0; margin: 0; padding: 0; height: 50px; line-height: 50px; vertical-align: middle; }
|
|
194
|
+
#tuneup button { background: none; border: 0; margin: 0; padding: 0; height: 50px; line-height: 50px; vertical-align: middle; }
|
|
195
|
+
|
|
196
|
+
a.tuneup-step-link { padding-left: 20px; margin-left: -20px; outline: none;}
|
data/bin/fiveruns_tuneup
CHANGED
|
File without changes
|
data/fiveruns_tuneup.gemspec
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
|
|
2
|
-
# Gem::Specification for Fiveruns_tuneup-0.8.
|
|
2
|
+
# Gem::Specification for Fiveruns_tuneup-0.8.4
|
|
3
3
|
# Originally generated by Echoe
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
6
|
s.name = %q{fiveruns_tuneup}
|
|
7
|
-
s.version = "0.8.
|
|
7
|
+
s.version = "0.8.4"
|
|
8
8
|
|
|
9
9
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.authors = ["FiveRuns Development Team"]
|
|
13
|
-
s.date = %q{2008-
|
|
13
|
+
s.date = %q{2008-06-01}
|
|
14
14
|
s.default_executable = %q{fiveruns_tuneup}
|
|
15
15
|
s.description = %q{Instrumentation for the FiveRuns TuneUp product.}
|
|
16
16
|
s.email = %q{dev@fiveruns.com}
|
|
17
17
|
s.executables = ["fiveruns_tuneup"]
|
|
18
|
-
s.extra_rdoc_files = ["bin/fiveruns_tuneup", "lib/bumpspark_helper.rb", "lib/fiveruns/tuneup/asset_tags.rb", "lib/fiveruns/tuneup/custom_methods.rb", "lib/fiveruns/tuneup/environment.rb", "lib/fiveruns/tuneup/instrumentation/action_controller/base.rb", "lib/fiveruns/tuneup/instrumentation/action_view/base.rb", "lib/fiveruns/tuneup/instrumentation/active_record/base.rb", "lib/fiveruns/tuneup/instrumentation/cgi/session.rb", "lib/fiveruns/tuneup/instrumentation/utilities.rb", "lib/fiveruns/tuneup/multipart.rb", "lib/fiveruns/tuneup/runs.rb", "lib/fiveruns/tuneup/schema.rb", "lib/fiveruns/tuneup/step.rb", "lib/fiveruns/tuneup/urls.rb", "lib/fiveruns/tuneup/version.rb", "lib/fiveruns/tuneup.rb", "lib/fiveruns_tuneup.rb", "lib/tuneup_config.rb", "lib/tuneup_controller.rb", "lib/tuneup_helper.rb", "README.rdoc", "tasks/assets.rake"]
|
|
19
|
-
s.files = ["assets/images/arrows.gif", "assets/images/edit.png", "assets/images/fade.png", "assets/images/fade_down.png", "assets/images/head.gif", "assets/images/logo.gif", "assets/images/logo_clear.png", "assets/images/magnify.png", "assets/images/pip.gif", "assets/images/pointer.gif", "assets/images/schema.png", "assets/images/signin.gif", "assets/images/spinner.gif", "assets/images/warning.gif", "assets/javascripts/prototype.js", "assets/javascripts/tuneup.js", "assets/stylesheets/tuneup.css", "bin/fiveruns_tuneup", "History.rdoc", "init.rb", "install.rb", "lib/bumpspark_helper.rb", "lib/fiveruns/tuneup/asset_tags.rb", "lib/fiveruns/tuneup/custom_methods.rb", "lib/fiveruns/tuneup/environment.rb", "lib/fiveruns/tuneup/instrumentation/action_controller/base.rb", "lib/fiveruns/tuneup/instrumentation/action_view/base.rb", "lib/fiveruns/tuneup/instrumentation/active_record/base.rb", "lib/fiveruns/tuneup/instrumentation/cgi/session.rb", "lib/fiveruns/tuneup/instrumentation/utilities.rb", "lib/fiveruns/tuneup/multipart.rb", "lib/fiveruns/tuneup/runs.rb", "lib/fiveruns/tuneup/schema.rb", "lib/fiveruns/tuneup/step.rb", "lib/fiveruns/tuneup/urls.rb", "lib/fiveruns/tuneup/version.rb", "lib/fiveruns/tuneup.rb", "lib/fiveruns_tuneup.rb", "lib/tuneup_config.rb", "lib/tuneup_controller.rb", "lib/tuneup_helper.rb", "Manifest", "rails/init.rb", "Rakefile", "README.rdoc", "tasks/assets.rake", "test/test_helper.rb", "test/tuneup_test.rb", "uninstall.rb", "views/tuneup/_data.html.erb", "views/tuneup/_flash.html.erb", "views/tuneup/_link.html.erb", "views/tuneup/_schema.html.erb", "views/tuneup/_sql.html.erb", "views/tuneup/_step.html.erb", "views/tuneup/panel/_registered.html.erb", "views/tuneup/panel/_unregistered.html.erb", "fiveruns_tuneup.gemspec"]
|
|
18
|
+
s.extra_rdoc_files = ["bin/fiveruns_tuneup", "lib/bumpspark_helper.rb", "lib/fiveruns/tuneup/asset_tags.rb", "lib/fiveruns/tuneup/configuration.rb", "lib/fiveruns/tuneup/custom_methods.rb", "lib/fiveruns/tuneup/environment.rb", "lib/fiveruns/tuneup/instrumentation/action_controller/base.rb", "lib/fiveruns/tuneup/instrumentation/action_view/base.rb", "lib/fiveruns/tuneup/instrumentation/active_record/base.rb", "lib/fiveruns/tuneup/instrumentation/cgi/session.rb", "lib/fiveruns/tuneup/instrumentation/utilities.rb", "lib/fiveruns/tuneup/multipart.rb", "lib/fiveruns/tuneup/runs.rb", "lib/fiveruns/tuneup/schema.rb", "lib/fiveruns/tuneup/step.rb", "lib/fiveruns/tuneup/urls.rb", "lib/fiveruns/tuneup/version.rb", "lib/fiveruns/tuneup.rb", "lib/fiveruns_tuneup.rb", "lib/tuneup_config.rb", "lib/tuneup_controller.rb", "lib/tuneup_helper.rb", "README.rdoc", "tasks/assets.rake"]
|
|
19
|
+
s.files = ["assets/images/arrows.gif", "assets/images/edit.png", "assets/images/fade.png", "assets/images/fade_down.png", "assets/images/head.gif", "assets/images/logo.gif", "assets/images/logo_clear.png", "assets/images/magnify.png", "assets/images/pip.gif", "assets/images/pointer.gif", "assets/images/schema.png", "assets/images/signin.gif", "assets/images/spinner.gif", "assets/images/warning.gif", "assets/javascripts/prototype.js", "assets/javascripts/tuneup.js", "assets/stylesheets/tuneup.css", "bin/fiveruns_tuneup", "History.rdoc", "init.rb", "install.rb", "lib/bumpspark_helper.rb", "lib/fiveruns/tuneup/asset_tags.rb", "lib/fiveruns/tuneup/configuration.rb", "lib/fiveruns/tuneup/custom_methods.rb", "lib/fiveruns/tuneup/environment.rb", "lib/fiveruns/tuneup/instrumentation/action_controller/base.rb", "lib/fiveruns/tuneup/instrumentation/action_view/base.rb", "lib/fiveruns/tuneup/instrumentation/active_record/base.rb", "lib/fiveruns/tuneup/instrumentation/cgi/session.rb", "lib/fiveruns/tuneup/instrumentation/utilities.rb", "lib/fiveruns/tuneup/multipart.rb", "lib/fiveruns/tuneup/runs.rb", "lib/fiveruns/tuneup/schema.rb", "lib/fiveruns/tuneup/step.rb", "lib/fiveruns/tuneup/urls.rb", "lib/fiveruns/tuneup/version.rb", "lib/fiveruns/tuneup.rb", "lib/fiveruns_tuneup.rb", "lib/tuneup_config.rb", "lib/tuneup_controller.rb", "lib/tuneup_helper.rb", "Manifest", "rails/init.rb", "Rakefile", "README.rdoc", "tasks/assets.rake", "test/test_helper.rb", "test/tuneup_test.rb", "uninstall.rb", "views/tuneup/_data.html.erb", "views/tuneup/_flash.html.erb", "views/tuneup/_link.html.erb", "views/tuneup/_schema.html.erb", "views/tuneup/_sql.html.erb", "views/tuneup/_step.html.erb", "views/tuneup/panel/_registered.html.erb", "views/tuneup/panel/_unregistered.html.erb", "fiveruns_tuneup.gemspec"]
|
|
20
20
|
s.has_rdoc = true
|
|
21
21
|
s.homepage = %q{http://github.com/fiveruns/fiveruns_tuneup}
|
|
22
22
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fiveruns_tuneup", "--main", "README.rdoc"]
|
|
23
23
|
s.require_paths = ["lib"]
|
|
24
24
|
s.rubyforge_project = %q{fiveruns}
|
|
25
|
-
s.rubygems_version = %q{1.
|
|
25
|
+
s.rubygems_version = %q{1.1.1}
|
|
26
26
|
s.summary = %q{Instrumentation for the FiveRuns TuneUp product.}
|
|
27
27
|
s.test_files = ["test/test_helper.rb", "test/tuneup_test.rb"]
|
|
28
28
|
|
data/install.rb
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
# Allow linking (for development)
|
|
2
|
-
method = ENV['LINK'] ? :ln_s : :cp
|
|
3
1
|
installed = false
|
|
4
2
|
Dir[File.dirname(__FILE__) << "/assets/*"].each do |location|
|
|
5
3
|
directory = File.basename(location)
|
|
6
4
|
destination = File.join(RAILS_ROOT, 'public', directory, 'tuneup')
|
|
7
|
-
FileUtils.
|
|
5
|
+
FileUtils.rm_rf(destination) rescue nil
|
|
6
|
+
FileUtils.mkdir_p(destination)
|
|
8
7
|
Dir[File.join(location, '*')].each do |file|
|
|
9
8
|
new_filename = File.join(destination, File.basename(file))
|
|
10
9
|
unless File.exists?(new_filename)
|
|
11
|
-
FileUtils.
|
|
12
|
-
installed = true
|
|
10
|
+
FileUtils.cp file, new_filename
|
|
13
11
|
end
|
|
14
12
|
end
|
|
15
|
-
end
|
|
16
|
-
if installed
|
|
17
|
-
STDERR.puts "FiveRuns TuneUp: Installed assets in public/"
|
|
18
13
|
end
|
data/lib/bumpspark_helper.rb
CHANGED
|
@@ -5,7 +5,7 @@ require 'zlib'
|
|
|
5
5
|
# discussed and collaborated on at:
|
|
6
6
|
# http://redhanded.hobix.com/inspect/sparklinesForMinimalists.html
|
|
7
7
|
# Many thanks to the various collaborators; _why (concept), MenTaLguY (transparency), and jzp (png)
|
|
8
|
-
module BumpsparkHelper
|
|
8
|
+
module BumpsparkHelper #:nodoc:
|
|
9
9
|
|
|
10
10
|
def build_png_chunk(type,data)
|
|
11
11
|
to_check = type + data
|
data/lib/fiveruns/tuneup.rb
CHANGED
|
@@ -33,6 +33,14 @@ module Fiveruns
|
|
|
33
33
|
result
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def config(&block)
|
|
37
|
+
yield configuration
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def configuration
|
|
41
|
+
@configuration ||= ::Fiveruns::Tuneup::Configuration.new
|
|
42
|
+
end
|
|
43
|
+
|
|
36
44
|
def collecting
|
|
37
45
|
if defined?(@collecting)
|
|
38
46
|
@collecting
|
|
@@ -78,19 +86,51 @@ module Fiveruns
|
|
|
78
86
|
end
|
|
79
87
|
|
|
80
88
|
def start
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
if supports_rails?
|
|
90
|
+
load_configuration_file
|
|
91
|
+
if configuration.instrument?
|
|
92
|
+
yield
|
|
93
|
+
log :info, "Starting..."
|
|
94
|
+
install_instrumentation
|
|
95
|
+
log :debug, "Using collector at #{collector_url}"
|
|
96
|
+
log :debug, "Using frontend at #{frontend_url}"
|
|
97
|
+
else
|
|
98
|
+
log :warn, "Not configured to run in #{RAILS_ENV} environment, aborting."
|
|
99
|
+
end
|
|
100
|
+
end
|
|
85
101
|
end
|
|
86
102
|
|
|
87
103
|
def log(level, text)
|
|
88
|
-
|
|
104
|
+
message = "FiveRuns TuneUp (v#{Fiveruns::Tuneup::Version::STRING}): #{text}"
|
|
105
|
+
LOGGER.send(level, message)
|
|
106
|
+
STDERR.puts message if level == :error
|
|
89
107
|
end
|
|
90
108
|
|
|
91
109
|
#######
|
|
92
110
|
private
|
|
93
111
|
#######
|
|
112
|
+
|
|
113
|
+
def configuration_file
|
|
114
|
+
File.join(RAILS_ROOT, 'config/tuneup.rb')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def load_configuration_file
|
|
118
|
+
if File.exists?(configuration_file)
|
|
119
|
+
require configuration_file
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def supports_rails?
|
|
124
|
+
version = Rails::VERSION rescue nil
|
|
125
|
+
return true unless version
|
|
126
|
+
if version::MAJOR < 2
|
|
127
|
+
log :error, "Sorry, FiveRuns TuneUp does not currently support Rails < 2.0.0; aborting load."
|
|
128
|
+
false
|
|
129
|
+
else
|
|
130
|
+
log :info, "Rails version #{version::STRING} is supported, loading..."
|
|
131
|
+
true
|
|
132
|
+
end
|
|
133
|
+
end
|
|
94
134
|
|
|
95
135
|
def clear_stack
|
|
96
136
|
@stack = nil
|
|
@@ -20,6 +20,9 @@ module Fiveruns
|
|
|
20
20
|
)
|
|
21
21
|
response.headers["Content-Length"] += insertion.size
|
|
22
22
|
response.body.replace(before << insertion << '</head>' << after)
|
|
23
|
+
log :error, "Inserted asset tags"
|
|
24
|
+
else
|
|
25
|
+
log :error, "Could not find closing </head> tag for insertion"
|
|
23
26
|
end
|
|
24
27
|
end
|
|
25
28
|
|
data/lib/fiveruns/tuneup/runs.rb
CHANGED
data/lib/fiveruns/tuneup/step.rb
CHANGED
data/lib/tuneup_controller.rb
CHANGED
|
@@ -3,6 +3,12 @@ require 'ostruct'
|
|
|
3
3
|
require 'open-uri'
|
|
4
4
|
|
|
5
5
|
class TuneupController < ActionController::Base
|
|
6
|
+
|
|
7
|
+
def self.request_forgery_protection_options
|
|
8
|
+
ApplicationController.request_forgery_protection_options || {}
|
|
9
|
+
rescue
|
|
10
|
+
Hash.new
|
|
11
|
+
end
|
|
6
12
|
|
|
7
13
|
def show
|
|
8
14
|
render :update do |page|
|
data/lib/tuneup_helper.rb
CHANGED
|
@@ -60,7 +60,7 @@ module TuneupHelper #:nodoc:
|
|
|
60
60
|
def tuneup_step_link(step)
|
|
61
61
|
name = tuneup_style_step_name(tuneup_truncate_step_name(step))
|
|
62
62
|
link = if step.children.any?
|
|
63
|
-
link_to_function(name, "$('#{dom_id(step, :children)}').toggle();$('#{dom_id(step)}').toggleClassName('tuneup-opened');")
|
|
63
|
+
link_to_function(name, "$('#{dom_id(step, :children)}').toggle();$('#{dom_id(step)}').toggleClassName('tuneup-opened');", :class => "tuneup-step-link")
|
|
64
64
|
else
|
|
65
65
|
name
|
|
66
66
|
end
|
|
@@ -162,6 +162,8 @@ module TuneupHelper #:nodoc:
|
|
|
162
162
|
update_page do |page|
|
|
163
163
|
page['tuneup-flash'].removeClassName('tuneup-show');
|
|
164
164
|
page['tuneup-content'].replace_html(render(:partial => "tuneup/panel/#{@config.state}"))
|
|
165
|
+
page << 'TuneUp.adjustAbsoluteElements(document.body);'
|
|
166
|
+
page << 'TuneUp.adjustFixedElements();'
|
|
165
167
|
end
|
|
166
168
|
end
|
|
167
169
|
|
|
@@ -174,6 +176,8 @@ module TuneupHelper #:nodoc:
|
|
|
174
176
|
page['tuneup-flash'].removeClassName("tuneup-#{other_type}")
|
|
175
177
|
end
|
|
176
178
|
page['tuneup-flash'].addClassName("tuneup-#{type}");
|
|
179
|
+
page << 'TuneUp.adjustAbsoluteElements(document.body);'
|
|
180
|
+
page << 'TuneUp.adjustFixedElements();'
|
|
177
181
|
end
|
|
178
182
|
end
|
|
179
183
|
|
data/rails/init.rb
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
Fiveruns::Tuneup.start do
|
|
2
|
+
require 'dispatcher'
|
|
3
|
+
Dispatcher.to_prepare :tuneup_route do
|
|
4
|
+
ActionController::Routing::Routes.add_route '/tuneup', :controller => 'tuneup', :action => 'show'
|
|
5
|
+
ActionController::Routing::Routes.add_route '/tuneup/:action', :controller => 'tuneup'
|
|
6
|
+
2.times do
|
|
7
|
+
route = ActionController::Routing::Routes.routes.pop
|
|
8
|
+
ActionController::Routing::Routes.routes.unshift(route)
|
|
9
|
+
end
|
|
8
10
|
end
|
|
11
|
+
Dispatcher.to_prepare :tuneup_controller_filters do
|
|
12
|
+
TuneupController.filter_chain.clear
|
|
13
|
+
TuneupController.before_filter :find_config, :except => :index
|
|
14
|
+
end
|
|
15
|
+
[ActionController::Base, ActiveRecord::Base, ActionView::Base].each do |target|
|
|
16
|
+
target.extend Fiveruns::Tuneup::CustomMethods
|
|
17
|
+
end
|
|
18
|
+
ActionController::Base.append_view_path(File.dirname(__FILE__) << "/../views")
|
|
19
|
+
require File.dirname(__FILE__) << "/../install" # Check for assets
|
|
9
20
|
end
|
|
10
|
-
Dispatcher.to_prepare :tuneup_controller_filters do
|
|
11
|
-
TuneupController.filter_chain.clear
|
|
12
|
-
TuneupController.before_filter :find_config, :except => :index
|
|
13
|
-
end
|
|
14
|
-
[ActionController::Base, ActiveRecord::Base, ActionView::Base].each do |target|
|
|
15
|
-
target.extend Fiveruns::Tuneup::CustomMethods
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
ActionController::Base.append_view_path(File.dirname(__FILE__) << "/../views")
|
|
19
|
-
require File.dirname(__FILE__) << "/../install" # Check for assets
|
|
20
|
-
Fiveruns::Tuneup.start
|
data/views/tuneup/_data.html.erb
CHANGED
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
<%= link_to_upload %>
|
|
8
8
|
</div>
|
|
9
9
|
<%= render :partial => 'schema' %>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
10
|
+
<ul id="tuneup-details">
|
|
11
|
+
<%= render :partial => 'step', :collection => tuneup_data.children %>
|
|
12
|
+
<li style="clear:both"></li>
|
|
13
|
+
</ul>
|
|
15
14
|
</div>
|
data/views/tuneup/_link.html.erb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<p class='full'><%= tuneup_collection_link %></p>
|
|
1
|
+
<p class='tuneup-full'><%= tuneup_collection_link %></p>
|
data/views/tuneup/_step.html.erb
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<% content_tag_for :li, step, :class => tuneup_css_class_for_step(step) do %>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
2
|
+
<ul class='tuneup-step-info'>
|
|
3
|
+
<li class="tuneup-title"><p><span class='time'><%= '%.2f' % step.time %> ms</span>
|
|
4
4
|
<%= tuneup_step_link(step) %>
|
|
5
5
|
<%= link_to_edit_step(step) %>
|
|
6
|
-
</p></
|
|
7
|
-
<
|
|
8
|
-
|
|
6
|
+
</p></li>
|
|
7
|
+
<li class="tuneup-detail-bar"><%= tuneup_bar(step, :width => (280 * (step.time / tuneup_data.time))) %></li>
|
|
8
|
+
<li style="clear:both"></li>
|
|
9
|
+
</ul>
|
|
9
10
|
<%= render :partial => 'sql', :object => step.sql, :locals => {:step => step} if step.sql %>
|
|
10
11
|
<% if step.children.any? %>
|
|
11
12
|
<ul id='<%= dom_id step, :children %>'<% if step.depth > 1 %> class='fiveruns_tuneup_children' <% unless open_step?(step) %>style='display:none'<% end %><% end %>>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fiveruns_tuneup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- FiveRuns Development Team
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-
|
|
12
|
+
date: 2008-06-01 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -31,6 +31,7 @@ extra_rdoc_files:
|
|
|
31
31
|
- bin/fiveruns_tuneup
|
|
32
32
|
- lib/bumpspark_helper.rb
|
|
33
33
|
- lib/fiveruns/tuneup/asset_tags.rb
|
|
34
|
+
- lib/fiveruns/tuneup/configuration.rb
|
|
34
35
|
- lib/fiveruns/tuneup/custom_methods.rb
|
|
35
36
|
- lib/fiveruns/tuneup/environment.rb
|
|
36
37
|
- lib/fiveruns/tuneup/instrumentation/action_controller/base.rb
|
|
@@ -75,6 +76,7 @@ files:
|
|
|
75
76
|
- install.rb
|
|
76
77
|
- lib/bumpspark_helper.rb
|
|
77
78
|
- lib/fiveruns/tuneup/asset_tags.rb
|
|
79
|
+
- lib/fiveruns/tuneup/configuration.rb
|
|
78
80
|
- lib/fiveruns/tuneup/custom_methods.rb
|
|
79
81
|
- lib/fiveruns/tuneup/environment.rb
|
|
80
82
|
- lib/fiveruns/tuneup/instrumentation/action_controller/base.rb
|
|
@@ -137,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
137
139
|
requirements: []
|
|
138
140
|
|
|
139
141
|
rubyforge_project: fiveruns
|
|
140
|
-
rubygems_version: 1.
|
|
142
|
+
rubygems_version: 1.1.1
|
|
141
143
|
signing_key:
|
|
142
144
|
specification_version: 2
|
|
143
145
|
summary: Instrumentation for the FiveRuns TuneUp product.
|