SubmitService.html #1

  • //
  • guest/
  • ptomiak/
  • hws/
  • build/
  • doc/
  • helix_web_services/
  • HelixVersioningEngine/
  • SubmitService.html
  • View
  • Commits
  • Open Download .zip Download (13 KB)
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: HelixVersioningEngine::SubmitService
  
    &mdash; Documentation by YARD 0.8.7.6
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!HelixVersioningEngine/SubmitService.html";
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (S)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../HelixVersioningEngine.html" title="HelixVersioningEngine (module)">HelixVersioningEngine</a></span></span>
     &raquo; 
    <span class="title">SubmitService</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: HelixVersioningEngine::SubmitService
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">HelixVersioningEngine::SubmitService</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/helix_versioning_engine/submit_service.rb</dd>
  
</dl>
<div class="clear"></div>





  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#env-instance_method" title="#env (instance method)">- (Object) <strong>env</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Existing Rack environment.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#p4-instance_method" title="#p4 (instance method)">- (Object) <strong>p4</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Require the p4 connection decided by our middleware.</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (SubmitService) <strong>initialize</strong>(p4: nil, env: nil) </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>A new instance of SubmitService.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#stream_client_for-instance_method" title="#stream_client_for (instance method)">- (Object) <strong>stream_client_for</strong>(change) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns true if the changelist is associated with a Streams-based client.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#submit_shelf-instance_method" title="#submit_shelf (instance method)">- (Object) <strong>submit_shelf</strong>(change) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Perform a &#39;p4 submit -e change&#39;.</p>
</div></span>
  
</li>

      
    </ul>
  

<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="HelixVersioningEngine::SubmitService (class)">SubmitService</a></span></tt>) <strong>initialize</strong>(p4: nil, env: nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns a new instance of SubmitService</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


11
12
13
14
15
16
17</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/submit_service.rb', line 11</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>p4:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>env:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
  <span class='ivar'>@p4</span> <span class='op'>=</span> <span class='id identifier rubyid_p4'>p4</span>
  <span class='ivar'>@env</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span>

  <span class='comment'># This is created by `submit_shelf`
</span>  <span class='ivar'>@p4_root</span> <span class='op'>=</span> <span class='kw'>nil</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="env=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="env-instance_method">
  
    - (<tt>Object</tt>) <strong>env</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Existing Rack environment</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


9
10
11</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/submit_service.rb', line 9</span>

<span class='kw'>def</span> <span class='id identifier rubyid_env'>env</span>
  <span class='ivar'>@env</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="p4=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="p4-instance_method">
  
    - (<tt>Object</tt>) <strong>p4</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Require the p4 connection decided by our middleware</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/submit_service.rb', line 6</span>

<span class='kw'>def</span> <span class='id identifier rubyid_p4'>p4</span>
  <span class='ivar'>@p4</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="stream_client_for-instance_method">
  
    - (<tt>Object</tt>) <strong>stream_client_for</strong>(change) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns true if the changelist is associated with a Streams-based client.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


36
37
38
39
40
41
42</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/submit_service.rb', line 36</span>

<span class='kw'>def</span> <span class='id identifier rubyid_stream_client_for'>stream_client_for</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_change_spec'>change_spec</span> <span class='op'>=</span> <span class='id identifier rubyid_p4'>p4</span><span class='period'>.</span><span class='id identifier rubyid_fetch_change'>fetch_change</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span>

  <span class='id identifier rubyid_client_spec'>client_spec</span> <span class='op'>=</span> <span class='id identifier rubyid_p4'>p4</span><span class='period'>.</span><span class='id identifier rubyid_fetch_client'>fetch_client</span><span class='lparen'>(</span><span class='id identifier rubyid_change_spec'>change_spec</span><span class='period'>.</span><span class='id identifier rubyid__client'>_client</span><span class='rparen'>)</span>

  <span class='id identifier rubyid_client_spec'>client_spec</span><span class='period'>.</span><span class='id identifier rubyid__stream'>_stream</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='kw'>nil</span> <span class='op'>:</span> <span class='id identifier rubyid_client_spec'>client_spec</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="submit_shelf-instance_method">
  
    - (<tt>Object</tt>) <strong>submit_shelf</strong>(change) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Perform a &#39;p4 submit -e change&#39;</p>

<p>This will need to detect the correct kind of temporary client to create,
create that, and then perform the submission.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


23
24
25
26
27
28
29
30
31
32
33</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/submit_service.rb', line 23</span>

<span class='kw'>def</span> <span class='id identifier rubyid_submit_shelf'>submit_shelf</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_stream_client'>stream_client</span> <span class='op'>=</span> <span class='id identifier rubyid_stream_client_for'>stream_client_for</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_stream_client'>stream_client</span>
    <span class='ivar'>@p4_root</span> <span class='op'>=</span> <span class='const'>P4Util</span><span class='period'>.</span><span class='id identifier rubyid_create_temp_stream_client_duplicate'>create_temp_stream_client_duplicate</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_stream_client'>stream_client</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>p4_root</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@p4_root</span>
  <span class='kw'>else</span>
    <span class='ivar'>@p4_root</span> <span class='op'>=</span> <span class='const'>P4Util</span><span class='period'>.</span><span class='id identifier rubyid_create_temp_client'>create_temp_client</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>p4_root</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@p4_root</span>
  <span class='kw'>end</span>
  <span class='id identifier rubyid_p4'>p4</span><span class='period'>.</span><span class='id identifier rubyid_run_submit'>run_submit</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>-e</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Tue Sep 15 01:20:30 2015 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.6 (ruby-2.2.3).
</div>

  </body>
</html>
# Change User Description Committed
#1 15741 ptomiak Branch HWS for my use.