File.html #11

  • //
  • guest/
  • doug_scheirer/
  • helix-web-services/
  • main/
  • build/
  • doc/
  • helix_web_services/
  • HelixVersioningEngine/
  • ChangeService/
  • File.html
  • View
  • Commits
  • Open Download .zip Download (36 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::ChangeService::File
  
    &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/ChangeService/File.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 (F)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../HelixVersioningEngine.html" title="HelixVersioningEngine (module)">HelixVersioningEngine</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ChangeService.html" title="HelixVersioningEngine::ChangeService (class)">ChangeService</a></span></span>
     &raquo; 
    <span class="title">File</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::ChangeService::File
  
  
  
</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::ChangeService::File</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/change_service.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>Handles tracking &#39;file modification&#39; operations on a single file
for a change.</p>

<p>One important aspect of initializing these files is assigning a
&#39;files&#39; result. The ChangeHelper pretty much grabs the output of
&#39;p4 files&#39; for all file changes, which lets us know if a file
exists or not in the system, which changes downstream behavior during an
upload process.</p>


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

</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="#action-instance_method" title="#action (instance method)">- (Object) <strong>action</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute action.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute content.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute depot_file.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The output of p4 files on this depot_file path, if it exists.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>For <em>some</em> actions, like a move, we need this indicated by the user.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>If set, this should be the version number we require before running.</p>
</div></span>
  
</li>

    
  </ul>




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

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#from_json-class_method" title="from_json (class method)">+ (Object) <strong>from_json</strong>(obj) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The “external” JSON representation uses a CamelCase style string.</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="#call-instance_method" title="#call (instance method)">- (Object) <strong>call</strong>(p4, change_id, client_root) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This really should only be called by ChangeHelper::call to do work once we
have associated any file_result and from_file properties.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#exists%3F-instance_method" title="#exists? (instance method)">- (Boolean) <strong>exists?</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (File) <strong>initialize</strong>(depot_file: nil, action: nil, content: nil, from_depot_file: nil, require_version: nil) </a>
    

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

  
    <span class="summary_desc"><div class='inline'>
<p>Notice how the file <em>must</em> be specified using our &#39;external
normalized&#39; data style.</p>
</div></span>
  
</li>

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

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

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

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

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

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></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::ChangeService::File (class)">File</a></span></tt>) <strong>initialize</strong>(depot_file: nil, action: nil, content: nil, from_depot_file: nil, require_version: nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Notice how the file <em>must</em> be specified using our &#39;external
normalized&#39; data style.</p>


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

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


79
80
81
82
83
84
85
86
87
88</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 79</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>depot_file:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>action:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>content:</span> <span class='kw'>nil</span><span class='comma'>,</span>
               <span class='label'>from_depot_file:</span> <span class='kw'>nil</span><span class='comma'>,</span>
               <span class='label'>require_version:</span> <span class='kw'>nil</span><span class='rparen'>)</span>

  <span class='ivar'>@depot_file</span> <span class='op'>=</span> <span class='id identifier rubyid_depot_file'>depot_file</span>
  <span class='ivar'>@action</span> <span class='op'>=</span> <span class='id identifier rubyid_action'>action</span>
  <span class='ivar'>@content</span> <span class='op'>=</span> <span class='id identifier rubyid_content'>content</span>
  <span class='ivar'>@from_depot_file</span> <span class='op'>=</span> <span class='id identifier rubyid_from_depot_file'>from_depot_file</span>
  <span class='ivar'>@require_version</span> <span class='op'>=</span> <span class='id identifier rubyid_require_version'>require_version</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="action=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="action-instance_method">
  
    - (<tt>Object</tt>) <strong>action</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute action</p>


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

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


62
63
64</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 62</span>

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

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute content</p>


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

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


64
65
66</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 64</span>

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

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns the value of attribute depot_file</p>


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

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


60
61
62</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 60</span>

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

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The output of p4 files on this depot_file path, if it exists.</p>


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

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


70
71
72</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 70</span>

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

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>For <em>some</em> actions, like a move, we need this indicated by the user.</p>


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

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


67
68
69</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 67</span>

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

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>If set, this should be the version number we require before running. If you
want to require a new file, this should be set to 0. Otherwise specify the
version directly.</p>


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

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


75
76
77</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 75</span>

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


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="from_json-class_method">
  
    + (<tt>Object</tt>) <strong>from_json</strong>(obj) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The “external” JSON representation uses a CamelCase style string.</p>


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

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


91
92
93
94
95
96
97
98
99
100
101
102
103</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 91</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_json'>from_json</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>

  <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:depot_file</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DepotFile</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DepotFile</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:action</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Action</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Action</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:from_depot_file</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>FromDepotFile</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>FromDepotFile</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:require_version</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>RequireVersion</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>RequireVersion</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>

  <span class='id identifier rubyid_content_base64'>content_base64</span> <span class='op'>=</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:content</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_decode64'>decode64</span><span class='lparen'>(</span><span class='id identifier rubyid_content_base64'>content_base64</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_content_base64'>content_base64</span>

  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</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="call-instance_method">
  
    - (<tt>Object</tt>) <strong>call</strong>(p4, change_id, client_root) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This really should only be called by ChangeHelper::call to do work once we
have associated any file_result and from_file properties.</p>


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

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


112
113
114
115
116
117
118
119
120
121</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 112</span>

<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='comma'>,</span> <span class='id identifier rubyid_client_root'>client_root</span><span class='rparen'>)</span>
  <span class='kw'>case</span> <span class='id identifier rubyid_action'>action</span>
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>upload</span><span class='tstring_end'>&#39;</span></span>
    <span class='id identifier rubyid_upload_file'>upload_file</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='comma'>,</span> <span class='id identifier rubyid_client_root'>client_root</span><span class='rparen'>)</span>
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>branch</span><span class='tstring_end'>&#39;</span></span>
    <span class='id identifier rubyid_integrate_file'>integrate_file</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='rparen'>)</span>
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>move</span><span class='tstring_end'>&#39;</span></span>
    <span class='id identifier rubyid_move_file'>move_file</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='rparen'>)</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="exists?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>exists?</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

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


105
106
107</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 105</span>

<span class='kw'>def</span> <span class='id identifier rubyid_exists?'>exists?</span>
  <span class='op'>!</span><span class='id identifier rubyid_file_result'>file_result</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_file_result'>file_result</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>action</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>delete</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="integrate_file-instance_method">
  
    - (<tt>Object</tt>) <strong>integrate_file</strong>(p4, change_id) 
  

  

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


152
153
154</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 152</span>

<span class='kw'>def</span> <span class='id identifier rubyid_integrate_file'>integrate_file</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_p4'>p4</span><span class='period'>.</span><span class='id identifier rubyid_run_integrate'>run_integrate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>-c</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='comma'>,</span> <span class='id identifier rubyid_from_depot_file'>from_depot_file</span><span class='comma'>,</span> <span class='id identifier rubyid_depot_file'>depot_file</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="move_file-instance_method">
  
    - (<tt>Object</tt>) <strong>move_file</strong>(p4, change_id) 
  

  

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


156
157
158</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 156</span>

<span class='kw'>def</span> <span class='id identifier rubyid_move_file'>move_file</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_p4'>p4</span><span class='period'>.</span><span class='id identifier rubyid_run_move'>run_move</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>-c</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='comma'>,</span> <span class='id identifier rubyid_from_depot_file'>from_depot_file</span><span class='comma'>,</span> <span class='id identifier rubyid_depot_file'>depot_file</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="upload_file-instance_method">
  
    - (<tt>Object</tt>) <strong>upload_file</strong>(p4, change_id, client_root) 
  

  

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


123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/helix_versioning_engine/change_service.rb', line 123</span>

<span class='kw'>def</span> <span class='id identifier rubyid_upload_file'>upload_file</span><span class='lparen'>(</span><span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='comma'>,</span> <span class='id identifier rubyid_client_root'>client_root</span><span class='rparen'>)</span>
  <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_assert_no_special_paths'>assert_no_special_paths</span><span class='lparen'>(</span><span class='ivar'>@depot_file</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>

  <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_require_version'>require_version</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
    <span class='kw'>if</span> <span class='id identifier rubyid_require_version'>require_version</span> <span class='op'>==</span> <span class='int'>0</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_exists?'>exists?</span>
      <span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>assertion failed: file </span><span class='embexpr_beg'>#{</span><span class='ivar'>@depot_file</span><span class='embexpr_end'>}</span><span class='tstring_content'> exists</span><span class='tstring_end'>&quot;</span></span>
      <span class='id identifier rubyid_raise'>raise</span> <span class='const'>P4Error</span><span class='period'>.</span><span class='id identifier rubyid_default_error'>default_error</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
    <span class='kw'>end</span>

    <span class='id identifier rubyid_cur_version'>cur_version</span> <span class='op'>=</span> <span class='int'>0</span>
    <span class='id identifier rubyid_cur_version'>cur_version</span> <span class='op'>=</span> <span class='id identifier rubyid_file_result'>file_result</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rev</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_exists?'>exists?</span>
    <span class='kw'>if</span> <span class='id identifier rubyid_cur_version'>cur_version</span> <span class='op'>!=</span> <span class='id identifier rubyid_require_version'>require_version</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
      <span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>assertion failed: file </span><span class='embexpr_beg'>#{</span><span class='ivar'>@depot_file</span><span class='embexpr_end'>}</span><span class='tstring_content'> not at required </span><span class='tstring_end'>&quot;</span></span> \
            <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>version </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_require_version'>require_version</span><span class='embexpr_end'>}</span><span class='tstring_content'>, </span><span class='tstring_end'>&quot;</span></span> \
            <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>current version is </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cur_version'>cur_version</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
      <span class='id identifier rubyid_raise'>raise</span> <span class='const'>P4Error</span><span class='period'>.</span><span class='id identifier rubyid_default_error'>default_error</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>

  <span class='kw'>if</span> <span class='id identifier rubyid_exists?'>exists?</span>
    <span class='id identifier rubyid_p4'>p4</span><span class='period'>.</span><span class='id identifier rubyid_run_sync'>run_sync</span><span class='lparen'>(</span><span class='id identifier rubyid_depot_file'>depot_file</span><span class='rparen'>)</span>
    <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_mark_change'>mark_change</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>edit</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='comma'>,</span> <span class='id identifier rubyid_client_root'>client_root</span><span class='comma'>,</span> <span class='id identifier rubyid_depot_file'>depot_file</span><span class='rparen'>)</span>
    <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_save_content'>save_content</span><span class='lparen'>(</span><span class='id identifier rubyid_client_root'>client_root</span><span class='comma'>,</span> <span class='id identifier rubyid_depot_file'>depot_file</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span>
  <span class='kw'>else</span>
    <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_save_content'>save_content</span><span class='lparen'>(</span><span class='id identifier rubyid_client_root'>client_root</span><span class='comma'>,</span> <span class='id identifier rubyid_depot_file'>depot_file</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span>
    <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_mark_change'>mark_change</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>add</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_p4'>p4</span><span class='comma'>,</span> <span class='id identifier rubyid_change_id'>change_id</span><span class='comma'>,</span> <span class='id identifier rubyid_client_root'>client_root</span><span class='comma'>,</span> <span class='id identifier rubyid_depot_file'>depot_file</span><span class='rparen'>)</span>
  <span class='kw'>end</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/ChangeService/File.html
#32 15676 tjuricek HWS/NOARCH/2015.1.main/201509092205
#31 15589 tjuricek Update path to test output and update docs.
#30 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.
#29 15517 tjuricek Do not require changelist ID for submitting Helix Sync pending changelists.
#28 15499 tjuricek Naive implementation of helix sync project submit for "helix versioning engine projects".
#27 15487 tjuricek Add basic ability to create pending changelists for helix sync projects.
#26 15479 tjuricek Added a basic "HVE project" implementation for creating clients.
#25 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.
#24 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
#23 15228 tjuricek Revise triggers implementation, tests, and documentation.
#22 15227 tjuricek Revise implementation, tests, and documentation for protections management.

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

Wasn't available in the Ruby client before, so, it's now available.
#20 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.
#19 15211 tjuricek Implement tests and documentation for label spec management.
#18 15210 tjuricek Implement tests and documentation for job spec management.
#17 15209 tjuricek Implement tests and documentation for group spec management.
#16 15208 tjuricek Revise 'command' implementation, tests, and documentaiton.

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

Also revised the documentation folder http_p4_web_api -> helix_versioning_engine
#11 15132 tjuricek Provde a basic submit -e mechanism on classic perforce workspaces.
#10 15110 tjuricek Revise changes methods for new p4 connection handling, add server specs, remove model references in client, and update asciidoc documentation.
#9 15099 tjuricek Revise project services to be our simple 'container' for other systems.
#8 15098 tjuricek Revised project services to GET-only forms.

With Helix Sync revising to integrate purely with Helix Cloud, this is the only thing we can reasonably define.
#7 15090 tjuricek Update _proposed_ API for project services.

This is *very likely* to change, and will not be implemented until reviewed.
#6 15078 tjuricek clients spec method revisions

Updated some other documentation.
#5 15077 tjuricek Add new 'model' technique, revised branch spec operations, test Auth::Middleware.

The Ruby client now does *not* strictly type anything, but extends OpenStruct with helper methods to help deal with inconsistent data formats.
See the OpenModel class documentation for more details.

The Auth::Middleware class is also *finally* implemented as well. This does not take into account all possible variations of server behavior (yet), but that will happen in follow-up work.
#4 15073 tjuricek Update Auth::Middleware and add spec
#3 15053 tjuricek Revise the client API to use the new login method.

The current specs will need to be revised since data normalization is moving out of the server and into the client.
#2 15038 tjuricek Document 'login' auth method and client programming overview.
#1 15032 tjuricek Starting config and doc revisions.
System is now broken while revisions underway.

Configuration of the p4d connection is now done via a single HWSSettings middleware object injected into the Rack env.

The HWSP4Cleanup middleware now cleans up any p4 injected into the Rack env.

The Auth::App class now mostly just contains one method to generate a p4 ticket. /auth/v1/login.

Added yard documentation for the main project.

Yard docs have been reconfigured to dump into build/ directories. This should probably be done with each release. Hm...

The top level rake file contains a task, 'all:doc', to update our documentation. This should probably be run for each checkin. Hm...

Specs are now using Rack::Test on top of a 'live' p4d. I'd suggest you still use the p4util mechanism, which now dumps to a /tmp folder, so we can safely add P4IGNORE rules back into your local .p4config file.

Old 'perforce' application now called 'helix_versioning_engine'.

Removing cache data. Helix Sync may be slow. It may also get axed. We'll see.