<?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>Ruy Rocha &#187; ruby</title>
	<atom:link href="http://ruyrocha.com/tag/ruby-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://ruyrocha.com</link>
	<description>it&#039;s a long way to the top if wanna rock and roll</description>
	<lastBuildDate>Tue, 31 Jan 2012 02:17:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Puppet &amp; Ruby DSL &#8211; Only four minutes</title>
		<link>http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/</link>
		<comments>http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 16:15:33 +0000</pubDate>
		<dc:creator>Ruy Rocha</dc:creator>
				<category><![CDATA[Puppet]]></category>
		<category><![CDATA[eal4]]></category>
		<category><![CDATA[evaluation assurance level 4]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby dsl]]></category>

		<guid isPermaLink="false">http://ruyrocha.com/?p=172</guid>
		<description><![CDATA[Four minutes is the time to get a few things done. In this time you can drink a water, smoke a cigarette, make some kind of WHOAAA or anything else&#8230; Or setup a new entirely server. Every server ships with Evaluation Assurance Level 4 and is the nearest to perfection someone could be. Nothing is [...]]]></description>
			<content:encoded><![CDATA[<p><em>Four minutes is the time to get a few things done. In this time you can drink a water, smoke a cigarette, make some kind of <strong>WHOAAA</strong> or anything else&#8230; Or setup a new entirely server.</em></p>
<p><em>Every server ships with <strong>Evaluation Assurance Level 4</strong> and is the nearest to perfection someone could be. Nothing is supposed: we&#8217;ve done an <strong>awesome</strong> job here and everything works as it should. Let me show you a few facts:</em><em> one server spends 4 minutes to be completely configured by puppet, so 360 servers can be up and running in a day. We need to raise down this speed to something about 30 seconds and get more than 2k servers per day. </em><em><span style="text-decoration: line-through;"></span></em></p>
<p><em>Puppet 2.6.x <a title="Puppet - Ruby DSL" href="http://www.puppetlabs.com/blog/ruby-dsl/">introduces a ruby dsl</a>, so manifests and resources can be written in ruby right now. It&#8217;s time to rewrite everything with this dsl and talk pure ruby. </em><em>Thank you Puppet, Ruby <span style="text-decoration: line-through;">and the girl dressed in red&#8230;</span></em></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes+http%3A%2F%2Fis.gd%2FGWiXlC" title="Post to Twitter"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="tt twitter Puppet & Ruby DSL   Only four minutes"  title="Puppet & Ruby DSL   Only four minutes" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes+http%3A%2F%2Fis.gd%2FGWiXlC" title="Post to Twitter">Tweet This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;title=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes" title="Post to Delicious"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious.png" alt="tt delicious Puppet & Ruby DSL   Only four minutes"  title="Puppet & Ruby DSL   Only four minutes" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;title=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes" title="Post to Delicious">Post to Delicious</a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;title=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes" title="Post to Digg"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="tt digg Puppet & Ruby DSL   Only four minutes"  title="Puppet & Ruby DSL   Only four minutes" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;title=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes" title="Post to Digg">Digg This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;t=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes" title="Post to Facebook"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook.png" alt="tt facebook Puppet & Ruby DSL   Only four minutes"  title="Puppet & Ruby DSL   Only four minutes" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;t=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes" title="Post to Facebook">Post to Facebook</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;title=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes&amp;summary=Four+minutes+is+the+time+to+get+a+few+things+done.+In+this+time+you+can+drink+a+water%2C+smoke+a+cigarette%2C+make+some+kind+of+WHOAAA+or+anything+else...&amp;source=Ruy Rocha" title="Post to LinkedIn"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/linkedin/tt-linkedin.png" alt="tt linkedin Puppet & Ruby DSL   Only four minutes"  title="Puppet & Ruby DSL   Only four minutes" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/&amp;title=Puppet+%26+Ruby+DSL+%E2%80%93+Only+four+minutes&amp;summary=Four+minutes+is+the+time+to+get+a+few+things+done.+In+this+time+you+can+drink+a+water%2C+smoke+a+cigarette%2C+make+some+kind+of+WHOAAA+or+anything+else...&amp;source=Ruy Rocha" title="Post to LinkedIn">Post to LinkedIn</a></p></div><div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/pt_BR/all.js#appId=159773440769970&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/" send="true" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://ruyrocha.com/puppet-ruby-dsl-only-four-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aprenda Ruby On Rails Com Boas Práticas</title>
		<link>http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/</link>
		<comments>http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 16:10:32 +0000</pubDate>
		<dc:creator>Ruy Rocha</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code quality]]></category>
		<category><![CDATA[melhores práticas]]></category>
		<category><![CDATA[railscasts]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby frameworks]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[ruby on rails guides]]></category>

		<guid isPermaLink="false">http://ruyrocha.com/?p=92</guid>
		<description><![CDATA[Vimos da forma mais breve possível Sinatra e Padrino, dois frameworks úteis escritos em Ruby, e agora vamos para Ruby On Rails sem perder qualquer tempo disponível. Não existe como cair de paraquedas em Rails sem ter visto Ruby. Acredito que deu tempo suficiente para escrever ao menos uma aplicação em Ruby&#8230; Rails não é [...]]]></description>
			<content:encoded><![CDATA[<p>Vimos da forma mais breve possível Sinatra e Padrino, dois frameworks úteis escritos em Ruby, e agora vamos para Ruby On Rails sem perder qualquer tempo disponível.</p>
<p>Não existe como cair de paraquedas em Rails sem ter visto Ruby. Acredito que deu tempo suficiente para escrever ao menos uma aplicação em Ruby&#8230;</p>
<p>Rails não é um CMS. Rails é um framework em Ruby para escrever aplicações web. É isso. Se tudo o que se precisa é gerir conteúdo, o WordPress faz o trabalho bem feito. Economize linhas dando um <em>hello world</em> com Sinatra, se é apenas isso o que precisa.</p>
<p>A documentação do Rails é bem escrita, e onde falta documentação é fácil perceber o que acontece dando aquela olhadela no código devidamente documentado &#8211; obrigado RDoc!</p>
<p>Sites <strong>úteis</strong>: <a title="Railscasts" href="http://railscasts.com">Railscasts</a> e <a title="Ruby On Rails Guides" href="http://guides.rubyonrails.org/">Ruby On Rails Guides</a>, sem deixar o GitHub de fora. E vale uma olhada no Akita On Rails também.</p>
<p>E para as boas práticas, Matthew Paul Moore <a title="Ruby On Rails Code Quality Checklist" href="http://www.matthewpaulmoore.com/ruby-on-rails-code-quality-checklist">já escreveu</a> sobre. <em>E duvido que todo mundo execute a 15.</em></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas+http%3A%2F%2Fis.gd%2FslvOKa" title="Post to Twitter"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="tt twitter Aprenda Ruby On Rails Com Boas Práticas"  title="Aprenda Ruby On Rails Com Boas Práticas" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas+http%3A%2F%2Fis.gd%2FslvOKa" title="Post to Twitter">Tweet This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;title=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas" title="Post to Delicious"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious.png" alt="tt delicious Aprenda Ruby On Rails Com Boas Práticas"  title="Aprenda Ruby On Rails Com Boas Práticas" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;title=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas" title="Post to Delicious">Post to Delicious</a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;title=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas" title="Post to Digg"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="tt digg Aprenda Ruby On Rails Com Boas Práticas"  title="Aprenda Ruby On Rails Com Boas Práticas" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;title=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas" title="Post to Digg">Digg This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;t=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas" title="Post to Facebook"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook.png" alt="tt facebook Aprenda Ruby On Rails Com Boas Práticas"  title="Aprenda Ruby On Rails Com Boas Práticas" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;t=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas" title="Post to Facebook">Post to Facebook</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;title=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas&amp;summary=Vimos+da+forma+mais+breve+poss%C3%ADvel+Sinatra+e+Padrino%2C+dois+frameworks+%C3%BAteis+escritos+em+Ruby%2C+e+agora+vamos+para+Ruby+On+Rails+sem+perder+qualquer+...&amp;source=Ruy Rocha" title="Post to LinkedIn"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/linkedin/tt-linkedin.png" alt="tt linkedin Aprenda Ruby On Rails Com Boas Práticas"  title="Aprenda Ruby On Rails Com Boas Práticas" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/&amp;title=Aprenda+Ruby+On+Rails+Com+Boas+Pr%C3%A1ticas&amp;summary=Vimos+da+forma+mais+breve+poss%C3%ADvel+Sinatra+e+Padrino%2C+dois+frameworks+%C3%BAteis+escritos+em+Ruby%2C+e+agora+vamos+para+Ruby+On+Rails+sem+perder+qualquer+...&amp;source=Ruy Rocha" title="Post to LinkedIn">Post to LinkedIn</a></p></div><div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/pt_BR/all.js#appId=159773440769970&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/" send="true" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://ruyrocha.com/aprenda-ruby-on-rails-com-boas-praticas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IRB &#8211; Interactive Ruby Shell</title>
		<link>http://ruyrocha.com/irb-interactive-ruby-shell/</link>
		<comments>http://ruyrocha.com/irb-interactive-ruby-shell/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 20:57:25 +0000</pubDate>
		<dc:creator>Ruy Rocha</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[interactive ruby shell]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ruyrocha.com/?p=67</guid>
		<description><![CDATA[Passar batido sem falar do irb ficaria um tanto complicado. Você vê tuas linhas ganharem vida no irb quando executa o código na unha. O irb pode lêr sua configuração de um ~/.irbrc da vida. O que uso: require 'irb/completion' require 'irb/ext/save-history' &#160; IRB.conf&#91;:SAVE_HISTORY&#93; = 1000 IRB.conf&#91;:HISTORY_FILE&#93; = &#34;#{ENV['HOME']}/.irb-save-history&#34; puts &#34;History configured.&#34; &#160; # auto-indent [...]]]></description>
			<content:encoded><![CDATA[<p>Passar batido sem falar do irb ficaria um tanto complicado. Você vê tuas linhas ganharem vida no <strong>irb</strong> quando executa o código na unha.</p>
<p>O irb pode lêr sua configuração de um ~/.irbrc da vida. O que uso:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'irb/completion'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'irb/ext/save-history'</span>
&nbsp;
IRB.<span style="color:#9900CC;">conf</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:SAVE_HISTORY</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#006666;">1000</span>
IRB.<span style="color:#9900CC;">conf</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:HISTORY_FILE</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;#{ENV['HOME']}/.irb-save-history&quot;</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;History configured.&quot;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># auto-indent</span>
IRB.<span style="color:#9900CC;">conf</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:AUTO_INDENT</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#0000FF; font-weight:bold;">true</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Auto-indent on.&quot;</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'map_by_method'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'what_methods'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'pp'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'wirble'</span>
&nbsp;
THEME_FOR_WHITE_BKG = <span style="color:#006600; font-weight:bold;">&#123;</span>
      <span style="color:#008000; font-style:italic;"># delimiter colors</span>
      <span style="color:#ff3333; font-weight:bold;">:comma</span>              =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:purple</span>,
      <span style="color:#ff3333; font-weight:bold;">:refers</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># container colors (hash and array)</span>
      <span style="color:#ff3333; font-weight:bold;">:open_hash</span>          =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_hash</span>         =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:open_array</span>         =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_array</span>        =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># object colors</span>
      <span style="color:#ff3333; font-weight:bold;">:open_object</span>        =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:dark_gray</span>,
      <span style="color:#ff3333; font-weight:bold;">:object_class</span>       =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:purple</span>,
      <span style="color:#ff3333; font-weight:bold;">:object_addr_prefix</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
      <span style="color:#ff3333; font-weight:bold;">:object_line_prefix</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_object</span>       =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:dark_gray</span>,
      <span style="color:#008000; font-style:italic;"># symbol colors</span>
      <span style="color:#ff3333; font-weight:bold;">:symbol</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:black</span>,
      <span style="color:#ff3333; font-weight:bold;">:symbol_prefix</span>      =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:light_gray</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># string colors</span>
      <span style="color:#ff3333; font-weight:bold;">:open_string</span>        =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
      :<span style="color:#CC0066; font-weight:bold;">string</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:dark_gray</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_string</span>       =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># misc colors</span>
      <span style="color:#ff3333; font-weight:bold;">:number</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:black</span>,
      <span style="color:#ff3333; font-weight:bold;">:keyword</span>            =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:brown</span>,
      :<span style="color:#9966CC; font-weight:bold;">class</span>              =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:range</span>              =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
    <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#Wirble::Colorize.colors = THEME_FOR_WHITE_BKG</span>
Wirble.<span style="color:#9900CC;">init</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:skip_prompt</span>=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;true,:skip_history=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;true<span style="color:#006600; font-weight:bold;">&#41;</span>
Wirble.<span style="color:#9900CC;">colorize</span></pre></div></div>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=IRB+%E2%80%93+Interactive+Ruby+Shell+http%3A%2F%2Fis.gd%2FBYYN2h" title="Post to Twitter"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="tt twitter IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=IRB+%E2%80%93+Interactive+Ruby+Shell+http%3A%2F%2Fis.gd%2FBYYN2h" title="Post to Twitter">Tweet This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Delicious"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious.png" alt="tt delicious IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Delicious">Post to Delicious</a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Digg"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="tt digg IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Digg">Digg This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;t=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Facebook"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook.png" alt="tt facebook IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;t=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Facebook">Post to Facebook</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell&amp;summary=Passar+batido+sem+falar+do+irb+ficaria+um+tanto+complicado.+Voc%C3%AA+v%C3%AA+tuas+linhas+ganharem+vida+no+irb+quando+executa+o+c%C3%B3digo+na+unha.%0D%0A%0D%0AO+irb+pode...&amp;source=Ruy Rocha" title="Post to LinkedIn"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/linkedin/tt-linkedin.png" alt="tt linkedin IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell&amp;summary=Passar+batido+sem+falar+do+irb+ficaria+um+tanto+complicado.+Voc%C3%AA+v%C3%AA+tuas+linhas+ganharem+vida+no+irb+quando+executa+o+c%C3%B3digo+na+unha.%0D%0A%0D%0AO+irb+pode...&amp;source=Ruy Rocha" title="Post to LinkedIn">Post to LinkedIn</a></p></div><div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/pt_BR/all.js#appId=159773440769970&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://ruyrocha.com/irb-interactive-ruby-shell/" send="true" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://ruyrocha.com/irb-interactive-ruby-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sinatra Framework</title>
		<link>http://ruyrocha.com/sinatra-framework/</link>
		<comments>http://ruyrocha.com/sinatra-framework/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 20:50:06 +0000</pubDate>
		<dc:creator>Ruy Rocha</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[aprenda ruby]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>
		<category><![CDATA[sinatra framework]]></category>

		<guid isPermaLink="false">http://ruyrocha.com/?p=62</guid>
		<description><![CDATA[Sinatra is a specific DSL for quickly creating web-applications in Ruby &#8211; retirado do Sinatra Book, e você o instala pelas Gems: gem install sinatra Simples: require 'rubygems' require 'sinatra' &#160; use Rack::Auth::Basic do &#124;username, password&#124; username == 'fu' &#38;amp;&#38;amp; password == 'bar' end &#160; get '/' do ... end E nos três pontos, meu [...]]]></description>
			<content:encoded><![CDATA[<p><em><a title="Sinatra Framework" href="http://www.sinatrarb.com/">Sinatra</a> is a specific DSL for quickly creating web-applications in Ruby</em> &#8211; retirado do <a title="Sinatra Book" href="http://sinatra-book.gittr.com/">Sinatra Book</a>, e você o instala pelas Gems:</p>

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

<p>Simples:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'sinatra'</span>
&nbsp;
use <span style="color:#6666ff; font-weight:bold;">Rack::Auth::Basic</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>username, password<span style="color:#006600; font-weight:bold;">|</span>
  username == <span style="color:#996600;">'fu'</span> <span style="color:#006600; font-weight:bold;">&amp;</span>amp;<span style="color:#006600; font-weight:bold;">&amp;</span>amp; password == <span style="color:#996600;">'bar'</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
get <span style="color:#996600;">'/'</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  ...
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>E nos três pontos, meu velho, é aí que fica a brincadeira. Sexta-feira, 17:57, e precisa disponibilizar um webservice muito do fajuto? Pois é&#8230;</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Sinatra+Framework+http%3A%2F%2Fis.gd%2FXY7Lob" title="Post to Twitter"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="tt twitter Sinatra Framework"  title="Sinatra Framework" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Sinatra+Framework+http%3A%2F%2Fis.gd%2FXY7Lob" title="Post to Twitter">Tweet This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/sinatra-framework/&amp;title=Sinatra+Framework" title="Post to Delicious"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious.png" alt="tt delicious Sinatra Framework"  title="Sinatra Framework" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/sinatra-framework/&amp;title=Sinatra+Framework" title="Post to Delicious">Post to Delicious</a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/sinatra-framework/&amp;title=Sinatra+Framework" title="Post to Digg"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="tt digg Sinatra Framework"  title="Sinatra Framework" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/sinatra-framework/&amp;title=Sinatra+Framework" title="Post to Digg">Digg This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/sinatra-framework/&amp;t=Sinatra+Framework" title="Post to Facebook"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook.png" alt="tt facebook Sinatra Framework"  title="Sinatra Framework" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/sinatra-framework/&amp;t=Sinatra+Framework" title="Post to Facebook">Post to Facebook</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/sinatra-framework/&amp;title=Sinatra+Framework&amp;summary=Sinatra+is+a+specific+DSL+for+quickly+creating+web-applications+in+Ruby+-+retirado+do+Sinatra+Book%2C+e+voc%C3%AA+o+instala+pelas+Gems%3A%0D%0Agem+install+sinat...&amp;source=Ruy Rocha" title="Post to LinkedIn"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/linkedin/tt-linkedin.png" alt="tt linkedin Sinatra Framework"  title="Sinatra Framework" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/sinatra-framework/&amp;title=Sinatra+Framework&amp;summary=Sinatra+is+a+specific+DSL+for+quickly+creating+web-applications+in+Ruby+-+retirado+do+Sinatra+Book%2C+e+voc%C3%AA+o+instala+pelas+Gems%3A%0D%0Agem+install+sinat...&amp;source=Ruy Rocha" title="Post to LinkedIn">Post to LinkedIn</a></p></div><div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/pt_BR/all.js#appId=159773440769970&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://ruyrocha.com/sinatra-framework/" send="true" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://ruyrocha.com/sinatra-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Esqueça Rails: Aprenda Ruby!</title>
		<link>http://ruyrocha.com/esqueca-rails-aprenda-ruby/</link>
		<comments>http://ruyrocha.com/esqueca-rails-aprenda-ruby/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 20:36:58 +0000</pubDate>
		<dc:creator>Ruy Rocha</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[aprenda ruby]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ruyrocha.com/?p=59</guid>
		<description><![CDATA[Esqueça Ruby On Rails - framework &#8211; e aprenda Ruby, a linguagem. Perdi 50 anos pra fazer algo ridículo com jQuery. Não sei nada de Javascript e por isso tomei o baile O Pragmatic Programmer&#8217;s Guide é um excelente começo, ainda mais para quem já está habituado com outras linguagens orientadas. Dúvidas sobre classes e [...]]]></description>
			<content:encoded><![CDATA[<p>Esqueça <strong>Ruby On Rails </strong>- framework &#8211; e aprenda Ruby, a linguagem. Perdi <strong>50 anos</strong> pra fazer algo ridículo com jQuery. Não sei nada de Javascript e por isso tomei o baile <img src='http://ruyrocha.com/wp-includes/images/smilies/icon_smile.gif' alt="icon smile Esqueça Rails: Aprenda Ruby!" class='wp-smiley' title="Esqueça Rails: Aprenda Ruby!" /> </p>
<p>O <a title="Programming Ruby - The Pragmatic Programmer's Guide" href="http://ruby-doc.org/docs/ProgrammingRuby/">Pragmatic Programmer&#8217;s Guide</a> é um excelente começo, ainda mais para quem já está habituado com outras linguagens orientadas. Dúvidas sobre classes e métodos, e mais outras coisas: dê uma olhada rápida <a title="Ruby Doc :D" href="http://www.ruby-lang.org/en/documentation/">na documentação</a>.</p>
<p>Uma olhada no <a title="Ruby Forum" href="http://www.ruby-forum.com/">forum</a> responde algumas das possíveis questões.</p>
<p>E ao invés de instalar o ruby da sua distribuição use o <strong>Ruby Version Manager.<br />
</strong></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21+http%3A%2F%2Fis.gd%2Fxy0HmM" title="Post to Twitter"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="tt twitter Esqueça Rails: Aprenda Ruby!"  title="Esqueça Rails: Aprenda Ruby!" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21+http%3A%2F%2Fis.gd%2Fxy0HmM" title="Post to Twitter">Tweet This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;title=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21" title="Post to Delicious"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious.png" alt="tt delicious Esqueça Rails: Aprenda Ruby!"  title="Esqueça Rails: Aprenda Ruby!" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;title=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21" title="Post to Delicious">Post to Delicious</a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;title=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21" title="Post to Digg"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="tt digg Esqueça Rails: Aprenda Ruby!"  title="Esqueça Rails: Aprenda Ruby!" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;title=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21" title="Post to Digg">Digg This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;t=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21" title="Post to Facebook"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook.png" alt="tt facebook Esqueça Rails: Aprenda Ruby!"  title="Esqueça Rails: Aprenda Ruby!" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;t=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21" title="Post to Facebook">Post to Facebook</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;title=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21&amp;summary=Esque%C3%A7a+Ruby+On+Rails+-+framework+-+e+aprenda+Ruby%2C+a+linguagem.+Perdi+50+anos+pra+fazer+algo+rid%C3%ADculo+com+jQuery.+N%C3%A3o+sei+nada+de+Javascript+e+por...&amp;source=Ruy Rocha" title="Post to LinkedIn"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/linkedin/tt-linkedin.png" alt="tt linkedin Esqueça Rails: Aprenda Ruby!"  title="Esqueça Rails: Aprenda Ruby!" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/esqueca-rails-aprenda-ruby/&amp;title=Esque%C3%A7a+Rails%3A+Aprenda+Ruby%21&amp;summary=Esque%C3%A7a+Ruby+On+Rails+-+framework+-+e+aprenda+Ruby%2C+a+linguagem.+Perdi+50+anos+pra+fazer+algo+rid%C3%ADculo+com+jQuery.+N%C3%A3o+sei+nada+de+Javascript+e+por...&amp;source=Ruy Rocha" title="Post to LinkedIn">Post to LinkedIn</a></p></div><div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/pt_BR/all.js#appId=159773440769970&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://ruyrocha.com/esqueca-rails-aprenda-ruby/" send="true" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://ruyrocha.com/esqueca-rails-aprenda-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

