<?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 &#187; Open Source</title>
	<atom:link href="http://www.mundoruby.com.ar/category/open-source/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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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>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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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>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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</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>
		<item>
		<title>Stepping up as SQLite3/Ruby maintainer</title>
		<link>http://www.mundoruby.com.ar/2009/07/13/stepping-up-as-sqlite3ruby-maintainer/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/13/stepping-up-as-sqlite3ruby-maintainer/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 17:43:04 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sqlite3]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=131</guid>
		<description><![CDATA[
So, I think this may be good news for some folks.
February 24, 2009 is the date that Jamis Buck marked as the end of several of his open source projects, including SQLite3/Ruby. (you can read the post here)
Previously, he asked for help updating SQLite3/Ruby to make it work on Windows.
That sad news left a lot [...]]]></description>
			<content:encoded><![CDATA[<p>
<p>So, I think this may be good news for some folks.</p>
<p>February 24, 2009 is the date that Jamis Buck marked as the end of several of his open source projects, including <span class="caps">SQL</span>ite3/Ruby. (you can read the post <a href="http://weblog.jamisbuck.org/2009/2/25/net-ssh-capistrano-and-saying-goodbye">here</a>)</p>
<p>Previously, he <a href="http://weblog.jamisbuck.org/2008/12/7/sqlite3-ruby-windows-builds">asked for help</a> updating <span class="caps">SQL</span>ite3/Ruby to make it work on Windows.</p>
<p>That sad news left a lot of us with a bad taste, and very unhappy, not because we no longer will have someone to complain at, but because he no longer enjoyed working on those projects.</p>
<p><span id="more-261"></span></p>
<p>Over the past months I&#8217;ve been improving <a href="http://github.com/luislavena/rake-compiler/">rake-compiler</a> to be able to catch most of the building issues of <a href="http://wiki.github.com/luislavena/rake-compiler/projects-using-rake-compiler">several</a> projects, including my own (I love to scratch my own itch).</p>
<p>As you have noticed on my &#8220;getting started with Rails and <span class="caps">SQL</span>ite3&#8243;: http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-sqlite3/ post, I successfully built, installed and used a <span class="caps">SQL</span>ite3/Ruby gem on Windows.</p>
<p>The next question was, what to do? The work to get all those lovely gems was there, initial 1.9 was there, but was not <em>official</em></p>
<p>While <span class="caps">SQL</span>ite3/Ruby being the de-facto for getting started with Rails, we couldn&#8217;t let it die.</p>
<p>Enough words, sent some emails to Jamis and now I can publish those gems to RubyForge.</p>
<h3>What all that babbling means?</h3>
<p>This means:</p>
<ul>
<li><a href="http://github.com/luislavena/sqlite3-ruby">My fork</a> at GitHub is the new <em>mainstream</em> for the releases</li>
<li>I&#8217;m going to go over the open bugs and tickets and asses validity and relevancy based on work that was already done in my fork.</li>
<li>The release cycle has been improved and almost automated. It can be performed from Windows, Linux or <span class="caps">OSX, </span>even using latter to create Windows native gems.</li>
</ul>
<p>Now, what happens with new features:</p>
<ul>
<li>Pull requests with patches and bug fixes are going to be accepted.</li>
<li>New features will be evaluated as long they don&#8217;t impose structural changes and carry with them tests cases.</li>
<li>Patches that improve Ruby 1.9 compatibility are <em>highly</em> appreciated.</li>
</ul>
<p>I don&#8217;t have strong knowledge of all the internals of this tool, so don&#8217;t expect earth breaking changes from me, except ensuring stability.</p>
<p>I hope this is <em>good</em> news to everybody. Now I&#8217;m going to stalk MySQL binding author and get permission to push those lovely gems <img src='http://blog.mmediasys.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Cheers everybody!</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/08/stepping-up-as-sqlite3ruby-maintainer/#comments">Stepping up as SQLite3/Ruby maintainer</a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/13/stepping-up-as-sqlite3ruby-maintainer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 2.3, rake y reenable method</title>
		<link>http://www.mundoruby.com.ar/2009/07/13/rails-2-3-rake-y-reenable-method/</link>
		<comments>http://www.mundoruby.com.ar/2009/07/13/rails-2-3-rake-y-reenable-method/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 17:42:27 +0000</pubDate>
		<dc:creator>FreedomCoder</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[rake]]></category>

		<guid isPermaLink="false">http://www.mundoruby.com.ar/?p=129</guid>
		<description><![CDATA[

Estoy terminando de hacer una migration a Rails 2.3 de la
app con la que estoy trabajando, resulta que me encontré con el siguiente tema:
Luego de instalar rails y migrar la app, llegó el momento de hacer un deploy a
staging, entonces me econtré con el siguiente error:

undefined method `reenable' for &#60;Rake::Task db:schema:dump =&#62;
[environment]&#62;:Rake::Task

googleando un poco llegué [...]]]></description>
			<content:encoded><![CDATA[<p>
<div class='snap_preview'>
<p>Estoy terminando de hacer una migration a Rails 2.3 de la<br />
app con la que estoy trabajando, resulta que me encontré con el siguiente tema:<br />
Luego de instalar rails y migrar la app, llegó el momento de hacer un deploy a<br />
staging, entonces me econtré con el siguiente error:</p>
<pre>
undefined method `reenable' for &lt;Rake::Task db:schema:dump =&gt;
[environment]&gt;:Rake::Task
</pre>
<p>googleando un poco llegué a este <a href="http://antono.info/en/138">link </a> que dice que hay que instalar<br />
la nueva versión de rake, investigando un poco más, llegué a este <a href="http://rails.lighthouseapp.com/projects/8994/tickets/1412-dbmigrateredo-does-not-dump-the-schema-after-migrating-back-up">PATCH </a><br />
que hace uso del método Rake::Task#reenable, el caso es que este método<br />
se agrega e con la versión de rake 0.8.2 y como el pibe dice en el comentario<br />
del patch, no hay problemas por que rails 2.3 require rake 0.8.3&#8230;. pero<br />
que pasa cuando:</p>
<p>1- Instalo rails 2.3<br />
2- Hago un &#8216;rake rails:freeze&#8217;<br />
3- hago &#8216;cap staging deploy:migrations&#8217;</p>
<p>Y no tengo rails 2.3 instalado en el server y por eso justamente hice un freeze.</p>
<p>Si leemos la task que arma las dependencias de rails:</p>
<pre>
  s.add_dependency('rake', '&gt;= 0.8.3')
  s.add_dependency('activesupport',    '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('activerecord',     '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('actionpack',       '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('actionmailer',     '= 3.0.pre' + PKG_BUILD)
  s.add_dependency('activeresource',   '= 3.0.pre' + PKG_BUILD)
</pre>
<p>uando hacemos el freeze nos copia todas estas cosas menos el rake,<br />
lo cual parece razonable. Pero creo debería agregar en config/environment.rb</p>
<p>config.gem &#8220;rake&#8221;, :version =&gt; &#8216;0.8.3&#8242;</p>
<p>Que opinan uds? </p>
<p>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gastonramos.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gastonramos.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gastonramos.wordpress.com/345/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gastonramos.wordpress.com&#038;blog=1034400&#038;post=345&#038;subd=gastonramos&#038;ref=&#038;feed=1" /></div>
</p>
<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/08/rails-2-3-rake-y-reenable-method/#comments">Rails 2.3, rake y reenable method</a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-7949681675937032";
google_ad_slot = "0874687580";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mundoruby.com.ar/2009/07/13/rails-2-3-rake-y-reenable-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

