diff options
Diffstat (limited to 'doc/app/classes/Bugzilla/Bug.html')
-rw-r--r-- | doc/app/classes/Bugzilla/Bug.html | 393 |
1 files changed, 0 insertions, 393 deletions
diff --git a/doc/app/classes/Bugzilla/Bug.html b/doc/app/classes/Bugzilla/Bug.html deleted file mode 100644 index 5ac9c49..0000000 --- a/doc/app/classes/Bugzilla/Bug.html +++ /dev/null @@ -1,393 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Class: Bugzilla::Bug</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <meta http-equiv="Content-Script-Type" content="text/javascript" /> - <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> - <script type="text/javascript"> - // <![CDATA[ - - function popupCode( url ) { - window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") - } - - function toggleCode( id ) { - if ( document.getElementById ) - elem = document.getElementById( id ); - else if ( document.all ) - elem = eval( "document.all." + id ); - else - return false; - - elemStyle = elem.style; - - if ( elemStyle.display != "block" ) { - elemStyle.display = "block" - } else { - elemStyle.display = "none" - } - - return true; - } - - // Make codeblocks hidden by default - document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) - - // ]]> - </script> - -</head> -<body> - - - - <div id="classHeader"> - <table class="header-table"> - <tr class="top-aligned-row"> - <td><strong>Class</strong></td> - <td class="class-name-in-header">Bugzilla::Bug</td> - </tr> - <tr class="top-aligned-row"> - <td><strong>In:</strong></td> - <td> - <a href="../../files/lib/bugzilla_rb.html"> - lib/bugzilla.rb - </a> - <br /> - </td> - </tr> - - <tr class="top-aligned-row"> - <td><strong>Parent:</strong></td> - <td> - Object - </td> - </tr> - </table> - </div> - <!-- banner header --> - - <div id="bodyContent"> - - - - <div id="contextContent"> - - <div id="description"> - <p> -Encapsulates a <a href="../Bugzilla.html">Bugzilla</a> <a -href="Bug.html">Bug</a> -</p> - - </div> - - - </div> - - <div id="method-list"> - <h3 class="section-bar">Methods</h3> - - <div class="name-list"> - <a href="#M000045">history</a> - <a href="#M000043">load_from_id</a> - <a href="#M000046">new</a> - <a href="#M000047">str2bugIDs</a> - <a href="#M000044">url</a> - </div> - </div> - - </div> - - - <!-- if includes --> - - <div id="section"> - - - - - - <div id="attribute-list"> - <h3 class="section-bar">Attributes</h3> - - <div class="name-list"> - <table> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">alias</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">assigned_to</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">bug_id</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">cc</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">comments</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">component</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">created_at</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">product</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">reporter</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">resolution</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">status</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">status_whiteboard</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">summary</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - <tr class="top-aligned-row context-row"> - <td class="context-item-name">url</td> - <td class="context-item-value"> [R] </td> - <td class="context-item-desc"></td> - </tr> - </table> - </div> - </div> - - - - <!-- if method_list --> - <div id="methods"> - <h3 class="section-bar">Public Class methods</h3> - - <div id="method-M000043" class="method-detail"> - <a name="M000043"></a> - - <div class="method-heading"> - <a href="#M000043" class="method-signature"> - <span class="method-name">load_from_id</span><span class="method-args">(bugid)</span> - </a> - </div> - - <div class="method-description"> - <p> -Creates a <a href="Bug.html#M000046">new</a> <tt><a -href="Bug.html">Bug</a></tt> object from the Gentoo bug referenced as -#<tt>bugid</tt> -</p> - <p><a class="source-toggle" href="#" - onclick="toggleCode('M000043-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000043-source"> -<pre> - <span class="ruby-comment cmt"># File lib/bugzilla.rb, line 23</span> -23: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_from_id</span>(<span class="ruby-identifier">bugid</span>) -24: <span class="ruby-keyword kw">begin</span> -25: <span class="ruby-identifier">id</span> = <span class="ruby-constant">Integer</span>(<span class="ruby-identifier">bugid</span>) -26: -27: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> -28: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span> -29: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Invalid Bug ID"</span> -30: <span class="ruby-keyword kw">end</span> -31: -32: <span class="ruby-keyword kw">begin</span> -33: <span class="ruby-identifier">xml</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-constant">Glsamaker</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"http://bugs.gentoo.org/show_bug.cgi?ctype=xml&id=#{id}"</span>)) -34: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span> -35: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Couldn't load bug: #{e.message}"</span> -36: <span class="ruby-keyword kw">end</span> -37: -38: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">xml</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"bug"</span>).<span class="ruby-identifier">first</span>) -39: <span class="ruby-keyword kw">end</span> -</pre> - </div> - </div> - </div> - - <div id="method-M000046" class="method-detail"> - <a name="M000046"></a> - - <div class="method-heading"> - <a href="#M000046" class="method-signature"> - <span class="method-name">new</span><span class="method-args">(bug)</span> - </a> - </div> - - <div class="method-description"> - <p><a class="source-toggle" href="#" - onclick="toggleCode('M000046-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000046-source"> -<pre> - <span class="ruby-comment cmt"># File lib/bugzilla.rb, line 54</span> -54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">bug</span>) -55: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">bug</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Element</span> -56: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Nokogiri failure"</span> -57: <span class="ruby-keyword kw">end</span> -58: -59: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bug</span>[<span class="ruby-value str">"error"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"NotFound"</span> -60: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Bug not found"</span> -61: <span class="ruby-keyword kw">end</span> -62: -63: <span class="ruby-ivar">@bug_id</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'bug_id'</span>) -64: <span class="ruby-ivar">@summary</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'short_desc'</span>) -65: <span class="ruby-ivar">@created_at</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'creation_ts'</span>)) -66: <span class="ruby-ivar">@reporter</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'reporter'</span>) -67: <span class="ruby-ivar">@alias</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'alias'</span>) -68: <span class="ruby-ivar">@assigned_to</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'assigned_to'</span>) -69: <span class="ruby-ivar">@cc</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'cc'</span>) -70: <span class="ruby-ivar">@status_whiteboard</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'status_whiteboard'</span>) -71: <span class="ruby-ivar">@product</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'product'</span>) -72: <span class="ruby-ivar">@component</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'component'</span>) -73: <span class="ruby-ivar">@status</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'bug_status'</span>) -74: <span class="ruby-ivar">@resolution</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'resolution'</span>) -75: <span class="ruby-ivar">@url</span> = <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">bug</span>, <span class="ruby-value str">'bug_file_loc'</span>) -76: -77: <span class="ruby-ivar">@comments</span> = [] -78: <span class="ruby-identifier">bug</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">'long_desc'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">comment</span><span class="ruby-operator">|</span> -79: <span class="ruby-ivar">@comments</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Comment</span>.<span class="ruby-identifier">new</span>( -80: <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">comment</span>, <span class="ruby-value str">'who'</span>), -81: <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">comment</span>, <span class="ruby-value str">'thetext'</span>), -82: <span class="ruby-identifier">xml_content</span>(<span class="ruby-identifier">comment</span>, <span class="ruby-value str">'bug_when'</span>) -83: ) -84: <span class="ruby-keyword kw">end</span> -85: <span class="ruby-keyword kw">end</span> -</pre> - </div> - </div> - </div> - - <div id="method-M000047" class="method-detail"> - <a name="M000047"></a> - - <div class="method-heading"> - <a href="#M000047" class="method-signature"> - <span class="method-name">str2bugIDs</span><span class="method-args">(str)</span> - </a> - </div> - - <div class="method-description"> - <p> -Splits a <a href="../String.html">String</a> <tt>str</tt> into an array of -valid bug IDs -</p> - <p><a class="source-toggle" href="#" - onclick="toggleCode('M000047-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000047-source"> -<pre> - <span class="ruby-comment cmt"># File lib/bugzilla.rb, line 88</span> -88: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">str2bugIDs</span>(<span class="ruby-identifier">str</span>) -89: <span class="ruby-identifier">bug_ids</span> = <span class="ruby-identifier">str</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,\s*/</span>) -90: -91: <span class="ruby-identifier">bug_ids</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">bug</span><span class="ruby-operator">|</span> -92: <span class="ruby-identifier">bug</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\D/</span>, <span class="ruby-value str">''</span>) -93: <span class="ruby-keyword kw">end</span> -94: <span class="ruby-keyword kw">end</span> -</pre> - </div> - </div> - </div> - - <h3 class="section-bar">Public Instance methods</h3> - - <div id="method-M000045" class="method-detail"> - <a name="M000045"></a> - - <div class="method-heading"> - <a href="#M000045" class="method-signature"> - <span class="method-name">history</span><span class="method-args">()</span> - </a> - </div> - - <div class="method-description"> - <p><a class="source-toggle" href="#" - onclick="toggleCode('M000045-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000045-source"> -<pre> - <span class="ruby-comment cmt"># File lib/bugzilla.rb, line 50</span> -50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">history</span>() -51: <span class="ruby-ivar">@history</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">History</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>) -52: <span class="ruby-keyword kw">end</span> -</pre> - </div> - </div> - </div> - - <div id="method-M000044" class="method-detail"> - <a name="M000044"></a> - - <div class="method-heading"> - <a href="#M000044" class="method-signature"> - <span class="method-name">url</span><span class="method-args">(secure = true)</span> - </a> - </div> - - <div class="method-description"> - <p> -Returns the URL for the bug, set <tt>secure</tt> to false to get a <a -href="http:-URL">-URL</a> -</p> - <p><a class="source-toggle" href="#" - onclick="toggleCode('M000044-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000044-source"> -<pre> - <span class="ruby-comment cmt"># File lib/bugzilla.rb, line 42</span> -42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url</span>(<span class="ruby-identifier">secure</span> = <span class="ruby-keyword kw">true</span>) -43: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secure</span> -44: <span class="ruby-node">"https://bugs.gentoo.org/show_bug.cgi?id=#{@bug_id}"</span> -45: <span class="ruby-keyword kw">else</span> -46: <span class="ruby-node">"http://bugs.gentoo.org/show_bug.cgi?id=#{@bug_id}"</span> -47: <span class="ruby-keyword kw">end</span> -48: <span class="ruby-keyword kw">end</span> -</pre> - </div> - </div> - </div> - - - </div> - - - </div> - - -<div id="validator-badges"> - <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> -</div> - -</body> -</html>
\ No newline at end of file |