<?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/"
	>

<channel>
	<title>papodenerd.net</title>
	<atom:link href="http://www.papodenerd.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.papodenerd.net</link>
	<description>puts "NOT just another development weblog"</description>
	<pubDate>Sun, 07 Mar 2010 18:57:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mini-palestra: Outsourcing - Terceirizando para o exterior [portuguese]</title>
		<link>http://www.papodenerd.net/mini-palestra-outsourcing-terceirizando-para-o-exterior-portuguese/</link>
		<comments>http://www.papodenerd.net/mini-palestra-outsourcing-terceirizando-para-o-exterior-portuguese/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 01:34:32 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Outsourcing]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=142</guid>
		<description><![CDATA[Mini-palestra feita para alunos calouros e veteranos do curso de Sistemas para Internet da Faculdade Dom Bosco, Cascavel - PR.


]]></description>
			<content:encoded><![CDATA[<p>Mini-palestra feita para alunos calouros e veteranos do curso de Sistemas para Internet da Faculdade Dom Bosco, Cascavel - PR.</p>
<p style="text-align: center;"><object width="560" height="340" data="http://www.youtube.com/v/dW69AyDhFf4&amp;hl=pt_BR&amp;fs=1&amp;" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/dW69AyDhFf4&amp;hl=pt_BR&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /></object></p>
<p style="text-align: center;"><object width="425" height="355" data="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=outsourcing-100201184004-phpapp01&amp;stripped_title=outsourcing-terceirizando-para-o-exterior" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=outsourcing-100201184004-phpapp01&amp;stripped_title=outsourcing-terceirizando-para-o-exterior" /><param name="allowfullscreen" value="true" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/mini-palestra-outsourcing-terceirizando-para-o-exterior-portuguese/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Simple helper method to hide emails from bots</title>
		<link>http://www.papodenerd.net/simple-helper-method-to-hide-emails-from-bots/</link>
		<comments>http://www.papodenerd.net/simple-helper-method-to-hide-emails-from-bots/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 17:36:02 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Quick Tip]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=136</guid>
		<description><![CDATA[If you have a site where users can send content, and they often send emails on it, it&#8217;s good to protect them from spam bots.
Here follows a simple helper method that uses a javascript technique to do that.

def hide_emails_from_bots&#40;text&#41;
    match = text.match&#40;/\w+@&#91;a-zA-Z_&#93;+?\.&#91;a-zA-Z&#93;&#123;2,6&#125;/&#41;.to_s
    if match.blank?
      [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a site where users can send content, and they often send emails on it, it&#8217;s good to protect them from spam bots.</p>
<p>Here follows a simple helper method that uses a javascript technique to do that.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> hide_emails_from_bots<span style="color:#006600; font-weight:bold;">&#40;</span>text<span style="color:#006600; font-weight:bold;">&#41;</span>
    match = text.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\w<span style="color:#006600; font-weight:bold;">+</span>@<span style="color:#006600; font-weight:bold;">&#91;</span>a<span style="color:#006600; font-weight:bold;">-</span>zA<span style="color:#006600; font-weight:bold;">-</span>Z_<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">+</span>?\.<span style="color:#006600; font-weight:bold;">&#91;</span>a<span style="color:#006600; font-weight:bold;">-</span>zA<span style="color:#006600; font-weight:bold;">-</span>Z<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006666;">2</span>,<span style="color:#006666;">6</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">to_s</span>
    <span style="color:#9966CC; font-weight:bold;">if</span> match.<span style="color:#9900CC;">blank</span>?
      text
    <span style="color:#9966CC; font-weight:bold;">else</span>
      size = match.<span style="color:#9900CC;">size</span>
      splitter = size <span style="color:#006600; font-weight:bold;">/</span> <span style="color:#006666;">3</span>
      string1 = match<span style="color:#006600; font-weight:bold;">&#91;</span>0...<span style="color:#9900CC;">splitter</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      string2 = match<span style="color:#006600; font-weight:bold;">&#91;</span>splitter...2<span style="color:#006600; font-weight:bold;">*</span>splitter<span style="color:#006600; font-weight:bold;">&#93;</span>
      string3 = match<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">*</span>splitter..<span style="color:#9900CC;">size</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      js = <span style="color:#996600;">&quot;
        &lt;script type=&quot;</span>\<span style="color:#006600; font-weight:bold;">&amp;</span>quot;text<span style="color:#006600; font-weight:bold;">/</span>javascript\<span style="color:#006600; font-weight:bold;">&amp;</span>quot;<span style="color:#996600;">&quot;&gt;&lt;!--mce:0--&gt;&lt;/script&gt;
      &quot;</span>
      text.<span style="color:#CC0066; font-weight:bold;">gsub</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#008000; font-style:italic;">#{match}/, js)</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/simple-helper-method-to-hide-emails-from-bots/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to pull emails from GMail to Rails (with attachments)</title>
		<link>http://www.papodenerd.net/how-to-pull-emails-from-gmail-to-rails-with-attachments/</link>
		<comments>http://www.papodenerd.net/how-to-pull-emails-from-gmail-to-rails-with-attachments/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 23:19:09 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=118</guid>
		<description><![CDATA[So, you want to know how to get emails from GMail to manipulate in your Rails app right?
First let&#8217;s create our app and generate our main class:

$ rails app
$ cd app
$ script/generate scaffold task name:string description:text
$ rake db:migrate
$ rm -rf public/index.html

Map the tasks index action to be the root of the app:

#config/routes.rb
ActionController::Routing::Routes.draw do &#124;map&#124;
  [...]]]></description>
			<content:encoded><![CDATA[<p>So, you want to know how to get emails from GMail to manipulate in your Rails app right?</p>
<p>First let&#8217;s create our app and generate our main class:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ rails app
$ <span style="color: #7a0874; font-weight: bold;">cd</span> app
$ script<span style="color: #000000; font-weight: bold;">/</span>generate scaffold task name:string description:text
$ rake db:migrate
$ <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> public<span style="color: #000000; font-weight: bold;">/</span>index.html</pre></div></div>

<p>Map the tasks index action to be the root of the app:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#config/routes.rb</span>
<span style="color:#6666ff; font-weight:bold;">ActionController::Routing::Routes</span>.<span style="color:#9900CC;">draw</span> <span style="color:#9966CC; font-weight:bold;">do</span> |map|
  map.<span style="color:#9900CC;">resources</span> <span style="color:#ff3333; font-weight:bold;">:tasks</span>
&nbsp;
  map.<span style="color:#9900CC;">root</span> <span style="color:#ff3333; font-weight:bold;">:tasks</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>At this point we have a working very simple app to manage our tasks list. Let&#8217;s start our server:</p>

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

<p>You can go to http://localhost:3000 and see our app running.<br />
Now, create the mailer that will check gmail for us:</p>

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

<p>Edit the generated mailer to look like the above:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># app/models/mail_reader.rb</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'net/pop'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> MailReader <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActionMailer::Base</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> receive<span style="color:#006600; font-weight:bold;">&#40;</span>email<span style="color:#006600; font-weight:bold;">&#41;</span>
    task = Task.<span style="color:#9900CC;">new</span> <span style="color:#ff3333; font-weight:bold;">:name</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> email.<span style="color:#9900CC;">subject</span>, <span style="color:#ff3333; font-weight:bold;">:description</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> email.<span style="color:#9900CC;">body</span>
    <span style="color:#9966CC; font-weight:bold;">if</span> email.<span style="color:#9900CC;">has_attachments</span>?
      email.<span style="color:#9900CC;">attachments</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |attachment|
        task.<span style="color:#9900CC;">assets</span>.<span style="color:#9900CC;">create</span> <span style="color:#ff3333; font-weight:bold;">:data</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> attachment
      <span style="color:#9966CC; font-weight:bold;">end</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> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">check_mail</span>
    logger = RAILS_DEFAULT_LOGGER
&nbsp;
    logger.<span style="color:#9900CC;">info</span> <span style="color:#996600;">&quot;Checking for emails...&quot;</span>
    <span style="color:#6666ff; font-weight:bold;">Net::POP3</span>.<span style="color:#9900CC;">enable_ssl</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">OpenSSL::SSL::VERIFY_NONE</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#This line raises error if ruby version &amp;lt; 1.8.7</span>
    <span style="color:#6666ff; font-weight:bold;">Net::POP3</span>.<span style="color:#9900CC;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;pop.gmail.com&quot;</span>, <span style="color:#006666;">995</span>, <span style="color:#996600;">&quot;your-email@gmail.com&quot;</span>, <span style="color:#996600;">&quot;your-password&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> |pop|
      <span style="color:#9966CC; font-weight:bold;">if</span> pop.<span style="color:#9900CC;">mails</span>.<span style="color:#9900CC;">empty</span>?
        logger.<span style="color:#9900CC;">info</span> <span style="color:#996600;">&quot;No emails found.&quot;</span>
      <span style="color:#9966CC; font-weight:bold;">else</span>
        pop.<span style="color:#9900CC;">mails</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |email|
          <span style="color:#9966CC; font-weight:bold;">begin</span>
            logger.<span style="color:#9900CC;">info</span> <span style="color:#996600;">&quot;Retrieving mail...&quot;</span>
            MailReader.<span style="color:#9900CC;">receive</span><span style="color:#006600; font-weight:bold;">&#40;</span>email.<span style="color:#9900CC;">pop</span><span style="color:#006600; font-weight:bold;">&#41;</span>
            email.<span style="color:#9900CC;">delete</span>
          <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#CC00FF; font-weight:bold;">Exception</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> e
            logger.<span style="color:#9900CC;">error</span> <span style="color:#996600;">&quot;[&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>.<span style="color:#9900CC;">to_s</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;] &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> e.<span style="color:#9900CC;">message</span>
          <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    logger.<span style="color:#9900CC;">info</span> <span style="color:#996600;">&quot;Done.&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Note that your ruby version need to be 1.8.7 or higher.<br />
Now we need to create our model that will keep the attachments and install the paperclip plugin:</p>

<div class="wp_syntax"><div class="code"><pre class="bash 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>thoughtbot<span style="color: #000000; font-weight: bold;">/</span>paperclip.git
$ script<span style="color: #000000; font-weight: bold;">/</span>generate model asset</pre></div></div>

<p>Put this in the migration file:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># db/migrate/20090303181609_create_assets.rb</span>
<span style="color:#9966CC; font-weight:bold;">class</span> CreateAssets <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Migration</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">up</span>
    create_table <span style="color:#ff3333; font-weight:bold;">:assets</span> <span style="color:#9966CC; font-weight:bold;">do</span> |t|
      t.<span style="color:#CC0066; font-weight:bold;">string</span>      <span style="color:#ff3333; font-weight:bold;">:data_file_name</span>
      t.<span style="color:#CC0066; font-weight:bold;">string</span>      <span style="color:#ff3333; font-weight:bold;">:data_content_type</span>
      t.<span style="color:#CC0066; font-weight:bold;">integer</span>     <span style="color:#ff3333; font-weight:bold;">:data_file_size</span>
      t.<span style="color:#9900CC;">datetime</span>    <span style="color:#ff3333; font-weight:bold;">:data_updated_at</span>
      t.<span style="color:#9900CC;">references</span>  <span style="color:#ff3333; font-weight:bold;">:task</span>
      t.<span style="color:#9900CC;">timestamps</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> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">down</span>
    drop_table <span style="color:#ff3333; font-weight:bold;">:assets</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Run the migration:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ rake db:migrate</pre></div></div>

<p>Create the associations in the models:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># app/models/asset.rb</span>
<span style="color:#9966CC; font-weight:bold;">class</span> Asset <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  belongs_to <span style="color:#ff3333; font-weight:bold;">:task</span>
&nbsp;
  has_attached_file <span style="color:#ff3333; font-weight:bold;">:data</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># app/models/task.rb</span>
<span style="color:#9966CC; font-weight:bold;">class</span> Task <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  has_many <span style="color:#ff3333; font-weight:bold;">:assets</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>&#8230;and finally, modify the task show template to show the attachments:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">  &lt;!-- app/views/tasks/show.html.erb --&gt;
&nbsp;
  &lt;b&gt;Name:&lt;/b&gt;
  <span style="color:#006600; font-weight:bold;">&lt;%</span>=h <span style="color:#0066ff; font-weight:bold;">@task</span>.<span style="color:#9900CC;">name</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
&nbsp;
  &lt;b&gt;Description:&lt;/b&gt;
  <span style="color:#006600; font-weight:bold;">&lt;%</span>=h <span style="color:#0066ff; font-weight:bold;">@task</span>.<span style="color:#9900CC;">description</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
&nbsp;
  <span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#0066ff; font-weight:bold;">@task</span>.<span style="color:#9900CC;">assets</span>.<span style="color:#9900CC;">blank</span>? <span style="color:#006600; font-weight:bold;">-%&gt;</span>
&nbsp;
  &lt;b&gt;Attachments:&lt;/b&gt;
  <span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#0066ff; font-weight:bold;">@task</span>.<span style="color:#9900CC;">assets</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |asset| <span style="color:#006600; font-weight:bold;">-%&gt;</span>
    <span style="color:#006600; font-weight:bold;">&lt;%</span>= link_to <span style="color:#996600;">&quot;Download <span style="color:#000099;">\&quot;</span>#{asset.data_file_name}<span style="color:#000099;">\&quot;</span>&quot;</span>, asset.<span style="color:#9900CC;">data</span>.<span style="color:#9900CC;">url</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
  <span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">-%&gt;</span>
&nbsp;
<span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">-%&gt;</span>
&nbsp;
<span style="color:#006600; font-weight:bold;">&lt;%</span>= link_to <span style="color:#996600;">'Edit'</span>, edit_task_path<span style="color:#006600; font-weight:bold;">&#40;</span>@task<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span> |
<span style="color:#006600; font-weight:bold;">&lt;%</span>= link_to <span style="color:#996600;">'Back'</span>, tasks_path <span style="color:#006600; font-weight:bold;">%&gt;</span></pre></div></div>

<p>You can set up a cron job to check if there are new emails every two minutes by putting this your crontab file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">##__email_checker__</span>
<span style="color: #000000; font-weight: bold;">*/</span><span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #007800;">RAILS_ENV</span>=production <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mauricio<span style="color: #000000; font-weight: bold;">/</span>pdn-posts<span style="color: #000000; font-weight: bold;">/</span>how-to-pull-emails-from-gmail-to-rachments<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>script<span style="color: #000000; font-weight: bold;">/</span>runner MailReader.check_mail</pre></div></div>

<p>And last but not least, the source code used for this post is hosted on <a href="http://github.com/mauriciozaffari/pdn-posts/tree/fc9f7a42e907881e53dd0314f6a615068866080d/how-to-pull-emails-from-gmail-to-rails-with-attachments/app">github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/how-to-pull-emails-from-gmail-to-rails-with-attachments/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quick tip: Multiple terminals in the same window</title>
		<link>http://www.papodenerd.net/quick-tip-multiple-terminals-in-the-same-window/</link>
		<comments>http://www.papodenerd.net/quick-tip-multiple-terminals-in-the-same-window/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 13:48:08 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Quick Tip]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[productivity]]></category>

		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=105</guid>
		<description><![CDATA[While I&#8217;m working, I always have a minimum of 3 or 4 open terminals: one for watching the logs, one for ssh and so on.
It&#8217;s not good to have a lot of windows open, and tab switching can be a pain, specially when you want to see what&#8217;s going on in one window while you [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m working, I always have a minimum of 3 or 4 open terminals: one for watching the logs, one for ssh and so on.<br />
It&#8217;s not good to have a lot of windows open, and tab switching can be a pain, specially when you want to see what&#8217;s going on in one window while you type in another one.<br />
So I&#8217;ve found recently <a href="http://www.tenshu.net/terminator/" target="_blank">Terminator</a>.<br />
Taken from terminator&#8217;s home page:</p>
<blockquote><p>
The goal of this project is to produce a useful tool for arranging terminals.<br />
It is inspired by programs such as gnome-multi-term, quadkonsole, etc. in that the main focus is arranging terminals in grids (tabs is the most common default method, which Terminator also supports).</p>
<p>Much of the behaviour of Terminator is based on GNOME Terminal, and we are adding more features from that as time goes by, but we also want to extend out in different directions with useful features for sysadmins and other users. If you have any suggestions, please file wishlist bugs! (see below for the address)</p>
<p><strong>Features:</strong></p>
<p>    * Arrange terminals in a grid<br />
    * Tabs<br />
    * Drag and drop re-ordering of terminals<br />
    * Lots of keyboard shortcuts<br />
    * Config file to override gnome-terminal settings<br />
    * Simultaneous typing to arbitrary groups of terminals
</p></blockquote>
<div id="attachment_103" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.papodenerd.net/wp-content/uploads/2009/01/terminator-ss.png"><img class="size-medium wp-image-103" title="terminator-ss.png" src="http://www.papodenerd.net/wp-content/uploads/2009/01/terminator-ss-300x240.png" alt="My screen." width="300" height="240" /></a><p class="wp-caption-text">My screen.</p></div>
<p>You can put your default configurations in the file ~/.config/terminator/config<br />
Mine configurations are this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#/home/mauricio/.config/terminator/config</span>
<span style="color: #007800;">enable_real_transparency</span>=True
<span style="color: #007800;">force_no_bell</span>=True
<span style="color: #007800;">scrollbar_position</span>=disabled
<span style="color: #007800;">titlebars</span>=False
<span style="color: #007800;">handle_size</span>=<span style="color: #000000;">1</span></pre></div></div>

<p>This increased a lot my productivity. Unfortunately I haven&#8217;t found anything like Terminator for Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/quick-tip-multiple-terminals-in-the-same-window/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating atom feeds with Ruby on Rails</title>
		<link>http://www.papodenerd.net/creating-atom-feeds-with-ruby-on-rails/</link>
		<comments>http://www.papodenerd.net/creating-atom-feeds-with-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 13:40:56 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[atom]]></category>

		<category><![CDATA[feed]]></category>

		<category><![CDATA[google reader]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=90</guid>
		<description><![CDATA[Update (26/01): I&#8217;m using IDs on the feeds now, as I was getting duplicated feed entries. I followed this post written by Carlos Brando.
I had some trouble recently with atom feeds. I made it work with almost all the readers around there, but it took some time until I found why it wasn&#8217;t working with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update (26/01)</strong>: I&#8217;m using IDs on the feeds now, as I was getting duplicated feed entries. I followed this <a href="http://www.nomedojogo.com/2008/09/11/edge-rails-evitando-feeds-duplicados/">post</a> written by <a href="http://www.nomedojogo.com">Carlos Brando</a>.</p>
<p>I had some trouble recently with atom feeds. I made it work with almost all the readers around there, but it took some time until I found why it wasn&#8217;t working with Google Reader.<br />
So, I&#8217;ll try to save some people time here.</p>
<p>First, you need a action for creating the feeds (could be the index action too, you just need to add the format.atom line):</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># app/controllers/stories_controller.rb</span>
<span style="color:#9966CC; font-weight:bold;">def</span> feed
    <span style="color:#0066ff; font-weight:bold;">@project</span> = Project.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:project_id</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@type</span> = <span style="color:#0066ff; font-weight:bold;">@project</span>.<span style="color:#9900CC;">types</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:type_id</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@stories</span> = <span style="color:#0066ff; font-weight:bold;">@type</span>.<span style="color:#9900CC;">stories</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:order</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">'updated_at desc'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
    respond_to <span style="color:#9966CC; font-weight:bold;">do</span> |format|
      <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">atom</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Now, you need a builder for that action:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># app/views/stories/feed.atom.builder</span>
atom_feed <span style="color:#9966CC; font-weight:bold;">do</span> |feed|
  feed.<span style="color:#9900CC;">title</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;#{@project.name}-&amp;gt;#{@type.name}&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  feed.<span style="color:#9900CC;">updated</span><span style="color:#006600; font-weight:bold;">&#40;</span>@stories.<span style="color:#9900CC;">first</span>.<span style="color:#9900CC;">updated_at</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%Y-%m-%dT%H:%M:%SZ&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">for</span> story <span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#0066ff; font-weight:bold;">@stories</span>
    <span style="color:#9966CC; font-weight:bold;">next</span> <span style="color:#9966CC; font-weight:bold;">if</span> story.<span style="color:#9900CC;">updated_at</span>.<span style="color:#9900CC;">blank</span>?
    feed.<span style="color:#9900CC;">entry</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>@project, <span style="color:#0066ff; font-weight:bold;">@type</span>, story<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> |entry|
      entry.<span style="color:#9900CC;">title</span><span style="color:#006600; font-weight:bold;">&#40;</span>story.<span style="color:#9900CC;">headline</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      entry.<span style="color:#9900CC;">content</span><span style="color:#006600; font-weight:bold;">&#40;</span>story.<span style="color:#9900CC;">text</span>, <span style="color:#ff3333; font-weight:bold;">:type</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">'html'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      entry.<span style="color:#9900CC;">updated</span><span style="color:#006600; font-weight:bold;">&#40;</span>story.<span style="color:#9900CC;">updated_at</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%Y-%m-%dT%H:%M:%SZ&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;"># needed to work with Google Reader.</span>
      entry.<span style="color:#9900CC;">author</span> <span style="color:#9966CC; font-weight:bold;">do</span> |author|
        author.<span style="color:#9900CC;">name</span><span style="color:#006600; font-weight:bold;">&#40;</span>story.<span style="color:#9900CC;">author</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>And finally, a route to the feed:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">map.<span style="color:#9900CC;">connect</span> <span style="color:#996600;">'/projects/:project_id/types/:type_id/feed'</span>, <span style="color:#ff3333; font-weight:bold;">:controller</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">'stories'</span>, <span style="color:#ff3333; font-weight:bold;">:action</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">'feed'</span>, <span style="color:#ff3333; font-weight:bold;">:format</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">'atom'</span></pre></div></div>

<p>Now you can check if it&#8217;s valid with the <a href="http://feedvalidator.org/">Feed Validator</a>.</p>
<p>The problem why it wasn&#8217;t working with Google Reader was that I forgot the entry.updated line. Also, you need to format the time as it is above, so it&#8217;ll follow the <a href="http://feedvalidator.org/docs/error/InvalidRFC3339Date.html">rules for dates in the atom specification</a> and will work with Google Reader.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/creating-atom-feeds-with-ruby-on-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dica rápida: Twittando a partir da linha de comando</title>
		<link>http://www.papodenerd.net/dica-rapida-twittando-a-partir-da-linha-de-comando/</link>
		<comments>http://www.papodenerd.net/dica-rapida-twittando-a-partir-da-linha-de-comando/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 19:03:59 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Quick Tip]]></category>

		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=86</guid>
		<description><![CDATA[Estava procurando uma forma de escrever no twitter de forma rápida e sem precisar abrir nenhum cliente, nem mesmo o site. Foi quando uma pergunta rápida ao guru me trouxe esse artigo.
Fiz algumas modificações (não conseguia postar mensagems com !) e acabei com esse script:

#!/usr/bin/ruby
`curl --basic --user &#34;&#60;myusername&#62;:&#60;mysecretpassword&#62;&#34; --data-ascii &#34;status=#{ARGV.join(&#34; &#34;)}&#34; &#34;http://twitter.com/statuses/update.json&#34;`

Substitua  e  [...]]]></description>
			<content:encoded><![CDATA[<p>Estava procurando uma forma de escrever no twitter de forma rápida e sem precisar abrir nenhum cliente, nem mesmo o site. Foi quando uma pergunta rápida ao <a href="http://www.google.com.br">guru</a> me trouxe <a href="http://binnyva.blogspot.com/2007/03/using-twitter-part-1-command-line.html">esse artigo</a>.<br />
Fiz algumas modificações (não conseguia postar mensagems com !) e acabei com esse script:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span>
<span style="color:#996600;">`curl --basic --user &quot;&lt;myusername&gt;:&lt;mysecretpassword&gt;&quot; --data-ascii &quot;status=#{ARGV.join(&quot; &quot;)}&quot; &quot;http://twitter.com/statuses/update.json&quot;`</span></pre></div></div>

<p>Substitua <myusername> e <mypassword> com seu usuário e sua senha, salve o arquivo com o nome de twit em /usr/bin ou qualquer pasta no seu path, de permissão de execução (chmod +x /usr/bin/twit) e execute:</p>
<pre>
$ twit Estou postando a partir da linha de comando!
</pre>
<p>Se essa dica foi útil à você, poste nos comentários. <img src='http://www.papodenerd.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/dica-rapida-twittando-a-partir-da-linha-de-comando/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dica rápida: simplificando a chamada do método I18n.localize no Rails 2.2</title>
		<link>http://www.papodenerd.net/dica-rapida-simplificando-a-chamada-do-metodo-i18nlocalize-no-rails-22/</link>
		<comments>http://www.papodenerd.net/dica-rapida-simplificando-a-chamada-do-metodo-i18nlocalize-no-rails-22/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 19:14:49 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Quick Tip]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[DSL]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=82</guid>
		<description><![CDATA[Fiquei um longo período sem postar nada. A coisa está corrida por aqui. Estou fazendo o deployment da minha aplicação, refatorando pedaços de código, corrigindo bugs, enfim, aparando as últimas arestas antes de colocar no ar.
Assim sendo, vamos com uma dica rápida para facilitar o acesso aos recursos de internacionalização inseridos no Rails 2.2.
Até o [...]]]></description>
			<content:encoded><![CDATA[<p>Fiquei um longo período sem postar nada. A coisa está corrida por aqui. Estou fazendo o deployment da minha aplicação, refatorando pedaços de código, corrigindo bugs, enfim, aparando as últimas arestas antes de colocar no ar.<br />
Assim sendo, vamos com uma dica rápida para facilitar o acesso aos recursos de internacionalização inseridos no <a href="http://www.rubyonrails.pro.br/">Rails</a> 2.2.</p>
<p>Até o Rails 2.1 eu usava o <a href="http://www.improveit.com.br/software_livre/brazilian_rails">Brazilian Rails</a> para a formatação de datas, moeda, etc. Resolvi que era hora de tentar o I18n do Rails 2.2.</p>
<p>Primeiro passo: criar o locale &#8216;pt-BR.yml&#8217; dentro de config/locales/:</p>

<div class="wp_syntax"><div class="code"><pre class="yaml" style="font-family:monospace;">time:
    formats:
      default: &quot;%A, %d de %B de %Y, %H:%M&quot;
      short: &quot;%d/%m, %H:%M&quot;
      long: &quot;%A, %d de %B de %Y, %H:%M&quot;
      hour: &quot;%H:%M&quot;
    am: ''
    pm: ''</pre></div></div>

<p>no config/environment.rb:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">I18n.<span style="color:#9900CC;">default_locale</span> = <span style="color:#996600;">&quot;pt-BR&quot;</span></pre></div></div>

<p>e vualá:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&gt;&gt;</span> I18n.<span style="color:#9900CC;">localize</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;Segunda, 08 de Dezembro de 2008, 17:00&quot;</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> I18n.<span style="color:#9900CC;">localize</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>, <span style="color:#ff3333; font-weight:bold;">:format</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:short</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;08/12, 17:00&quot;</span></pre></div></div>

<p>Muito bem. Tudo funcionando. Mas é muito chato ter que chamar a classe I18n todo o tempo. Então vamos usar o poder de DSLs que Ruby nos dá.<br />
Crie um arquivo em config/initalizers com o nome que preferir e adicione:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC00FF; font-weight:bold;">Time</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> localize<span style="color:#006600; font-weight:bold;">&#40;</span>options=<span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    I18n.<span style="color:#9900CC;">localize</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, options<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Agora ficou muito mais fácil e intuitivo:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&gt;&gt;</span> <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>.<span style="color:#9900CC;">localize</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;Segunda, 08 de Dezembro de 2008, 17:04&quot;</span>
<span style="color:#006600; font-weight:bold;">&gt;&gt;</span> <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>.<span style="color:#9900CC;">localize</span> <span style="color:#ff3333; font-weight:bold;">:format</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:short</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;08/12, 17:04&quot;</span></pre></div></div>

<p>Isso pode ser feito similarmente com outros métodos, de outras classes também. Fica para o próximo post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/dica-rapida-simplificando-a-chamada-do-metodo-i18nlocalize-no-rails-22/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JRuby 1.1.4 vs Ruby 1.8 no Rails 2.2</title>
		<link>http://www.papodenerd.net/jruby-114-vs-ruby-18-no-rails-22/</link>
		<comments>http://www.papodenerd.net/jruby-114-vs-ruby-18-no-rails-22/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 18:58:18 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[benchmark]]></category>

		<category><![CDATA[JRuby]]></category>

		<category><![CDATA[Threading]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=70</guid>
		<description><![CDATA[Continuando a série de benchmarks começada ao comparar o Rails 2.1 com o Rails 2.2 em cima do Ruby 1.8, agora é a vez de comparar o JRuby e Ruby.
Se você não leu a explicação das diferenças do modelo de threading entre Ruby 1.8, Ruby 1.9 e JRuby, leia antes de prosseguir.
Estou rodando os testes [...]]]></description>
			<content:encoded><![CDATA[<p>Continuando a série de benchmarks começada ao <a href="http://www.papodenerd.net/comparacoes-entre-rails-211-e-rails-22/">comparar o Rails 2.1 com o Rails 2.2</a> em cima do Ruby 1.8, agora é a vez de comparar o JRuby e Ruby.<br />
Se você não leu a explicação das <a href="http://www.papodenerd.net/green-threads-native-threads-gil-ruby-e-rails/">diferenças do modelo de threading entre Ruby 1.8, Ruby 1.9 e JRuby</a>, leia antes de prosseguir.<br />
Estou rodando os testes no meu computador pessoal, que é um Pentium 4 3.0 HT, com 1Gb de memória rodando Ubuntu Linux. Já é um PC um tanto quanto ultrapassado, portanto o tempo de resposta acaba sendo um pouco alto, além de que ao mesmo tempo em que rodam os testes rodam também outros programas, como o Firefox por exemplo.<br />
Vamos ao que interessa:</p>
<h3>Ruby 1.8</h3>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ ruby script<span style="color: #000000; font-weight: bold;">/</span>server <span style="color: #660033;">-p</span> <span style="color: #000000;">3001</span> <span style="color: #660033;">-e</span> production
$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">5</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">3000</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
Concurrency Level:      <span style="color: #000000;">5</span>
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests:   <span style="color: #000000;">3.903964</span> seconds
Complete requests:      <span style="color: #000000;">50</span>
Failed requests:        0
Write errors:           0
Total transferred:      <span style="color: #000000;">573554</span> bytes
HTML transferred:       <span style="color: #000000;">547350</span> bytes
Requests per second:    <span style="color: #000000;">12.81</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span>
Time per request:       <span style="color: #000000;">390.396</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Time per request:       <span style="color: #000000;">78.079</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Transfer rate:          <span style="color: #000000;">143.44</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received</pre></div></div>

<h3>JRuby 1.1.4</h3>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ jruby -J-Djruby.objectspace.enabled=<span style="color: #c20cb9; font-weight: bold;">false</span> <span style="color: #660033;">-J-Xmn128m</span> <span style="color: #660033;">-J-Xms512m</span> <span style="color: #660033;">-J-Xmx512m</span> <span style="color: #660033;">-J-server</span> -J-Djruby.thread.pooling=<span style="color: #c20cb9; font-weight: bold;">true</span> script<span style="color: #000000; font-weight: bold;">/</span>server <span style="color: #660033;">-e</span> production
$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">5</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">3000</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
Concurrency Level:      <span style="color: #000000;">5</span>
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests:   <span style="color: #000000;">7.976448</span> seconds
Complete requests:      <span style="color: #000000;">50</span>
Failed requests:        0
Write errors:           0
Total transferred:      <span style="color: #000000;">573600</span> bytes
HTML transferred:       <span style="color: #000000;">547350</span> bytes
Requests per second:    <span style="color: #000000;">6.27</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span>
Time per request:       <span style="color: #000000;">797.645</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Time per request:       <span style="color: #000000;">159.529</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Transfer rate:          <span style="color: #000000;">70.21</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received</pre></div></div>

<p>Mesmo utilizando todas as flags de <a href="http://wiki.jruby.org/wiki/Performance_Tuning">performance tunning</a> da <a href="http://wiki.jruby.org/">wiki do JRuby</a>, ele ainda se mostrou mais lento. Isso significa que o JRuby não vai tirar proveito do threadsafeting do Rails 2.2? Não!<br />
Pelo que eu entendi pesquisando brevemente, ainda é preciso fazer alterações no código do JRuby pra que ele ofereça a melhor performance possível. Mesmo a última barreira para que o Rails possa ser executado em modo multi-threaded tenha sido removida, ainda é preciso implementar essa função no core do JRuby. Me corrijam se eu estiver errado.</p>
<p>Tempo de carga de uma única requisição no JRuby:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">Processing IndexController<span style="color: #666666; font-style: italic;">#index (for 127.0.0.1 at 2008-10-30 18:44:58) [GET]</span>
Completed <span style="color: #000000; font-weight: bold;">in</span> 186ms <span style="color: #7a0874; font-weight: bold;">&#40;</span>View: <span style="color: #000000;">116</span>, DB: <span style="color: #000000;">7</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> | <span style="color: #000000;">200</span> OK <span style="color: #7a0874; font-weight: bold;">&#91;</span>http:<span style="color: #000000; font-weight: bold;">//</span>localhost<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>&#8230;e no Ruby:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">Processing IndexController<span style="color: #666666; font-style: italic;">#index (for 127.0.0.1 at 2008-10-30 18:45:13) [GET]</span>
Completed <span style="color: #000000; font-weight: bold;">in</span> 131ms <span style="color: #7a0874; font-weight: bold;">&#40;</span>View: <span style="color: #000000;">60</span>, DB: <span style="color: #000000;">20</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> | <span style="color: #000000;">200</span> OK <span style="color: #7a0874; font-weight: bold;">&#91;</span>http:<span style="color: #000000; font-weight: bold;">//</span>localhost<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>O Ruby é 2x mais rápido que o JRuby ao renderizar a view, mas quase 3x mais lento em consultas ao banco.<br />
Alguém já brincou com o JRuby e Rails 2.2? Obteve resultados melhores? Comentem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/jruby-114-vs-ruby-18-no-rails-22/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Green Threads, Native Threads, GIL, Ruby e Rails&#8230;</title>
		<link>http://www.papodenerd.net/green-threads-native-threads-gil-ruby-e-rails/</link>
		<comments>http://www.papodenerd.net/green-threads-native-threads-gil-ruby-e-rails/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 14:24:19 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[Threading]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=56</guid>
		<description><![CDATA[No post passado eu falei sobre os benefícios do Rails 2.2 em termos de performance que obtive na minha aplicação. Porém, não deixei bem claro que a intenção dos meus testes eram comparar a diferença entre as duas versões do Rails apenas, sem tocar no interpretador Ruby. Então pra deixar as coisas mais claras, vou [...]]]></description>
			<content:encoded><![CDATA[<p>No post passado eu falei sobre os <a href="http://www.papodenerd.net/comparacoes-entre-rails-211-e-rails-22/">benefícios do Rails 2.2</a> em termos de performance que obtive na minha aplicação. Porém, não deixei bem claro que a intenção dos meus testes eram comparar a diferença entre as duas versões do Rails apenas, sem tocar no interpretador Ruby. Então pra deixar as coisas mais claras, vou analizar aqui as diferenças entre os interpretadores Ruby 1.8 (MRI), Ruby 1.9 (YARV) e JRuby (JVM).</p>
<h3>Ruby 1.8</h3>
<p>É o Ruby estável atual. Suporta apenas Green Threads.<br />
Isso significa que, não importa quantas threads você rode no seu programa, haverá apenas uma Thread alocada no kernel do sistema operacional. O efeito colateral disso é a necessidade de esperar que uma Thread termine a sua execução para começar outra Thread.<br />
Até pouco tempo a solução para esse problema eram clusters de servidores. Com vários servidores rodando, cada um fica responsável por uma requisição, permitindo a execução de mais de um processo ao mesmo tempo (não concorrente). Mas gerava um outro problema: cada servidor precisava carregar na memória todas as bibliotecas, classes do framework, classes da aplicação, etc, o que gera um overload de memória.<br />
Então chegaram os <a href="http://phusion.nl">Phusion Guys</a> com o Passenger e o Ruby Enterprise Edition, que juntos otimizaram esse processo. O que o Ruby Enterprise Edition fez foi compartilhar os objetos iguais entre as instâncias de Rails, diminuindo o overload. Contúdo você ainda tem conexões de banco, código de aplicação e dados em memória criados depois da inicialização duplicados.</p>
<h3>Ruby 1.9</h3>
<p>O Ruby 1.9 implementa o YARV (desenvolvido pelo Matz assim como o MRI) como virtual machine, o qual suporta Native Threads. Isso significa que cada Thread Ruby terá sua própria Thread no kernel do sistema operacional. Porém, isso não significa que haverá paralelismo entre as execuções das Threads. Somente um processo rodará por vez, independente de quantos cores tenha o servidor. Isso acontece devido ao GIL (Global Interpreter Lock), que também está presente no MRI.<br />
O GIL nada mais é que uma trava gerada quando são solicitados processos de IO, para impedir que seja compartilhado código que não é Thread Safe entre as Threads.<br />
Remover o GIL beneficiaria a utilização de mais de 1 core no servidor, pois possibilitaria a execução paralela de Threads. O problema é que muitas extensões feitas em C precisariam ser reescritas, o que atrasaria o lançamento. Talvez isso esteja nos planos para a versão 2.0.</p>
<h3>JRuby</h3>
<p>O JRuby usa JVM, a máquina virtual Java, e que suporta Native Threads e execução simultânea.<br />
Isso significa dizer que várias requisições poderão ser executadas paralelamente, dependendo únicamente da quantidade de cores do seu servidor.</p>
<h3>Então por que houve melhora na performance sem trocar o interpretador?</h3>
<p>O que acontecia com o Rails até a versão 2.1.1 é que havia um lock único sobre cada requisição, e que fora substituido na versão 2.2 por locks menores, sobre os recursos compartilhados apenas. Porém, ao meu ver, mais importante que isso para a melhora de performance é o pool de conexões. Na versão 2.2, você pode configurar um pool de conexões com o banco de dados que serão acessados ao mesmo tempo.<br />
No seu blog o Carlos Brando explicou como o <a href="http://www.nomedojogo.com/2008/09/09/edge-rails-pool-de-conexoes-no-rails/">pool de conexões</a> funciona. Vale o acesso.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/green-threads-native-threads-gil-ruby-e-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Comparações entre Rails 2.1.1 e Rails 2.2</title>
		<link>http://www.papodenerd.net/comparacoes-entre-rails-211-e-rails-22/</link>
		<comments>http://www.papodenerd.net/comparacoes-entre-rails-211-e-rails-22/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 18:32:33 +0000</pubDate>
		<dc:creator>mauricio</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[benchmark]]></category>

		<category><![CDATA[deployment]]></category>

		<guid isPermaLink="false">http://www.papodenerd.net/?p=48</guid>
		<description><![CDATA[Hoje resolvi testar a minha aplicação de várias formas, pra ver se a nova versão do Rails traria algum benefício de fato para mim.
Primeiro rodei o Apache Benchmark na aplicação do jeito que ela estava, como Rails 2.1.1:

$ ab -n 50 -c 5 http://localhost:3000/
&#160;
Concurrency Level:      5
Time taken for tests:  [...]]]></description>
			<content:encoded><![CDATA[<p>Hoje resolvi testar a minha aplicação de várias formas, pra ver se a nova versão do Rails traria algum benefício de fato para mim.</p>
<p>Primeiro rodei o Apache Benchmark na aplicação do jeito que ela estava, como Rails 2.1.1:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">5</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">3000</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
Concurrency Level:      <span style="color: #000000;">5</span>
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests:   <span style="color: #000000;">39.938685</span> seconds
Complete requests:      <span style="color: #000000;">50</span>
Failed requests:        0
Write errors:           0
Total transferred:      <span style="color: #000000;">1036850</span> bytes
HTML transferred:       <span style="color: #000000;">1010700</span> bytes
Requests per second:    <span style="color: #000000;">1.25</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span>
Time per request:       <span style="color: #000000;">3993.869</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Time per request:       <span style="color: #000000;">798.774</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Transfer rate:          <span style="color: #000000;">25.34</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received</pre></div></div>

<p>Hummm.. lento.. muito lento. Já estava preocupado com a hora de colocar isso em produção.</p>
<p>Atualizando o Rails para a versão 2.2 e rodando o benchmark:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">5</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">3000</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
Concurrency Level:      <span style="color: #000000;">5</span>
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests:   <span style="color: #000000;">32.228686</span> seconds
Complete requests:      <span style="color: #000000;">50</span>
Failed requests:        0
Write errors:           0
Total transferred:      <span style="color: #000000;">590650</span> bytes
HTML transferred:       <span style="color: #000000;">564400</span> bytes
Requests per second:    <span style="color: #000000;">1.55</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span>
Time per request:       <span style="color: #000000;">3222.869</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Time per request:       <span style="color: #000000;">644.574</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Transfer rate:          <span style="color: #000000;">17.87</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received</pre></div></div>

<p>What?? Cadê a melhora de performance? Rails não é Threadsafe agora?<br />
É! Mas você tem que habilitar o recurso nas configurações pequeno Padawan:</p>
<p>No seu arquivo config/development.rb adicione no final:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">config.<span style="color:#9900CC;">threadsafe</span>!</pre></div></div>

<p>Rodando o Benchmark:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">5</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">3000</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
Concurrency Level:      <span style="color: #000000;">5</span>
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests:   <span style="color: #000000;">6.807438</span> seconds
Complete requests:      <span style="color: #000000;">50</span>
Failed requests:        0
Write errors:           0
Total transferred:      <span style="color: #000000;">590620</span> bytes
HTML transferred:       <span style="color: #000000;">564400</span> bytes
Requests per second:    <span style="color: #000000;">7.34</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span>
Time per request:       <span style="color: #000000;">680.744</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Time per request:       <span style="color: #000000;">136.149</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Transfer rate:          <span style="color: #000000;">84.61</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received</pre></div></div>

<p>Muito melhor não?! Uma melhora de quase 500%! Mas e se rodassemos em modo de produção?</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">5</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">3000</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
Concurrency Level:      <span style="color: #000000;">5</span>
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests:   <span style="color: #000000;">3.693437</span> seconds
Complete requests:      <span style="color: #000000;">50</span>
Failed requests:        0
Write errors:           0
Total transferred:      <span style="color: #000000;">573555</span> bytes
HTML transferred:       <span style="color: #000000;">547350</span> bytes
Requests per second:    <span style="color: #000000;">13.54</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span>
Time per request:       <span style="color: #000000;">369.344</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Time per request:       <span style="color: #000000;">73.869</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Transfer rate:          <span style="color: #000000;">151.62</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received</pre></div></div>

<p>Impressionado pequeno Padawan? Cuidado! Nada disso aqui significa que sua aplicação vai ficar tão melhor quanto a minha somente com a nova versão do Rails. A aplicação em questão aqui envolve muitos cálculos complexos, e por isso tira vantagem do threading.<br />
Tentei fazer alguns testes com o <a href="http://github.com/oldmoe/mysqlplus/tree/master">mysqlplus</a>, driver de mysql pra ruby que promete acesso assíncrono ao banco de dados. O <a href="http://www.igvita.com/2008/10/27/scaling-activerecord-with-mysqlplus/">tutorial</a> que eu segui simplesmente não funcionou no meu ambiente. Li em algum dos posts que pesquisei que eles estavam concentrando esforços pra fazer funcionar com o Rails 2.2 e corrigir alguns bugs.<br />
Rails escala? Pra minha aplicação sim. E pra sua?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.papodenerd.net/comparacoes-entre-rails-211-e-rails-22/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
