diff options
author | Xavier Noria <fxn@hashref.com> | 2011-06-06 22:23:30 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-06-06 22:23:30 +0200 |
commit | 5e21247131fa7d5484190c9a71b74f9d3f090684 (patch) | |
tree | 5eee39fcabb952cafd513caf7e67943bc6b26e98 /railties/lib/rails/commands/profiler.rb | |
parent | 38ad6bb2f566202dd522a0cf31a55a746f122d53 (diff) | |
parent | 689e12b828665b7b2cfcda85d46249c5cf2aa713 (diff) | |
download | rails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.gz rails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.bz2 rails-5e21247131fa7d5484190c9a71b74f9d3f090684.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
activerecord/RUNNING_UNIT_TESTS
Diffstat (limited to 'railties/lib/rails/commands/profiler.rb')
-rw-r--r-- | railties/lib/rails/commands/profiler.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/commands/profiler.rb b/railties/lib/rails/commands/profiler.rb index 94cf32d32d..ea6347c918 100644 --- a/railties/lib/rails/commands/profiler.rb +++ b/railties/lib/rails/commands/profiler.rb @@ -6,7 +6,7 @@ require 'active_support/testing/performance' def options options = {} defaults = ActiveSupport::Testing::Performance::DEFAULTS - + OptionParser.new do |opt| opt.banner = "Usage: rails benchmarker 'Ruby.code' 'Ruby.more_code' ... [OPTS]" opt.on('-r', '--runs N', Numeric, 'Number of runs.', "Default: #{defaults[:runs]}") { |r| options[:runs] = r } @@ -15,13 +15,13 @@ def options opt.on('-f', '--formats x,y,z', Array, 'Formats to output to.', "Default: #{defaults[:formats].join(",")}") { |m| options[:formats] = m.map(&:to_sym) } opt.parse!(ARGV) end - + options end class ProfilerTest < ActionDispatch::PerformanceTest self.profile_options = options - + ARGV.each do |expression| eval <<-RUBY def test_#{expression.parameterize('_')} |