title: Generating gmail oauth tokens - xoauth.py in ruby?
body: <p>I am wondering if anyone knows of a ruby version of <a href="http://code.google.com/p/google-mail-xoauth-tools/wiki/XoauthDotPyRunThrough" rel="nofollow noreferrer">Google's example python code (xoauth.py)</a> to generate consumer oauth tokens?  Preferably something that will connect well with <a href="https://github.com/nfo/gmail_xoauth" rel="nofollow noreferrer">gmail_xoauth</a> or <a href="https://github.com/nu7hatch/gmail" rel="nofollow noreferrer">gMail for Ruby</a>.</p>
  
  <p>I've searched around a good amount and found some similar Stackoverflow questions in the past which don't give a clear enough answer unfortunately (eg: <a href="https://stackoverflow.com/questions/9084701/how-to-implement-gmail-imap-with-omniauth">How to implement Gmail IMAP with Omniauth</a>, <a href="https://stackoverflow.com/questions/6415421/rails-app-gmail-gem-xoauth-how-to-grant-access-to-a-specific-application">Rails app, gmail gem, xoauth: How to grant access to a specific application?</a>, <a href="https://stackoverflow.com/questions/3763168/how-do-i-use-connect-to-gmails-imap-server-using-oauth-in-rails3">How do I connect to Gmail&#39;s IMAP server using oauth in Rails3?</a>)</p>
  
  <p>Thanks!</p>