title: Persistent authentication with Google API in Ruby
body: <p>I try to code a cronjob which syncronizes some duedates to Google Calendar. My problem at the moment is, that the authentification with Google isn't persistent. After an hour I have to reauthenticate the application. I use this method to autheticate my application: <a href="https://developers.google.com/google-apps/calendar/instantiate" rel="nofollow">https://developers.google.com/google-apps/calendar/instantiate</a> This means I generate the .yaml-File manually. In order to keep the program working I would have to do that very hour. Thats not very practicable for an cronjob.</p>
  
  <p>So, what I'm looking for is a method to authenticate my application once. After that it should last forever or at least for 30 days or something. The best solution would be if the user just has to add his login data as attributes to the call. Like this:</p>
  
  <pre><code>ruby google.rb Username SHA1-Password
  </code></pre>
  
  <p>What's the best way to do something like this?</p>
  
  <p>Best regards, Juuro</p>