fiveruns_tuneup 0.8.18 → 0.8.20
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/README.rdoc +7 -11
- data/lib/fiveruns/tuneup/asset_tags.rb +16 -2
- data/lib/fiveruns/tuneup/version.rb +1 -1
- data/lib/tuneup_controller.rb +0 -6
- data/views/tuneup/_data.html.erb +2 -2
- metadata +3 -4
- data/bin/fiveruns_tuneup +0 -26
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
@@ -9,25 +9,21 @@
|
|
9
9
|
|
10
10
|
Display call stack information on Rails requests.
|
11
11
|
|
12
|
-
*THIS IS A BETA RELEASE*; the normal disclaimers apply.
|
13
|
-
|
14
12
|
== Installation
|
15
13
|
|
14
|
+
For Rails 2.1+, you can use it as a gem dependency (recommended).
|
15
|
+
|
16
16
|
Install the gem:
|
17
17
|
|
18
18
|
sudo gem install fiveruns_tuneup
|
19
|
-
|
20
|
-
|
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+:
|
19
|
+
|
20
|
+
In your +environment.rb+:
|
26
21
|
|
27
22
|
config.gem 'fiveruns_tuneup'
|
28
23
|
|
29
|
-
*Note*: There is an issue in Rails 2.1 that prevents the plugin running as an unpacked
|
30
|
-
|
24
|
+
*Note*: There is an issue in Rails 2.1 that prevents the plugin running as an unpacked gem (via +rake gems:unpack+).
|
25
|
+
|
26
|
+
TuneUp can also be used from +vendor/plugins+.
|
31
27
|
|
32
28
|
== Configuration
|
33
29
|
|
@@ -14,8 +14,7 @@ module Fiveruns
|
|
14
14
|
<script type="text/javascript" src="/javascripts/tuneup/init.js"></script>
|
15
15
|
<!-- END FIVERUNS TUNEUP ASSETS -->
|
16
16
|
)
|
17
|
-
|
18
|
-
response.headers["Content-Length"] += insertion.size
|
17
|
+
add_content_length(response, insertion.size)
|
19
18
|
response.body.replace(before << insertion << '</head>' << after)
|
20
19
|
log :error, "Inserted asset tags"
|
21
20
|
else
|
@@ -25,6 +24,7 @@ module Fiveruns
|
|
25
24
|
|
26
25
|
def show_for?(response)
|
27
26
|
return false unless response.body
|
27
|
+
return true if response.headers['ETag'] && response.headers['Content-Type'].to_s.include?('html')
|
28
28
|
return false unless response.headers['Status'] && response.headers['Status'].include?('200')
|
29
29
|
true
|
30
30
|
end
|
@@ -33,6 +33,20 @@ module Fiveruns
|
|
33
33
|
"<script type='text/javascript' src='/javascripts/tuneup/prototype.js'></script>"
|
34
34
|
end
|
35
35
|
|
36
|
+
# Modify the Content-Length header, regardless if String/Fixnum, and
|
37
|
+
# keep it the same type
|
38
|
+
def add_content_length(response, delta)
|
39
|
+
length = response.headers["Content-Length"]
|
40
|
+
response.headers["Content-Length"] = case length
|
41
|
+
when Fixnum
|
42
|
+
length + delta
|
43
|
+
when String
|
44
|
+
(length.to_i + delta).to_s
|
45
|
+
else
|
46
|
+
length # Shouldn't happen
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
36
50
|
end
|
37
51
|
|
38
52
|
end
|
data/lib/tuneup_controller.rb
CHANGED
@@ -95,12 +95,6 @@ class TuneupController < ActionController::Base
|
|
95
95
|
private
|
96
96
|
#######
|
97
97
|
|
98
|
-
def log_processing
|
99
|
-
Fiveruns::Tuneup.log :info, "\n\nProcessing #{controller_class_name}\##{action_name} (for #{request_origin}) [#{request.method.to_s.upcase}]"
|
100
|
-
Fiveruns::Tuneup.log :info, " Session ID: #{@_session.session_id}" if @_session and @_session.respond_to?(:session_id)
|
101
|
-
Fiveruns::Tuneup.log :info, " Parameters: #{respond_to?(:filter_parameters) ? filter_parameters(params).inspect : params.inspect}"
|
102
|
-
end
|
103
|
-
|
104
98
|
def collect(state)
|
105
99
|
Fiveruns::Tuneup.collecting = state
|
106
100
|
render :update do |page|
|
data/views/tuneup/_data.html.erb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<ul id="tuneup-details">
|
11
11
|
<%= render :partial => 'step.html.erb', :collection => tuneup_data.children %>
|
12
12
|
<li style="clear:both"></li>
|
13
|
-
<li style="padding-top:10px;font-style:italic;float:right;font-size:0.8em;color:#ccc;">For
|
14
|
-
<a href="http://
|
13
|
+
<li style="padding-top:10px;font-style:italic;float:right;font-size:0.8em;color:#ccc;">For production technical and business metrics, try
|
14
|
+
<a href="http://dash.fiveruns.com/?utm_source=TuneUpBar&utm_medium=DashURL&utm_campaign=Dash" target="_blank" style="font-style:italic">FiveRuns Dash</a></li>
|
15
15
|
</ul>
|
16
16
|
</div>
|
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.20
|
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:
|
12
|
+
date: 2009-03-23 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -60,7 +60,6 @@ files:
|
|
60
60
|
- assets/javascripts/tuneup.js
|
61
61
|
- assets/stylesheets
|
62
62
|
- assets/stylesheets/tuneup.css
|
63
|
-
- bin/fiveruns_tuneup
|
64
63
|
- lib/bumpspark_helper.rb
|
65
64
|
- lib/fiveruns
|
66
65
|
- lib/fiveruns/tuneup
|
@@ -128,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
127
|
requirements: []
|
129
128
|
|
130
129
|
rubyforge_project: fiveruns_tuneup
|
131
|
-
rubygems_version: 1.3.
|
130
|
+
rubygems_version: 1.3.1
|
132
131
|
signing_key:
|
133
132
|
specification_version: 2
|
134
133
|
summary: Rails plugin that provides the FiveRuns TuneUp Panel (http://tuneup.fiveruns.com)
|
data/bin/fiveruns_tuneup
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'fileutils'
|
4
|
-
require File.dirname(__FILE__) << "/../lib/fiveruns/tuneup/version"
|
5
|
-
|
6
|
-
# For older Rails versions
|
7
|
-
# USAGE: fiveruns_manage [RAILS_ROOT]
|
8
|
-
plugin_dir = File.join(ARGV[0] || Dir.pwd, 'vendor/plugins')
|
9
|
-
unless File.directory?(plugin_dir)
|
10
|
-
abort "FiveRuns TuneUp: #{plugin_dir} does not exist; cannot install plugin"
|
11
|
-
end
|
12
|
-
|
13
|
-
FileUtils.rm_rf File.join(plugin_dir, 'fiveruns_tuneup') rescue nil
|
14
|
-
|
15
|
-
File.readlines(File.dirname(__FILE__) << "/../Manifest").each do |line|
|
16
|
-
stub = line.strip
|
17
|
-
origin = File.dirname(__FILE__) << "/../#{stub}"
|
18
|
-
next if origin =~ /\/fiveruns_tuneup$/
|
19
|
-
if File.file?(origin)
|
20
|
-
destination = File.join(plugin_dir, 'fiveruns_tuneup', stub)
|
21
|
-
FileUtils.mkdir_p File.dirname(destination)
|
22
|
-
FileUtils.cp origin, destination
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
STDERR.puts "Installed FiveRuns TuneUp (#{Fiveruns::Tuneup::Version::STRING}) in vendor/plugins/fiveruns_tuneup"
|