<?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>Geoff Evason &#187; tech</title>
	<atom:link href="http://geoff.evason.name/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://geoff.evason.name</link>
	<description></description>
	<lastBuildDate>Wed, 30 Nov 2011 03:41:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Lite and Full Versions of Apps &#8211; There is a Better Way</title>
		<link>http://geoff.evason.name/2011/08/12/lite-and-full-versions-of-apps-there-is-a-better-way/</link>
		<comments>http://geoff.evason.name/2011/08/12/lite-and-full-versions-of-apps-there-is-a-better-way/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 12:34:05 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/2011/08/12/lite-and-full-versions-of-apps-there-is-a-better-way/</guid>
		<description><![CDATA[Consumers obviously love free apps, and app developers obviously love to make money.  To bridge the divide &#8211; there seem to be 2 common ways to offer a consumer a free trial of an app.
1. Offer a free &#8216;lite&#8217; version and a paid for &#8216;full&#8217; version.
2. Offer in app purchases (eg free app with [...]]]></description>
			<content:encoded><![CDATA[<p>Consumers obviously love free apps, and app developers obviously love to make money.  To bridge the divide &#8211; there seem to be 2 common ways to offer a consumer a free trial of an app.</p>
<p>1. Offer a free &#8216;lite&#8217; version and a paid for &#8216;full&#8217; version.</p>
<p>2. Offer in app purchases (eg free app with basics, but can buy extra levels).</p>
<p>  I cant find any real stats comparing the two ways, but there are obvious problems with both.</p>
<p>The ipad App store has (at the time of writing) about 109,000 apps in it. A search for &#8220;lite&#8221; apps showed 4400 results.  That&#8217;s 4% of the apps!! (more if you consider that all those apps are essentially duplicated in the app store because they have &#8216;lite&#8217; and &#8216;full&#8217; versions.</p>
<p>So when browsing the app store &#8211; 8% of the apps you&#8217;ll see are duplicates with arbitrary separation between trial and full.  Each of these apps appears in the app store twice (noise) with separate reviews (inconsistency).</p>
<p>For the in app purchase &#8211; the common metaphor is buying extra levels, widgets, or content.  Technically it is a lot more work, which will prevent a lot of developers from doing it just to offer a trial and full version i the same app. Secondly &#8211; although I can&#8217;t find any info comparing this, my hunch from my own behavior is to avoid apps that offer in app purchases unless they are content based (eg buy a new book).  I don&#8217;t like the idea of paying for new levels or add-ons.</p>
<p>Here is what I&#8217;d like to see: an Apple sanctioned way of offering in app upgrades.  When a user searches for an app they see a single app in the app store. They can install it as either the lite or full version.  Either way, the same app is installed, and the app itself has an API call to check what &#8216;level&#8217; it is.  Eg &#8211; [theApplication isServiceLevelLite]. There would also need to be an API to upgrade from within the app.</p>
<p>This type of solution has a lot of benefits.</p>
<p>- cleans up the mess of doubled up applications (again &#8211; 8% of the app store)</p>
<p>- consolidates incorrectly segregated reviews</p>
<p>- a consistent way of upgrading apps if they are upgradeable</p>
<p>- a less intimidating way (than in app purchases) to offer an upgraded version of an app</p>
<p>- a consistent trial/full paradigm </p>
<p>I think it&#8217;s a big win for both developers and consumers.  The lite/full app versions is clearly a paradigm that has become commonplace &#8211; and I can&#8217;t wait until app decides to properly streamline it.</p>
<p>&#8212;</p>
<p>Update : Aparently 66% of in-app revenue is from &#8216;consumable&#8217; goods. (At least for apps that are games).: <a href="http://techcrunch.com/2011/08/16/what-ios-android-gamers-actually-spend-money-on/">http://techcrunch.com/2011/08/16/what-ios-android-gamers-actually-spend-money-on/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2011/08/12/lite-and-full-versions-of-apps-there-is-a-better-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Illegal UTF-8 Characters in Rails</title>
		<link>http://geoff.evason.name/2010/10/07/testing-illegal-utf-8-characters-in-rails/</link>
		<comments>http://geoff.evason.name/2010/10/07/testing-illegal-utf-8-characters-in-rails/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 00:05:25 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=233</guid>
		<description><![CDATA[I wanted to make a User model given an error it the password contained an illegal UTF8 character.
Here is the spec

it 'should give an error on illegal characters' do
  # The hex code FF is illegal as a UTF8 character
  illegal_utf8_string = ("pass%c" %0xff)  

  user = User.new(:email =&#62; 'test@test.com',
  [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to make a User model given an error it the password contained an illegal UTF8 character.</p>
<p>Here is the spec</p>
<pre><code class="ruby">
it 'should give an error on illegal characters' do
  # The hex code FF is illegal as a UTF8 character
  illegal_utf8_string = ("pass%c" %0xff)  

  user = User.new(:email =&gt; 'test@test.com',
      :password =&gt; illegal_utf8_string,
      :password_confirmation =&gt; illegal_utf8_string)
  user.should_not be_valid
  user.errors_on(:password).should include("has invalid characters.")
end
</code></pre>
<p>Here is the implementation</p>
<pre><code class="ruby">
def validate
  if @password.toutf8 != @password
    errors.add(:password, "has invalid characters.")
  end
end
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2010/10/07/testing-illegal-utf-8-characters-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nested has_many: through in Rails (or how to do a 3 table join)</title>
		<link>http://geoff.evason.name/2010/04/23/nested-has_many-through-in-rails-or-how-to-do-a-3-table-join/</link>
		<comments>http://geoff.evason.name/2010/04/23/nested-has_many-through-in-rails-or-how-to-do-a-3-table-join/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 10:17:33 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[has_many]]></category>
		<category><![CDATA[nested]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[through]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=201</guid>
		<description><![CDATA[Today I came across a problem that I would have expected would work in Rails (2.3.5), but doesn&#8217;t.  I wanted to use a has_many :through relationship on a association that was itself a has_many :through.
Here is an example.  Let&#8217;s say I have Group class, which has many users through memberships.  Further, a [...]]]></description>
			<content:encoded><![CDATA[<p>Today I came across a problem that I would have expected would work in Rails (2.3.5), but doesn&#8217;t.  I wanted to use a has_many :through relationship on a association that was itself a has_many :through.</p>
<p>Here is an example.  Let&#8217;s say I have Group class, which has many users through memberships.  Further, a user has many comments.  What I want is a simple way to get all the comments that were made by users in a group.</p>
<pre><code class="ruby">
class Group < ActiveRecord::Base
  has_many :memberships
  has_many :users, :through => :memberships

  # This is what I would like to do, but this does not work!
  # has_many :comments, :through => :users
end

class User < ActiveRecord::Base
  has_many :comments
  has_many :memberships
  has_many :groups, :through => :memberships
end

class Comment <  ActiveRecord::Base
  belongs_to :user
  has_many :likes

  named_scope :approved, :conditions => {:approved => true}
end

</code></pre>
<p>What I <strong>want<strong> is to be able to call</p>
<pre><code class="ruby">
  @group = Group.find(params[:id])
  @comments = @group.comments.approved.find(:all, :include => :likes)
</code></pre>
<hr />
<p><strong>Option #1 : Includes</strong> : use includes when loading the group so I can eager load the comments. Then I can collect them:</p>
<pre><code class="ruby">
  @group = Group.find(params[:id], :include => {:users, :comments})
  @comments = @group.users.map{|u| u.comments}.flatten
</code></pre>
<p><strong>Problems with Option #1</strong> :  First, it is inefficient.  If I don&#8217;t use the user objects anywhere, I&#8217;m loading them for nothing.  Second, I can&#8217;t use pagination or other filters easily on the comments association.</p>
<hr />
<p><strong>Option #2 : find_by_sql </strong>  : use a method on Group to load up comments, like so:</p>
<pre><code class="ruby">
class Group < ActiveRecord::Base
  has_many :memberships
  has_many :users, :through => :memberships

  # This is what I would like to do, but this does not work!
  # has_many :comments, :through => :users

  def comments
    # Use a 3 table sql join to load the comments for all users in this group.
    Comment.find_by_sql("
             SELECT c.* FROM comments c
               INNER JOIN users u ON u.id = c.user_id
                 INNER JOIN memberships m ON m.user_id = u.id
             WHERE m.group_id = #{id}")
  end
end
</code></pre>
<p><strong>Problems with Option #2</strong> :   You can&#8217;t do eager loading, pagination, or use any named scopes on the comments class.  So, if I wanted to load on &#8216;approved&#8217; comments I&#8217;d have to write another method. boo.</p>
<hr />
<p><strong>Option #3 : named_scope + method </strong>  : use a named_scope on Comment and a method on Group so that i can make the calls that I want to&#8230;</p>
<pre><code class="ruby">
class Group < ActiveRecord::Base
  has_many :memberships
  has_many :users, :through => :memberships

  # This is what I would like to do, but this does not work!
  # has_many :comments, :through => :users

  # This lets us call the code in a nice looking way:
  # e.g. group.comments.approved
  def comments
    Comment.all_for_group(self)
  end
end

class Comment <  ActiveRecord::Base
  belongs_to :user
  has_many :likes

  named_scope :approved, :conditions => {:approved => true}

  # perform the 3 table join in a way that will
  # let us also call include and other filters.
  named_scope :all_for_group, lambda{ |group|
      {
        :joins      => {:users, :memberships},
        :conditions => {:memberships => {:group_id => group.id},
        :select     => "DISTINCT `comments`.*"
      }
    }
end
</code></pre>
<p>Option #3 is definitely the cleanest, and what I would recommend.  </p>
<p>I&#8217;m not sure if Rails 3 supports nested has_many :through, but 2.3.5 does not.  There is a <a href="http://dev.rubyonrails.org/ticket/6461">(very old) ticket</a> for Rails.  There is also a <a href="http://github.com/ianwhite/nested_has_many_through">nested has_many :through plugin</a> that is has an experimental branch for 2.3.x.  I don&#8217;t like using things that are &#8216;experimental&#8217;.  </p>
<p>The number of times you need to do multiple has_many :through associations should be fairly small.  If you are doing it a lot, you should probably reconsider your data model.  In most cases, a simple named_scope and method ought to do the trick for you like it did for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2010/04/23/nested-has_many-through-in-rails-or-how-to-do-a-3-table-join/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>IE Error : File Download on Rails Form Post</title>
		<link>http://geoff.evason.name/2010/03/22/ie-error-file-download-on-rails-form-post/</link>
		<comments>http://geoff.evason.name/2010/03/22/ie-error-file-download-on-rails-form-post/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 04:41:36 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=98</guid>
		<description><![CDATA[If you are using Rails, you many notice that some form posts from IE (6/7) result in IE asking you where you want to save a file, even if your response is supposed to be a redirect.  It took me a while to figure out what was happening here so thought I&#8217;d share it [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using Rails, you many notice that some form posts from IE (6/7) result in IE asking you where you want to save a file, even if your response is supposed to be a redirect.  It took me a while to figure out what was happening here so thought I&#8217;d share it and save someone else the trouble.</p>
<p>It seems that IE doesn&#8217;t always send the correct accepts headers for a post. Rails (v2.3.5 at least) if it can&#8217;t find a matching format in a responds_to block, will just render the first response.</p>
<p>So, make sure you always order your responds_to blocks so that html is first.</p>
<pre><code class="ruby">def action
  # my action code
  respond_to do |format|
    # Always make sure HTML is first otherwise
    # you'll send a js response to IE!
    format.html { redirect_to '/' }
    format.js { }
  end
end
</code></pre>
<p>Otherwise, when you submit a form, Rails will render the js result, which IE sees as a file download.</p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2010/03/22/ie-error-file-download-on-rails-form-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Set Cookie in HTML Body for Rails 2.3.2</title>
		<link>http://geoff.evason.name/2009/05/26/set-cookie-in-html-body-for-rails-232/</link>
		<comments>http://geoff.evason.name/2009/05/26/set-cookie-in-html-body-for-rails-232/#comments</comments>
		<pubDate>Tue, 26 May 2009 04:33:55 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=69</guid>
		<description><![CDATA[I recently upgraded an app to rails 2.3 and on many pages on my local machine the top of the HTML body included something like this:

Set-Cookie: _myapp_session_id=BAh7B...; path=/; HttpOnly

I couldn&#8217;t figure out what was happening until I found this forum post which explained that the problem was related to passenger 2.0.6.  To fix the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded an app to rails 2.3 and on many pages on my local machine the top of the HTML body included something like this:</p>
<pre><code>
Set-Cookie: _myapp_session_id=BAh7B...; path=/; HttpOnly
</code></pre>
<p>I couldn&#8217;t figure out what was happening until I found <a href="http://railsforum.com/viewtopic.php?id=27180" title"rails 2.3 cookie in body">this forum post</a> which explained that the problem was related to passenger 2.0.6.  To fix the problem I just needed to update the version of passenger I was running.</p>
<p>To update passenger (on a mac) was pretty simple.  Just run the following 2 commands:</p>
<pre><code>
sudo gem install passenger
sudo passenger-install-apache2-module
</code></pre>
<p>Depending on how you set up your local apache instance, you may also need to update the config. I needed to update /etc/apache2/httpd.conf to</p>
<pre><code>
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.1.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.1.2
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2009/05/26/set-cookie-in-html-body-for-rails-232/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Swiff Uploader argumentsToXML Error</title>
		<link>http://geoff.evason.name/2009/05/06/swiff-uploader-argumentstoxml-error/</link>
		<comments>http://geoff.evason.name/2009/05/06/swiff-uploader-argumentstoxml-error/#comments</comments>
		<pubDate>Wed, 06 May 2009 07:57:30 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[fancyuploader]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[swiff]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=68</guid>
		<description><![CDATA[I was working on getting the Swiff uploader working with a wedding vendors application and was getting the following javascript error:

__flash__argumentsToXML is not defined

After banging my head for a while (the exact same code was working fine on another website) I discovered the problem.  It was a really silly oversight on my part.  [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on getting the <a href="http://digitarald.de/project/fancyupload/">Swiff uploader</a> working with a <a href="http://vendors.momentville.com">wedding vendors</a> application and was getting the following javascript error:</p>
<pre><code>
__flash__argumentsToXML is not defined
</code></pre>
<p>After banging my head for a while (the exact same code was working fine on another website) I discovered the problem.  It was a really silly oversight on my part.  I didn&#8217;t have the file Swiff.Uploader.swf in the right location!!!</p>
<p>Make sure that when create a swiffy object you have a the above swiff file where you set it in the path:</p>
<pre><code class='html'>
    $('upload-fallback').removeClass('hide');
  	var swiffy = new Fancyuploader2($('upload-status'), $('upload-list'), {
  	...
        /* This is the important bit re: this blog post */
  		'path': '/swf/Swiff.Uploader.swf',
  	...
  		'target': 'upload-browse-images', /* This is for flash 10 */
  		'onLoad': function() {
  			$('upload-status').removeClass('hide');
  			$('upload-fallback').destroy();
  		}

  	});
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2009/05/06/swiff-uploader-argumentstoxml-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading from Rails 2.2.2 to Rails 2.3.2</title>
		<link>http://geoff.evason.name/2009/05/04/upgrading-from-rails-222-to-rails-232/</link>
		<comments>http://geoff.evason.name/2009/05/04/upgrading-from-rails-222-to-rails-232/#comments</comments>
		<pubDate>Mon, 04 May 2009 11:32:44 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[2.3.2]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=67</guid>
		<description><![CDATA[I recently upgraded one of my apps from Rails 2.2.2 to Rails 2.3.2.  It was actually a really easy upgrade, but there were  few little gotchas I had to watch out for, so I thought I&#8217;d share my experience.
Upgrading Rails
I imagine there is probably a better way to do this, but since I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded one of my apps from Rails 2.2.2 to Rails 2.3.2.  It was actually a really easy upgrade, but there were  few little gotchas I had to watch out for, so I thought I&#8217;d share my experience.</p>
<p><strong>Upgrading Rails</strong></p>
<p>I imagine there is probably a better way to do this, but since I change the version of rails so infrequently I&#8217;m not sure.  (If there is a better way, please let me know). My flow is as follows:</p>
<p>Install the new version of the rails gems:</p>
<pre><code>
sudo gem install rails
</code></pre>
<p>Branch your app</p>
<pre><code>
git branch newrails
git co newrails
</code></pre>
<p>Remove the old version of frozen gems</p>
<pre><code>
git rm -rf vendor/rails
</code></pre>
<p>Update your config/environment.rb file to the new version of rails:</p>
<pre><code class='ruby'>
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
</code></pre>
<p>freeze the new gems</p>
<pre><code>
rake rails:freeze:gems
</code></pre>
<p>Please note, that if instead of installing the new gems and freezing them from your local gems, it looks as though you need to be careful if using rake rails:freeze:gems.  You can read more about it in the <a href="http://weblog.rubyonrails.org/2009/3/20/this-week-in-edge-rails" title="rails 2.3.2.1">official post</a> or in <a href="http://afreshcup.com/2009/03/18/rails-2321/" title="rails 2.3.2.1">this post</a> which I found more understandable.</p>
<p><strong>Testing Your App</strong></p>
<p>The first and most obvious error you will run into is this:</p>
<pre><code class='ruby'>
uninitialized constant ApplicationController
</code></pre>
<p>This is because as of <a href="http://guides.rubyonrails.org/2_3_release_notes.html#application-controller-renamed">Rails 2.3 application.rb is now application_controller.rb</a>.  To fix this just do</p>
<pre><code>
git mv app/controllers/application.rb app/controllers/application_controller.rb
</code></pre>
<p>The next error I got was</p>
<pre><code>
undefined method `relative_url_root' for #<actionController::Request:0x373adf4>
</code></pre>
<p>I narrowed this down to a stylesheet_link_tag call.  I got around this by updating the <a href="http://synthesis.sbecker.net/pages/asset_packager" title="asset packager">asset_packager</a> plugin, and updating HAML to 2.0.9.  By the way, if you&#8217;re not using asset packager, you should be.</p>
<p>That&#8217;s it!  It overall was a very easy upgrade that took much less time to test than my <a href="http://geoff.evason.name/2009/01/15/upgrading-an-app-from-rails-21-to-rails-222/">rails 2.1 to rails 2.2.2 upgrade</a>.</p>
<p>Here are <a href="http://giantrobots.thoughtbot.com/2009/4/15/rails-2-3-2-upgrade-gotchas">some other rails 2.3 gotchas</a> to watch out for courtesy of thoughtbot.</p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2009/05/04/upgrading-from-rails-222-to-rails-232/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Dear Yahoo &#8211; Please get with the program (or, why am I still getting traffic to my old IP even though I updated my DNS entires?)</title>
		<link>http://geoff.evason.name/2009/04/06/dear-yahoo-please-get-with-the-program/</link>
		<comments>http://geoff.evason.name/2009/04/06/dear-yahoo-please-get-with-the-program/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 05:52:11 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[ttl]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=66</guid>
		<description><![CDATA[Recently we move our wedding website application to ec2 servers.  Part of doing so meant updating DNS entries.  5 days after changing them, I&#8217;m still seeing traffic to the old servers&#8230;  
Part of moving to ec2 required us to move to a 3rd party DNS solution.  We chose DynDNS.  Their offering is pretty good, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently we move our wedding website application to ec2 servers.  Part of doing so meant updating DNS entries.  5 days after changing them, I&#8217;m still seeing traffic to the old servers&#8230; <img src='http://geoff.evason.name/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Part of moving to ec2 required us to move to a 3rd party DNS solution.  We chose <a href="http://www.dyndns.com" title="dns hosting">DynDNS</a>.  Their offering is pretty good, but I&#8217;m less then impressed with their support.  [their response time is about 24 hours and when I asked why I'd still be getting traffic to the old IP and what I might do about it they basically said "that's not our problem"...]</p>
<p>Anyway &#8211; before changing hosts I set the DNS TTL to 20s.  I was surprised to see traffic to the old IP a day later.  On the second day I got worried. After a few more days I was even more so&#8230;</p>
<p>After looking through the logs a bit more it seems that almost all of the traffic in the last two days is coming from the IP 72.30.79.108 &#8211; which turns out to be one of <a href="http://whois.domaintools.com/72.30.79.108">yahoo&#8217;s crawlers&#8230;</a></p>
<p>So, Yahoo, if you read this, please make sure your crawlers respect DNS records&#8230; Otherwise you&#8217;re getting stale data&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2009/04/06/dear-yahoo-please-get-with-the-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting a Capistrano Variable from the Command Line</title>
		<link>http://geoff.evason.name/2009/03/27/setting-a-capistrano-variable-from-the-command-line/</link>
		<comments>http://geoff.evason.name/2009/03/27/setting-a-capistrano-variable-from-the-command-line/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 00:57:46 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=65</guid>
		<description><![CDATA[It took me a little while to find a solution for this, so I thought I&#8217;d post it.
I was cleaning some deployment dirs and wanted, just for this instance, to only leave 1 release as opposed to the 5 releases that capistrano leaves by default. Keep in mind this was across about 6 apps and [...]]]></description>
			<content:encoded><![CDATA[<p>It took me a little while to find a solution for this, so I thought I&#8217;d post it.</p>
<p>I was cleaning some deployment dirs and wanted, just for this instance, to only leave 1 release as opposed to the 5 releases that capistrano leaves by default. Keep in mind this was across about 6 apps and 2 stages for each.</p>
<p>Option 1: Add the following to the deploy.rb files:</p>
<pre><code class="ruby">
set :keep_releases, 1
</code></pre>
<p>That would require changing them all back afterwards.</p>
<p>Options 2: Set the capistrano variable from the command line:</p>
<pre><code class="ruby">
cap deploy:cleanup -s keep_releases=1
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2009/03/27/setting-a-capistrano-variable-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Domain Name Registration API Plugin for Rails</title>
		<link>http://geoff.evason.name/2009/02/26/domain-name-registration-api-plugin-for-rails/</link>
		<comments>http://geoff.evason.name/2009/02/26/domain-name-registration-api-plugin-for-rails/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 00:55:50 +0000</pubDate>
		<dc:creator>Geoff</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[domain name]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[register]]></category>

		<guid isPermaLink="false">http://geoff.evason.name/?p=63</guid>
		<description><![CDATA[If you&#8217;ve ever had an app where you want to allow users to purchase a domain name, you&#8217;ve probably felt the pain of trying to interface to a registrar.  Although some have APIs, my search found that most were hard to interface to or poorly documented.  Many even required signing up as a partner (and [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever had an app where you want to allow users to purchase a domain name, you&#8217;ve probably felt the pain of trying to interface to a registrar.  Although some have APIs, my search found that most were hard to interface to or poorly documented.  Many even required signing up as a partner (and paying a big fee) before you could even get documenation.</p>
<p>After much searching and experimenting I decided to go with <a href="http://www.register.com">Register.com</a>&#8217;s XML api for my app.  They offered the best API, and the easiest signup path.</p>
<p>I bundled the main part of the interface into a rails plugin.  The plugin is stored on github: <a href="http://github.com/geoffevason/register-api/tree/master" title="register.com api for rails">http://github.com/geoffevason/register-api/tree/master</a></p>
<p>To install the plugin do this:</p>
<pre><code>
script/plugin install git://github.com/geoffevason/register-api.git
</code></pre>
<p>The plugin is of little value unless you have spoken to register.com and have received their API documentation.  You need to register as a partner (it&#8217;s free) and have the IP of your dev machine whitelisted for testing.</p>
<p>Most of the info on use is in the readme in the plugin.  You can call any of the Register.com API methods by calling Register::API.</p>
<pre><code class='ruby'>
# A call to the API looks like this
# Register::Api::Call(params)

# Example to check if the domain name google.com is available
Register::Api::Check( :tld => 'com', :sld => 'google' )
</code></pre>
<p>The plugin also contains a few helper methods and classes.  If all you want to do is let people search for an available domain, and purchase it, then everything you need is in these helpers.  Some important logic remains in my controllers, but if you have any questions, let me know.  geoff [a] evason.name</p>
]]></content:encoded>
			<wfw:commentRss>http://geoff.evason.name/2009/02/26/domain-name-registration-api-plugin-for-rails/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

