<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abyss Knight &#187; Ruby on Rails</title>
	<atom:link href="http://www.abyssknight.com/category/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abyssknight.com</link>
	<description>version 9</description>
	<lastBuildDate>Thu, 31 Mar 2011 02:31:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Rails, OAuth and GameTweet</title>
		<link>http://www.abyssknight.com/2009/05/03/rails-oauth-and-gametweet/</link>
		<comments>http://www.abyssknight.com/2009/05/03/rails-oauth-and-gametweet/#comments</comments>
		<pubDate>Sun, 03 May 2009 23:54:01 +0000</pubDate>
		<dc:creator>Abyss</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[gametweet]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.abyssknight.com/?p=153</guid>
		<description><![CDATA[Yesterday I launched a little tool for twitter using Ruby on Rails, Capistrano (with Deprec), and OAuth called GameTweet. This is the first Rails application I&#8217;ve deployed since I started playing with the stack a few weeks ago. The idea for GameTweet came one night when I was thinking about the old TD clan website [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I launched a little tool for twitter using Ruby on Rails, Capistrano (with Deprec), and OAuth called <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a>. This is the first Rails application I&#8217;ve deployed since I started playing with the stack a few weeks ago. The idea for <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a> came one night when I was thinking about the old <a href="http://www.thedaggers.net" target="_blank">TD</a> clan website before the site went down. There used to be a feature for anyone who wanted to be text messaged when a game was about to start where a user could put in their phone number and carrier and any member of the site could send out a mass text to those on the list notifying them when they were going to play. Fast forward a few years into the future and we have Twitter, which works with most phones and can notify users when a message is posted.</p>
<p>The idea was simple: <em>Use Twitter to notify my friends when and where I was playing a game, specifically a PC game.</em></p>
<p>I remembered that Twitter was implementing a new authentication method which might just work for something like this, as basic authentication always seemed <em>dirty</em> to me. Why would anyone in their right mind hand out their username and password? A quick Google for &#8220;Twitter OAuth in Ruby on Rails&#8221; and I hit the <a href="http://apiwiki.twitter.com/OAuth-Examples" target="_blank">Twitter OAuth examples</a>. It didn&#8217;t take much to fashion the quick and dirty example into a working system. Actually, I&#8217;d estimate I was in the single digit hour range as for work involved. It was simple, which seriously scared me. <a href="http://www.capify.org/" target="_blank">Capistrano</a> and <a href="http://deprec.failmode.com/" target="_blank">Deprec</a> really made the process extremely painless. More on that later.</p>
<p>OAuth came easy. All I had to do was follow along in the step by step example from Twitter&#8217;s wiki and then register my application with <a href="http://twitter.com/oauth_clients" target="_blank">Twitter&#8217;s OAuth Client page</a>. Perhaps the hardest part was debugging and testing, as the current Twitter system doesn&#8217;t appear to have a test sandbox.</p>
<p>So <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a> was born. Just login to Twitter via OAuth and then type the IP:Port combination of the server you&#8217;re playing on, then the name of the game, and hit &#8220;Tweet!&#8221;. <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a> then uses OAuth to update your status with all that information as well as a tinyurl to the <a href="http://www.gametracker.com/" target="_blank">GameTracker</a> server status page using the <a href="http://github.com/patientslikeme/tinify_urls/tree/master" target="_blank">tinify_urls</a> plugin.</p>
<p><a href="http://www.capify.org/" target="_blank">Capistrano</a>, the Ruby based task automator, is perhaps the single most amazing piece of scripting I&#8217;ve seen in awhile. Coupled with the deployment recipes from <a href="http://deprec.failmode.com/" target="_blank">Deprec</a>, I was able to manage everything from code checkout, releases, deployment and even the Apache configuration all from one &#8220;cap deploy&#8221;. I managed to get an installation of SMF2 (a php based forum) deploying with Capistrano as well. Really, it is a joy to work with. After making a quick change to <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a> I just had to run an &#8220;svn commit&#8221; and &#8220;cap deploy&#8221; and everything is up on the server with the latest code, database schema, and Passenger restarted the application.</p>
<p>That said, <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a> has absolutely no test harness. I&#8217;m still learning the ropes with Ruby and Rails, but I do plan on eventually implementing a full test bed. OAuth is perhaps not the best thing to start with, but <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a> was a tool I wanted to use for myself so I built it. Fast.</p>
<p>If you have an idea for <a href="http://gametweet.williamriggins.com" target="_blank">GameTweet</a>, want to talk shop, criticize my horrible Ruby on Rails code, or just talk pop me an email using the contact form or send me a tweet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abyssknight.com/2009/05/03/rails-oauth-and-gametweet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)

Served from: www.abyssknight.com @ 2012-02-09 10:47:29 -->
