<?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>Mundo Ruby</title>
	<atom:link href="http://www.mundoruby.com.ar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mundoruby.com.ar</link>
	<description>Ruby Artists, Hackers y otras yerbas ...</description>
	<lastBuildDate>Wed, 12 Aug 2009 23:02:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Regalando cosas por Bluetooth</title>
		<link>http://www.mundoruby.com.ar/2009/08/12/regalando-cosas-por-bluetooth/</link>
		<comments>http://www.mundoruby.com.ar/2009/08/12/regalando-cosas-por-bluetooth/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 23:02:09 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[bluetooth]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=161</guid>
		<description><![CDATA[
El año pasado Movistar había lanzado una campaña muy pedorra en el subte, en donde unos carteles en el piso te invitaban a prender tu Bluetooth y te enviaban un file. Lo que te enviaban era una simple imagen, con tanto texto que en mi celular era casi ilegible y no tenía consigna alguna.
Sin embargo [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>El año pasado Movistar había lanzado una campaña muy pedorra en el subte, en donde unos carteles en el piso te invitaban a prender tu Bluetooth y te enviaban un file. Lo que te enviaban era una simple imagen, con tanto texto que en mi celular era casi ilegible y no tenía consigna alguna.</p>
<p>Sin embargo esto sirvió para que me encaprichara y quisiera armar algo similar para la oficina, orientado a que un cliente que viene a una reunión se pueda llevar un regalo, que en este caso es un juego J2ME.</p>
<p>Hacerlo realmente es una boludez. El real problema, que no voy a tratar acá, es tener una placa Bluetooth soportada por Linux (creo que esta solución aplica Windows, pero no lo probé), lo que puede resultar complicado. Yo en mi anterior laptop fallé en cada intento. Hoy en día en mi MacBook anda todo out-of-the-box por suerte así que pude jugar un poco.</p>
<p>El protocolo que se utiliza para intercambiar cosas es Object Exchange (OBEX) y tenemos una excelente biblioteca llamada <a href="http://dev.zuckschwerdt.org/openobex/">OpenObex</a>. A nosotros nos interesa particularmente ObexFTP que nos da el File Transfer sobre Obex.</p>
<p>El primer problema que tuve es que en Jaunty no está el binding de ruby, por lo que me tuve que bajar el <a href="https://launchpad.net/ubuntu/karmic/+source/obexftp/0.22-1">source y diff</a> de Karmic y crear mis libobexftp-ruby_0.22-1_i386.deb y sus dependencias.</p>
<p>Salvando eso, con los ejemplos del <a href="http://dev.zuckschwerdt.org/openobex/wiki/ObexFtpExampleClientRuby">wiki</a> sale muy fácil. La biblioteca nos permite descubrir devices, abrir channels y enviar archivos en pocas líneas. Acá un en ruby ejemplo :</p>
<div>
<div>
<pre style="font-family:monospace"><span style="color:#008000;font-style:italic">#!/usr/bin/env ruby</span>
 
<span style="color:#CC0066;font-weight:bold">require</span> <span style="color:#996600">'obexftp'</span>
 
<span style="color:#CC0066;font-weight:bold">puts</span> <span style="color:#996600">&quot;Scanning BT...&quot;</span>
intfs = Obexftp.<span style="color:#9900CC">discover</span><span style="color:#006600;font-weight:bold">(</span><span style="color:#6666ff;font-weight:bold">Obexftp::BLUETOOTH</span><span style="color:#006600;font-weight:bold">)</span>
dev = intfs.<span style="color:#9900CC">first</span> <span style="color:#008000;font-style:italic"># Es un array, podríamos iterar sobre todas las encontradas</span>
 
channel = Obexftp.<span style="color:#9900CC">browsebt</span><span style="color:#006600;font-weight:bold">(</span>dev, <span style="color:#6666ff;font-weight:bold">Obexftp::PUSH</span><span style="color:#006600;font-weight:bold">)</span>
 
cli = <span style="color:#6666ff;font-weight:bold">Obexftp::Client</span>.<span style="color:#9900CC">new</span><span style="color:#006600;font-weight:bold">(</span><span style="color:#6666ff;font-weight:bold">Obexftp::BLUETOOTH</span><span style="color:#006600;font-weight:bold">)</span>
<span style="color:#CC0066;font-weight:bold">puts</span> cli.<span style="color:#9900CC">connectpush</span><span style="color:#006600;font-weight:bold">(</span>dev, channel<span style="color:#006600;font-weight:bold">)</span>
<span style="color:#CC0066;font-weight:bold">puts</span> cli.<span style="color:#9900CC">put_file</span><span style="color:#006600;font-weight:bold">(</span><span style="color:#996600">'ver.jpg'</span><span style="color:#006600;font-weight:bold">)</span>
<span style="color:#CC0066;font-weight:bold">puts</span> cli.<span style="color:#9900CC">disconnect</span></pre>
</div>
</div>
<p>Hacer lo mismo en Python, Perl o cualqueir otro <a href="http://dev.zuckschwerdt.org/openobex/wiki/ObexFtpBindings">lenguaje soportado</a> es igual de simple.</p>
<p>Obviamente es muy minimalista: agarra el primer device encontrado, abre un channel para hacer un PUSH (si el device no soporta PUSH retorna -1 según creo), luego abre la conexión y le envía el archivo.</p>
<p>Desde el celular vemos un mensaje de que se está abriendo una conexión y luego el detalle de lo que se quiere enviar, nombre del archivo, tipo de archivo, tamaño, etc. Podemos aceptarlo o rechazarlo. De aceptarlo se descarga pero no se guarda ni se instala, es un paso extra que debemos decidir si lo hacemos o no.</p>
<p>Un problema que encontramos para enviar juegos es que algunos celulares están bloqueados para esa función (para así vendértelos por el portal WAP oficial de tu carrier). Ya lo pudimos probar con varios celulares Nokia, Motorola y Samsung y funciona razonablemente bien.</p>
<p>Sobre este ejemplo nosotros tenés un poco más de trabajo, ya que guardamos los device ID y el contenido enviado, así cuando volvés te damos un contenido diferente <img src="http://www.gazer.com.ar/wp-includes/images/smilies/icon_smile.gif" alt=":)"> . Si además no podés recibir el juego, te pasamos una imágen simpática <img src="http://www.gazer.com.ar/wp-includes/images/smilies/icon_razz.gif" alt=":P"> .</p>
</p>
<p>(Via <a href="http://www.gazer.com.ar">El Futirifoken</a>.) Original Link: <a href="http://www.gazer.com.ar/2009/08/12/regalando-cosas-por-bluetooth/">Regalando cosas por Bluetooth</a> </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/08/12/regalando-cosas-por-bluetooth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RubyInstaller: Voting is over and the results are…</title>
		<link>http://www.mundoruby.com.ar/2009/07/25/rubyinstaller-voting-is-over-and-the-results-are%e2%80%a6/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/25/rubyinstaller-voting-is-over-and-the-results-are%e2%80%a6/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 15:13:29 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=159</guid>
		<description><![CDATA[
Hello Hello!
I&#8217;m happy to announce &#8212; 24 hours late on it &#8212; that the voting is over for the website contest I started last month for getting RubyInstaller (known as OneClick) a new home.

Thank all the designers who participated
First I would like to thank all the designers that contributed over the wiki with their design [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>Hello Hello!</p>
<p>I&#8217;m happy to announce &#8212; 24 hours late on it &#8212; that the voting is over for the website contest I started <a href="http://blog.mmediasys.com/2009/06/23/rubyinstaller-get-ready-to-vote">last month</a> for getting RubyInstaller (known as OneClick) a new home.</p>
<p><span id="more-269"></span></p>
<h3>Thank all the designers who participated</h3>
<p>First I would like to thank all the designers that contributed over the <a href="http://wiki.github.com/oneclick/rubyinstaller/website-contest">wiki</a> with their design proposals and comments.</p>
<h3>Thank you contributors</h3>
<p>Second but no less important a huge <strong>thank you</strong> to all the members of the Ruby community that contributed money to the <a href="http://pledgie.com/campaigns/4435">campaign</a> over pledgie.</p>
<p><strong>26</strong> people donated <strong>900 dollars</strong>!!!</p>
<p>The designer who created the selected design is going to receive all that.</p>
<p>Thank you!</p>
<h3>Selection of the design</h3>
<p>So, the polldaddy results:</p>
<p>With a total of <strong>339</strong> votes:</p>
<table>
<tr>
<th>Participant</th>
<th>Votes</th>
<th>%</th>
</tr>
<tr>
<td>Pavel Macek</td>
<td>160</td>
<td>47%</td>
</tr>
<tr>
<td>Ben Alpert</td>
<td>100</td>
<td>29%</td>
</tr>
<tr>
<td>Francesco Agnoletto</td>
<td>43</td>
<td>13%</td>
</tr>
<tr>
<td>Thuva Tharma</td>
<td>25</td>
<td>7%</td>
</tr>
<tr>
<td>Silviu Postavaru</td>
<td>11</td>
<td>3%</td>
</tr>
</table>
<p>Congratulations Pavel Macek!</p>
<p>I must say that was hard choice to all who voted, I couldn&#8217;t personally decide which one to vote since each design focused on important aspects.</p>
<h3>Thanks to the community</h3>
<p>Thank everyone that spread the word over Twitter, blog posts and mailing lists.</p>
<h3>What&#8217;s next?</h3>
<p>Well, now getting in touch with designer and arrange the GitHub repository for him to publish the <span class="caps">HTML </span>and <span class="caps">CSS </span>of the designs.</p>
<p>Then, built it over Radiant application and deploy!</p>
<p>Over the past weeks <em>Jon</em> has been working on documentation, <span class="caps">FAQ </span>and collecting information at the GitHub <a href="http://wiki.github.com/oneclick/rubyinstaller/">wiki</a> page.</p>
<p>Thanks <em>Jon</em>!</p>
<p>Once everything is in place, content will be ported/migrated to the new website.</p>
<h3>When the final installers?</h3>
<p>There are still some issues with own Ruby tests, but expect a newer preview release soon.</p>
<p><strong><span class="caps">THANKS EVERYBODY WHO VOTED AND DONATED</span>!</strong></p>
</p>
<p>(Via <a href="http://blog.mmediasys.com">DEV_MEM.dump_to(:blog) &#8211; Multimedia systems blog</a>.) Original Link: <a href="http://blog.mmediasys.com/2009/07/25/rubyinstaller-voting-is-over-and-the-results-are/#comments">RubyInstaller: Voting is over and the results are…</a> </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/25/rubyinstaller-voting-is-over-and-the-results-are%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>SQLite3/Ruby 1.2.5 Released!</title>
		<link>http://www.mundoruby.com.ar/2009/07/25/sqlite3ruby-1-2-5-released/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/25/sqlite3ruby-1-2-5-released/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 15:09:34 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=157</guid>
		<description><![CDATA[
I just released an updated version of SQLite3/Ruby, officially to RubyForge!
Read the news here
This release includes binaries for Windows, but not any kind of binary, but fat ones!
That means that using either 1.8 or 1.9 versions of Ruby you will be able to access SQLite3/Ruby bindings and script your craziest applications!
This also solves the major [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>I just released an updated version of <span class="caps">SQL</span>ite3/Ruby, officially to RubyForge!</p>
<p>Read the news <a href="http://rubyforge.org/forum/forum.php?forum_id=33814">here</a></p>
<p>This release includes binaries for Windows, but not any kind of binary, but <strong>fat</strong> ones!</p>
<p>That means that using either 1.8 or 1.9 versions of Ruby you will be able to access <span class="caps">SQL</span>ite3/Ruby bindings and script your craziest applications!</p>
<p>This also solves the major <span class="caps">PITA </span>for <code>gem update</code> that lot of user experienced in the past.</p>
<p>Don&#8217;t forget to read a getting started guide <a href="http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-sqlite3/">here</a></p>
<p>Now is time to hunt down MySQL gem author and politely ask him integrate my patches <img src='http://blog.mmediasys.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
</p>
<p>(Via <a href="http://blog.mmediasys.com">DEV_MEM.dump_to(:blog) &#8211; Multimedia systems blog</a>.) Original Link: <a href="http://blog.mmediasys.com/2009/07/25/sqlite3-ruby-1-2-5-released/#comments">SQLite3/Ruby 1.2.5 Released!</a> </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/25/sqlite3ruby-1-2-5-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rails twitter search using search.atom</title>
		<link>http://www.mundoruby.com.ar/2009/07/23/rails-twitter-search-using-search-atom/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/23/rails-twitter-search-using-search-atom/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 00:08:00 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=155</guid>
		<description><![CDATA[
Recently, I had to create a twitter live feed for a work I&#8217;m doing&#8230;. so I found the gems for searching in twitter, but all of them were working with the search.json api, but since my client wanted the same results that he saw in twitter.search.com, I created a lib for that project (following the [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>Recently, I had to create a twitter live feed for a work I&#8217;m doing&#8230;. so I found the gems for searching in twitter, but all of them were working with the search.json api, but since my client wanted the same results that he saw in <a href="http://twitter.search.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://twitter.search.com');" target="_blank">twitter.search.com</a>, I created a lib for that project (following the gem example code), in order to use the search.atom api and parse the xml results with hpricot.</p>
<p>If you deal with the same problem, here you have the code</p>
<p>require &#8216;rubygems&#8217;<br />
require &#8216;net/http&#8217;<br />
require &#8216;cgi&#8217;</p>
<p>class Twitter<br />
TWITTER_SEARCH_API_URL = &#8216;http://search.twitter.com/search.atom&#8217;<br />
DEFAULT_TIMEOUT = 5<br />
HEADERS = { &#8220;Content-Type&#8221; =&gt; &#8216;application/rss+xml&#8217;,<br />
&#8220;User-Agent&#8221;   =&gt; &#8216;twitter-search&#8217; }</p>
<p>def self.search(opts)<br />
search_for = &#8216;#twitter&#8217;</p>
<p>url = URI.parse(TWITTER_SEARCH_API_URL)<br />
url.query = sanitize_query(opts)</p>
<p>ensure_no_location_operators(url.query)</p>
<p>req  = Net::HTTP::Get.new(url.path)<br />
http = Net::HTTP.new(url.host, url.port)<br />
http.read_timeout = DEFAULT_TIMEOUT</p>
<p>res = http.start { |h| h.get(&#8221;#{url.path}?#{url.query}&#8221;, HEADERS) }</p>
<p>if res.code == &#8216;404&#8242;<br />
raise &#8220;Twitter responded with a 404 for your query&#8221;<br />
end</p>
<p>self.parse_search(res.body)<br />
end</p>
<p>def self.sanitize_query(opts)<br />
if opts.is_a? String<br />
&#8220;q=#{CGI.escape(opts)}&#8221;<br />
elsif opts.is_a? Hash<br />
&#8220;#{sanitize_query_hash(opts)}&#8221;<br />
else<br />
raise &#8220;sanitique_query expects a String or a Hash&#8221;<br />
end<br />
end</p>
<p>def self.sanitize_query_hash(query_hash)<br />
query_hash.collect{|key, value| &#8220;#{CGI.escape(key.to_s)}=#{CGI.escape(value.to_s)}&#8221; }.join(&#8217;&amp;&#8217;)<br />
end</p>
<p>def self.ensure_no_location_operators(query_string)<br />
if query_string.include?(&#8221;near%3A&#8221;) ||<br />
query_string.include?(&#8221;within%3A&#8221;)<br />
raise &#8220;near: and within: are available from the Twitter Search web interface, but not the API. The API requires the geocode parameter. See dancroak/twitter-search README.&#8221;<br />
end<br />
end</p>
<p>def self.parse_search(body)<br />
doc = Hpricot.parse(body)</p>
<p>entries = []</p>
<p>items = (doc/:entry)<br />
items.each do |raw_item|<br />
entry = {}</p>
<p>entry</p>
</p>
<p>(Via <a href="http://www.rorra.com.ar">Rorra&#8217;s blog</a>.) Original Link: <a href="http://www.rorra.com.ar/2009/07/22/rails-twitter-search-using-searchatomrails-busquedas-en-twitter-usando-searchatom/#comments">rails twitter search using search.atom</a> </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/23/rails-twitter-search-using-search-atom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rake sh en otro directorio</title>
		<link>http://www.mundoruby.com.ar/2009/07/17/rake-sh-en-otro-directorio/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/17/rake-sh-en-otro-directorio/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 13:31:39 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[rake]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=151</guid>
		<description><![CDATA[Problema: Quiero ejecutar un comando desde otro directorio en rake (por ejemplo, ejecutar un makefile que está en un subdirectorio).
Solución: Agrego al rakefile la posibilidad de ejecutar comandos en otro directorio. Para eso, al principio de mi rakefile puse:

require 'fileutils'

def sh_in_dir( dirname, *args, &#38;block )
  old_path = pwd
  FileUtils.chdir( dirname )
  sh( [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight:bold;">Problema:</span> Quiero ejecutar un comando desde otro directorio en rake (por ejemplo, ejecutar un makefile que está en un subdirectorio).<br />
<span style="font-weight:bold;">Solución:</span> Agrego al rakefile la posibilidad de ejecutar comandos en otro directorio. Para eso, al principio de mi rakefile puse:</p>
<pre class="ruby"><span class="string">
<pre style="font-size: 1.1em; background-color: #ffffcc; color: #000000; overflow-x: auto; overflow-y: auto; margin-top: 4px; margin-right: 0px; margin-bottom: 4px; margin-left: 0px; width: 610px; padding: 10px; border: thin dashed initial;"><span style="color: #000044;">require</span> <span style="color: #444477; font-weight: bold;">'</span><span style="color: #994444;">fileutils</span><span style="color: #444477; font-weight: bold;">'</span>

<span style="color: #aa0000; font-weight: bold;">def </span><span style="color: #007777;">sh_in_dir</span><span style="color: #444477; font-weight: bold;">(</span> <span style="color: #000044;">dirname</span><span style="color: #444477; font-weight: bold;">,</span> <span style="color: #444477; font-weight: bold;">*</span><span style="color: #000044;">args</span><span style="color: #444477; font-weight: bold;">,</span> <span style="color: #444477; font-weight: bold;">&amp;</span><span style="color: #000044;">block</span> <span style="color: #444477; font-weight: bold;">)</span>
  <span style="color: #000044;">old_path</span> <span style="color: #444477; font-weight: bold;">=</span> <span style="color: #000044;">pwd</span>
  <span style="color: #0077ff;">FileUtils</span><span style="color: #444477; font-weight: bold;">.</span><span style="color: #000044;">chdir</span><span style="color: #444477; font-weight: bold;">(</span> <span style="color: #000044;">dirname</span> <span style="color: #444477; font-weight: bold;">)</span>
  <span style="color: #000044;">sh</span><span style="color: #444477; font-weight: bold;">(</span> <span style="color: #444477; font-weight: bold;">*</span><span style="color: #000044;">args</span><span style="color: #444477; font-weight: bold;">,</span> <span style="color: #444477; font-weight: bold;">&amp;</span><span style="color: #000044;">block</span> <span style="color: #444477; font-weight: bold;">)</span>
  <span style="color: #0077ff;">FileUtils</span><span style="color: #444477; font-weight: bold;">.</span><span style="color: #000044;">chdir</span><span style="color: #444477; font-weight: bold;">(</span> <span style="color: #000044;">old_path</span> <span style="color: #444477; font-weight: bold;">)</span>
<span style="color: #aa0000; font-weight: bold;">end</span></pre>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, fantasy; line-height: 19px; white-space: normal; font-size: 13px;">Happy hacking,</span></p>
<p></span></pre>
<p>Aureliano.</p>
<div class="blogger-post-footer"><img src="https://blogger.googleusercontent.com/tracker/1437970354124720603-7633002584629589611?l=aurelianito.blogspot.com" alt="" width="1" height="1" /></div>
<p>(Via <a href="http://aurelianito.blogspot.com/">aurelianito</a>.) Original Link: <a href="http://aurelianito.blogspot.com/2009/07/rake-sh-en-otro-directorio.html">rake sh en otro directorio</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/17/rake-sh-en-otro-directorio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RubyInstaller: Updated packages, and other news.</title>
		<link>http://www.mundoruby.com.ar/2009/07/15/rubyinstaller-updated-packages-and-other-news/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/15/rubyinstaller-updated-packages-and-other-news/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 01:50:30 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=149</guid>
		<description><![CDATA[
A few days of silence in the middle, but definitely progress in Windows land&#8230; Readline, new packages and more news&#8230;

Pure-Ruby Readline for the win!
If was the case that under your environment every time you use IRB your CPU went crazy, you will be happy to hear that we found the problem.
More than just find it, [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>A few days of silence in the middle, but definitely progress in Windows land&#8230; Readline, new packages and more news&#8230;</p>
<p><span id="more-172"></span></p>
<h3>Pure-Ruby Readline for the win!</h3>
<p>If was the case that under your environment every time you use <span class="caps">IRB </span>your <span class="caps">CPU </span>went crazy, you will be happy to hear that we found the problem.</p>
<p>More than just find it, we put our some money to it and paid Park Heesob (from win32utils project fame) to code a Pure-Ruby Readline library.</p>
<p>The crazy part is that works on 1.8, 1.9, on Windows and Linux!, even more crazy, it also worked under Rubinius!</p>
<p>The code is in GitHub <a href="http://github.com/luislavena/rb-readline">here</a></p>
<p>Latest packages in RubyInstaller download page have replaced the <span class="caps">GNU</span> Readline binary with it, and <span class="caps">IRB </span>now works normally.</p>
<h3>Ruby 1.9.1-p129 got out.</h3>
<p>As announced in Ruby-Lang website (<a href="http://www.ruby-lang.org/en/news/2009/05/12/ruby-1-9-1-p129-released/">here</a>) 1.9.1-p129 went out last week.</p>
<p>While test on Windows for either trunk and 1.9.1 branch still segfault, I decided to do another release of this and put the 7zip packages in the <a href="http://rubyinstaller.org/downloads/">downloads</a> page at RubyInstaller.</p>
<p>Yes, no official Windows Installer yet, still need to iron some quirks (mentioned in previous post <a href="http://blog.mmediasys.com/2009/05/05/rubyinstaller-state-of-one-click/">here</a>)</p>
<p>Again, you can download those from <a href="http://rubyinstaller.org/downloads/">usual place</a></p>
<h3>Moved to Windows 7</h3>
<p>I definitely been one of the late adopters in OS changes. Been using Windows XP for work for the past 7 years (moved directly from Windows <span class="caps">NT4</span>) &#8212; yeah, love to skip versions.</p>
<p>So decided to install latest Release Candidate as main <span class="caps">OS, </span>and start using it. So far, the experience has been great.</p>
<p>Keep in mind that I rarely turned my laptop off or restarted it (even with XP). Sleep and hibernation are the two options I mostly use, and haven&#8217;t restarted the computer since installed Windows 7, so is good <img src='http://blog.mmediasys.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The following is a list of <em>things</em> I noticed that will love to expand in other posts:</p>
<h4>Mount <code>Users</code> in other partition, don&#8217;t keep with your system</h4>
<p>Like on Linux, dedicate a partition to your personal files, so I did it for the user folder. Is tricky, but can be done. This ease the restoration process of the OS since you don&#8217;t need to worry about losing your personal files.</p>
<h4>Set <code>HOME</code></h4>
<p>Ensure <code>HOME</code> get set to <code>%HOMEDRIVE%</code>@%HOMEPATH%@. This is to make RubyGems and Ruby expansion of @~@ will work properly (and avoid nasty issues with known scripts or gems).</p>
<h4>Console 2 halts</h4>
<p>For some reason, the combo of Console 2 and <span class="caps">VIM </span>when working with Git just halts, not accepting any input. This also affected <span class="caps">IRB, </span>which lead me to think that is readline related.</p>
<p>Anyhow, installed GVim and installed Fabio Akita&#8217;s vimfiles (instructions <a href="http://www.akitaonrails.com/2009/04/27/the-best-environment-for-rails-on-windows-part-2">here</a>)</p>
<p>Then, ensured Git uses it doing <code>git config --global core.editor gvim</code></p>
<h4>Hidden files behave as read only?</h4>
<p>Found that Ruby and some programs don&#8217;t let you modify hidden files. They just return access denied.</p>
<p>This seems weird, since Notepad can edit those files without issues.</p>
<p>Will investigate further, seems a bad usage of Windows <span class="caps">API.</span></p>
<h4>Don&#8217;t pollute your system.</h4>
<p>Put all your tools, <span class="caps">DLL</span>s and your scripts in your user folder. Mine is <code>%HOME%\Tools\bin</code>, add this to your User environment variables: <code>%HOME%\Tools\bin</code>, et voila!</p>
<p>Don&#8217;t copy files to <code>system32</code> blindly, this includes <span class="caps">SQL</span>ite3, MySQL or any of these tools, putting things there make things harder to find or update later.</p>
<p>Also, that requires Admin rights, which are annoying if you don&#8217;t have them (I have <span class="caps">UAC </span>to the highest value to avoid do any stuff that normal non-admin users will do).</p>
<p>See my <a href="http://gist.github.com/113258">Tools layout</a></p>
<h3>Some gem issues and news</h3>
<p>While doing the move to new <span class="caps">OS, </span>decided to build a few gems again, and maybe update them.</p>
<h4>MySQL 5.1 and mysql gem are a nightmare, stick to 5.0 for now.</h4>
<p>Yeah, it seems that mysql Ruby C Extension have several memory issues. Stick to 5.0 for know (or switch to DataMapper, I heard they got things working on Windows!) <img src='http://blog.mmediasys.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Been working in my own fork to support MinGW properly. Check the code at GitHub:</p>
<p><a href="http://github.com/luislavena/mysql-gem">http://github.com/luislavena/mysql-gem</a></p>
<h4>Almost 100% cross-platform <span class="caps">SQL</span>ite3 ruby gem!</h4>
<p>Lot of progress on this, partially stolen from do_sqlite3 (and viceversa!) <img src='http://blog.mmediasys.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>My fork <a href="http://github.com/luislavena/sqlite3-ruby">here</a> is capable to build Windows binaries on Linux/OSX.</p>
<p>Ideas of making <a href="http://tenderlovemaking.com/2009/05/07/fat-binary-gems-make-the-rockin-world-go-round/">fat binaries</a> are around, but I believe this can be worked out with some love to RubyGems (discussed last year).</p>
<p>Will make binaries of those gems this week.</p>
<h3>So, what are you waiting for?</h3>
<p>Start using it!, like Mike Hodgson that reported his success <a href="http://rubyforge.org/pipermail/rubyinstaller-devel/2009-May/000565.html">here</a></p>
</p>
<p>(Via <a href="http://blog.mmediasys.com">DEV_MEM.dump_to(:blog) &#8211; Multimedia systems blog</a>.) Original Link: <a href="http://blog.mmediasys.com/2009/05/17/rubyinstaller-updated-packages-and-other-news/#comments">RubyInstaller: Updated packages, and other news.</a> </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/15/rubyinstaller-updated-packages-and-other-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitemaps vía crawling</title>
		<link>http://www.mundoruby.com.ar/2009/07/15/sitemaps-via-crawling/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/15/sitemaps-via-crawling/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 01:49:05 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=147</guid>
		<description><![CDATA[
Hoy me pidieron agregar un Sitemap para uno de los trabajos que hicimos para el gobierno y me encontré con que los plugins que uso para esta tarea no me cerraban de forma cómoda. El problema es que este sitio tiene, además del contenido dinámico, muchas páginas estáticas que no puedo referenciar desde un modelo, [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>Hoy me pidieron agregar un <a href="http://www.sitemaps.org/es/">Sitemap</a> para uno de los trabajos que hicimos para el gobierno y me encontré con que los plugins que uso para esta tarea no me cerraban de forma cómoda. El problema es que este sitio tiene, además del contenido dinámico, muchas páginas estáticas que no puedo referenciar desde un modelo, por lo que debía forzarlas y era bastante molesto.</p>
<p>Buscando encontré <a href="http://www.webficient.com/2008/09/06/google-sitemap-ruby-on-rails">una solución</a> práctica para este caso (donde hay pocas páginas, menos de 1k) que usa un crawler para recorrer todo el sitio y obtener las URLs a agregar al sitemap. El script que presentan me sirvió, aunque tuve que hacerle algunos cambios menores.</p>
<p>El primer problema que tenía era que me agregaba páginas que no deben ir en un sitemap (ni ser indexadas) como las de login, recuperar clave, form de registración, etc. Por lo que tuve que modificar ligeramente el código para no seguir los enlaces que estuvieran marcados con <code>rel="nofollow"</code> y para eso modifiqué en el método <code>extract_and_call_urls</code> la última línea como sigue :</p>
<div class="wp_syntax">
<div class="code">
<pre class="ruby" style="font-family:monospace;">links.<span style="color:#9900CC;">each</span><span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>link<span style="color:#006600; font-weight:bold;">|</span>
   extract_and_call_urls<span style="color:#006600; font-weight:bold;">&#40;</span>link.<span style="color:#9900CC;">href</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">unless</span>
      !can_follow?<span style="color:#006600; font-weight:bold;">&#40;</span>link<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">||</span> ignore_url?<span style="color:#006600; font-weight:bold;">&#40;</span>link.<span style="color:#9900CC;">href</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">||</span>
      <span style="color:#0066ff; font-weight:bold;">@visited_pages</span>.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>link.<span style="color:#9900CC;">href</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span></pre>
</div>
</div>
<p>Y definiendo el nuevo método :</p>
<div class="wp_syntax">
<div class="code">
<pre class="ruby" style="font-family:monospace;"> <span style="color:#9966CC; font-weight:bold;">def</span> can_follow?<span style="color:#006600; font-weight:bold;">&#40;</span>link<span style="color:#006600; font-weight:bold;">&#41;</span>
   <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">false</span> <span style="color:#9966CC; font-weight:bold;">if</span> link.<span style="color:#0000FF; font-weight:bold;">nil</span>? <span style="color:#006600; font-weight:bold;">||</span>
   <span style="color:#006600; font-weight:bold;">&#40;</span>link.<span style="color:#9900CC;">attributes</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;rel&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> link.<span style="color:#9900CC;">attributes</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;rel&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;nofollow&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
   <span style="color:#0000FF; font-weight:bold;">true</span>
 <span style="color:#9966CC; font-weight:bold;">end</span></pre>
</div>
</div>
<p>Entonces, cuando el crawler encuentra un enlace que el <em>developer</em> marcó que no debe seguirse en una indexación (esto es principalmente para los crawlers de los search engines) se ignora y no se agrega al sitemap.</p>
<p>El otro cambio menor fue que tenía algunas URLs con el path completo y por default siempre me agregaba al inicio el domain name, por lo que me quedaban URLs inválidas, por lo que hice la siguiente modificación :</p>
<div class="wp_syntax">
<div class="code">
<pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># Antes</span>
xml.<span style="color:#9900CC;">loc</span><span style="color:#006600; font-weight:bold;">&#40;</span>@starting_url <span style="color:#006600; font-weight:bold;">+</span> url<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Después</span>
xml.<span style="color:#9900CC;">loc</span><span style="color:#006600; font-weight:bold;">&#40;</span>url.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>@starting_url<span style="color:#006600; font-weight:bold;">&#41;</span> ? url : <span style="color:#006600; font-weight:bold;">&#40;</span>@starting_url <span style="color:#006600; font-weight:bold;">+</span> url<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre>
</div>
</div>
<p>Una vez probado el script hice una tarea rake para poder correrla fácil desde un cronjob :</p>
<div class="wp_syntax">
<div class="code">
<pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># lib/tasks/sitemap.rake</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'lib/crawler'</span>
&nbsp;
desc <span style="color:#996600;">&quot;Generate the sitemap file&quot;</span>
task <span style="color:#ff3333; font-weight:bold;">:sitemap</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:environment</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  start_url = ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;URL&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">||</span> <span style="color:#996600;">&quot;http://localhost:3000&quot;</span>
  Crawler.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>start_url, <span style="color:#006600; font-weight:bold;">&#40;</span>ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;CREDS&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#9966CC; font-weight:bold;">if</span> ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;CREDS&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>, ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;QUIET&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">||</span> <span style="color:#0000FF; font-weight:bold;">false</span>, ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;SITEMAP&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">||</span> <span style="color:#0000FF; font-weight:bold;">false</span>, ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;DEBUG&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">||</span> <span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre>
</div>
</div>
<p>Y listo, lo último fue hacer un deploy y configurar un cron.dayli para que cree el sitemap actualizado :</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">rake sitemap <span style="color: #007800;">URL</span>=http:<span style="color: #000000; font-weight: bold;">//</span>www.haciendoelcolon.buenosaires.gob.ar <span style="color: #007800;">SITEMAP</span>=<span style="color: #c20cb9; font-weight: bold;">true</span></pre>
</div>
</div>
<p>Así una vez por día se actualiza el sitemap y se hace un ping a google para que sepa que debe pasar a reindexar el contenido.</p>
<p>Esto tiene varias desventajas (pero aún así para este sitio sirve a su propópito) :</p>
<ul>
<li>No se puede priorizar cada tipo de contenido fácilmente</li>
<li>La fecha de última modificación es inexacta</li>
<li>Carga el webserver para generar el sitemap</li>
</ul>
<p>Código completo : <a href='http://www.gazer.com.ar/wp-content/uploads/2009/07/crawler.rb'>crawler.rb</a></p>
</p>
<p>(Via <a href="http://www.gazer.com.ar">El Futirifoken</a>.) Original Link: <a href="http://www.gazer.com.ar/2009/07/15/sitemaps-via-crawling/#comments">Sitemaps vía crawling</a> </p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/15/sitemaps-via-crawling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First stable beta of ESearchy is out!</title>
		<link>http://www.mundoruby.com.ar/2009/07/14/first-stable-beta-of-esearchy-is-out/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/14/first-stable-beta-of-esearchy-is-out/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:02:22 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=145</guid>
		<description><![CDATA[
Finally, after weeks of work, the first stable Beta of ESearchy is up and running in github&#8217;s gem repository.
Esearchy is a small library capable of searching the internet for email addresses. Currently, the supported search methods are engines such as Google, Bing, Yahoo, PGP servers, GoogleGroups, Linkedin, etc , but I intend to add many [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>Finally, after weeks of work, the first stable Beta of ESearchy is up and running in github&#8217;s gem repository.<br />
Esearchy is a small library capable of searching the internet for email addresses. Currently, the supported search methods are engines such as Google, Bing, Yahoo, PGP servers, GoogleGroups, Linkedin, etc , but I intend to add many more.</p>
<p>Also, the library searches inside .pdf, .docx, .xlsx, .pptx, asn and .txt files for emails addresses and adds them to the list of found accounts. Finally, we have support for .docs files but for now only in Windows Platforms. (For more information visit: <a href="http://github.com/FreedomCoder/esearchy/tree/master"> Github </a> .</p>
<p>In order to install it you simple add the repository and then install the gem, as shown below.</p>
<p>
<div class="geshifilter">
<div class="geshifilter-bash" style="font-family: monospace;">
<ol>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&gt; &nbsp;gem sources -a http://gems.github.com</div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&gt; &nbsp;gem <span style="color: #c20cb9; font-weight: bold;">install</span> FreedomCoder-esearchy</div>
</li>
</ol>
</div>
</div>
<p>Once the gem is installed, you can create a new search opening and/or use the &#8220;esearchy&#8221; CLI tool but it&#8217;s really basic so far and it does not has all of the plugins.</p>
<div class="geshifilter">
<div class="geshifilter-ruby" style="font-family: monospace;">
<ol>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&#8216;esearchy&#8217;</span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp;</div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color:#6666ff; font-weight:bold;">ESearchy::LOG</span>.<span style="color:#9900CC;">level</span> = <span style="color:#6666ff; font-weight:bold;">ESearchy::APP</span> <span style="color:#008000; font-style:italic;">#Output to the stdout. </span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp;</div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">ESearchy.<span style="color:#9900CC;">create</span> <span style="color:#996600;">&quot;domain.com&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span> |d|</div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; d.<span style="color:#9900CC;">yahoo_key</span> = <span style="color:#996600;">&quot;yourAPIkeygoeshere&quot;</span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; d.<span style="color:#9900CC;">bing_key</span> = <span style="color:#996600;">&quot;yourAPIkeygoeshere&quot;</span> </div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; <span style="color:#008000; font-style:italic;"># if you want to also look in LinkedIn</span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; d.<span style="color:#9900CC;">company_name</span> <span style="color:#996600;">&quot;Company Name&quot;</span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; <span style="color:#008000; font-style:italic;">#A user is needed in order to search within Linkedin</span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; d.<span style="color:#9900CC;">linkedin_credentials</span> <span style="color:#996600;">&quot;myuser@linkedin.com&quot;</span>, <span style="color:#996600;">&quot;mypwd&quot;</span> </div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; d.<span style="color:#9900CC;">maxhits</span> = <span style="color:#006666;">50</span> </div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; d.<span style="color:#9900CC;">search</span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal">&nbsp; d.<span style="color:#9900CC;">save_to_file</span> <span style="color:#996600;">&quot;company_emails.txt&quot;</span></div>
</li>
<li style="font-family: monospace; font-weight: normal;">
<div style="font-family: monospace; font-weight: normal; font-style: normal"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
</ol>
</div>
</div>
<p>
If you have any comments, issues or want to submit a bug please do so on<br />
<a href="http://github.com/FreedomCoder/esearchy/issues">http://github.com/FreedomCoder/esearchy/issues</a></p>
<p> Hopefully it will be useful to you.<br /> <img src='http://www.mundoruby.com.ar/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</p>
<p>(Via <a href="http://www.freedomcoder.com.ar">自由編碼人</a>.) Original Link: <a href="http://www.freedomcoder.com.ar/node/155#comments">First stable beta of ESearchy is out!</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/14/first-stable-beta-of-esearchy-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random User Agents</title>
		<link>http://www.mundoruby.com.ar/2009/07/13/random-user-agents/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/13/random-user-agents/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 17:45:18 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=135</guid>
		<description><![CDATA[
While programming Esearchy I had to create a simple class to retrieve random user agents. You may say but why you would want something like this, and the answer is simple:
 &#8220;Try to trick the search engines, so they would not block me&#8221;.  
Yeah, I know this might not even works, but it&#8217;s still [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>While programming Esearchy I had to create a simple class to retrieve random user agents. You may say but why you would want something like this, and the answer is simple:<br />
 &#8220;Try to trick the search engines, so they would not block me&#8221;.  </p>
<p>Yeah, I know this might not even works, but it&#8217;s still cool. =D</p>
<p>Well here it goes</p>
<p><script src="http://gist.github.com/144932.js"></script>
<p>
Use it at your own discretion and listen to your ghost &#8230;</p>
</p>
<p>(Via <a href="http://www.freedomcoder.com.ar">自由編碼人</a>.) Original Link: <a href="http://www.freedomcoder.com.ar/node/154#comments">Random User Agents</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/13/random-user-agents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails edge, Ruby 1.9 style String interpolation support</title>
		<link>http://www.mundoruby.com.ar/2009/07/13/rails-edge-ruby-1-9-style-string-interpolation-support/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/13/rails-edge-ruby-1-9-style-string-interpolation-support/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 17:43:41 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=133</guid>
		<description><![CDATA[
Este es el primer post de una serie que he decidido comenzar titulada “Analizando commits de rails edge”. Aclaro que los post no van a tener orden alguno y que voy a comentar los que me llaman la atención a _mí_  .
En este caso el commit se trata de agregar a rails la nueva forma de interpolación [...]]]></description>
			<content:encoded><![CDATA[<div class="snap_preview">
<p>Este es el primer post de una serie que he decidido comenzar titulada <strong>“Analizando commits de rails edge”</strong>. Aclaro que los post no van a tener orden alguno y que voy a comentar los que me llaman la atención a _mí_ <img style="margin: 5px;" src="http://s.wordpress.com/wp-includes/images/smilies/face-smile.png" alt=":)" /> .<br />
En este caso el <a style="color: #557799; text-decoration: none;" href="http://github.com/rails/rails/commit/da635394c1c3004f4dacf4a35275404e5b1aef43">commit</a> se trata de agregar a rails la nueva forma de interpolación de strings que trae ruby 1.9 ( la idea es que se pueda usar con versiones menores también), pueden ver el código en este archivo:</p>
<pre>activesupport/lib/active_support/core_ext/string/interpolation.rb</pre>
<p>Cómo uds sabrán en Ruby se pueden interpolar strings de la siguiente manera:</p>
<pre>&gt;&gt;"%s, %s" % ["Masao", "Mutoh"]
=&gt; "Masao, Mutoh"</pre>
<p>Cómo lo explica el comentario en el código:</p>
<pre> # call-seq:
  #   %(arg)
  #   %(hash)
  #
  # Format - Uses str as a format specification, and returns the result of applying it to arg.
  # If the format specification contains more than one substitution, then arg must be
  # an Array containing the values to be substituted. See Kernel::sprintf for details of the
  # format string. This is the default behavior of the String class.
  #   * arg: an Array or other class except Hash.
  #   * Returns: formatted String
  # Example:
  #    "%s, %s" % ["Masao", "Mutoh"]
  #
  # Also you can use a Hash as the "named argument". This is recommended way so translators
  # can understand the meanings of the msgids easily.
  #   * hash: {:key1 =&gt; value1, :key2 =&gt; value2, ... }
  #   * Returns: formatted String
  # Example:
  #   For strings.
  #   "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
  #
  #   With field type to specify format such as d(decimal), f(float),...
  #   "%d, %.1f" % {:age =&gt; 10, :weight =&gt; 43.4}</pre>
<p>Es decir que ahora podemos interpolar strings de la siguiente manera:</p>
<pre>&gt;&gt; "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
ArgumentError: malformed format string - %{
	from (irb):2:in `%'
	from (irb):2
&gt;&gt;</pre>
<p>Auuuchh! estoy probando con un irb con ruby 1.8.6, así que necesito requerir el archivo:</p>
<pre>&gt;&gt; require 'activesupport/lib/active_support/core_ext/string/interpolation.rb'
=&gt; true
&gt;&gt; "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
=&gt; "Masao, Mutoh"</pre>
<p>Ahora sí! podemos interpolar string nombrados pasando un hash como argumento, Hermoso!<br />
Estuve mirando en los fuentes de Ruby 1.9 y no encuentro dónde está escrita esta nueva funcionalidad, el método que define la interpolación con”%” es <strong>rb_str_format_m</strong> y está en la línea número 1202 del archivo <strong>string.c</strong> en el trunk de ruby, pero sólo está la vieja forma de interpolación. <strong>Entonces dónde está ? Alguien sabe?</strong><br />
Es más hice esta prueba:</p>
<pre>$ irb1.9
require 'activesupport/lib/active_support/string/interpolation.rb'
=&gt; true
irb(main):002:0&gt; "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}
ArgumentError: malformed format string - %{
	from (irb):2:in `%'
	from (irb):2
	from /usr/bin/irb1.9:12:in `'</pre>
<p>Y la versión que tengo de ruby 1.9 es:<br />
<strong>ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]</strong><br />
Un poco vieja, probemos con ruby 1.9 compilado desde trunk<br />
<strong>ruby 1.9.2dev (2009-07-11 trunk 24027) [i686-linux]</strong></p>
<pre>./ruby  -e 'puts "%{firstname}, %{familyname}" % {:firstname =&gt; "Masao", :familyname =&gt; "Mutoh"}'
Masao, Mutoh</pre>
<p>Funcionó! entonces en algún lugar tiene que estar.</p>
<p><a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/352/"><img src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/352/" border="0" alt="" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/352/"><img src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/352/" border="0" alt="" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/352/"><img src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/352/" border="0" alt="" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/352/"><img src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/352/" border="0" alt="" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/352/"><img src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/352/" border="0" alt="" /></a> <img src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&amp;blog=1034400&amp;post=352&amp;subd=gastonramos&amp;ref=&amp;feed=1" border="0" alt="" /></div>
<p>(Via <a href="http://gastonramos.wordpress.com">Gastón Ramos &#8211; Ruby, Rails&#8230;</a>.) Original Link: <a href="http://gastonramos.wordpress.com/2009/07/10/rails-edge-ruby-1-9-style-string-interpolation-support/#comments">Rails edge, Ruby 1.9 style String interpolation support</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/13/rails-edge-ruby-1-9-style-string-interpolation-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

