rdoc/files/README_rdoc.html in git_hub-0.2.0 vs rdoc/files/README_rdoc.html in git_hub-0.2.7
- old
+ new
@@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>File: README.rdoc [zemax 0.1.0
+ <title>File: README.rdoc [git_hub 0.2.7
]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
@@ -52,11 +52,11 @@
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>2010-01-07 14:46:41 +0300</td>
+ <td>2010-01-12 12:07:54 +0300</td>
</tr>
</table>
</div>
<!-- banner header -->
@@ -65,17 +65,17 @@
<div id="contextContent">
<div id="description">
<h1>git_hub</h1>
<pre>
- by:: Arvicco
- url:: http://github.com/arvicco/git_hub
+ by: Arvicco
+ url: http://github.com/arvicco/git_hub
</pre>
<h2>DESCRIPTION:</h2>
<p>
git_hub is a library that wraps github API and exposes simple interface for
-finding, creating and managing github repositories and other resources...
+finding, creating and managing github repositories and other resources.
</p>
<h2>FEATURES/PROBLEMS:</h2>
<ul>
<li>FIXME (list of features or problems)
@@ -84,35 +84,60 @@
<p>
This project is quite new, so it’s probably not ready for prime time
just yet... Contributors always welcome!
</p>
<h2>SYNOPSIS:</h2>
+<pre>
+ require 'git_hub'
+ include GitHub
+</pre>
<p>
-require ‘git_hub’ include <a
-href="../classes/GitHub.html">GitHub</a>
+Find existing repos:
</p>
+<pre>
+ repo = Repo.find(:user=>user_name, :repo=>repo_name)
+ repos = Repo.find(:user=>user_name)
+ search_repos = Repo.find(:query=>['search','terms'])
+</pre>
<p>
-# Find existing repos repo = Repo.find(:user=>user_name, :repo=>repo_name)
-repos = Repo.find(:user=>user_name) search_repos =
-Repo.find(:query=>[‘search’,’terms’])
+Retrieve tags, branches and commits for a repo:
</p>
+<pre>
+ puts repo.tags['v0.1.0'].committer
+ puts repo.branches['master'].committed_date
+ repo.commits.each {|commit| p commit.author}
+</pre>
<p>
-# Create new repo (need to authenticate with your github credentials first)
-Api.auth = {:user=>user_name, :token=>token} new_repo =
-Repo.create(:name=>repo_name, :desc=>’Description’,
-:homepage=>’<a href="http://your_page.org">your_page.org</a>’,
-:private=> false)
+Retrieve info for a specific commit:
</p>
+<pre>
+ commits = Commit.find(:user=>user_name, :repo=>repo_name, :branch=>'master')
+ commits = Commit.find(:user=>user_name, :repo=>repo_name, :branch=>'master', :path=>'README.rdoc')
+ commit = Commit.find(:user=>user_name, :repo=>repo_name, :sha=>'commit_sha')
+ # or, if repo is already retrieved:
+ commit = repo.commits.last
+ commit = repo.tags['v0.1.0']
+ commit = repo.branches['master'] # returns most recent commit for a branch
+</pre>
+<p>
+Create new repo or delete existing repo (need to authenticate with your
+github credentials first)
+</p>
+<pre>
+ Api.auth = {:user=>user_name, :token=>token}
+ new_repo = Repo.create(:name=>repo_name, :desc=>'Description', :homepage=>'http://your_page.org', :private=> false)
+ new_repo.delete
+</pre>
<h2>REQUIREMENTS:</h2>
<ul>
<li>FIXME (list of requirements)
</li>
</ul>
<h2>INSTALL:</h2>
-<p>
-$ sudo gem install git_hub
-</p>
+<pre>
+ $ sudo gem install git_hub
+</pre>
<h2>LICENSE:</h2>
<p>
(The MIT License)
</p>
<p>