<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Think in code - Home</title>
  <id>tag:thinkincode.net,2009:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://thinkincode.net/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://thinkincode.net/" rel="alternate" type="text/html"/>
  <updated>2009-06-11T14:57:02Z</updated>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2009-06-11:957</id>
    <published>2009-06-11T14:55:00Z</published>
    <updated>2009-06-11T14:57:02Z</updated>
    <category term="Java"/>
    <category term="Ruby on rails"/>
    <link href="http://thinkincode.net/2009/6/11/tomcat-rails-develop-rails-app-within-tomcat" rel="alternate" type="text/html"/>
    <title>Tomcat-rails, develop rails app within tomcat</title>
<content type="html">
            &lt;p&gt;This days I'm working every day with this stack, jruby+rails+tomcat. I was quite tired to have to pack the application and restart tomcat every time I wanted to test every slight change, so as a result, I wrote a script to use an embed tomcat within my application and this morning I wrapped it as a gem.&lt;/p&gt;

&lt;p&gt;There is a lot of work to do but you can already &lt;a href='http://github.com/calavera/tomcat-rails'&gt;download&lt;/a&gt; it from &lt;a href='http://calavera.github.com/tomcat-rails'&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's usage is quite simple, just install the gem with jruby, go to the root directory of your rails app and run jruby -S tomcat_rails, or copy and paste this lines:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
  jgem install calavera-tomcat-rails -s http;//gems.github.com
  cd myrailsapp
  jruby -S tomcat_rails
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Any feedback will be really appreciated.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2009-04-09:865</id>
    <published>2009-04-09T15:59:00Z</published>
    <updated>2009-04-09T16:33:02Z</updated>
    <category term="Ruby on rails"/>
    <link href="http://thinkincode.net/2009/4/9/rails-template-for-google-app-engine" rel="alternate" type="text/html"/>
    <title>Rails template for Google app engine</title>
<content type="html">
            &lt;p&gt;I know, there is already too much buzz out there that talks about the new GAE's java support but I was sure I end up trying it.&lt;/p&gt;

&lt;p&gt;I was following the &lt;a href='http://olabini.com/blog/2009/04/jruby-on-rails-on-google-app-engine/'&gt;Ola's post&lt;/a&gt;, it's quite simple to configure a rails project to deploy it on GAE, but I didn't want to repeat all those steps every time I'll deploy a new application, so I just wrote a rails template that adds all that stuff to my projects.&lt;/p&gt;

&lt;p&gt;I'm waiting &lt;a href='http://www.omgbloglol.com/'&gt;Jeremy&lt;/a&gt;'ll add it to the &lt;a href='http://github.com/jeremymcanally/rails-templates'&gt;templates repository&lt;/a&gt;, meanwhile you can &lt;a href='http://github.com/calavera/rails-templates/blob/0ea4b23956d26c42a7fa3eb33c5e743a9a4ffb0f/google_app_engine.rb'&gt;grab it&lt;/a&gt; from my &lt;a href='http://github.com/calavera/rails-templates'&gt;forked repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;By the way, if you've already worked with rails templates you know they provide a &lt;strong&gt;git&lt;/strong&gt; command that I'm not using in my template. That's because that command doesn't work outside the app root directory. I've already submitted a &lt;a href='https://rails.lighthouseapp.com/projects/8994/tickets/2466-patch-rails-templates-git-command-doesnt-run-inside-a-directory'&gt;patch to the rails' lighthouse&lt;/a&gt; to solve it. Please vote it!!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2009-01-09:772</id>
    <published>2009-01-09T11:05:00Z</published>
    <updated>2009-01-09T17:33:33Z</updated>
    <category term="Ruby on rails"/>
    <link href="http://thinkincode.net/2009/1/9/rails-hackathon" rel="alternate" type="text/html"/>
    <title>Rails Hackathon in Madrid</title>
<content type="html">
            &lt;p&gt;Last month &lt;a href='http://www.lacoctelera.com/porras'&gt;some&lt;/a&gt; &lt;a href='http://blog.lmcavalle.com'&gt;friends&lt;/a&gt; of &lt;a href='http://jobandtalent.com'&gt;mine&lt;/a&gt; organized a great event called &lt;a href='http://github.com/monstersofruby'&gt;Monsters of Ruby&lt;/a&gt;. The topic was Ruby without Rails, and the challenge was mix random technologies and create a simple web app, my teammates and I suffered with SproutCore, Ramaze and Sequel.&lt;/p&gt;

&lt;p&gt;Following its essence I'm organizing a new event called &lt;a href='http://rails-hackathon.org'&gt;Rails Hackathon&lt;/a&gt; next February 7 in the 11870.com's office. The topic will be dive into the Rails core and send as patch as we can to the &lt;a href='http://rails.lighthouseapp.com/projects/8994-ruby-on-rails'&gt;issue tracker&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Our office is not too much big so I've decided to close this event to 20 people, some of them have been already &lt;a href='http://groups.google.com/group/rails-hackathon/web/madrid-february-7-2009'&gt;invited&lt;/a&gt; but there are some available places yet. If you are a Rails core contributor or you want to be and you enjoy diving in foreign source code send me a mail to calavera AT apache DOT org and I'll include you in the list.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-12-11:771</id>
    <published>2008-12-11T09:56:00Z</published>
    <updated>2008-12-11T09:58:26Z</updated>
    <link href="http://thinkincode.net/2008/12/11/european-ruby-konference-in-barcelona" rel="alternate" type="text/html"/>
    <title>European Ruby Konference 2009 in Barcelona</title>
<content type="html">
            &lt;p&gt;I'm glad to announce that we have dates and venue for the next Euruko 2009 in Barcelona, May 9 and 10 in the Citilab, a beatiful place that hosted other big international conferences like DrupalConf or OpenOffice.org Conference.&lt;/p&gt;

&lt;p&gt;You can see the official announce in the &lt;a href='http://euruko2009.org'&gt;Euruko web page&lt;/a&gt;, we'll open the call for papers in the next weeks, stay in touch!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-11-20:716</id>
    <published>2008-11-20T17:53:00Z</published>
    <updated>2008-11-20T17:56:55Z</updated>
    <link href="http://thinkincode.net/2008/11/20/abdera-gets-the-graduation" rel="alternate" type="text/html"/>
    <title>Abdera gets the graduation</title>
<content type="html">
            &lt;p&gt;Although I don't speak pretty much on &lt;a href='http://incubator.apache.org/abdera'&gt;Apache Abdera&lt;/a&gt;, I've been involved in the project for more than a year.&lt;/p&gt;

&lt;p&gt;Today, two years later Abdera is finally graduated and in the next weeks we're moving our home to &lt;em&gt;abdera.apache.org&lt;/em&gt; as a Top Level Project in the ASF. So, now the question is... when will we release a new version of Abdera? and the answer is... we're working on fix every major bug that we have in &lt;a href='https://issues.apache.org/jira/browse/ABDERA'&gt;our jira&lt;/a&gt;, and we have to look over &lt;a href='http://cwiki.apache.org/ABDERA'&gt;our documentation&lt;/a&gt;, but we'd like to release a new version as soon as our infrastructure will be migrated. &lt;/p&gt;

&lt;p&gt;Meanwhile contributions are welcome, if you find a bug or you think that you can improve our documentation, please don't hesitate to &lt;a href='http://incubator.apache.org/abdera/project.html#lists'&gt;drop us a line&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-10-25:654</id>
    <published>2008-10-25T17:28:00Z</published>
    <updated>2008-12-12T12:53:41Z</updated>
    <link href="http://thinkincode.net/2008/10/25/google-test-automation-conference-08" rel="alternate" type="text/html"/>
    <title>Google Test Automation Conference 08</title>
<content type="html">
            &lt;p&gt;Yesterday, the third edition of the Google Test Automation Conference finished, and, although my speech was a little disaster, I'm glad. It was a challenge, this was the first time that I gave a speech in english and I chose to do it in front of the main experts in testing in the world.&lt;/p&gt;

&lt;p&gt;I'm trying to upload the slides to slideshare but I have several problems converting the file, so, if you want to get them you can &lt;a href='http://thinkincode.net/gtac_atomPub_testing_your_server_implementation.pdf'&gt;download the pdf from my server&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update&lt;/em&gt;: I finally got to upload the presentation to slideshare, you can take it a look here:&lt;/p&gt;

&lt;div&gt;&lt;a href='http://www.slideshare.net/calavera/gtac-atompub-testing-your-server-implementation?type=powerpoint' title='GTAC: AtomPub, testing your server implementation'&gt;GTAC: AtomPub, testing your server implementation&lt;/a&gt;&amp;lt;object height='355' width='425' style='margin:0px'&gt;&amp;lt;param name='movie' value='http://static.slideshare.net/swf/ssplayer2.swf?doc=gtac-atompub-testing-your-server-implementation-3825&amp;stripped_title=gtac-atompub-testing-your-server-implementation' /&gt;&amp;lt;param name='allowFullScreen' value='true' /&gt;&amp;lt;param name='allowScriptAccess' value='always' /&gt;&amp;lt;embed allowfullscreen='true' type='application/x-shockwave-flash' src='http://static.slideshare.net/swf/ssplayer2.swf?doc=gtac-atompub-testing-your-server-implementation-3825&amp;stripped_title=gtac-atompub-testing-your-server-implementation' allowscriptaccess='always' height='355' width='425'&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;div&gt;View SlideShare &lt;a href='http://www.slideshare.net/calavera/gtac-atompub-testing-your-server-implementation?type=powerpoint' title='View GTAC: AtomPub, testing your server implementation on SlideShare'&gt;presentation&lt;/a&gt; or &lt;a href='http://www.slideshare.net/upload?type=powerpoint'&gt;Upload&lt;/a&gt; your own. (tags: &lt;a href='http://slideshare.net/tag/conference'&gt;conference&lt;/a&gt; &lt;a href='http://slideshare.net/tag/automation'&gt;automation&lt;/a&gt;)&lt;/div&gt;&lt;/div&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-10-20:621</id>
    <published>2008-10-20T16:37:00Z</published>
    <updated>2008-10-20T16:57:41Z</updated>
    <link href="http://thinkincode.net/2008/10/20/next-three-weeks-in-the-states" rel="alternate" type="text/html"/>
    <title>Next three weeks in the states</title>
<content type="html">
            &lt;p&gt;Right so, Tomorrow I'm flying to Seattle to speak in the Google Test Automation Conference and to seitze the opportunity I'm going to visit some friend in San Francisco next week. After that, I'm going to New Orleans to attend to the ApacheCon where I'm talking on Abdera in the Fast Feather track.&lt;/p&gt;

&lt;p&gt;If you're in my route and you want to spend some time taking a beer and talking on open source, rails, java, atom or something, just drop me a line to calavera at apache dot org or leave me a comment in this post. See you there!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-09-18:402</id>
    <published>2008-09-18T12:03:00Z</published>
    <updated>2008-09-18T13:35:04Z</updated>
    <link href="http://thinkincode.net/2008/9/18/rubymetrics-1-2-supports-rails-stats" rel="alternate" type="text/html"/>
    <title>rubyMetrics 1.2 supports Rails stats</title>
<content type="html">
            &lt;p&gt;I've just released the version 1.2 of the &lt;a href='http://hudson.gotdns.com/wiki/display/HUDSON/Ruby+metrics+plugin'&gt;rubyMetrcics plugin&lt;/a&gt; for &lt;a href='http://hudson.dev.java.net'&gt;Hudson&lt;/a&gt;, and I've added support for Rails stats, so, if you check the right option hudson generates the report and its trend graph:&lt;/p&gt;

&lt;div&gt;
&lt;img src='http://thinkincode.net/assets/2008/9/18/railsStatsConfig.png' /&gt;
&lt;/div&gt;

&lt;div&gt;
&lt;img src='http://thinkincode.net/assets/2008/9/18/railsStatsReport.png' width='600' /&gt;
&lt;/div&gt;

&lt;p&gt;You can find more info into the &lt;a href='http://hudson.gotdns.com/wiki/display/HUDSON/Ruby+metrics+plugin'&gt;plugin page&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-09-12:364</id>
    <published>2008-09-12T13:53:00Z</published>
    <updated>2008-09-12T16:02:44Z</updated>
    <link href="http://thinkincode.net/2008/9/12/ruby-metrics-plugin-for-hudson" rel="alternate" type="text/html"/>
    <title>Ruby Metrics plugin for Hudson</title>
<content type="html">
            &lt;p&gt;I couldn't  keep quiet after I read &lt;a href='http://blogs.sun.com/arungupta/entry/rails_conf_europe_2008_day'&gt;this Arun Gupta's post&lt;/a&gt;, so I've just released the first version of the &lt;a href='http://hudson.gotdns.com/wiki/display/HUDSON/Ruby+metrics+plugin'&gt;Ruby metrics plugin&lt;/a&gt; for &lt;a href='http://hudson.dev.java.net'&gt;Hudson&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This plugin aims to collect a bunch of ruby metrics tools and integrate them with Hudson. The first release allows to integrate &lt;a href='http://eigenclass.org/hiki.rb?rcov'&gt;Rcov&lt;/a&gt; reports into Hudson and builds a trend graph with the coverage of your project between releases.&lt;/p&gt;

&lt;p&gt;&lt;img src='/assets/2008/9/12/rcovTrendReport.png' /&gt;&lt;/p&gt;

&lt;p&gt;You can find &lt;a href='http://hudson.gotdns.com/wiki/display/HUDSON/Ruby+metrics+plugin'&gt;more screenshots&lt;/a&gt; in the plugin wiki page. Enjoy it!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-09-08:345</id>
    <published>2008-09-08T10:15:00Z</published>
    <updated>2008-09-08T10:20:49Z</updated>
    <link href="http://thinkincode.net/2008/9/8/when-readability-is-better-than-metaprogramming" rel="alternate" type="text/html"/>
    <title>When readability is better than metaprogramming</title>
<content type="html">
            &lt;p&gt;This morning I've bumped into this code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
latitude = phif + (x2frac * x2poly * (x ** 2)) + 
  (x4frac * x4poly * (x ** 4)) + 
  (x6frac * x6poly * (x ** 6)) + 
  (x8frac * x8poly * (x ** 8))

longitude = central_meridian + (x1frac * x) + 
  (x3frac * x3poly * (x ** 3)) + 
  (x5frac * x5poly * (x ** 5)) + 
  (x7frac * x7poly * (x ** 7))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And quickly I've thought that it could be refactored easily with a loop like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
latitude = phif
longitude = central_meridian + (x1frac * x)

(2..8).each do |n|
  latitude += eval(&quot;x#{n}frac * x{n}poly * (x ** #{n})&quot;) if n % 2 == 0
  longitude += eval(&quot;x#{n}frac * x{n}poly * (x ** #{n})&quot;) if n % 2 != 0
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;both pieces of code work fine, but sincerely, my mind is getting used to understand the first one better than the second one, so I've ruled out my refactor and I've kept the original version.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-08-26:241</id>
    <published>2008-08-26T12:27:00Z</published>
    <updated>2008-08-26T12:32:40Z</updated>
    <link href="http://thinkincode.net/2008/8/26/greasemonkey-script-for-pootle" rel="alternate" type="text/html"/>
    <title>Greasemonkey script for pootle</title>
<content type="html">
            &lt;p&gt;I think one of the most unpleasant tasks when you internationalize a web page is locate missed sentences and translate them. &lt;/p&gt;

&lt;p&gt;&lt;a href='http://translate.sourceforge.net/wiki/'&gt;Pootle&lt;/a&gt; allow us to keep a centralized translation repository where translators can work together. But pootle sentences navigation is a little weird and you always finish searching sentences by hand.&lt;/p&gt;

&lt;p&gt;This morning I've written a little &lt;a href='http://www.greasespot.net'&gt;greasemonkey&lt;/a&gt; script that allows you to select a sentence into a web page and search it into your pootle server. The script records one command action for each one of the languages that you've configured and then, they can be invoked from the greasemonkey user script tab.&lt;/p&gt;

&lt;p&gt;If you've already installed greasemonkey you can add the script from my &lt;a href='http://github.com/calavera/gm-pootle-search/tree/master'&gt;github accout&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-07-24:185</id>
    <published>2008-07-24T20:59:00Z</published>
    <updated>2008-07-24T21:04:22Z</updated>
    <category term="Atom Publishing Protocol"/>
    <category term="Java"/>
    <link href="http://thinkincode.net/2008/7/24/apache-abdera-supports-atompub-multipart" rel="alternate" type="text/html"/>
    <title>Apache Abdera supports AtomPub-multipart creation</title>
<content type="html">
            &lt;p&gt;One of the most weird stuff in the AtomPub specification is the media creation flow. First, you need to send a request in order to post the new media resource and once the response is correct you can update the media link entry related with it.&lt;/p&gt;

&lt;p&gt;In order to avoid the second step, the Picassa team added to their api a &lt;a href='http://code.google.com/apis/picasaweb/developers_guide_protocol.html#Add_Photo'&gt;new way to add photos&lt;/a&gt;, and now, they allow to send a multipart file that wraps the photo and its metadata. &lt;/p&gt;

&lt;p&gt;This atom extension is been covered by &lt;a href='http://atompub-mulitpart-spec.googlecode.com/svn/trunk/draft-gregorio-atompub-multipart-02.txt'&gt;an IEFT draft that Joe Gregorio published&lt;/a&gt;, and this morning I've updated the &lt;a href='http://svn.apache.org/repos/asf/incubator/abdera/java/trunk/'&gt;Abdera trunk&lt;/a&gt; in order to implement this specification. &lt;/p&gt;

&lt;p&gt;You can read more into &lt;a href='http://cwiki.apache.org/confluence/display/ABDERA/Support+for+AtomPub-multipart'&gt;the Abdera wiki&lt;/a&gt;. Enjoy it.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-07-16:133</id>
    <published>2008-07-16T11:47:00Z</published>
    <updated>2008-07-16T13:26:06Z</updated>
    <category term="Atom Publishing Protocol"/>
    <link href="http://thinkincode.net/2008/7/16/atompub-at-gtac-08" rel="alternate" type="text/html"/>
    <title>Speaking: AtomPub at GTAC 08</title>
<content type="html">
            &lt;p&gt;This October I'll be presenting at &lt;a href='http://googletesting.blogspot.com/2008/07/call-for-attendance-gtac-2008.html'&gt;Google Test Automation Conference&lt;/a&gt; on testing of AtomPub implementations. The talk will discuss the best practices in order to test AtomPub implementations, why testing an extensible standard could become painful and how to get started with some useful tools.&lt;/p&gt;

&lt;p&gt;GTAC is one of my favorites conferences, people talking about testing, just one track and no fees. If you are considering applying for attendance, I suggest it. But if you are actually interested in testing and you didn't know it, you should consider applying.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-07-02:67</id>
    <published>2008-07-02T21:31:00Z</published>
    <updated>2008-07-02T21:37:28Z</updated>
    <category term="Atom Publishing Protocol"/>
    <link href="http://thinkincode.net/2008/7/2/the-ape-1-5-released" rel="alternate" type="text/html"/>
    <title>The ape 1.5 released</title>
<content type="html">
            &lt;p&gt;Yesterday I released a new version of &lt;a href='http://rubyforge.org/projects/ape'&gt;The atom protocol exerciser&lt;/a&gt;. We have been working in order to simplify its architecture and create a modular system that anyone may extend.&lt;/p&gt;

&lt;p&gt;Now it works from the command line as well the web interface. We've added some rake tasks that you can use for exercise your server implementation and you can select the output format just invoking the correct option:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
 $ rake ape:go:text['service document uri']
 $ rake ape:go:html['service document uri']
 $ rake ape:go:atom['service document uri']
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It allows some configuration options through its config file &lt;em&gt;$APE_HOME/aperc&lt;/em&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
Ape.conf[:REQUESTED_ENTRY_COLLECTION] = 'collection name'
Ape.conf[:REQUESTED_MEDIA_COLLECTION] = 'collection name'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And finally, this last release allows to create and add new tests easily. The test cases must to extend the Ape Validator class and override the validate method.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
module Ape
  class CustomValidator &amp;lt; Validator
    def validate(opts = {}) end
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We've implemented a little system for select the variables to use in your tests, just call the &lt;strong&gt;requires_presence_of&lt;/strong&gt; method into the class declaration and pass the variable name that you require.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
module Ape
  class CustomValidator &amp;lt; Validator
    requires_presence_of :entry_collection #OR
    requires_presence_of :entry_collection =&gt; 'comments' #OR
    requires_presence_of :media_collection =&gt; {:accept =&gt; 'image/png'}
    #...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once your custom validator is ready you just need to move it to &lt;em&gt;$APE_HOME/validators&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;But if you really want to learn how to write your custom validator you just need to take a look at the &lt;a href='http://ape.rubyforge.org/svn/trunk/lib/ape/validators/media_posts_validator.rb'&gt;source&lt;/a&gt; &lt;a href='http://ape.rubyforge.org/svn/trunk/lib/ape/validators/sanitization_validator.rb'&gt;code&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://thinkincode.net/">
    <author>
      <name>david</name>
    </author>
    <id>tag:thinkincode.net,2008-05-22:61</id>
    <published>2008-05-22T13:30:00Z</published>
    <updated>2009-06-08T19:01:31Z</updated>
    <category term="Desarrollo"/>
    <category term="Java"/>
    <category term="Ruby on rails"/>
    <link href="http://thinkincode.net/2008/5/22/using-hudson-as-rails-ci-server" rel="alternate" type="text/html"/>
    <title>Using Hudson as Rails CI server</title>
<content type="html">
            &lt;p&gt;For some time, &lt;a href='http://hudson.dev.java.net'&gt;Hudson&lt;/a&gt; has become my favorite continuous integration server. It's easy to configure and provides a handful of really interesting plug-ins. The only thing that I missed was the possibility of use &lt;a href='http://rake.rubyforge.org'&gt;Rake&lt;/a&gt; as a project build tool and thus I'll be able to take my java, ruby or rails projects into the same CI server.&lt;/p&gt;

&lt;p&gt;Well, past weekend I had too much spare time so I decided to develop my first Hudson plugin and this morning I've released the first version of the &lt;a href='http://hudson.gotdns.com/wiki/display/HUDSON/Rake+plugin'&gt;Hudson Rake plugin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you have &lt;a href='http://hudson.gotdns.com/wiki/display/HUDSON/Installation+and+Execution'&gt;installed Hudson&lt;/a&gt; you just need to &lt;a href='https://hudson.dev.java.net/servlets/ProjectDocumentList?folderID=9255&amp;amp;expandFolder=9255&amp;amp;folderID=0'&gt;donwload the plug-in&lt;/a&gt; and upload it from the &lt;strong&gt;&lt;em&gt;Manage Hudson&lt;/strong&gt;&lt;/em&gt; section:&lt;/p&gt;

&lt;p&gt;&lt;img src='/assets/2008/5/22/hudsonPluginUpload.png' /&gt;&lt;/p&gt;

&lt;p&gt;When the plugin is avalable it detects your ruby instances installed from your &lt;strong&gt;PATH&lt;/strong&gt; but it allows you to add other ruby or jruby paths:&lt;/p&gt;

&lt;p&gt;&lt;img src='/assets/2008/5/22/rubyConfigurationOptions.png' width='90%' /&gt;&lt;/p&gt;

&lt;p&gt;Finally you just need to select the &lt;strong&gt;&lt;em&gt;Invoke Rake&lt;/strong&gt;&lt;/em&gt; option into the project configuration and select the tasks that you want to Hudson executes:&lt;/p&gt;

&lt;p&gt;&lt;img src='/assets/2008/5/22/jobRakeConfiguration.png' width='100%' /&gt;&lt;/p&gt;

&lt;p&gt;That's it, you are ready to go with Rake, Hudson and &lt;a href='http://clintshank.javadevelopersjournal.com/ci_build_game.htm'&gt;the Continuous&lt;/a&gt; &lt;a href='http://redsolo.blogspot.com/2008/04/start-playing-continuous-integration.html'&gt;Integration Game&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
</feed>
