doc/RubyProf/ProfileTask.html in ruby-prof-0.15.2 vs doc/RubyProf/ProfileTask.html in ruby-prof-0.15.3

- old
+ new

@@ -4,25 +4,22 @@ <head> <meta charset="UTF-8"> <title>class RubyProf::ProfileTask - ruby-prof</title> -<link href="../fonts.css" rel="stylesheet"> -<link href="../rdoc.css" rel="stylesheet"> - <script type="text/javascript"> var rdoc_rel_prefix = "../"; </script> <script src="../js/jquery.js"></script> -<script src="../js/navigation.js"></script> -<script src="../js/search_index.js"></script> -<script src="../js/search.js"></script> -<script src="../js/searcher.js"></script> <script src="../js/darkfish.js"></script> +<link href="../css/fonts.css" rel="stylesheet"> +<link href="../css/rdoc.css" rel="stylesheet"> + + <body id="top" role="document" class="class"> <nav role="navigation"> <div id="project-navigation"> <div id="home-section" role="region" title="Quick navigation" class="nav-section"> <h2> @@ -119,14 +116,14 @@ min_percent - Methods that take less than the specified percent will not be written out.</pre> <p>Example:</p> -<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'ruby-prof/task'</span> +<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;ruby-prof/task&#39;</span> <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">ProfileTask</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">t</span>.<span class="ruby-identifier">test_files</span> = <span class="ruby-constant">FileList</span>[<span class="ruby-string">'test/test*.rb'</span>] + <span class="ruby-identifier">t</span>.<span class="ruby-identifier">test_files</span> = <span class="ruby-constant">FileList</span>[<span class="ruby-string">&#39;test/test*.rb&#39;</span>] <span class="ruby-identifier">t</span>.<span class="ruby-identifier">output_dir</span> = <span class="ruby-string">&quot;c:/temp&quot;</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">printer</span> = :<span class="ruby-identifier">graph</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">min_percent</span> = <span class="ruby-value">10</span> <span class="ruby-keyword">end</span> </pre> @@ -135,19 +132,20 @@ list of test files will be overridden to include only the filename specified on the command line. This provides an easy way to run just one test.</p> <p>If rake is invoked with a “TESTOPTS=options” command line option, then the -given options are passed to the test process after a ‘–’. This allows -Test::Unit options to be passed to the test suite.</p> +given options are passed to the test process after a &#39;–&#39;. This +allows Test::Unit options to be passed to the test suite.</p> <p>Examples:</p> -<pre>rake profile # run tests normally -rake profile TEST=just_one_file.rb # run just one test file. -rake profile TESTOPTS=&quot;-v&quot; # run in verbose mode -rake profile TESTOPTS=&quot;--runner=fox&quot; # use the fox test runner</pre> +<pre class="ruby"><span class="ruby-identifier">rake</span> <span class="ruby-identifier">profile</span> <span class="ruby-comment"># run tests normally</span> +<span class="ruby-identifier">rake</span> <span class="ruby-identifier">profile</span> <span class="ruby-constant">TEST</span>=<span class="ruby-identifier">just_one_file</span>.<span class="ruby-identifier">rb</span> <span class="ruby-comment"># run just one test file.</span> +<span class="ruby-identifier">rake</span> <span class="ruby-identifier">profile</span> <span class="ruby-constant">TESTOPTS</span>=<span class="ruby-string">&quot;-v&quot;</span> <span class="ruby-comment"># run in verbose mode</span> +<span class="ruby-identifier">rake</span> <span class="ruby-identifier">profile</span> <span class="ruby-constant">TESTOPTS</span>=<span class="ruby-string">&quot;--runner=fox&quot;</span> <span class="ruby-comment"># use the fox test runner</span> +</pre> </section> @@ -281,11 +279,11 @@ <div class="method-source-code" id="clean_output_directory-source"> <pre><span class="ruby-comment"># File lib/ruby-prof/task.rb, line 135</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">clean_output_directory</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">output_directory</span>) - <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-identifier">output_directory</span> <span class="ruby-operator">+</span> <span class="ruby-string">'/*'</span>) + <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-identifier">output_directory</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;/*&#39;</span>) <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span>(<span class="ruby-identifier">files</span>) <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span></pre> </div> @@ -433,11 +431,11 @@ <div class="method-source-code" id="run_script-source"> <pre><span class="ruby-comment"># File lib/ruby-prof/task.rb, line 90</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">run_script</span>(<span class="ruby-identifier">script_path</span>) - <span class="ruby-identifier">run_code</span> = <span class="ruby-string">''</span> + <span class="ruby-identifier">run_code</span> = <span class="ruby-string">&#39;&#39;</span> <span class="ruby-constant">RakeFileUtils</span>.<span class="ruby-identifier">verbose</span>(<span class="ruby-ivar">@verbose</span>) <span class="ruby-keyword">do</span> <span class="ruby-identifier">file_name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">script_path</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">script_path</span>)) <span class="ruby-keyword">case</span> <span class="ruby-ivar">@printer</span> <span class="ruby-keyword">when</span> <span class="ruby-value">:flat</span>, <span class="ruby-value">:graph</span>, <span class="ruby-value">:call_tree</span> <span class="ruby-identifier">file_name</span> <span class="ruby-operator">+=</span> <span class="ruby-string">&quot;.txt&quot;</span> @@ -454,11 +452,11 @@ <span class="ruby-string">&quot; &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">script_path</span> <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;ruby &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">command_line</span> <span class="ruby-comment"># We have to catch the exeption to continue on. However,</span> <span class="ruby-comment"># the error message will have been output to STDERR</span> - <span class="ruby-comment"># already by the time we get here so we don't have to</span> + <span class="ruby-comment"># already by the time we get here so we don&#39;t have to</span> <span class="ruby-comment"># do that again</span> <span class="ruby-keyword">begin</span> <span class="ruby-identifier">ruby</span> <span class="ruby-identifier">command_line</span> <span class="ruby-keyword">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span> <span class="ruby-constant">STDOUT</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">e</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span> @@ -484,9 +482,9 @@ </main> <footer id="validator-badges" role="contentinfo"> <p><a href="http://validator.w3.org/check/referer">Validate</a> - <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0. - <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>. + <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0. + <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>. </footer>