doc/RubyProf/ProfileTask.html in ruby-prof-0.14.1 vs doc/RubyProf/ProfileTask.html in ruby-prof-0.14.2

- old
+ new

@@ -119,14 +119,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">&#39;ruby-prof/task&#39;</span> +<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'ruby-prof/task'</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">&#39;test/test*.rb&#39;</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">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,12 +135,12 @@ 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 &#39;–&#39;. This -allows Test::Unit options to be passed to the test suite.</p> +given options are passed to the test process after a ‘–’. 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. @@ -281,11 +281,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">&#39;/*&#39;</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-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 +433,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">&#39;&#39;</span> + <span class="ruby-identifier">run_code</span> = <span class="ruby-string">''</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,10 +454,10 @@ <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&#39;t have to</span> + <span class="ruby-comment"># already by the time we get here so we don'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>