<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>TDD developer &#187; IronRuby</title>
	<atom:link href="http://testdrivendevelopment.wordpress.com/tag/ironruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://testdrivendevelopment.wordpress.com</link>
	<description>Diary of an agile developer</description>
	<lastBuildDate>Wed, 28 Oct 2009 22:06:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='testdrivendevelopment.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a6ef45b2d30fa0fcbe697fa111d46fdd?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>TDD developer &#187; IronRuby</title>
		<link>http://testdrivendevelopment.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://testdrivendevelopment.wordpress.com/osd.xml" title="TDD developer" />
		<item>
		<title>IronRuby</title>
		<link>http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 12:35:06 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[IronRuby]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/</guid>
		<description><![CDATA[Today I watched this realy interesting presentation about IronRuby. Now that the implementation is near the version 0.9 I believe it’s time to start using IronRuby in a production environment. First of all I’ll use it for testing (RSpec) and for developing web application (Rails and IronRubyMVC)
If you have time don’t miss it!

Iron Ruby (Ben [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=92&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I watched this realy interesting presentation about <a href="http://ironruby.net/" target="_blank">IronRuby</a>. Now that the implementation is near the version 0.9 I believe it’s time to start using <a href="http://ironruby.net/" target="_blank">IronRuby</a> in a production environment. First of all I’ll use it for testing (<a href="http://rspec.info/" target="_blank">RSpec</a>) and for developing web application (<a href="http://rubyonrails.org/" target="_blank">Rails</a> and <a href="http://github.com/jschementi/ironrubymvc/tree/master" target="_blank">IronRubyMVC</a>)</p>
<p>If you have time don’t miss it!</p>
</p>
<p><a href="http://vimeo.com/5660902">Iron Ruby (Ben Hall)</a> from <a href="http://vimeo.com/vistasquad">Vista Squad</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=92&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2009/07/26/ironruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft Sync Framework using IronRuby</title>
		<link>http://testdrivendevelopment.wordpress.com/2008/12/25/microsoft-sync-framework-using-ironruby/</link>
		<comments>http://testdrivendevelopment.wordpress.com/2008/12/25/microsoft-sync-framework-using-ironruby/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 11:38:35 +0000</pubDate>
		<dc:creator>makka</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IronRuby]]></category>
		<category><![CDATA[SyncFramework]]></category>

		<guid isPermaLink="false">http://testdrivendevelopment.wordpress.com/2008/12/25/microsoft-sync-framework-using-ironruby/</guid>
		<description><![CDATA[Microsoft Sync Framework is a comprehensive synchronization platform that enables collaboration and offline access for applications, services and devices. It features technologies and tools that enable roaming, sharing, and taking data offline. Using Microsoft Sync Framework, developers can build sync ecosystems that integrate any application, with any data from any store using any protocol over [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=55&subd=testdrivendevelopment&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://msdn.microsoft.com/sync">Microsoft Sync Framework</a> is a comprehensive synchronization platform that enables collaboration and offline access for applications, services and devices. It features technologies and tools that enable roaming, sharing, and taking data offline. Using <a href="http://msdn.microsoft.com/sync">Microsoft Sync Framework</a>, developers can build sync ecosystems that integrate any application, with any data from any store using any protocol over any network. </p>
<p>In these days <a href="http://absistemi.it">we</a> used <a href="http://msdn.microsoft.com/sync">Microsoft Sync Framework</a> to develop some occasionally connected application. These application use <a href="http://msdn.microsoft.com/sync">Microsoft Sync Framework</a> to synchronize their local storage with the centralized database hosted on-line.</p>
<p>Microsoft Sync Framework includes a number of providers that support common data sources. The following providers are included:
<ul>
<li><strong>Sync Services for ADO.NET</strong>: Synchronization for ADO.NET enabled data sources
<li><strong>Sync Services for File Systems</strong>: Synchronization for files and folders
<li><strong>Sync Services for FeedSync</strong>: Synchronization for RSS and ATOM feeds</li>
</ul>
<p>Key features of the File system provider include:</p>
<ul>
<ul>
<li>Incremental synchronization of changes between two file system locations specified via a local or UNC path.
<li>Synchronization of file contents, file and folder names, file timestamps, and attributes.
<li>Support for optional filtering of files based on filename/extensions, sub-directories, or file attributes
<li>Optional use of file hashes to detect changes to file contents if file timestamps are not reliable
<li>Reliable detection of conflicting changes to the same file and automatic resolution of conflicts with a no-data-loss policy
<li>Allow for limited user undo operation by optionally allowing file deletes and overwrites to be moved to the Recycle Bin
<li>Support for Preview mode which provides a preview of the incremental sync operation without committing changes to the file system
<li>First-class support for the scenario where the user may start synchronization with equal or partially equal file hierarchies on more than one replica.
<li>Support for graceful cancellation of an ongoing sync operation such that the remaining changes can be synchronized later without having to re-sync changes that were already synchronized.</li>
</ul>
</ul>
<p>An example of <strong>Sync Services for File Systems </strong>usage can be found <a href="http://msdn.microsoft.com/en-us/sync/bb887623.aspx">here</a>. In order to test <a href="http://www.ironruby.net/">IronRuby</a> I decided to convert this sample from C# to Ruby</p>
<div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:4cbde056-7d7a-4a9b-aff5-bb385ea7c703" style="display:inline;float:none;margin:0;padding:0;">
<pre style="overflow:auto;background-color:white;">
<div><span style="color:#000000;">require </span><span style="color:#800000;">"</span><span style="color:#800000;">mscorlib</span><span style="color:#800000;">"</span><span style="color:#000000;">
require </span><span style="color:#800000;">"</span><span style="color:#800000;">Microsoft.Synchronization.dll</span><span style="color:#800000;">"</span><span style="color:#000000;">
require </span><span style="color:#800000;">"</span><span style="color:#800000;">Microsoft.Synchronization.Files.dll</span><span style="color:#800000;">"</span><span style="color:#000000;">

include System
include Microsoft::Synchronization
include Microsoft::Synchronization::Files

</span><span style="color:#0000ff;">class</span><span style="color:#000000;"> Syncronizer

    def DoWork replica1RootPath, replica2RootPath
        idFileName </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">filesync.id</span><span style="color:#800000;">"</span><span style="color:#000000;">;
        replica1Id </span><span style="color:#000000;">=</span><span style="color:#000000;"> GetReplicaId( replica1RootPath </span><span style="color:#000000;">+</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">/</span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#000000;">+</span><span style="color:#000000;"> idFileName)
        replica2Id </span><span style="color:#000000;">=</span><span style="color:#000000;"> GetReplicaId( replica2RootPath </span><span style="color:#000000;">+</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">/</span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#000000;">+</span><span style="color:#000000;"> idFileName)

        options </span><span style="color:#000000;">=</span><span style="color:#000000;"> FileSyncOptions.RecycleDeletedFiles
        filter </span><span style="color:#000000;">=</span><span style="color:#000000;">  FileSyncScopeFilter.</span><span style="color:#0000ff;">new</span><span style="color:#000000;">
        filter.FileNameExcludes.Add idFileName

        DetectChangesOnFileSystemReplica replica1Id, replica1RootPath, filter, options
        DetectChangesOnFileSystemReplica replica2Id, replica2RootPath, filter, options

        SyncFileSystemReplicasOneWay replica1Id, replica2Id, replica1RootPath, replica2RootPath, filter, options
        SyncFileSystemReplicasOneWay replica2Id, replica1Id, replica2RootPath, replica1RootPath, filter, options
    end

    def GetReplicaId path
        id </span><span style="color:#000000;">=</span><span style="color:#000000;"> Guid.NewGuid
        </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> File.exist</span><span style="color:#000000;">?</span><span style="color:#000000;"> path
            str </span><span style="color:#000000;">=</span><span style="color:#000000;"> File.read path
            id </span><span style="color:#000000;">=</span><span style="color:#000000;"> Guid.</span><span style="color:#0000ff;">new</span><span style="color:#000000;">(str)
        </span><span style="color:#0000ff;">else</span><span style="color:#000000;">
            File.open(path, </span><span style="color:#800000;">'</span><span style="color:#800000;">w</span><span style="color:#800000;">'</span><span style="color:#000000;">) {</span><span style="color:#000000;">|</span><span style="color:#000000;">f</span><span style="color:#000000;">|</span><span style="color:#000000;"> f.write(id.ToString) }
        end
        id
    end

    def DetectChangesOnFileSystemReplica replicaId, rootPath, filter, options
        provider </span><span style="color:#000000;">=</span><span style="color:#000000;"> FileSyncProvider.</span><span style="color:#0000ff;">new</span><span style="color:#000000;">(replicaId, rootPath, filter, options)
        provider.DetectChanges;
        provider.Dispose
    end

    def SyncFileSystemReplicasOneWay sourceReplicaId, destinationReplicaId, sourceReplicaRootPath, destinationReplicaRootPath, filter, options
        agent </span><span style="color:#000000;">=</span><span style="color:#000000;"> SyncOrchestrator.</span><span style="color:#0000ff;">new</span><span style="color:#000000;">
        agent.LocalProvider </span><span style="color:#000000;">=</span><span style="color:#000000;"> FileSyncProvider.</span><span style="color:#0000ff;">new</span><span style="color:#000000;">(sourceReplicaId, sourceReplicaRootPath, filter, options)
        agent.RemoteProvider </span><span style="color:#000000;">=</span><span style="color:#000000;"> FileSyncProvider.</span><span style="color:#0000ff;">new</span><span style="color:#000000;">(destinationReplicaId, destinationReplicaRootPath, filter, options)
        agent.Direction </span><span style="color:#000000;">=</span><span style="color:#000000;"> SyncDirectionOrder.Upload
        agent.Synchronize
    end
end

sync </span><span style="color:#000000;">=</span><span style="color:#000000;"> Syncronizer.</span><span style="color:#0000ff;">new</span><span style="color:#000000;">
sync.DoWork </span><span style="color:#800000;">"</span><span style="color:#800000;">D:/tmp/SyncFXSamples/A</span><span style="color:#800000;">"</span><span style="color:#000000;">, </span><span style="color:#800000;">"</span><span style="color:#800000;">D:/tmp/SyncFXSamples/B</span><span style="color:#800000;">"</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>I have uploaded a little zip <a href="http://cid-777c01ffd69b17d0.skydrive.live.com/downloadfolder.ashx/Public/samples?canary=H1lO0i8WTvBLwYhql%2btx7OipWsV%2bXfNao%2byTtSDX%2b4s%3d1">here</a> that contains all the stuff you need to get ready. If you want to run the sample you have to run the command: <strong>ir sync.rb</strong> as show below</p>
<p><a href="http://testdrivendevelopment.files.wordpress.com/2008/12/image.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="114" alt="image" src="http://testdrivendevelopment.files.wordpress.com/2008/12/image-thumb.png?w=319&#038;h=114" width="319" border="0"></a> </p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:451ce3ec-54e0-47f1-8b64-4243aac20a21" style="display:inline;margin:0;padding:0;">Technorati Tag: <a href="http://technorati.com/tags/syncFramework" rel="tag">syncFramework</a>,<a href="http://technorati.com/tags/ironRuby" rel="tag">ironRuby</a></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/testdrivendevelopment.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/testdrivendevelopment.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/testdrivendevelopment.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/testdrivendevelopment.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/testdrivendevelopment.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/testdrivendevelopment.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/testdrivendevelopment.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/testdrivendevelopment.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/testdrivendevelopment.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/testdrivendevelopment.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=testdrivendevelopment.wordpress.com&blog=2459763&post=55&subd=testdrivendevelopment&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://testdrivendevelopment.wordpress.com/2008/12/25/microsoft-sync-framework-using-ironruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eaac7e727c1e026a9677bf418eca3ee9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">makka</media:title>
		</media:content>

		<media:content url="http://testdrivendevelopment.files.wordpress.com/2008/12/image-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>