<?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>klaasprause.com &#187; Ruby</title>
	<atom:link href="http://klaasprause.com/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://klaasprause.com</link>
	<description>Klaas' personal site</description>
	<lastBuildDate>Tue, 25 Jan 2011 08:50:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ivy4r using Apache Ivy with Ruby</title>
		<link>http://klaasprause.com/2009/07/12/ivy4r-using-apache-ivy-with-ruby/</link>
		<comments>http://klaasprause.com/2009/07/12/ivy4r-using-apache-ivy-with-ruby/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 18:07:58 +0000</pubDate>
		<dc:creator>Klaas</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://klaasprause.com/?p=67</guid>
		<description><![CDATA[Our company uses Apache Ivy for dependency management and tracks all our artifacts including EARs and WARs with Ivy. Ivy is great and provides a lot of great features but depends on Apache Ant. Making builds with Ant is a pain, because Ant is no programming language and misses a lot features needed for bigger [...]]]></description>
			<content:encoded><![CDATA[<p>Our company uses <a href="http://ant.apache.org/ivy/">Apache Ivy</a> for dependency management and tracks all our artifacts including EARs and WARs with Ivy. Ivy is great and provides a lot of great features but depends on <a href="http://ant.apache.org/">Apache Ant</a>. Making builds with Ant is a pain, because Ant is no programming language and misses a lot features needed for bigger builds including deployments of servers for testing and stuff like this.</p>
<p>We are using Ruby on some projects and really wanted to give <a href="http://buildr.apache.org/">Apache Buildr</a> a try. The problem with buildr is that it plugs ifself into the maven dependency management. Downgrading dependencies back to maven was not an option, so we needed a way to use Ivy with Buildr.</p>
<h3>ivy4r to the rescue</h3>
<p>To integrate ivy into buildr <a href="http://github.com/klaas1979/ivy4r/tree/master">ivy4r</a> was created. Ivy4r is a wrapper around Ivy using <a href="http://antwrap.rubyforge.org/">antwrap</a> and provides a pure ruby interface to ivy. The interface provides all Ant tasks that can be useful. On top of this two extensions are provided one for buildr one for <a href="http://rake.rubyforge.org/">rake</a>. By requiring the appropriate extension ivy can be integrated seamless into the build process using the standard way buildr extensions are configured.</p>
<p>For more information check out the ivy4r documentation on github or rubyforge:</p>
<ul>
<li><a href="http://github.com/klaas1979/ivy4r/tree/master">http://github.com/klaas1979/ivy4r/tree/master</a></li>
<li><a href="http://hamburgrb.rubyforge.org/ivy4r/">http://hamburgrb.rubyforge.org/ivy4r/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klaasprause.com/2009/07/12/ivy4r-using-apache-ivy-with-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using hoe and jeweler for rubyforge and github</title>
		<link>http://klaasprause.com/2009/06/24/using-hoe-and-jeweler-for-rubyforge-and-github/</link>
		<comments>http://klaasprause.com/2009/06/24/using-hoe-and-jeweler-for-rubyforge-and-github/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 17:54:24 +0000</pubDate>
		<dc:creator>Klaas</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://klaasprause.com/?p=50</guid>
		<description><![CDATA[I asked myself how to get started using github as a development platform but still support rubyforge as the main server for stable gem versions?
First I tried to use only hoe but did not get a gemspec file out of it. So I added jeweler to get a gemspec via the rake target gemspec but [...]]]></description>
			<content:encoded><![CDATA[<p>I asked myself how to get started using github as a development platform but still support rubyforge as the main server for stable gem versions?</p>
<p>First I tried to use only <em>hoe</em> but did not get a <em>gemspec</em> file out of it. So I added <em>jeweler</em> to get a gemspec via the rake target <em>gemspec</em> but did not want to configure <em>hoe</em> and <em>jeweler</em> separate. So I used the <em>hoe</em> generated gemspec object to initialize <em>jeweler</em> and thought that it was a good solution.</p>
<p>But then I stumbled upon the best solution, hoe supports the generation of gemspecs only the target name is a bit akward. Just call rake with the command <em>rake debug_gem</em> as recommended on github.</p>
<p style="text-align: center;"><strong>The previous solution combining hoe and jeweler</strong></p>
<p>The rake file:</p>
<pre><span class="ident">require</span> <span class="punct">'</span><span class="string">rubygems</span><span class="punct">'</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">hoe</span><span class="punct">'</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">yourgem</span><span class="punct">'</span>

<span class="ident">hoe</span> <span class="punct">=</span> <span class="constant">Hoe</span><span class="punct">.</span><span class="ident">spec</span> <span class="punct">'</span><span class="string">yourgem</span><span class="punct">'</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">p</span><span class="punct">|</span>
  <span class="comment"># self.rubyforge_name = 'yourgemx' # if different than 'yourgem'</span>
  <span class="ident">p</span><span class="punct">.</span><span class="ident">developer</span><span class="punct">('</span><span class="string">Yourname</span><span class="punct">',</span> <span class="punct">'</span><span class="string">yourmail@example.com</span><span class="punct">')</span>
  <span class="ident">p</span><span class="punct">.</span><span class="ident">remote_rdoc_dir</span> <span class="punct">=</span> <span class="punct">'</span><span class="punct">'</span> <span class="comment"># Release to root only one project</span>
  <span class="ident">p</span><span class="punct">.</span><span class="ident">extra_deps</span> <span class="punct">&lt;&lt;</span> <span class="ident">yourdeps</span>
  <span class="constant">File</span><span class="punct">.</span><span class="ident">open</span><span class="punct">(</span><span class="constant">File</span><span class="punct">.</span><span class="ident">join</span><span class="punct">(</span><span class="constant">File</span><span class="punct">.</span><span class="ident">dirname</span><span class="punct">(</span><span class="constant">__FILE__</span><span class="punct">),</span> <span class="punct">'</span><span class="string">VERSION</span><span class="punct">'),</span> <span class="punct">'</span><span class="string">w</span><span class="punct">')</span> <span class="keyword">do</span> <span class="punct">|</span><span class="ident">file</span><span class="punct">|</span>
    <span class="ident">file</span><span class="punct">.</span><span class="ident">puts</span> <span class="constant">Yourgem</span><span class="punct">::</span><span class="constant">VERSION</span>
  <span class="keyword">end</span>
<span class="keyword">end</span>

<span class="keyword">begin</span>
  <span class="ident">require</span> <span class="punct">'</span><span class="string">jeweler</span><span class="punct">'</span>
  <span class="constant">Jeweler</span><span class="punct">::</span><span class="constant">Tasks</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">hoe</span><span class="punct">.</span><span class="ident">spec</span><span class="punct">)</span>
<span class="keyword">rescue</span> <span class="constant">LoadError</span>
  <span class="ident">puts</span> <span class="punct">"</span><span class="string">Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com</span><span class="punct">"</span>
<span class="keyword">end</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://klaasprause.com/2009/06/24/using-hoe-and-jeweler-for-rubyforge-and-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby RDoc ressources</title>
		<link>http://klaasprause.com/2009/06/12/ruby-rdoc-ressources/</link>
		<comments>http://klaasprause.com/2009/06/12/ruby-rdoc-ressources/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 09:02:44 +0000</pubDate>
		<dc:creator>Klaas</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://klaasprause.com/?p=45</guid>
		<description><![CDATA[I quite often search for infos about RDoc, so here are some useful links.
How to write RDoc comments

RDoc Homepage The homepage links
Ruby Standard Lib documentation links from the standard library documentation
rdoc.info allows you to generate RDoc on the fly for Github projects and browse it as well

How to browse RDoc for installed gems

bdoc very nice [...]]]></description>
			<content:encoded><![CDATA[<p>I quite often search for infos about RDoc, so here are some useful links.</p>
<h2>How to write RDoc comments</h2>
<ul>
<li><a title="RDoc Homepage" href="http://rdoc.sourceforge.net/doc/" target="_blank">RDoc Homepage</a> The homepage links</li>
<li><a href="http://www.ruby-doc.org/stdlib/libdoc/rdoc/rdoc/index.html">Ruby Standard Lib documentation</a> links from the standard library documentation</li>
<li><a href="http://rdoc.info/">rdoc.info</a> allows you to generate RDoc on the fly for Github projects and browse it as well</li>
</ul>
<h2>How to browse RDoc for installed gems</h2>
<ul>
<li><a href="http://github.com/manalang/bdoc/tree/master">bdoc</a> very nice browsing for documentation should be used with the better <a href="http://github.com/mislav/hanna/tree/master">hanna</a> rdoc template</li>
<li><a href="http://github.com/jnewland/sinatra-rubygems/tree/master">sinatra-rubygems</a> reimplementation of <em>gem server</em> to use apache not webrick</li>
<li><a href="http://code.quirkey.com/gembox/">Gembox</a> sinatra based application to browse the locally installed gems</li>
<li><a href="http://docs.github.com/">docs.github.com</a> for github based projects that use rdoc.info</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://klaasprause.com/2009/06/12/ruby-rdoc-ressources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JRuby access to C libraries using FFI</title>
		<link>http://klaasprause.com/2008/09/02/jruby-access-to-c-libraries-using-ffi/</link>
		<comments>http://klaasprause.com/2008/09/02/jruby-access-to-c-libraries-using-ffi/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 09:59:53 +0000</pubDate>
		<dc:creator>Klaas</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[jruby ffi rubinius]]></category>

		<guid isPermaLink="false">http://klaasprause.com/?p=19</guid>
		<description><![CDATA[With the new release of JRuby 1.1.4 it is possible to use the rubinius FFI API. With FFI you can access C libraries via plain ruby code. To get started with FFI the only documentation I have found is provided by Free Minds blog entry. Additional info may be posted to the discussion using jruby-ff. [...]]]></description>
			<content:encoded><![CDATA[<p>With the new release of <a href="http://docs.codehaus.org/display/JRUBY/2008/08/28/JRuby+1.1.4+Released">JRuby 1.1.4</a> it is possible to use the <a href="http://rubini.us">rubinius</a> FFI API. With FFI you can access C libraries via plain ruby code. To get started with FFI the only documentation I have found is provided by <a title="On the Rubinus FFI" href="http://pluskid.lifegoo.com/?p=370">Free Minds</a> blog entry. Additional info may be posted to the discussion <a href="http://www.nabble.com/Using-jruby-ffi-td18775932.html">using jruby-ff</a>. Hopefully gem authors start to implement extensions with FFI besides their native extensions to make it possible to use the gem with Rubinius and JRuby.</p>
<p>One problem is to provide ruby callback functions for the C library. I am trying to figure out how to extend <a href="http://sqlite-ruby.rubyforge.org/sqlite3/">sqlite3-ruby</a> to work with jruby. Sqlite3-ruby uses <a href="http://www.swig.org/Doc1.3/Ruby.html">swig</a> to create a native binding to the sqlite3 library. Within driver.rb some callbacks are registered for the C code like:</p>
<p><code>API.sqlite3_busy_handler( db, API::Sqlite3_ruby_busy_handler, cb )</code></p>
<p><em><code>API::Sqlite3_ruby_busy_handler</code></em><code> </code>is a callback implemented in the native extension. FFI does not provide any support for callbacks. To support C APIs that use callbacks a workaround must be found.</p>
]]></content:encoded>
			<wfw:commentRss>http://klaasprause.com/2008/09/02/jruby-access-to-c-libraries-using-ffi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

