browser-prof 1.2.4 → 1.2.5

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/README.rdoc CHANGED
@@ -9,10 +9,19 @@ This gem is a based on the discontinued Browser Profiler (http://rubyforge.org/p
9
9
 
10
10
  == Installation & basic usage
11
11
 
12
- Installing browser-prof as a Ruby gem is currently broken, so you need to use it as a plugin:
12
+ You can run browser-prof either as a plugin or through rubygems.
13
+ For plugin:
13
14
 
14
15
  $ ./script/plugin install http://github.com/barttenbrinke/browser-prof.git
15
16
 
17
+ For rubygems, add the following lines to your Bundle file:
18
+ gem 'browser-prof'
19
+ gem 'ruby-prof'
20
+
21
+ $ bundle install
22
+
23
+ Add a require 'browser-prof' to your environment.rb
24
+
16
25
  == Profiling
17
26
 
18
27
  Add ruby-prof to your Gemfile, run bundle install and start op your server environment.
data/browser-prof.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.name = "browser-prof"
3
3
 
4
4
  # Do not set the version and date field manually, this is done by the release script
5
- s.version = "1.2.4"
5
+ s.version = "1.2.5"
6
6
  s.date = "2011-02-17"
7
7
 
8
8
  s.summary = "Rails tool to to profile single requests using ruby-prof."
@@ -25,6 +25,6 @@ Gem::Specification.new do |s|
25
25
 
26
26
  # The files and test_files directives are set automatically by the release script.
27
27
  # Do not change them by hand, but make sure to add the files to the git repository.
28
- s.files = %w(.gitignore MIT-LICENSE README.rdoc Rakefile browser-prof.gemspec init.rb lib/browser-prof.rb lib/ruby-prof/graph_html_printer_enhanced.rb lib/ruby-prof/template.rhtml pkg/browser_profiler-1.2.0.gem tasks/github-gem.rake test/functional/slow_controller_test.rb test/test_helper.rb)
28
+ s.files = %w(.gitignore MIT-LICENSE README.rdoc Rakefile browser-prof.gemspec init.rb lib/browser-prof.rb lib/ruby-prof/graph_html_printer_enhanced.rb lib/ruby-prof/template.rhtml tasks/github-gem.rake test/functional/slow_controller_test.rb test/test_helper.rb)
29
29
  s.test_files = %w(test/functional/slow_controller_test.rb)
30
30
  end
data/lib/browser-prof.rb CHANGED
@@ -1,8 +1,12 @@
1
1
  module ActionController
2
2
  class Base
3
3
  def process_with_browser_profiling(request, response, method = :perform_action, *arguments)
4
- browser_output = request.parameters.key?('browser_profile!') || request.parameters[:params].key?('browser_profile!') || ENV["BROWSER_PROFILE"]
5
- file_output = request.parameters.key?('file_profile') || request.parameters[:params].key?('file_profile!') || ENV["FILE_PROFILE"]
4
+ browser_output = request.parameters.key?('browser_profile!') ||
5
+ (request.parameters[:params] && request.parameters[:params].key?('browser_profile!')) ||
6
+ ENV["BROWSER_PROFILE"]
7
+ file_output = request.parameters.key?('file_profile!') ||
8
+ (request.parameters[:params] && request.parameters[:params].key?('file_profile!')) ||
9
+ ENV["FILE_PROFILE"]
6
10
 
7
11
  if (browser_output or file_output)
8
12
  # Only require these files in needed
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browser-prof
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 4
10
- version: 1.2.4
9
+ - 5
10
+ version: 1.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bart ten Brinke
@@ -79,7 +79,6 @@ files:
79
79
  - lib/browser-prof.rb
80
80
  - lib/ruby-prof/graph_html_printer_enhanced.rb
81
81
  - lib/ruby-prof/template.rhtml
82
- - pkg/browser_profiler-1.2.0.gem
83
82
  - tasks/github-gem.rake
84
83
  - test/functional/slow_controller_test.rb
85
84
  - test/test_helper.rb
Binary file