Regenerate documentation

This commit is contained in:
Juan Cruz Viotti 2014-12-12 09:28:08 -04:00
parent 15c73b6ed5
commit 83d28a86aa
35 changed files with 1363 additions and 63 deletions

View File

@ -27,6 +27,16 @@
</ul>
<h2>Class Listing A-Z</h2>
<div class='index'>
<ul>
<li class='letter'>d</li>
<ul>
<li>
<a href='class/DirectoryDoesntExist.html'>
DirectoryDoesntExist
</a>
</li>
</ul>
</ul>
<ul>
<li class='letter'>i</li>
<ul>
@ -172,6 +182,19 @@
</li>
</ul>
</ul>
<ul>
<li class='letter'>g</li>
<ul>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html'>
git.coffee
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git)
</small>
</li>
</ul>
</ul>
<ul>
<li class='letter'>h</li>
<ul>
@ -266,6 +289,19 @@
</li>
</ul>
</ul>
<ul>
<li class='letter'>v</li>
<ul>
<li>
<a href='file/lib/resin/vcs/vcs.coffee.html'>
vcs.coffee
</a>
<small>
(lib&#47;resin&#47;vcs)
</small>
</li>
</ul>
</ul>
<ul>
<li class='letter'>w</li>
<ul>
@ -283,7 +319,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -0,0 +1,161 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>CoffeeScript API Documentation</title>
<script src='../javascript/application.js'></script>
<script src='../javascript/search.js'></script>
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../'></div>
<div id='header'>
<div id='menu'>
<a href='../extra/README.md.html' title='Resin'>
Resin
</a>
&raquo;
<a href='../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>DirectoryDoesntExist</span>
</div>
</div>
<div id='content'>
<h1>
Class:
DirectoryDoesntExist
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;resin&#47;errors&#47;errors.coffee</td>
</tr>
<tr>
<td>Inherits:</td>
<td>
TypedError
</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='code-variable'>
code
=
</dt>
<dd>
<pre><code class='coffeescript'>1</code></pre>
<div class='docstring'>
<p>Error code</p>
</div>
<div class='tags'>
</div>
</dd>
</dl>
<h2>Constructor Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='constructor-dynamic'>
#
(void)
<b>constructor</b><span>(directory)</span>
<br>
</p>
<div class='docstring'>
<p>Construct a Directory Doesn&#39;t Exist error</p><pre><code>throw new resin.errors.DirectoryDoesntExist(&#39;/tmp&#39;)
Error: Directory doesn&#39;t exist: /tmp
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the name of the directory that doesn&#39;t exist </span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id='footer'>
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.0.9
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -87,7 +87,7 @@ Error: Invalid configuration file: /opt/resin.conf
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -74,7 +74,7 @@ Error: Invalid credentials
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -74,7 +74,7 @@ Error: Invalid key
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -87,7 +87,7 @@ Error: Invalid path: /tmp
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -87,7 +87,7 @@ Error: You don&#39;t have any applications
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -87,7 +87,7 @@ Error: Couldn&#39;t find application
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -91,7 +91,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -89,6 +89,18 @@
</small>
</li>
<li>
<a href='class/DirectoryDoesntExist.html' target='main'>
DirectoryDoesntExist
</a>
<small class='parent'>
<
TypedError
</small>
<small class='namespace'>
</small>
</li>
<li>
<a href='class/NotAny.html' target='main'>
NotAny

View File

@ -52,7 +52,9 @@ $ npm install
</code></pre><p>If you set <code>DEBUG</code> environment variable, errors will print with a stack trace:</p><pre><code class="lang-sh">$ DEBUG=true resin ...
</code></pre>
<h2 id="documentation">Documentation</h2><p>You can renegerate the documentation with:</p><pre><code class="lang-sh">$ npm run-script doc
</code></pre><p>This should ideally be part of <code>gulp</code>, however there doesn&#39;t seems to be any plugin for the documentation generation tool that we&#39;re using at the moment (<a href="https://github.com/coffeedoc/codo">codo</a>).</p><h2 id="caveats">Caveats</h2>
</code></pre>
<h2 id="manual-pages">Manual pages</h2><p>UNIX manual pages reside in <code>doc/</code></p><p>You can regenerate UNIX <code>roff</code> manual pages from markdown with:</p><pre><code class="lang-sh">$ npm run-script man
</code></pre><p>If you add a new <code>man</code> page, remember to add the <code>roff</code> filename to the <code>man</code> array in <code>package.json</code>.</p><h2 id="caveats">Caveats</h2>
<ul>
<li>Some interactive widgets don&#39;t work on <a href="https://cygwin.com/">Cygwin</a>. If you&#39;re running Windows, it&#39;s preferrable that you use <code>cmd.exe</code>.</li>
<li>Most commands require an <code>&lt;id&gt;</code> argument, however <a href="https://github.com/tj/commander.js">Commander</a> refuses to show that in the help page. This will be fixed soon.</li>
@ -61,7 +63,7 @@ $ npm install
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -396,7 +396,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -123,7 +123,7 @@ console.log(contents.remoteUrl)
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -173,7 +173,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -41,7 +41,7 @@
</table>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -190,7 +190,7 @@ console.log(devices)
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -98,7 +98,7 @@ resin.errors.handle(error, shouldExit)
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -109,7 +109,7 @@ console.log(object.dataPrefix) # /opt/resin
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -54,6 +54,7 @@
auth: require(&#39;.&#47;auth&#47;auth&#39;),
device: require(&#39;.&#47;device&#47;device&#39;),
os: require(&#39;.&#47;os&#47;os&#39;),
vcs: require(&#39;.&#47;vcs&#47;vcs&#39;),
settings: require(&#39;.&#47;settings&#39;)
}</code></pre>
@ -61,7 +62,7 @@
</dl>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -352,7 +352,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -51,7 +51,7 @@
</table>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -330,7 +330,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -320,7 +320,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -158,7 +158,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -56,7 +56,7 @@
</dl>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -160,7 +160,7 @@ console.log(result)
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -108,7 +108,7 @@ for item in result console.log(&quot;#{item.id} - #{item.caption}&quot;)
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -231,7 +231,7 @@ resin.server.request { method: &#39;GET&#39; url: &#39;/download&#39; p
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -49,6 +49,7 @@
apiPrefix: &#39;&#47;ewa&#47;&#39;,
dataPrefix: path.join(userHome, &#39;.resin&#39;),
sshKeyWidth: 43,
gitRemote: &#39;resin&#39;,
directories: {
plugins: &#39;plugins&#39;,
os: &#39;os&#39;
@ -81,7 +82,7 @@
</dl>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -239,7 +239,7 @@
</div>
</div>
<div id='footer'>
December 10, 14 14:47:17 by
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -0,0 +1,745 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>CoffeeScript API Documentation</title>
<script src='../../../../../javascript/application.js'></script>
<script src='../../../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../../../extra/README.md.html' title='Resin'>
Resin
</a>
&raquo;
<a href='../../../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>lib</span>
&raquo;
<span class='title'>resin</span>
&raquo;
<span class='title'>vcs</span>
&raquo;
<span class='title'>git</span>
&raquo;
<span class='title'>git.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
git.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;resin&#47;vcs&#47;git</td>
</tr>
</table>
<h2>Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#getGitDirectory-'>
~
(String)
<b>getGitDirectory</b><span>(directory)</span>
</a>
</span>
<span class='note private title'>Private</span>
<span class='desc'>
Get git directory for a certain path <p>By git directory, we mean the hidden .git folder that every git repository have</p><pre><code>result = getGitDirectory(&#39;/opt/projects/myapp&#39;)
console.log(result)
</code></pre>
</span>
</li>
<li>
<span class='signature'>
<a href='#getCurrentGitDirectory-'>
~
(String)
<b>getCurrentGitDirectory</b><span>()</span>
</a>
</span>
<span class='note private title'>Private</span>
<span class='desc'>
Get current git directory <p>Get the path to the .git directory in the current directory</p><pre><code>$ cd /Users/me/Projects/foobar &amp;&amp; resin ...
</code></pre>
</span>
</li>
<li>
<span class='signature'>
<a href='#isGitRepository-'>
~
(void)
<b>isGitRepository</b><span>(directory, callback)</span>
</a>
</span>
<span class='note private title'>Private</span>
<span class='desc'>
Check if a directory is a git repository <pre><code>isGitRepository &#39;my/git/repo&#39;, (error, isGitRepository) -&gt; throw error if error? if isGitRepository
console.log(&#39;Yes, it\&#39;s a git repo!&#39;) else
console.log(&#39;I should use git here!&#39;)
</code></pre>
</span>
</li>
<li>
<span class='signature'>
<a href='#getRepositoryInstance-'>
~
(void)
<b>getRepositoryInstance</b><span>(directory, callback)</span>
</a>
</span>
<span class='note private title'>Private</span>
<span class='desc'>
Get repository instance <p>An instance of a <a href="https://github.com/tuvistavie/node-git-cli">gitCli</a> repository, for internal usage.</p>
</span>
</li>
<li>
<span class='signature'>
<a href='#isValidGitApplication-'>
~
(Boolean)
<b>isValidGitApplication</b><span>(application)</span>
</a>
</span>
<span class='note private title'>Private</span>
<span class='desc'>
Check if an application is a git app <pre><code>resin.models.application.get 91, (error, application) -&gt; throw error if error? result = isValidGitApplication(application) console.log(result)
</code></pre>
</span>
</li>
<li>
<span class='signature'>
<a href='#hasRemote-'>
~
(void)
<b>hasRemote</b><span>(repository, name, callback)</span>
</a>
</span>
<span class='note private title'>Private</span>
<span class='desc'>
Check if a repository has a certain remote <pre><code>repository = getRepositoryInstance(&#39;my/git/repo&#39;)
hasRemote repository, &#39;origin&#39;, (error, hasRemote) -&gt; throw error if error? if hasRemote
console.log(&#39;It has an origin remote!&#39;) else
console.log(&#39;It doesn\&#39;t has an origin remote!&#39;)
</code></pre>
</span>
</li>
<li>
<span class='signature'>
<a href='#addRemote-'>
~
(void)
<b>addRemote</b><span>(repository, name, url, callback)</span>
</a>
</span>
<span class='note private title'>Private</span>
<span class='desc'>
Add a remote to a git repository <pre><code>repository = getRepositoryInstance(&#39;my/git/repo&#39;)
addRemote repository, &#39;resin&#39;, &#39;git@git.resin.io:johndoe/app.git&#39;, (error) -&gt; throw error if error?
$ cd my/git/repo &amp;&amp; git remote -v
resin git@git.resin.io:johndoe/app.git (fetch)
resin git@git.resin.io:johndoe/app.git (push)
</code></pre>
</span>
</li>
<li>
<span class='signature'>
<a href='#initProjectWithApplication-'>
~
(void)
<b>initProjectWithApplication</b><span>(application, directory, callback)</span>
</a>
</span>
<span class='desc'>
Initialize an application project <ul>
<li>Add the corresponding git remote.</li>
</ul>
</span>
</li>
<li>
<span class='signature'>
<a href='#isResinProject-'>
~
(void)
<b>isResinProject</b><span>(directory, callback)</span>
</a>
</span>
<span class='desc'>
Check if an application was already initialized <p>It checks if we have a resin remote added already.</p>
</span>
</li>
</ul>
<h2>Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='getGitDirectory-'>
~
(String)
<b>getGitDirectory</b><span>(directory)</span>
<span class='note private'>Private</span>
<br>
</p>
<div class='docstring'>
<div class='note'>
<strong>Note:</strong>
This function doesn&#39;t check if the path is valid, it only constructs it.
</div>
<p>Get git directory for a certain path</p><p>By git directory, we mean the hidden .git folder that every git repository have</p><pre><code>result = getGitDirectory(&#39;/opt/projects/myapp&#39;)
console.log(result)
# /opt/projects/myapp/.git
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the directory path </span>
</li>
</ul>
<h3>Throws:</h3>
<ul class='throw'>
<li>
<span class='type'></span>
(
<tt>Error</tt>
)
&mdash;
<span class='desc'>Will throw if directory is not a string </span>
</li>
</ul>
<h3>Returns:</h3>
<ul class='return'>
<li>
<span class='type'></span>
(
<tt>String</tt>
)
&mdash;
<span class='desc'>the absolute path to the child .git directory </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='getCurrentGitDirectory-'>
~
(String)
<b>getCurrentGitDirectory</b><span>()</span>
<span class='note private'>Private</span>
<br>
</p>
<div class='docstring'>
<div class='note'>
<strong>Note:</strong>
The current directory is determined by from where you ran the app
</div>
<p>Get current git directory</p><p>Get the path to the .git directory in the current directory</p><pre><code>$ cd /Users/me/Projects/foobar &amp;&amp; resin ...
result = getCurrentGitDirectory()
console.log(result)
# /Users/me/Projects/foobar/.git
</code></pre>
</div>
<div class='tags'>
<h3>Returns:</h3>
<ul class='return'>
<li>
<span class='type'></span>
(
<tt>String</tt>
)
&mdash;
<span class='desc'>the absolute path to the current directory&#39;s .git folder </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='isGitRepository-'>
~
(void)
<b>isGitRepository</b><span>(directory, callback)</span>
<span class='note private'>Private</span>
<br>
</p>
<div class='docstring'>
<p>Check if a directory is a git repository</p><pre><code>isGitRepository &#39;my/git/repo&#39;, (error, isGitRepository) -&gt; throw error if error? if isGitRepository
console.log(&#39;Yes, it\&#39;s a git repo!&#39;) else
console.log(&#39;I should use git here!&#39;)
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the directory </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error, isGitRepository) </span>
</li>
</ul>
<h3>Throws:</h3>
<ul class='throw'>
<li>
<span class='type'></span>
(
<tt><a href='../../../../../class/DirectoryDoesntExist.html'>DirectoryDoesntExist</a></tt>
)
&mdash;
<span class='desc'>Will throw if directory doesn&#39;t exist </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='getRepositoryInstance-'>
~
(void)
<b>getRepositoryInstance</b><span>(directory, callback)</span>
<span class='note private'>Private</span>
<br>
</p>
<div class='docstring'>
<p>Get repository instance</p><p>An instance of a <a href="https://github.com/tuvistavie/node-git-cli">gitCli</a> repository, for internal usage.</p><pre><code>getRepositoryInstance &#39;my/git/repo&#39;, (error, repository) -&gt; throw error if error? # I can now use gitCli functions on `repository`
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the directory </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error, repository) </span>
</li>
</ul>
<h3>Throws:</h3>
<ul class='throw'>
<li>
<span class='type'></span>
(
<tt>Error</tt>
)
&mdash;
<span class='desc'>Will throw if directory is not a git repository. </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='isValidGitApplication-'>
~
(Boolean)
<b>isValidGitApplication</b><span>(application)</span>
<span class='note private'>Private</span>
<br>
</p>
<div class='docstring'>
<div class='note todo'>
<strong>TODO:</strong>
We should also test that the string contained in git_repository is a valid url.
</div>
<div class='note'>
<strong>Note:</strong>
All it does is check if the application object contains a valid git_repository field.
</div>
<p>Check if an application is a git app</p><pre><code>resin.models.application.get 91, (error, application) -&gt; throw error if error? result = isValidGitApplication(application) console.log(result) # True
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>application</span>
<span class='type'>
(
<tt>Object</tt>
)
</span>
&mdash;
<span class='desc'>an application from resin API </span>
</li>
</ul>
<h3>Returns:</h3>
<ul class='return'>
<li>
<span class='type'></span>
(
<tt>Boolean</tt>
)
&mdash;
<span class='desc'>wheter is a valid git application or not </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='hasRemote-'>
~
(void)
<b>hasRemote</b><span>(repository, name, callback)</span>
<span class='note private'>Private</span>
<br>
</p>
<div class='docstring'>
<div class='note todo'>
<strong>TODO:</strong>
We should extract the logic that lists all remotes into a separate function.
</div>
<p>Check if a repository has a certain remote</p><pre><code>repository = getRepositoryInstance(&#39;my/git/repo&#39;)
hasRemote repository, &#39;origin&#39;, (error, hasRemote) -&gt; throw error if error? if hasRemote
console.log(&#39;It has an origin remote!&#39;) else
console.log(&#39;It doesn\&#39;t has an origin remote!&#39;)
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>repository</span>
<span class='type'>
(
<tt>Object</tt>
)
</span>
&mdash;
<span class='desc'>a repository instance from getRepositoryInstance() </span>
</li>
<li>
<span class='name'>name</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the name of the remote to check for </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error, hasRemote) </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='addRemote-'>
~
(void)
<b>addRemote</b><span>(repository, name, url, callback)</span>
<span class='note private'>Private</span>
<br>
</p>
<div class='docstring'>
<div class='note todo'>
<strong>TODO:</strong>
We should check the validity of all arguments.
</div>
<div class='note todo'>
<strong>TODO:</strong>
This function should be better tested
</div>
<p>Add a remote to a git repository</p><pre><code>repository = getRepositoryInstance(&#39;my/git/repo&#39;)
addRemote repository, &#39;resin&#39;, &#39;git@git.resin.io:johndoe/app.git&#39;, (error) -&gt; throw error if error?
$ cd my/git/repo &amp;&amp; git remote -v
resin git@git.resin.io:johndoe/app.git (fetch)
resin git@git.resin.io:johndoe/app.git (push)
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>repository</span>
<span class='type'>
(
<tt>Object</tt>
)
</span>
&mdash;
<span class='desc'>a repository instance from getRepositoryInstance() </span>
</li>
<li>
<span class='name'>name</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the name of the remote to add </span>
</li>
<li>
<span class='name'>url</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>url of the new remote </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error) </span>
</li>
</ul>
<h3>Throws:</h3>
<ul class='throw'>
<li>
<span class='type'></span>
(
<tt>Error</tt>
)
&mdash;
<span class='desc'>Will throw if name is not a string </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='initProjectWithApplication-'>
~
(void)
<b>initProjectWithApplication</b><span>(application, directory, callback)</span>
<br>
</p>
<div class='docstring'>
<div class='note todo'>
<strong>TODO:</strong>
This function should be better tested
</div>
<div class='note'>
<strong>Note:</strong>
The directory should already be a git repo (maybe we should take care of git init as well here if necessary?)
</div>
<p>Initialize an application project</p><ul>
<li>Add the corresponding git remote.</li>
</ul>
<pre><code>resin.models.application.get 91, (error, application) -&gt; throw error if error?
initProjectWithApplication application, &#39;my/new/project&#39;, (error) -&gt;
throw error if error?
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>application</span>
<span class='type'>
(
<tt>Object</tt>
)
</span>
&mdash;
<span class='desc'>an application from resin API </span>
</li>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the directory to initialize </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error) </span>
</li>
</ul>
<h3>Throws:</h3>
<ul class='throw'>
<li>
<span class='type'></span>
(
<tt>Error</tt>
)
&mdash;
<span class='desc'>Will throw if application is not a valid application </span>
</li>
</ul>
</div>
</div>
<div class='method_details'>
<p class='signature' id='isResinProject-'>
~
(void)
<b>isResinProject</b><span>(directory, callback)</span>
<br>
</p>
<div class='docstring'>
<div class='note todo'>
<strong>TODO:</strong>
Find a way to test this function
</div>
<p>Check if an application was already initialized</p><p>It checks if we have a resin remote added already.</p><pre><code>isResinProject &#39;my/resin/app&#39;, (error, initialized) -&gt; if initialized
console.log(&#39;It\&#39;s already a resin app!&#39;) else
console.log(&#39;It\&#39;s just a boring project! It should be resinified!&#39;)
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the directory </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error, isResinProject) </span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id='footer'>
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.0.9
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,230 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>CoffeeScript API Documentation</title>
<script src='../../../../javascript/application.js'></script>
<script src='../../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../../extra/README.md.html' title='Resin'>
Resin
</a>
&raquo;
<a href='../../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>lib</span>
&raquo;
<span class='title'>resin</span>
&raquo;
<span class='title'>vcs</span>
&raquo;
<span class='title'>vcs.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
vcs.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;resin&#47;vcs</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='exports.initProjectWithApplication-variable'>
exports.initProjectWithApplication
=
</dt>
<dd>
<pre><code class='coffeescript'>git</code></pre>
<div class='docstring'>
<div class='note todo'>
<strong>TODO:</strong>
This function should be better tested
</div>
<div class='note'>
<strong>Note:</strong>
The directory should already be a git repo (maybe we should take care of git init as well here if necessary?)
</div>
<p>Initialize an application project</p><ul>
<li>Add the corresponding git remote.</li>
</ul>
<pre><code>resin.models.application.get 91, (error, application) -&gt; throw error if error?
resin.vcs.initProjectWithApplication application, &#39;my/new/project&#39;, (error) -&gt;
throw error if error?
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>application</span>
<span class='type'>
(
<tt>Object</tt>
)
</span>
&mdash;
<span class='desc'>an application from resin API </span>
</li>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the directory to initialize </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error) </span>
</li>
</ul>
<h3>Throws:</h3>
<ul class='throw'>
<li>
<span class='type'></span>
(
<tt>Error</tt>
)
&mdash;
<span class='desc'>Will throw if application is not a valid application </span>
</li>
</ul>
</div>
</dd>
<dt id='exports.isResinProject-variable'>
exports.isResinProject
=
</dt>
<dd>
<pre><code class='coffeescript'>git</code></pre>
<div class='docstring'>
<div class='note todo'>
<strong>TODO:</strong>
Find a way to test this function
</div>
<p>Check if an application was already initialized</p><p>It checks if we have a resin remote added already.</p><pre><code>resin.vcs.isResinProject &#39;my/resin/app&#39;, (error, initialized) -&gt; if initialized
console.log(&#39;It\&#39;s already a resin app!&#39;) else
console.log(&#39;It\&#39;s just a boring project! It should be resinified!&#39;)
</code></pre>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>directory</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>the directory </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>callback(error, isResinProject) </span>
</li>
</ul>
</div>
</dd>
</dl>
</div>
<div id='footer'>
December 12, 14 09:26:32 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.0.9
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -289,6 +289,38 @@
</li>
</ul>
<li>
<span>
vcs
</span>
</li>
<ul>
<li>
<span>
git
</span>
</li>
<ul>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html' target='main'>
git.coffee
</a>
<small class='namespace'>
lib&#47;resin&#47;vcs&#47;git
</small>
</li>
</ul>
<li>
<a href='file/lib/resin/vcs/vcs.coffee.html' target='main'>
vcs.coffee
</a>
<small class='namespace'>
lib&#47;resin&#47;vcs
</small>
</li>
</ul>
</ul>
</ul>

File diff suppressed because one or more lines are too long

View File

@ -37,6 +37,14 @@
(PinejsClientRequest)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#addRemote-' target='main' title='addRemote'>
~addRemote
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/log/log.coffee.html#array-' target='main' title='array'>
~array
@ -69,14 +77,6 @@
(lib&#47;resin&#47;token&#47;token.coffee)
</small>
</li>
<li>
<a href='class/NotFound.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(NotFound)
</small>
</li>
<li>
<a href='class/InvalidPath.html#constructor-dynamic' target='main' title='constructor'>
#constructor
@ -86,11 +86,11 @@
</small>
</li>
<li>
<a href='class/InvalidKey.html#constructor-dynamic' target='main' title='constructor'>
<a href='class/NotFound.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(InvalidKey)
(NotFound)
</small>
</li>
<li>
@ -109,6 +109,22 @@
(InvalidConfigFile)
</small>
</li>
<li>
<a href='class/DirectoryDoesntExist.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(DirectoryDoesntExist)
</small>
</li>
<li>
<a href='class/InvalidKey.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(InvalidKey)
</small>
</li>
<li>
<a href='class/InvalidCredentials.html#constructor-dynamic' target='main' title='constructor'>
#constructor
@ -157,14 +173,6 @@
(lib&#47;resin&#47;models&#47;device.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/data/data-prefix.coffee.html#get-' target='main' title='get'>
~get
</a>
<small>
(lib&#47;resin&#47;data&#47;data-prefix.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/models/application.coffee.html#get-' target='main' title='get'>
~get
@ -173,6 +181,14 @@
(lib&#47;resin&#47;models&#47;application.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/data/data-prefix.coffee.html#get-' target='main' title='get'>
~get
</a>
<small>
(lib&#47;resin&#47;data&#47;data-prefix.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/models/device.coffee.html#getAll-' target='main' title='getAll'>
~getAll
@ -189,6 +205,14 @@
(lib&#47;resin&#47;models&#47;application.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/models/device.coffee.html#getAllByApplication-' target='main' title='getAllByApplication'>
~getAllByApplication
</a>
<small>
(lib&#47;resin&#47;models&#47;device.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/models/environment-variables.coffee.html#getAllByApplication-' target='main' title='getAllByApplication'>
~getAllByApplication
@ -198,11 +222,11 @@
</small>
</li>
<li>
<a href='file/lib/resin/models/device.coffee.html#getAllByApplication-' target='main' title='getAllByApplication'>
~getAllByApplication
<a href='file/lib/resin/vcs/git/git.coffee.html#getCurrentGitDirectory-' target='main' title='getCurrentGitDirectory'>
~getCurrentGitDirectory
</a>
<small>
(lib&#47;resin&#47;models&#47;device.coffee)
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
@ -221,6 +245,22 @@
(lib&#47;resin&#47;device&#47;device.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#getGitDirectory-' target='main' title='getGitDirectory'>
~getGitDirectory
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#getRepositoryInstance-' target='main' title='getRepositoryInstance'>
~getRepositoryInstance
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/device/device.coffee.html#getSupportedDevices-' target='main' title='getSupportedDevices'>
~getSupportedDevices
@ -229,14 +269,6 @@
(lib&#47;resin&#47;device&#47;device.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/auth/auth.coffee.html#getToken-' target='main' title='getToken'>
~getToken
</a>
<small>
(lib&#47;resin&#47;auth&#47;auth.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/token/token.coffee.html#getToken-' target='main' title='getToken'>
~getToken
@ -245,6 +277,14 @@
(lib&#47;resin&#47;token&#47;token.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/auth/auth.coffee.html#getToken-' target='main' title='getToken'>
~getToken
</a>
<small>
(lib&#47;resin&#47;auth&#47;auth.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/errors/errors.coffee.html#handle-' target='main' title='handle'>
~handle
@ -253,6 +293,14 @@
(lib&#47;resin&#47;errors&#47;errors.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#hasRemote-' target='main' title='hasRemote'>
~hasRemote
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/token/token.coffee.html#hasToken-' target='main' title='hasToken'>
~hasToken
@ -277,6 +325,22 @@
(lib&#47;resin&#47;log&#47;log.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#initProjectWithApplication-' target='main' title='initProjectWithApplication'>
~initProjectWithApplication
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#isGitRepository-' target='main' title='isGitRepository'>
~isGitRepository
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/auth/auth.coffee.html#isLoggedIn-' target='main' title='isLoggedIn'>
~isLoggedIn
@ -293,6 +357,22 @@
(lib&#47;resin&#47;log&#47;log.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#isResinProject-' target='main' title='isResinProject'>
~isResinProject
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/vcs/git/git.coffee.html#isValidGitApplication-' target='main' title='isValidGitApplication'>
~isValidGitApplication
</a>
<small>
(lib&#47;resin&#47;vcs&#47;git&#47;git.coffee)
</small>
</li>
<li>
<a href='file/lib/resin/config/config.coffee.html#loadUserConfig-' target='main' title='loadUserConfig'>
~loadUserConfig
@ -350,11 +430,11 @@
</small>
</li>
<li>
<a href='file/lib/resin/models/application.coffee.html#remove-' target='main' title='remove'>
<a href='file/lib/resin/models/device.coffee.html#remove-' target='main' title='remove'>
~remove
</a>
<small>
(lib&#47;resin&#47;models&#47;application.coffee)
(lib&#47;resin&#47;models&#47;device.coffee)
</small>
</li>
<li>
@ -366,11 +446,11 @@
</small>
</li>
<li>
<a href='file/lib/resin/models/device.coffee.html#remove-' target='main' title='remove'>
<a href='file/lib/resin/models/application.coffee.html#remove-' target='main' title='remove'>
~remove
</a>
<small>
(lib&#47;resin&#47;models&#47;device.coffee)
(lib&#47;resin&#47;models&#47;application.coffee)
</small>
</li>
<li>