SubmitService.html #11

  • //
  • guest/
  • doug_scheirer/
  • helix-web-services/
  • main/
  • 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 Mon Oct 12 22:20:53 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
#11 16275 Doug Scheirer Merge from main
#10 16196 Doug Scheirer Merge from main
#9 16148 Doug Scheirer Merge from main
#8 16114 Doug Scheirer Merge from main
#7 16079 Doug Scheirer Merge from main
#6 16014 Doug Scheirer Merge down from main
#5 15884 Doug Scheirer Merge from main
#4 15868 Doug Scheirer Merge from main
#3 15845 Doug Scheirer Integ from main
#2 15715 Doug Scheirer merge changes from main
#1 15688 Doug Scheirer Populate -o //guest/perforce_software/helix-web-services/...
//guest/doug_scheirer/helix-web-services/....
//guest/perforce_software/helix-web-services/main/build/doc/helix_web_services/HelixVersioningEngine/SubmitService.html
#22 15676 tjuricek HWS/NOARCH/2015.1.main/201509092205
#21 15589 tjuricek Update path to test output and update docs.
#20 15542 tjuricek Add spaces to our basic 'component encode' mechanism, and use it for HVE project IDs.

In general, this will make the HVE IDs a bit more readable.
#19 15517 tjuricek Do not require changelist ID for submitting Helix Sync pending changelists.
#18 15499 tjuricek Naive implementation of helix sync project submit for "helix versioning engine projects".
#17 15487 tjuricek Add basic ability to create pending changelists for helix sync projects.
#16 15479 tjuricek Added a basic "HVE project" implementation for creating clients.
#15 15447 tjuricek Add simple Example application to list "projects" in a HVE instance.

Qt's a little weird to follow, so I may have to find a different kind of example to write. It does work, however.
#14 15240 tjuricek Set api level via request path on all Helix Versioning Engine methods.

This will allow migration of applications to different P4D versions. Our internal methods (like project API) should attempt to handle backward compatibility similarly.

P4WEBAPI-118
#13 15228 tjuricek Revise triggers implementation, tests, and documentation.
#12 15227 tjuricek Revise implementation, tests, and documentation for protections management.

Remove some specs I will not be revising from the helix_web_services project.
#11 15225 tjuricek Revise counter implementation, tests, and documentation

Wasn't available in the Ruby client before, so, it's now available.
#10 15222 tjuricek Revise server specs testing and documentation.

Note: also fixed issues with setting P4PORT via headers. For whatever reason, the host setting doesn't seem to work like I expect it to, though P4PORT works just fine.
#9 15211 tjuricek Implement tests and documentation for label spec management.
#8 15210 tjuricek Implement tests and documentation for job spec management.
#7 15209 tjuricek Implement tests and documentation for group spec management.
#6 15208 tjuricek Revise 'command' implementation, tests, and documentaiton.

This includes a change from a command blacklist to a whitelist. See P4WEBAPI-21
#5 15205 tjuricek Implemented tests and documentation for depot spec editing.
#4 15189 tjuricek Update files implementation, testing, and documentation.
#3 15185 tjuricek Update user spec management implementation, tests, and documentation.
#2 15144 tjuricek Setup stream spec tests and documentation.

Also revised the documentation folder http_p4_web_api -> helix_versioning_engine
#1 15132 tjuricek Provde a basic submit -e mechanism on classic perforce workspaces.