<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Diego Carrion</title>
	
	<link>http://www.diegocarrion.com</link>
	<description>loves bits, tits and beers</description>
	<pubDate>Sat, 27 Nov 2010 22:21:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/diegocarrion" /><feedburner:info uri="diegocarrion" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdiegocarrion" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdiegocarrion" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdiegocarrion" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/diegocarrion" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdiegocarrion" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fdiegocarrion" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdiegocarrion" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
		<title>Secure your Signal server with the Signal Authentication plugin</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/9_k-8P-FZ7g/</link>
		<comments>http://www.diegocarrion.com/2010/11/27/secure-your-signal-server-with-the-signal-authentication-plugin/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 22:21:11 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Gonow]]></category>

		<category><![CDATA[continuous integration]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[signal]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[github]]></category>

		<category><![CDATA[gitorious]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[signal-auth]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=138</guid>
		<description><![CDATA[Signal doesn&#8217;t come with authentication support by default, but as it is a Rails application, is very easy to extend its functionality with a plugin.
We at Gonow started using Signal with Gitorious in a intranet and as we trust each other, authentication was not a problem. As time passed by, we changed Gitorious for Github, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/dcrec1/signal">Signal</a> doesn&#8217;t come with authentication support by default, but as it is a <a href="http://rubyonrails.org/">Rails</a> application, is very easy to extend its functionality with a plugin.</p>
<p>We at <a href="http://gonow.com.br/">Gonow</a> started using <a href="https://github.com/dcrec1/signal">Signal</a> with <a href="http://gitorious.org/">Gitorious</a> in a intranet and as we trust each other, authentication was not a problem. As time passed by, we changed <a href="http://gitorious.org/">Gitorious</a> for <a href="https://github.com/">Github</a>, so we exposed our server to the internet and as some projects must stay secret, we needed a way to secure them and this way <a href="https://github.com/dcrec1/signal-auth">signal-auth</a> was born.</p>
<p>As a <a href="https://github.com/dcrec1/signal">Signal</a> plugin is nothing more than a <a href="http://rubyonrails.org/">Rails</a> plugin, the installation is like any other:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">script<span style="color: #000000; font-weight: bold;">/</span>plugin <span style="color: #c20cb9; font-weight: bold;">install</span> git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>dcrec1<span style="color: #000000; font-weight: bold;">/</span>signal-auth.git</pre></div></div>

<p>After this, you only need to customize <em>config/signal-auth.yml</em> with your desired user and password.</p>
<p><em>If you appreciate this work, please consider to <a href="http://workingwithrails.com/recommendation/new/person/13580-diego-carrion">recommend me</a> at <a href="http://workingwithrails.com/">Working With Rails</a> and to <a href="http://www.twitter.com/dcrec1">follow</a> me on <a href="http://www.twitter.com">Twitter</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/9_k-8P-FZ7g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/11/27/secure-your-signal-server-with-the-signal-authentication-plugin/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/11/27/secure-your-signal-server-with-the-signal-authentication-plugin/</feedburner:origLink></item>
		<item>
		<title>Signal playing nice with Bundler</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/2nii9GnMI7w/</link>
		<comments>http://www.diegocarrion.com/2010/09/26/signal-playing-nice-with-bundler/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 00:40:10 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Bundler]]></category>

		<category><![CDATA[continuous integration]]></category>

		<category><![CDATA[signal]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=131</guid>
		<description><![CDATA[When Signal changed to Bundler as the gem dependency manager, all the projects inside it that were also using Bundler started to break, as some gems were not being loaded. This behavior did also occur with other continuous integration tools that also use Bundler, like Integrity.
This problem happend because when Bundler is loaded it sets [...]]]></description>
			<content:encoded><![CDATA[<p>When <a href="http://github.com/dcrec1/signal">Signal</a> changed to <a href="http://gembundler.com/">Bundler</a> as the gem dependency manager, all the projects inside it that were also using <a href="http://gembundler.com/">Bundler</a> started to break, as some gems were not being loaded. This behavior did also occur with other continuous integration tools that also use <a href="http://gembundler.com/">Bundler</a>, like <a href="http://integrityapp.com/">Integrity</a>.</p>
<p>This problem happend because when <a href="http://gembundler.com/">Bundler</a> is loaded it sets some environment variables like BUNDLE_GEMFILE and this environment variables were being read by the projects inside <a href="http://github.com/dcrec1/signal">Signal</a>.</p>
<p>Let&#8217;s suppose <a href="http://github.com/dcrec1/signal">Signal</a> is installed in /var/local/apps/signal. When <a href="http://github.com/dcrec1/signal">Signal</a> is started, it will load <a href="http://gembundler.com/">Bundler</a> and <a href="http://gembundler.com/">Bundler</a> will try to read the environment variable BUNDLE_GEMFILE to know where the Gemfile is. As BUNDLE_GEMFILE is empty, it will read the Gemfile in the application root path and set this path to BUNDLE_GEMFILE. At this moment, the value of BUNDLE_GEMFILE is /var/local/apps/signal/Gemfile.</p>
<p>Now lets imagine we have a project inside <a href="http://github.com/dcrec1/signal">Signal</a> called Panthers and that his build script is like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">bundle <span style="color: #c20cb9; font-weight: bold;">install</span>
rake spec</pre></div></div>

<p>When this script is executed by <a href="http://github.com/dcrec1/signal">Signal</a>, it will load <a href="http://gembundler.com/">Bundler</a> and again <a href="http://gembundler.com/">Bundler</a> will try to read the environment variable BUNDLE_GEMFILE to know where the Gemfile is. The problem is that at this time BUNDLE_GEMFILE would be set to /var/local/apps/signal/Gemfile and because of this <a href="http://gembundler.com/">Bundler</a> will load <a href="http://github.com/dcrec1/signal">Signal</a>&#8217;s gems instead of Panther&#8217;s gems.</p>
<p>To resolve this, now when <a href="http://github.com/dcrec1/signal">Signal</a> executes a build script, it unsets some environment variables like BUNDLE_GEMFILE and RAILS_ENV, trying to simulate a &#8220;clean&#8221; environment.</p>
<p>If you know a better solution for this, please let me know.</p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/2nii9GnMI7w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/09/26/signal-playing-nice-with-bundler/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/09/26/signal-playing-nice-with-bundler/</feedburner:origLink></item>
		<item>
		<title>Deploy your Rails 3 applications à la Heroku with Inploy</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/sgTYDnNIflk/</link>
		<comments>http://www.diegocarrion.com/2010/09/01/deploy-your-rails-3-applications-a-la-heroku-with-inploy/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 01:52:26 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Heroku]]></category>

		<category><![CDATA[Inploy]]></category>

		<category><![CDATA[Rails 3]]></category>

		<category><![CDATA[deployment]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[rails3]]></category>

		<category><![CDATA[Deploy]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=122</guid>
		<description><![CDATA[I&#8217;m not a fan of Heroku&#8217;s deployment way, but I know that many people is and that many of them don&#8217;t know that with Inploy you can deploy your Rails 3 applications in a similar way.
Thomas Ritz contributed with Inploy creating a template called rails3_push. The template modifies Inploy so it creates a repository in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a fan of <a href="http://heroku.com/">Heroku</a>&#8217;s deployment way, but I know that many people is and that many of them don&#8217;t know that with <a href="http://github.com/dcrec1/inploy">Inploy</a> you can deploy your <a href="http://rubyonrails.org/">Rails</a> 3 applications in a similar way.</p>
<p><a href="http://github.com/thomasritz">Thomas Ritz</a> contributed with <a href="http://github.com/dcrec1/inploy">Inploy</a> creating a template called <a href="http://github.com/dcrec1/inploy/blob/master/lib/inploy/templates/rails3_push.rb">rails3_push</a>. The template modifies <a href="http://github.com/dcrec1/inploy">Inploy</a> so it creates a repository in the server on setup and pushes to it on every update, being followed by all the tasks that it executes by default on every deploy.</p>
<p>In order to use this template, like any other, you must specify it in the deploy.rb file:</p>
<p><code> </code></p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">template = <span style="color:#ff3333; font-weight:bold;">:rails3_push</span>
application = <span style="color:#996600;">&quot;tweerer&quot;</span>
hosts = <span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#40;</span>...<span style="color:#006600; font-weight:bold;">&#41;</span>
...</pre></div></div>

<p></code></p>
<p>After that, to setup your server and to deploy to it, you can execute respectively the following commands:</p>
<p><code> </code></p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">inploy setup
inploy</pre></div></div>

<p></code></p>
<p><em>If you appreciate this work, please consider to <a href="http://workingwithrails.com/recommendation/new/person/13580-diego-carrion">recommend me</a> at <a href="http://workingwithrails.com/">Working With Rails</a> and to <a href="http://www.twitter.com/dcrec1">follow</a> me on <a href="http://www.twitter.com">Twitter</a>.</em></p>
<p><em></em></p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/sgTYDnNIflk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/09/01/deploy-your-rails-3-applications-a-la-heroku-with-inploy/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/09/01/deploy-your-rails-3-applications-a-la-heroku-with-inploy/</feedburner:origLink></item>
		<item>
		<title>Test today your JavaScript code in a Rails 3 application with Blue Ridge</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/PXpLAkoTxqA/</link>
		<comments>http://www.diegocarrion.com/2010/07/01/test-today-your-javascript-code-in-a-rails-3-application-with-blue-ridge/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 15:52:58 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[BDD]]></category>

		<category><![CDATA[Blue Ridge]]></category>

		<category><![CDATA[Rails 3]]></category>

		<category><![CDATA[TDD]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[rails3]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=119</guid>
		<description><![CDATA[Case you want to test today your JavaScript code in a Rails 3 application in a simple way, Kristian Mandrup forked Blue Ridge and migrated the generators to the new interface. The commits haven&#8217;t been merged yet into the official repository and the code has some minor bugs, so I created another fork and fixed [...]]]></description>
			<content:encoded><![CDATA[<p>Case you want to test today your JavaScript code in a <a href="http://rubyonrails.org/">Rails</a> 3 application in a simple way, <a href="http://twitter.com/kmandrup">Kristian Mandrup</a> forked <a href="http://github.com/relevance/blue-ridge">Blue Ridge</a> and migrated the generators to the new interface. The commits haven&#8217;t been merged yet into the official repository and the code has some minor bugs, so I created <a href="http://github.com/dcrec1/blue-ridge/tree/rails3">another fork</a> and fixed them.</p>
<p>Until all the commits got merged in both repositories, you can execute the following commands to get a configured environment:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git submodule add <span style="color: #660033;">-b</span> rails3 git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>dcrec1<span style="color: #000000; font-weight: bold;">/</span>blue-ridge.git .<span style="color: #000000; font-weight: bold;">/</span>vendor<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>blue-ridge
rails g blue_ridge:skeleton
rails g blue_ridge:javascript_spec core
rake spec:javascripts</pre></div></div>

<p>Case you don&#8217;t know <a href="http://github.com/relevance/blue-ridge">Blue Ridge</a>, <a href="http://twitter.com/drnic">Dr. Nic</a> posted some time ago about the tool and he uploaded also a video from a presentation he gave at <a href="http://skillsmatter.com/event/ajax-ria/rails-underground-2009">Rails Underground 2009</a>.</p>
<p><em>If you appreciate this work, please consider to <a href="http://workingwithrails.com/recommendation/new/person/13580-diego-carrion">recommend me</a> at <a href="http://workingwithrails.com/">Working With Rails</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/PXpLAkoTxqA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/07/01/test-today-your-javascript-code-in-a-rails-3-application-with-blue-ridge/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/07/01/test-today-your-javascript-code-in-a-rails-3-application-with-blue-ridge/</feedburner:origLink></item>
		<item>
		<title>Develop Rails 3 applications with your favorites gems without headaches</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/T4spOKvV7Is/</link>
		<comments>http://www.diegocarrion.com/2010/06/10/develop-rails-3-applications-with-your-favorites-gems-without-headaches/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 10:50:42 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Rails 3]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[template]]></category>

		<category><![CDATA[rails3]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=115</guid>
		<description><![CDATA[As today, starting developing a Rails 3 application using the default libraries is very easy, but when we want to use those tools that were great in Rails 2, some problems begin to appear.
These problems aren&#8217;t caused in any way due that Rails or the libraries are unstable. What happens is that a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>As today, starting developing a <a href="http://rubyonrails.org/">Rails</a> 3 application using the default libraries is very easy, but when we want to use those tools that were great in <a href="http://rubyonrails.org/">Rails</a> 2, some problems begin to appear.</p>
<p>These problems aren&#8217;t caused in any way due that <a href="http://rubyonrails.org/">Rails</a> or the libraries are unstable. What happens is that a lot of plugins and gems had to update their integration with the framework and some chose to create pre-release versions, others to create branches and others just to bump to a new version, which means we have to hunt which version to use and from where in order to get compatible features.</p>
<p>To simplify the work of many people and to encourage the adoption of <a href="http://rubyonrails.org/">Rails</a> 3, I decided to create a <a href="http://github.com/dcrec1/rails3_template/">template</a> that configures the gems I most use in my projects and installs them in the application, along with other tasks that can be easily followed in the <a href="http://github.com/dcrec1/rails3_template/blob/master/main.rb">script</a>.</p>
<p><em>If you appreciate this work, please consider to <a href="http://workingwithrails.com/recommendation/new/person/13580-diego-carrion">recommend me</a> at <a href="http://workingwithrails.com/">Working With Rails</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/T4spOKvV7Is" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/06/10/develop-rails-3-applications-with-your-favorites-gems-without-headaches/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/06/10/develop-rails-3-applications-with-your-favorites-gems-without-headaches/</feedburner:origLink></item>
		<item>
		<title>Ruby annotations</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/cq9LMFS3lh8/</link>
		<comments>http://www.diegocarrion.com/2010/05/27/ruby-annotations/#comments</comments>
		<pubDate>Fri, 28 May 2010 03:36:02 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Metaprogramming]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[canivete]]></category>

		<category><![CDATA[method_added]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=110</guid>
		<description><![CDATA[In the programming world, an annotation is a way to mark the code that is below it for many purposes. In Cucumber, the tags it uses are a kind of annotation to apply callbacks and classify some features and scenarios:

@billing
Feature: Verify billing
&#160;
  @important
  Scenario: Missing product description
&#160;
  Scenario: Several products

In the case [...]]]></description>
			<content:encoded><![CDATA[<p>In the programming world, an annotation is a way to mark the code that is below it for many purposes. In <a href="http://cukes.info/">Cucumber</a>, the tags it uses are a kind of annotation to apply callbacks and classify some features and scenarios:</p>

<div class="wp_syntax"><div class="code"><pre class="cucumber" style="font-family:monospace;">@billing
Feature: Verify billing
&nbsp;
  @important
  Scenario: Missing product description
&nbsp;
  Scenario: Several products</pre></div></div>

<p>In the case of <a href="http://vraptor.caelum.com.br/">VRaptor</a>, we can use annotations to specify a controller as a <a href="http://pt.wikipedia.org/wiki/REST">REST</a> resource or to restrict the access method to an action:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Resource
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ShoppingCartController <span style="color: #009900;">&#123;</span>
    ...
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ProductsController <span style="color: #009900;">&#123;</span>
    @Post
    @Path<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/products&quot;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> add<span style="color: #009900;">&#40;</span>Product product<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>...<span style="color: #009900;">&#125;</span>
    ...
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In the <a href="http://www.ruby-lang.org/">Ruby</a> language, two annotations that are very used are the methods <a href="http://ruby-doc.org/core/classes/Module.html#M001640">protected</a> and <a href="http://ruby-doc.org/core/classes/Module.html#M001641">private</a>, which without arguments restrict the visibility of the methods defined below them:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> User
  <span style="color:#9966CC; font-weight:bold;">def</span> jump; <span style="color:#9966CC; font-weight:bold;">end</span>;
&nbsp;
  protected
  <span style="color:#9966CC; font-weight:bold;">def</span> eat; <span style="color:#9966CC; font-weight:bold;">end</span>;
  <span style="color:#9966CC; font-weight:bold;">def</span> flirt; <span style="color:#9966CC; font-weight:bold;">end</span>;
&nbsp;
  private
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#CC0066; font-weight:bold;">sleep</span>; <span style="color:#9966CC; font-weight:bold;">end</span>;
  <span style="color:#9966CC; font-weight:bold;">def</span> dream; <span style="color:#9966CC; font-weight:bold;">end</span>;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>In some situations we may want to annotate our code like this, for example to specify that a method is deprecated, functionality that is offered by the gem <a href="http://github.com/qmx/canivete">Canivete</a> from <a href="http://twitter.com/qmx">Douglas Campos</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> Bomb
  deprecate
  <span style="color:#9966CC; font-weight:bold;">def</span> explode; <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>In the previous code, when somebody calls Bomp#explode, the interpreter will effectively execute the method, but also will output: <em>Warning: calling deprecated method Bomb.explode</em>.</p>
<p>The key to this behavior is the <a href="http://ruby-doc.org/core/classes/Module.html#M001662">method_added</a> method which is present in all Ruby modules and which is called every time a method is defined, receiving the name of the method as the parameter.</p>
<p>We can use this method, for example, to create an annotation that specifies that the methods declared below it can only be called by an admin, something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#9966CC; font-weight:bold;">Module</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> method_added<span style="color:#006600; font-weight:bold;">&#40;</span>name<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#0066ff; font-weight:bold;">@_admin_only</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>? <span style="color:#9966CC; font-weight:bold;">or</span> <span style="color:#0066ff; font-weight:bold;">@_proxy_method</span>
      <span style="color:#0066ff; font-weight:bold;">@_proxy_method</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
      alias_method <span style="color:#996600;">&quot;_admin_#{name}&quot;</span>, name
      module_eval <span style="color:#006600; font-weight:bold;">&lt;&lt;-</span><span style="color:#CC0066; font-weight:bold;">STRING</span>
        <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#008000; font-style:italic;">#{name}(*args, &amp;block)</span>
          _admin_<span style="color:#008000; font-style:italic;">#{name}(*args, &amp;block) if admin?</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#CC0066; font-weight:bold;">STRING</span>
      <span style="color:#0066ff; font-weight:bold;">@_proxy_method</span> = <span style="color:#0000FF; font-weight:bold;">false</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> admin_only
    <span style="color:#0066ff; font-weight:bold;">@_admin_only</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> User
  <span style="color:#9966CC; font-weight:bold;">def</span> admin?
    <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#0000FF; font-weight:bold;">true</span>, <span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0066; font-weight:bold;">rand</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  admin_only
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> update_password
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;password updated&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> restart_server
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;server restarted&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>In the previous code, #admin? will randonmly return true or false and depending of the result the called method will be executed or not.</p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/cq9LMFS3lh8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/05/27/ruby-annotations/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/05/27/ruby-annotations/</feedburner:origLink></item>
		<item>
		<title>Following Pivotal Tracker projects with Kilt</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/NnFIPyG6t50/</link>
		<comments>http://www.diegocarrion.com/2010/03/30/following-pivotal-tracker-projects-with-kilt/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 20:11:49 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Pivotal Tracker]]></category>

		<category><![CDATA[RubyGems]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[gem]]></category>

		<category><![CDATA[kilt]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=107</guid>
		<description><![CDATA[I&#8217;m a big fan of Pivotal Tracker. When we used it at Gonow, the team I was part of did sit at a single table and that was very cool, because even when using the tool, it was very easy to tell everybody what task we were picking or delivering.
When I had the opportunity to work with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of <a href="http://www.pivotaltracker.com/">Pivotal Tracker</a>. When we used it at <a href="http://www.gonow.com.br/">Gonow</a>, the team I was part of did sit at a single table and that was very cool, because even when using the tool, it was very easy to tell everybody what task we were picking or delivering.</p>
<p>When I had the opportunity to work with Pivotal in a remote team, I did miss to know what was happening in real time, so I decided to create <a href="http://github.com/dcrec1/kilt">Kilt</a>.</p>
<p><a href="http://github.com/dcrec1/kilt">Kilt</a> is a daemon created with Ruby that requests the updates of the projects an user is involved with and notifies about them:</p>
<p><img src="http://img684.imageshack.us/img684/4875/screenshot20100319at349.png" alt="Kilt" /></p>
<p>With <a href="http://github.com/dcrec1/kilt">Kilt</a> I can keep working and at the same time being informed of what is happening in the projects I&#8217;m working on.</p>
<p>To install <a href="http://github.com/dcrec1/kilt">Kilt</a> you just need to download the gem and execute <em>kilt-install</em> with your token:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> kilt
kilt-install TOKEN</pre></div></div>

<p>In the case you don&#8217;t know your token, you can execute this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">curl <span style="color: #660033;">-u</span> USERNAME:PASSWORD <span style="color: #660033;">-X</span> GET https:<span style="color: #000000; font-weight: bold;">//</span>www.pivotaltracker.com<span style="color: #000000; font-weight: bold;">/</span>services<span style="color: #000000; font-weight: bold;">/</span>v3<span style="color: #000000; font-weight: bold;">/</span>tokens<span style="color: #000000; font-weight: bold;">/</span>active</pre></div></div>

<p>The previous command will return a xml document with the token and id of the given user. Case you didn&#8217;t like the command, another ways of retrieving the token can be found in the Pivotal Tracker <a href="http://www.pivotaltracker.com/help/api?version=v3#retrieve_token">documentation</a>.</p>
<p>Once installed <a href="http://github.com/dcrec1/kilt">Kilt</a>, you can initialize it by executing:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">kilt-app</pre></div></div>

<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/NnFIPyG6t50" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/03/30/following-pivotal-tracker-projects-with-kilt/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/03/30/following-pivotal-tracker-projects-with-kilt/</feedburner:origLink></item>
		<item>
		<title>Full text search in JRuby with ActiveLucene</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/MKwA83OFMh0/</link>
		<comments>http://www.diegocarrion.com/2010/02/04/full-text-search-in-jruby-with-activelucene/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 18:00:46 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Search]]></category>

		<category><![CDATA[jruby]]></category>

		<category><![CDATA[lucene]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[active_lucene]]></category>

		<category><![CDATA[active_model]]></category>

		<category><![CDATA[active_record]]></category>

		<category><![CDATA[query]]></category>

		<category><![CDATA[Solr]]></category>

		<category><![CDATA[sphinx]]></category>

		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=104</guid>
		<description><![CDATA[ActiveLucene is a Lucene interface similar to the one used by ActiveRecord and ActiveModel. 
This means that you can generate a scaffold in a Rails application, go to the model, replace ActiveRecord::Base with ActiveLucene::Document and everything should be still working with the difference that the model should be being saved in a Lucene index rather [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/dcrec1/active_lucene">ActiveLucene</a> is a <a href="http://lucene.apache.org/java/docs/index.html">Lucene</a> interface similar to the one used by <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html">ActiveRecord</a> and <a href="http://github.com/rails/rails/tree/master/activemodel">ActiveModel</a>. </p>
<p>This means that you can generate a <a href="http://en.wikipedia.org/wiki/Scaffold_(programming)">scaffold</a> in a <a href="http://rubyonrails.org/">Rails</a> application, go to the model, replace ActiveRecord::Base with ActiveLucene::Document and everything should be still working with the difference that the model should be being saved in a Lucene index rather than in a relational database. </p>
<p>As the documents are now being saved in a Lucene index, we can find them using the <a href="http://lucene.apache.org/java/3_0_0/queryparsersyntax.html">Lucene query syntax</a>, without forgetting that as ActiveLucene has a similar interface to ActiveRecord, we can also find them by an id, find the first, find the last, etc.</p>
<p>The base class of ActiveLucene is called Document because as the documents of another systems, it doesn&#8217;t have a defined structure and all the attributes are dynamic, so you do not have to worry about them. </p>
<p>ActiveLucene was extracted from <a href="http://github.com/dcrec1/lunr">Lunr</a>, a not-enterprise search server from which I will speak in a future post, but as today, it can also be used in applications where having a relational database doesn&#8217;t make much sense and especially in the ones where you want to search documents by text. </p>
<p>The restriction of ActiveLucene is that it only works with <a href="http://jruby.org/">JRuby</a>, since Lucene is a <a href="http://java.sun.com/">Java</a> library that runs on the JVM. Case this isn&#8217;t a problem, using ActiveLucene should be much simpler and lighter than using a solution such as Sphinx or Solr, depending of the case this may result in great benefits.</p>
<p>Lucene has a lot of features and ActiveLucene doesn&#8217;t support them all, but they will be added to the project as needed. As today, there is support for highlighting and a little for paging, as can be seen in the following video, along with a basic demonstration of the tool:</p>
<p><object width="501" height="313"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9010209&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9010209&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="501" height="313"></embed></object> </p>
<p><a href="http://vimeo.com/9010209">Full text search in JRuby with ActiveLucene</a> from <a href="http://vimeo.com/user1245982">Diego Carrion</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><em>If you appreciate this work, please consider to <a href="http://workingwithrails.com/recommendation/new/person/13580-diego-carrion">recommend me</a> at <a href="http://workingwithrails.com/">Working With Rails</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/MKwA83OFMh0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/02/04/full-text-search-in-jruby-with-activelucene/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/02/04/full-text-search-in-jruby-with-activelucene/</feedburner:origLink></item>
		<item>
		<title>ThinkingSphinx exits, enters ActsAsSolrReloaded</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/qXhynz42q-s/</link>
		<comments>http://www.diegocarrion.com/2010/01/18/thinkingsphinx-exits-enters-actsassolrreloaded/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 04:42:47 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[ActsAsSolr]]></category>

		<category><![CDATA[ActsAsSolrReloaded]]></category>

		<category><![CDATA[Solr]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ActiveRecord]]></category>

		<category><![CDATA[acts_as_solr]]></category>

		<category><![CDATA[acts_as_solr_reloaded]]></category>

		<category><![CDATA[acts_as_taggable_on]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[sphinx]]></category>

		<category><![CDATA[thinking_sphinx]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=91</guid>
		<description><![CDATA[I used to work with ThinkingSphinx until the day I needed to index documents with dynamic attributes. As Sphinx indexes data from the result of an SQL query, the goal didn&#8217;t seem possible. 
I decided then to take another look at Solr. Solr, differently from Sphinx, is an HTTP server and indexes data from posted [...]]]></description>
			<content:encoded><![CDATA[<p>I used to work with <a href="http://freelancing-god.github.com/ts/en/">ThinkingSphinx</a> until the day I needed to index documents with dynamic attributes. As <a href="http://www.sphinxsearch.com/">Sphinx</a> indexes data from the result of an SQL query, the goal didn&#8217;t seem possible. </p>
<p>I decided then to take another look at <a href="http://lucene.apache.org/solr/">Solr</a>. Solr, differently from Sphinx, is an HTTP server and indexes data from posted XML documents. Each document can have a different structure, so it fits perfectly with the model of dynamic attributes.</p>
<p><a href="http://www.railsfreaks.com/">Thiago Jackwin</a>, aka RailsFreaks, created a plugin that integrates Rails with Solr called <a href="http://github.com/railsfreaks/acts_as_solr/tree/master">acts_as_solr</a>. The plugin is very good, but Thiago disappeared from the map some time ago, he lost the domain, left <a href="http://www.github.com">GitHub</a> and doesn&#8217;t answer emails any more. As a result of this, different forks and forks of forks have been created and the <a href="http://git-scm.com/">Git</a> tree became a mess.</p>
<p>Annoyed with the situation of the project, I decided to fork the fork I liked the most and created a new repository called <a href="http://github.com/dcrec1/acts_as_solr_reloaded/tree">acts_as_solr_reloaded</a>, with new features. This way, I hope the project gets easier to be found and that it gives more trust. I&#8217;m also compromising myself to keep the repository up to date and to pull contributions.</p>
<p>As today, the new features acts_as_solr_reloaded comes with are:</p>
<ul>
<li>support for dynamic attributes</li>
<li>geo-localization or geo-spatial search</li>
<li>integration with <a href="http://github.com/mbleigh/acts-as-taggable-on">acts-as-taggable-on</a></li>
<li>highlighting</li>
<li>relevance ranking</li>
</ul>
<p>To support geo-localization in Solr, it needed to be updated to the version 1.4 .</p>
<p>To make easier the experience of working with dynamic attributes and geo-localization, a few generators that setup the database were added to the project. You can use them like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">script<span style="color: #000000; font-weight: bold;">/</span>generate dynamic_attributes_migration
script<span style="color: #000000; font-weight: bold;">/</span>generate local_migration</pre></div></div>

<p>You can after define your model this way:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> Document <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  acts_as_solr <span style="color:#ff3333; font-weight:bold;">:dynamic_attributes</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
               <span style="color:#ff3333; font-weight:bold;">:spatial</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>,
               <span style="color:#ff3333; font-weight:bold;">:taggable</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Note that with <em>:taggable => true </em>you dont need to define your model as <em>acts_as_taggable_on :tags</em>, it&#8217;s done automatically.</p>
<p>To better demonstrate the new features in acts_as_solr_reloaded, I recorded a small video of five minutes showing the functionalities in action, hope you like it:</p>
<p><object width="501" height="313"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8728276&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8728276&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="501" height="313"></embed></object>
<p><a href="http://vimeo.com/8728276">New features in ActsAsSolrReloaded</a> from <a href="http://vimeo.com/user1245982">Diego Carrion</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Note that in the video I used <em>acts_as_taggable_on :tags</em> and <em>:taggable => true</em>, at the time of the recording this both declarations were necessary, not anymore.</p>
<p><em>If you appreciate this work, please consider to <a href="http://workingwithrails.com/recommendation/new/person/13580-diego-carrion">recommend me</a> at <a href="http://workingwithrails.com/">Working With Rails</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/qXhynz42q-s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2010/01/18/thinkingsphinx-exits-enters-actsassolrreloaded/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2010/01/18/thinkingsphinx-exits-enters-actsassolrreloaded/</feedburner:origLink></item>
		<item>
		<title>Summary of new features in Inploy</title>
		<link>http://feedproxy.google.com/~r/diegocarrion/~3/6ehr2Ju5iNA/</link>
		<comments>http://www.diegocarrion.com/2009/12/18/summary-of-new-features-in-inploy/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 01:03:31 +0000</pubDate>
		<dc:creator>dc.rec1</dc:creator>
		
		<category><![CDATA[Deploy]]></category>

		<category><![CDATA[Inploy]]></category>

		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.diegocarrion.com/?p=88</guid>
		<description><![CDATA[After announcing Inploy 2 months ago, several people colaborated with it and now it has more features, the ones I will expose in this post. 
First of all, I want to thank these people for the contributions: 
Andy Shen
Carlos Brando
Douglas Campos
Erik Dahlstrand
Joris Troost
Josh Owens 
If you upgrade Inploy today and do nothing else, the two [...]]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://www.diegocarrion.com/2009/10/30/really-easy-continuous-integration-with-signal/">announcing</a> <a href="http://github.com/dcrec1/inploy">Inploy</a> 2 months ago, several people colaborated with it and now it has more features, the ones I will expose in this post. </p>
<p>First of all, I want to thank these people for the contributions: </p>
<p>Andy Shen<br />
Carlos Brando<br />
Douglas Campos<br />
Erik Dahlstrand<br />
Joris Troost<br />
Josh Owens </p>
<p>If you upgrade Inploy today and do nothing else, the two features you will automatically earn out of the box are: </p>
<p><strong>control of submodules</strong></p>
<p>This functionality initializes/updates the Git submodules on each deploy, so that the code is always updated without the possibility of forgetting. </p>
<p><strong>Hoptoad notification</strong></p>
<p>For those who use <a href="http://hoptoadapp.com/pages/home">Hoptoad</a>, Inploy will notify the tool on every code update, sending the environment and the revision code. </p>
<p>Besides the new features mentioned, Inploy now also has the following optional settings, which can be specified in the deploy.rb file: </p>
<p><strong>sudo</strong> </p>
<p>Case you want to run the commands in the server as sudo.</p>
<p><strong>server (Unicorn support) </strong></p>
<p>Inploy works now with <a href="http://unicorn.bogomips.org/">Unicorn</a>, too, being <a href="http://www.modrails.com/">Passenger</a> the default server. </p>
<p><strong>environment </strong></p>
<p>Inploy works with production environment as default, but now we can use another one, like staging. </p>
<p><strong>branch</strong> </p>
<p>Such times we have a branch with the configurations of our deploy and we want to use it, we can do it  with the branch option.</p>
<p><strong>ssh_opts </strong></p>
<p>If you want to connect to the server using some ssh parameter, we can specified it in this option.</p>
<p>Here&#8217;s an example of how to use the options mentioned:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">if</span> ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'environment'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">eql</span>? <span style="color:#996600;">'staging'</span>
  deploy.<span style="color:#9900CC;">ssh_opts</span> = <span style="color:#996600;">'-A'</span>
  deploy.<span style="color:#9900CC;">server</span> = <span style="color:#ff3333; font-weight:bold;">:unicorn</span>
  deploy.<span style="color:#9900CC;">environment</span> = <span style="color:#ff3333; font-weight:bold;">:staging</span>
<span style="color:#9966CC; font-weight:bold;">else</span>
  deploy.<span style="color:#9900CC;">branch</span> = <span style="color:#ff3333; font-weight:bold;">:deploy</span>
  deploy.<span style="color:#9900CC;">sudo</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p><em>Please consider to <a href="http://workingwithrails.com/recommendation/new/person/13580-diego-carrion">recommend me</a> at <a href="http://workingwithrails.com/">Working With Rails</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/diegocarrion/~4/6ehr2Ju5iNA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.diegocarrion.com/2009/12/18/summary-of-new-features-in-inploy/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.diegocarrion.com/2009/12/18/summary-of-new-features-in-inploy/</feedburner:origLink></item>
	</channel>
</rss>
