fiveruns_tuneup 0.8.12 → 0.8.13

Sign up to get free protection for your applications and to get access to all the features.
data/CONTRIBUTORS CHANGED
@@ -1 +1,3 @@
1
+ * 2008-07-21: Bryan Liles; merged fallback log dir code from git://github.com/bryanl/fiveruns_tuneup.git (master:e5838f47f)
2
+
1
3
  * 2008-06-14: Howard Rauscher; merged javascript sandboxing code from git://github.com/howardr/fiveruns_tuneup.git (master:8cc558dbe)
data/Manifest CHANGED
@@ -33,6 +33,7 @@ lib/fiveruns/tuneup/instrumentation/active_record/base.rb
33
33
  lib/fiveruns/tuneup/instrumentation/cgi/session.rb
34
34
  lib/fiveruns/tuneup/instrumentation/utilities.rb
35
35
  lib/fiveruns/tuneup/multipart.rb
36
+ lib/fiveruns/tuneup/routing.rb
36
37
  lib/fiveruns/tuneup/runs.rb
37
38
  lib/fiveruns/tuneup/schema.rb
38
39
  lib/fiveruns/tuneup/step.rb
data/README.rdoc CHANGED
@@ -39,9 +39,6 @@ environment (for testing), you can create a +RAILS_ROOT/config/tuneup.rb+ file:
39
39
  config.environments << :production
40
40
  end
41
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.
44
-
45
42
  == Known Issues
46
43
 
47
44
  See the notes at http://github.com/fiveruns/fiveruns_tuneup/wikis/known-issues
@@ -1,49 +1,169 @@
1
1
 
2
- # Gem::Specification for Fiveruns_tuneup-0.8.12
2
+ # Gem::Specification for Fiveruns_tuneup-0.8.13
3
3
  # Originally generated by Echoe
4
4
 
5
- Gem::Specification.new do |s|
6
- s.name = %q{fiveruns_tuneup}
7
- s.version = "0.8.12"
5
+ --- !ruby/object:Gem::Specification
6
+ name: fiveruns_tuneup
7
+ version: !ruby/object:Gem::Version
8
+ version: 0.8.13
9
+ platform: ruby
10
+ authors:
11
+ - FiveRuns Development Team
12
+ autorequire:
13
+ bindir: bin
8
14
 
9
- s.specification_version = 2 if s.respond_to? :specification_version=
15
+ date: 2008-08-13 00:00:00 -05:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: activesupport
20
+ type: :runtime
21
+ version_requirement:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: "0"
27
+ version:
28
+ - !ruby/object:Gem::Dependency
29
+ name: echoe
30
+ type: :development
31
+ version_requirement:
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: "0"
37
+ version:
38
+ description: Instrumentation for the FiveRuns TuneUp product.
39
+ email: dev@fiveruns.com
40
+ executables:
41
+ - fiveruns_tuneup
42
+ extensions: []
10
43
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.authors = ["FiveRuns Development Team"]
13
- s.date = %q{2008-07-15}
14
- s.default_executable = %q{fiveruns_tuneup}
15
- s.description = %q{Instrumentation for the FiveRuns TuneUp product.}
16
- s.email = %q{dev@fiveruns.com}
17
- s.executables = ["fiveruns_tuneup"]
18
- s.extra_rdoc_files = ["bin/fiveruns_tuneup", "CHANGELOG", "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/action_view/partial_template.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/init.js", "assets/javascripts/prototype.js", "assets/javascripts/tuneup.js", "assets/stylesheets/tuneup.css", "bin/fiveruns_tuneup", "CHANGELOG", "CONTRIBUTORS", "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/action_view/partial_template.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/_register.html.erb", "views/tuneup/panel/_show.html.erb", "views/tuneup/sandbox.html.erb", "fiveruns_tuneup.gemspec"]
20
- s.has_rdoc = true
21
- s.homepage = %q{http://github.com/fiveruns/fiveruns_tuneup}
22
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fiveruns_tuneup", "--main", "README.rdoc"]
23
- s.require_paths = ["lib"]
24
- s.rubyforge_project = %q{fiveruns}
25
- s.rubygems_version = %q{1.1.1}
26
- s.summary = %q{Instrumentation for the FiveRuns TuneUp product.}
27
- s.test_files = ["test/test_helper.rb", "test/tuneup_test.rb"]
44
+ extra_rdoc_files:
45
+ - bin/fiveruns_tuneup
46
+ - CHANGELOG
47
+ - lib/bumpspark_helper.rb
48
+ - lib/fiveruns/tuneup/asset_tags.rb
49
+ - lib/fiveruns/tuneup/configuration.rb
50
+ - lib/fiveruns/tuneup/custom_methods.rb
51
+ - lib/fiveruns/tuneup/environment.rb
52
+ - lib/fiveruns/tuneup/instrumentation/action_controller/base.rb
53
+ - lib/fiveruns/tuneup/instrumentation/action_view/base.rb
54
+ - lib/fiveruns/tuneup/instrumentation/action_view/partial_template.rb
55
+ - lib/fiveruns/tuneup/instrumentation/active_record/base.rb
56
+ - lib/fiveruns/tuneup/instrumentation/cgi/session.rb
57
+ - lib/fiveruns/tuneup/instrumentation/utilities.rb
58
+ - lib/fiveruns/tuneup/multipart.rb
59
+ - lib/fiveruns/tuneup/routing.rb
60
+ - lib/fiveruns/tuneup/runs.rb
61
+ - lib/fiveruns/tuneup/schema.rb
62
+ - lib/fiveruns/tuneup/step.rb
63
+ - lib/fiveruns/tuneup/urls.rb
64
+ - lib/fiveruns/tuneup/version.rb
65
+ - lib/fiveruns/tuneup.rb
66
+ - lib/fiveruns_tuneup.rb
67
+ - lib/tuneup_config.rb
68
+ - lib/tuneup_controller.rb
69
+ - lib/tuneup_helper.rb
70
+ - README.rdoc
71
+ - tasks/assets.rake
72
+ files:
73
+ - assets/images/arrows.gif
74
+ - assets/images/edit.png
75
+ - assets/images/fade.png
76
+ - assets/images/fade_down.png
77
+ - assets/images/head.gif
78
+ - assets/images/logo.gif
79
+ - assets/images/logo_clear.png
80
+ - assets/images/magnify.png
81
+ - assets/images/pip.gif
82
+ - assets/images/pointer.gif
83
+ - assets/images/schema.png
84
+ - assets/images/signin.gif
85
+ - assets/images/spinner.gif
86
+ - assets/images/warning.gif
87
+ - assets/javascripts/init.js
88
+ - assets/javascripts/prototype.js
89
+ - assets/javascripts/tuneup.js
90
+ - assets/stylesheets/tuneup.css
91
+ - bin/fiveruns_tuneup
92
+ - CHANGELOG
93
+ - CONTRIBUTORS
94
+ - init.rb
95
+ - install.rb
96
+ - lib/bumpspark_helper.rb
97
+ - lib/fiveruns/tuneup/asset_tags.rb
98
+ - lib/fiveruns/tuneup/configuration.rb
99
+ - lib/fiveruns/tuneup/custom_methods.rb
100
+ - lib/fiveruns/tuneup/environment.rb
101
+ - lib/fiveruns/tuneup/instrumentation/action_controller/base.rb
102
+ - lib/fiveruns/tuneup/instrumentation/action_view/base.rb
103
+ - lib/fiveruns/tuneup/instrumentation/action_view/partial_template.rb
104
+ - lib/fiveruns/tuneup/instrumentation/active_record/base.rb
105
+ - lib/fiveruns/tuneup/instrumentation/cgi/session.rb
106
+ - lib/fiveruns/tuneup/instrumentation/utilities.rb
107
+ - lib/fiveruns/tuneup/multipart.rb
108
+ - lib/fiveruns/tuneup/routing.rb
109
+ - lib/fiveruns/tuneup/runs.rb
110
+ - lib/fiveruns/tuneup/schema.rb
111
+ - lib/fiveruns/tuneup/step.rb
112
+ - lib/fiveruns/tuneup/urls.rb
113
+ - lib/fiveruns/tuneup/version.rb
114
+ - lib/fiveruns/tuneup.rb
115
+ - lib/fiveruns_tuneup.rb
116
+ - lib/tuneup_config.rb
117
+ - lib/tuneup_controller.rb
118
+ - lib/tuneup_helper.rb
119
+ - Manifest
120
+ - rails/init.rb
121
+ - Rakefile
122
+ - README.rdoc
123
+ - tasks/assets.rake
124
+ - test/test_helper.rb
125
+ - test/tuneup_test.rb
126
+ - uninstall.rb
127
+ - views/tuneup/_data.html.erb
128
+ - views/tuneup/_flash.html.erb
129
+ - views/tuneup/_link.html.erb
130
+ - views/tuneup/_schema.html.erb
131
+ - views/tuneup/_sql.html.erb
132
+ - views/tuneup/_step.html.erb
133
+ - views/tuneup/panel/_register.html.erb
134
+ - views/tuneup/panel/_show.html.erb
135
+ - views/tuneup/sandbox.html.erb
136
+ - fiveruns_tuneup.gemspec
137
+ has_rdoc: true
138
+ homepage: http://github.com/fiveruns/fiveruns_tuneup
139
+ post_install_message:
140
+ rdoc_options:
141
+ - --line-numbers
142
+ - --inline-source
143
+ - --title
144
+ - Fiveruns_tuneup
145
+ - --main
146
+ - README.rdoc
147
+ require_paths:
148
+ - lib
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: "0"
154
+ version:
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "="
158
+ - !ruby/object:Gem::Version
159
+ version: "1.2"
160
+ version:
161
+ requirements: []
28
162
 
29
- s.add_dependency(%q<activesupport>, [">= 0"])
30
- end
31
-
32
-
33
- # # Original Rakefile source (requires the Echoe gem):
34
- #
35
- # require 'rubygems'
36
- # require 'echoe'
37
- #
38
- # require File.dirname(__FILE__) << "/lib/fiveruns/tuneup/version"
39
- #
40
- # Echoe.new 'fiveruns_tuneup' do |p|
41
- # p.version = Fiveruns::Tuneup::Version::STRING
42
- # p.author = "FiveRuns Development Team"
43
- # p.email = 'dev@fiveruns.com'
44
- # p.project = 'fiveruns'
45
- # p.summary = "Instrumentation for the FiveRuns TuneUp product."
46
- # p.url = "http://github.com/fiveruns/fiveruns_tuneup"
47
- # p.dependencies = %w(activesupport)
48
- # p.include_rakefile = true
49
- # end
163
+ rubyforge_project: fiveruns
164
+ rubygems_version: 1.2.0
165
+ specification_version: 2
166
+ summary: Instrumentation for the FiveRuns TuneUp product.
167
+ test_files:
168
+ - test/test_helper.rb
169
+ - test/tuneup_test.rb
@@ -7,6 +7,8 @@ module Fiveruns::Tuneup
7
7
  @log_directory ||= begin
8
8
  rails_log = RAILS_DEFAULT_LOGGER.instance_eval { @log.path rescue @logdev.filename }
9
9
  File.dirname(rails_log)
10
+ rescue
11
+ Dir::tmpdir
10
12
  end
11
13
  end
12
14
 
@@ -20,4 +22,4 @@ module Fiveruns::Tuneup
20
22
 
21
23
  end
22
24
 
23
- end
25
+ end
@@ -42,10 +42,13 @@ module Fiveruns
42
42
  step.table_name = table_name
43
43
  stack.last << step
44
44
  stack << step
45
- handle_exclusions_in step do
46
- step.time = stopwatch { result = yield(sql) }
45
+ begin
46
+ handle_exclusions_in step do
47
+ step.time = stopwatch { result = yield(sql) }
48
+ end
49
+ ensure
50
+ stack.pop
47
51
  end
48
- stack.pop
49
52
  end
50
53
  result
51
54
  else
@@ -0,0 +1,25 @@
1
+ module Fiveruns::Tuneup
2
+
3
+ module Routing
4
+
5
+ def self.install
6
+ ActionController::Routing::RouteSet.send(:include, self)
7
+ end
8
+
9
+ def self.included(base)
10
+ base.alias_method_chain :draw, :fiveruns_tuneup
11
+ end
12
+ def draw_with_fiveruns_tuneup(*args, &block)
13
+ draw_without_fiveruns_tuneup(*args) do |map|
14
+ map.connect '/tuneup', :controller => 'tuneup', :action => 'show'
15
+ map.connect '/tuneup/:action', :controller => 'tuneup'
16
+ yield map
17
+ end
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+
24
+
25
+
@@ -75,7 +75,7 @@ module Fiveruns
75
75
 
76
76
  MAJOR = 0
77
77
  MINOR = 8
78
- TINY = 12
78
+ TINY = 13
79
79
 
80
80
  # The current version as a Version instance
81
81
  CURRENT = new(MAJOR, MINOR, TINY)
data/lib/tuneup_helper.rb CHANGED
@@ -60,9 +60,9 @@ 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, "TuneUpSandbox.$('#{dom_id(step, :children)}').toggle();TuneUpSandbox.$('#{dom_id(step)}').toggleClassName('tuneup-opened');", :class => "tuneup-step-link")
63
+ link_to_function(name, "TuneUpSandbox.$('#{dom_id(step, :children)}').toggle();TuneUpSandbox.$('#{dom_id(step)}').toggleClassName('tuneup-opened');", :class => "tuneup-step-link", :title => step.name)
64
64
  else
65
- name
65
+ content_tag(:span, name, :title => step.name)
66
66
  end
67
67
  link << additional_step_links(step)
68
68
  end
data/rails/init.rb CHANGED
@@ -1,13 +1,8 @@
1
1
  Fiveruns::Tuneup.start do
2
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
10
- end
3
+
4
+ Fiveruns::Tuneup::Routing.install
5
+
11
6
  Dispatcher.to_prepare :tuneup_controller_filters do
12
7
  TuneupController.filter_chain.clear
13
8
  TuneupController.before_filter :find_config, :except => :index
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.12
4
+ version: 0.8.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - FiveRuns Development Team
@@ -9,11 +9,22 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-15 00:00:00 -05:00
12
+ date: 2008-08-13 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: echoe
27
+ type: :development
17
28
  version_requirement:
18
29
  version_requirements: !ruby/object:Gem::Requirement
19
30
  requirements:
@@ -42,6 +53,7 @@ extra_rdoc_files:
42
53
  - lib/fiveruns/tuneup/instrumentation/cgi/session.rb
43
54
  - lib/fiveruns/tuneup/instrumentation/utilities.rb
44
55
  - lib/fiveruns/tuneup/multipart.rb
56
+ - lib/fiveruns/tuneup/routing.rb
45
57
  - lib/fiveruns/tuneup/runs.rb
46
58
  - lib/fiveruns/tuneup/schema.rb
47
59
  - lib/fiveruns/tuneup/step.rb
@@ -90,6 +102,7 @@ files:
90
102
  - lib/fiveruns/tuneup/instrumentation/cgi/session.rb
91
103
  - lib/fiveruns/tuneup/instrumentation/utilities.rb
92
104
  - lib/fiveruns/tuneup/multipart.rb
105
+ - lib/fiveruns/tuneup/routing.rb
93
106
  - lib/fiveruns/tuneup/runs.rb
94
107
  - lib/fiveruns/tuneup/schema.rb
95
108
  - lib/fiveruns/tuneup/step.rb
@@ -138,14 +151,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
151
  version:
139
152
  required_rubygems_version: !ruby/object:Gem::Requirement
140
153
  requirements:
141
- - - ">="
154
+ - - "="
142
155
  - !ruby/object:Gem::Version
143
- version: "0"
156
+ version: "1.2"
144
157
  version:
145
158
  requirements: []
146
159
 
147
160
  rubyforge_project: fiveruns
148
- rubygems_version: 1.1.1
161
+ rubygems_version: 1.2.0
149
162
  signing_key:
150
163
  specification_version: 2
151
164
  summary: Instrumentation for the FiveRuns TuneUp product.