docs
This commit is contained in:
@@ -94,6 +94,8 @@
|
||||
|
||||
<li class="file"><a href="../README_md.html">README</a>
|
||||
|
||||
<li class="file"><a href="../cache/browser/cookie-jar.html">cookie-jar</a>
|
||||
|
||||
<li class="file"><a href="../conf/browser_conf_json.html">browser.conf.json</a>
|
||||
|
||||
<li class="file"><a href="../generate_doc_sh.html">generate_doc.sh</a>
|
||||
@@ -170,6 +172,8 @@
|
||||
|
||||
<li><a href="../UpdaterFactory.html">UpdaterFactory</a>
|
||||
|
||||
<li><a href="../VersionCompare.html">VersionCompare</a>
|
||||
|
||||
<li><a href="../Vulnerabilities.html">Vulnerabilities</a>
|
||||
|
||||
<li><a href="../Vulnerabilities/Output.html">Vulnerabilities::Output</a>
|
||||
@@ -322,7 +326,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="to_s-source">
|
||||
<pre><span class="ruby-comment"># File lib/common/models/wp_item/versionable.rb, line 19</span>
|
||||
<pre><span class="ruby-comment"># File lib/common/models/wp_item/versionable.rb, line 22</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-identifier">item_version</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">version</span>
|
||||
<span class="ruby-node">"#@name#{' v' + item_version.strip if item_version}"</span>
|
||||
@@ -361,8 +365,11 @@
|
||||
<pre><span class="ruby-comment"># File lib/common/models/wp_item/versionable.rb, line 10</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">version</span>
|
||||
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@version</span>
|
||||
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Browser</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">readme_url</span>)
|
||||
<span class="ruby-ivar">@version</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>[<span class="ruby-node">%r{stable tag: #{WpVersion.version_pattern}}</span>, <span class="ruby-value">1</span>]
|
||||
<span class="ruby-comment"># This check is needed because readme_url can return nil
|
||||
</span>
|
||||
<span class="ruby-keyword">if</span> <span class="ruby-identifier">has_readme?</span>
|
||||
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Browser</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">readme_url</span>)
|
||||
<span class="ruby-ivar">@version</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>[<span class="ruby-node">%r{stable tag: #{WpVersion.version_pattern}}</span>, <span class="ruby-value">1</span>]
|
||||
<span class="ruby-keyword">end</span>
|
||||
<span class="ruby-keyword">end</span>
|
||||
<span class="ruby-ivar">@version</span>
|
||||
|
||||
Reference in New Issue
Block a user