doc/file.README.html in clavem-1.0.3 vs doc/file.README.html in clavem-1.1.0
- old
+ new
@@ -4,11 +4,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
<title>
File: README
- — Documentation by YARD 0.8.3
+ — Documentation by YARD 0.8.4.1
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
@@ -59,74 +59,75 @@
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
- <div id="content"><div id='filecontents'><h1>Introduction</h1>
+ <div id="content"><div id='filecontents'><h1 id="introduction">Introduction</h1>
-<p><a href="https://travis-ci.org/ShogunPanda/clavem"><img src="https://secure.travis-ci.org/ShogunPanda/clavem.png?branch=master" alt="Build Status"></a>
-<a href="https://gemnasium.com/ShogunPanda/clavem"><img src="https://gemnasium.com/ShogunPanda/clavem.png?travis" alt="Dependency Status"></a>
-<a href="https://codeclimate.com/github/ShogunPanda/clavem"><img src="https://codeclimate.com/badge.png" alt="Code Climate"></a></p>
+<p><a href="https://travis-ci.org/ShogunPanda/clavem"><img src="https://secure.travis-ci.org/ShogunPanda/clavem.png?branch=master" alt="Build Status" /></a>
+<a href="https://gemnasium.com/ShogunPanda/clavem"><img src="https://gemnasium.com/ShogunPanda/clavem.png?travis" alt="Dependency Status" /></a>
+<a href="https://codeclimate.com/github/ShogunPanda/clavem"><img src="https://codeclimate.com/badge.png" alt="Code Climate" /></a></p>
<p>A local callback server for oAuth web-flow.</p>
-<p><a href="http://sw.cow.tc/clavem">http://sw.cow.tc/clavem</a></p>
+<p>http://sw.cow.tc/clavem</p>
-<p><a href="http://rdoc.info/gems/clavem">http://rdoc.info/gems/clavem</a></p>
+<p>http://rdoc.info/gems/clavem</p>
-<h2>Usage</h2>
+<h2 id="usage">Usage</h2>
<p>clavem allows you to handle a full oAuth authentication flow directly from the console.</p>
<p>Simply instantiate the authorizer and run the authorize method with the URL:</p>
-<pre class="code ruby"><code><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>clavem</span><span class='tstring_end'>"</span></span>
+<p>```
+require “clavem”</p>
-<span class='comment'># Initalize your oAuth access.
-</span>
-<span class='id identifier rubyid_authorizer'>authorizer</span> <span class='op'>=</span> <span class='const'>Clavem</span><span class='op'>::</span><span class='const'>Authorizer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+<h1 id="initalize-your-oauth-access">Initalize your oAuth access.</h1>
-<span class='comment'># Get your authorization URL and append the callback.
-</span>
-<span class='id identifier rubyid_url'>url</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>?oauth_callback=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_authorizer'>authorizer</span><span class='period'>.</span><span class='id identifier rubyid_callback_url'>callback_url</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
-<span class='id identifier rubyid_authorizer'>authorizer</span><span class='period'>.</span><span class='id identifier rubyid_authorize'>authorize</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
+<p>authorizer = Clavem::Authorizer.new</p>
-<span class='kw'>if</span> <span class='id identifier rubyid_authorizer'>authorizer</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='symbol'>:succeded</span> <span class='kw'>then</span>
- <span class='id identifier rubyid_access_token'>access_token</span> <span class='op'>=</span> <span class='id identifier rubyid_authorizer'>authorizer</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
+<h1 id="get-your-authorization-url-and-append-the-callback">Get your authorization URL and append the callback.</h1>
- <span class='comment'># Go on!
-</span><span class='kw'>else</span>
- <span class='comment'># Authorization denied
-</span><span class='kw'>end</span>
-</code></pre>
+<p>url += “?oauth_callback=#authorizerauthorizer.callback_url”
+authorizer.authorize(url)</p>
+<p>if authorizer.status == :succeded then
+ access_token = authorizer.token</p>
+
+<p># Go on!
+else
+ # Authorization denied
+end
+```</p>
+
<p>Alternatively, you can also specify a timeout and a block to the constructor to customizer the response handling.</p>
<p>See the <a href="http://rdoc.info/gems/clavem">documentation</a> for more information.</p>
-<h2>Contributing to clavem</h2>
+<h2 id="contributing-to-clavem">Contributing to clavem</h2>
<ul>
-<li>Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.</li>
-<li>Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.</li>
-<li>Fork the project.</li>
-<li>Start a feature/bugfix branch.</li>
-<li>Commit and push until you are happy with your contribution.</li>
-<li>Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.</li>
-<li>Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.</li>
+ <li>Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.</li>
+ <li>Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.</li>
+ <li>Fork the project.</li>
+ <li>Start a feature/bugfix branch.</li>
+ <li>Commit and push until you are happy with your contribution.</li>
+ <li>Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.</li>
+ <li>Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.</li>
</ul>
-<h2>Copyright</h2>
+<h2 id="copyright">Copyright</h2>
-<p>Copyright (C) 2013 and above Shogun (<a href="mailto:shogun_panda@me.com">shogun_panda@me.com</a>).</p>
+<p>Copyright (C) 2013 and above Shogun (shogun_panda@me.com).</p>
-<p>Licensed under the MIT license, which can be found at <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.</p>
+<p>Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.</p>
</div></div>
<div id="footer">
- Generated on Sun Jan 27 17:32:23 2013 by
+ Generated on Fri Feb 8 11:54:02 2013 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.8.3 (ruby-1.9.3).
+ 0.8.4.1 (ruby-1.9.3).
</div>
</body>
</html>
\ No newline at end of file