<?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>Dr Nic &#187; TextMate</title>
	<atom:link href="http://drnicwilliams.com/category/textmate/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Mon, 21 May 2012 03:31:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Packaging TextMate bundles in OS X DMGs</title>
		<link>http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/</link>
		<comments>http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 21:11:22 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Engine Yard]]></category>
		<category><![CDATA[Mocra]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=765</guid>
		<description><![CDATA[Last week Engine Yard released a CLI for their Engine Yard AppCloud. Delights such as: ey deploy ey rebuild ey logs ey ssh They simultaneously released a TextMate bundle to deploy, rebuild, view logs, etc using Ctrl+Alt+Cmd+E. Like all TextMate bundles, you can install it in one of two ways: via git (see the README), [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/' rel='bookmark' title='Permanent Link: Trialing RedCar instead of TextMate &#8211; replacing my aliases'>Trialing RedCar instead of TextMate &#8211; replacing my aliases</a> <small>I&#8217;m interested to trial RedCar in my life, instead of...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Last week Engine Yard released a <a href="http://www.engineyard.com/products/appcloud/features/cli">CLI</a> for their Engine Yard AppCloud. Delights such as:</p>
<pre><code>ey deploy
ey rebuild
ey logs
ey ssh
</code></pre>
<p><a href="http://www.engineyard.com/docs/Engine_Yard.tmbundle.dmg"><img src="http://img.skitch.com/20100731-gqkw2eb9666qc415akcggjuet1.png" alt="Engine Yard.tmbundle" style="float: right" width="281" height="153"/></a></p>
<p>They simultaneously released a TextMate bundle to deploy, rebuild, view logs, etc using Ctrl+Alt+Cmd+E. Like all TextMate bundles, you can install it in one of two ways: via git (see the <a href="http://github.com/engineyard/engineyard.tmbundle">README</a>), or via a beautiful DMG. <a href="http://www.engineyard.com/docs/Engine_Yard.tmbundle.dmg">Download it here!</a></p>
<p>Yes indeed, TextMate bundles can now be packaged up and distributed via DMGs using ChocTop!</p>
<p><a href="http://drnicwilliams.com/wp-content/uploads/tmbundles/ruby-on-rails"><img src="http://img.skitch.com/20100731-n6hc948m7bd1qbwykwn1wxyhc1.png" alt="Ruby on Rails.tmbundle" width="380" height="246"/></a></p>
<p>For example, the <a href="http://drnicwilliams.com/wp-content/uploads/tmbundles/ruby-on-rails">Ruby on Rails.tmbundle</a> using a simple purple theme.</p>
<h2 id="first_the_engine_yard_tmbundle">First, the Engine Yard tmbundle</h2>
<p>To use the Engine Yard tmbundle, you first need to install and use the CLI once. Instructions at the bottom of the <a href="http://www.engineyard.com/products/appcloud/features/cli">information page</a>.</p>
<h2 id="how_to_package_a_textmate_bundle_into_a_dmg">How to package a TextMate bundle into a DMG</h2>
<p><a href="http://drnic.github.com/choctop">ChocTop</a> is a packaging and distribution tool originally designed only for Cocoa applications, but can now package any assets, URL links, or even the whole project folder itself. This makes it ideal for packaging TextMate bundles which have no compiled/built output to distribute (like a Cocoa application), rather the project folder itself is the distributed item (the <code>Engine Yard.tmbundle</code> folder in this case).</p>
<h2 id="getting_started">Getting started</h2>
<p>Everything is added into your TextMate bundle project. For example, with the EngineYard bundle:</p>
<pre><code>gem install choctop
cd Library/Application\ Support/TextMate/Bundles/Engine\ Yard.tmbundle
install_choctop . --tmbundle
</code></pre>
<p>If your tmbundle already has a Rakefile, then don&#8217;t overwrite it. Instead, inside the Rakefile, add the ChocTop configuration:</p>
<pre><code>require "choctop"

ChocTop::Configuration.new do |s|
  s.add_root :position =&gt; [290, 200], :exclude =&gt; %w[appcast build .bundle .git]
  s.add_link 'http://github.com/engineyard/engineyard.tmbundle', 'GitHub', :position =&gt; [520, 200]
  s.defaults :textmate
end
</code></pre>
<p>For TextMate bundles the DMG magic is from the <code>s.add_root</code> line. The resulting DMG will include the entire project as a folder/bundle. For example, you&#8217;ll want to exclude <code>appcast</code>, <code>build</code>, <code>.bundle</code> (if you&#8217;re using Bundler), and <code>.git</code> folders.</p>
<p>The <code>s.defaults :textmate</code> provides a generic background and volume icon for a TextMate bundle DMG. See below for customising the background and volume icons. The <code>:position</code> coordinates above are for the generic background.</p>
<h2 id="building_your_dmg">Building your DMG</h2>
<p>To build your DMG and then view it in Finder:</p>
<pre><code>rake dmg
open appcast/build/*.dmg
# or together
rake dmg[automount]
</code></pre>
<p>You can now share the DMG file. See below for how to upload it to a server.</p>
<h2 id="versioning">Versioning</h2>
<p>In future, it would be great to use Sparkle&#8217;s auto-update mechanism (as seen in nearly every Cocoa application). ChocTop will automatically generate the required XML feed; TextMate nor the bundle has a way to ask Sparkle to poll for it nor update itself, yet.</p>
<p>But, you can start versioning your DMGs today:</p>
<pre><code>$ rake version:current
0.0.0
$ rake version:bump:major
$ rake version:current
1.0.0
$ rake dmg
</code></pre>
<p>The DMG will now have a version number.</p>
<h2 id="uploading_new_dmg_versions">Uploading new DMG versions</h2>
<p>The original ChocTop was designed for Cocoa applications and included Sparkle support so your Cocoa applications automatically updated themselves when you built and uploaded a new version. I haven&#8217;t got a solution for this for TextMate bundles yet; but it seems like a good idea for the future.</p>
<p>Nonetheless, ChocTop still includes a <code>rake upload</code> task to ship new versions of your DMG to a server somewhere.</p>
<p>In your Rakefile, add the following config lines to the ChocTop block:</p>
<pre><code>s.base_url   = 'http://some.host.com/upload/folder'
s.remote_dir = '/path/to/upload/folder'
s.host       = 'some.host.com'
s.user       = 'remote-user'
</code></pre>
<p>The <code>s.base_url</code> is the URL from where the DMG file will be found by users. Later, when I figure out how to do auto-updating of the TextMate bundles, it will also use this URL. This URL is also used to determine the host for uploading the file.</p>
<p>The <code>s.remote_dir</code> is a path on the target server that maps to the <code>base_url</code>. This folder must already exist; rsync cannot create it as far as I can tell. So <code>ssh</code> into the machine and <code>mkdir -p /path/to/upload/folder</code></p>
<p>The latter two are optional: <code>s.host</code> is derived from <code>s.base_url</code> and <code>s.user</code> defaults to your current local user.</p>
<p>To upload the latest DMG, run:</p>
<pre><code>rake upload
</code></pre>
<p>You can now share the URL <code>http://some.host.com/upload/folder</code> for people to download the DMG. A small PHP script redirects from the folder path to the DMG filename.</p>
<h2 id="customising">Customising</h2>
<p>ChocTop allows you to customise nearly everything.</p>
<p>The <code>s.defaults :textmate</code> line is similar to the following configuration:</p>
<pre><code>s.background_file = "...choctop/assets/textmate_background.jpg"
s.volume_icon     = "...choctop/assets/textmate_volume.icns"
s.icon_size       = 104
s.icon_text_size  = 12
</code></pre>
<p>For TextMate bundles, perhaps put customised assets into a <code>Support/dmg</code> folder.</p>
<p>A background image should include blank space for the large YourBundle.tmbundle icon and webloc URL file to your GitHub project (or other target URLs). There are no size constraints on the background image. Design something beautiful.</p>
<p>The volume icon is an <code>icns</code> file. You create this using OS X&#8217;s Icon Composer application. Start with a transparent <code>png</code> file and drop it into the box with the corresponding size.</p>
<p>For the Engine Yard tmbundle, the following configuration is used:</p>
<pre><code>s.background_file = 'Support/dmg/engineyard.tmbundle.dmg.png'
s.volume_icon     = 'Support/dmg/engineyard.dmg.icns'
</code></pre>
<h2 id="additional_files">Additional files</h2>
<p>If there are other files you explicitly want bundled in the DMG, say a pretty README.html or a folder of documentation, then you can specify them:</p>
<pre><code>s.add_file 'README.html', :position =&gt; [50, 100]
s.add_file 'docs', :position =&gt; [100, 100], :name =&gt; 'Documentation'
</code></pre>
<h2 id="summary">Summary</h2>
<p>ChocTop is pretty cool for bundling any set of files into a custom DMG, especially Cocoa applications and now TextMate bundles.</p>
<p>Hopefully one day we can have Sparkle auto-updates for TextMate bundles too.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/' rel='bookmark' title='Permanent Link: Trialing RedCar instead of TextMate &#8211; replacing my aliases'>Trialing RedCar instead of TextMate &#8211; replacing my aliases</a> <small>I&#8217;m interested to trial RedCar in my life, instead of...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</title>
		<link>http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/</link>
		<comments>http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 12:54:18 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=751</guid>
		<description><![CDATA[In some TextMate bundles, if you save a file it will also validate the file and show any syntax errors in a tooltip. This is awesome. (e.g. JavaScript and CoffeeScript) So I added the same thing to my Ruby.tmbundle. Install this, save a dodgy Ruby file and you&#8217;ll now see something like: Rubinius superpowers Do [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/' rel='bookmark' title='Permanent Link: Trialing RedCar instead of TextMate &#8211; replacing my aliases'>Trialing RedCar instead of TextMate &#8211; replacing my aliases</a> <small>I&#8217;m interested to trial RedCar in my life, instead of...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>In some TextMate bundles, if you save a file it will also validate the file and show any syntax errors in a tooltip. This is awesome. (e.g. <a href="http://github.com/subtleGradient/javascript-tools.tmbundle">JavaScript</a> and <a href="http://github.com/jashkenas/coffee-script-tmbundle">CoffeeScript</a>)</p>
<p>So I added the same thing to my <a href="http://github.com/drnic/ruby-tmbundle">Ruby.tmbundle</a>. Install this, save a dodgy Ruby file and you&#8217;ll now see something like:</p>
<p><img src="http://img.skitch.com/20100601-eiw1ugr2ma8xwxbecjfbbpfgpk.jpg" style="width: 90%" alt="Validate and Save - No Rubinius" /></p>
<h3 id="rubinius_superpowers">Rubinius superpowers</h3>
<p>Do you think the following syntax error tooltip is more useful?</p>
<p><img src="http://img.skitch.com/20100601-r66y9yr8nb14br4esi436prn1p.jpg" style="width: 90%" alt="Validate and Save - Rubinius installed" /></p>
<p>Yes it lovely, and the new Ruby.tmbundle will automatically do this if it can find <code>rbx</code> in your TextMate&#8217;s <code>$PATH</code>. Yeah yeah.</p>
<p>If you have <a href="http://github.com/mxcl/homebrew">Homebrew</a> installed:</p>
<pre><code>brew install rubinius
</code></pre>
<p>Then in TextMate, add your homebrew <code>bin</code> folder to the $PATH.</p>
<ul>
<li>Go to TextMate&#8217;s Preferences (Cmd+,)</li>
<li>Go to &#8220;Advanced&#8221;, then &#8220;Shell Variables&#8221;</li>
<li>Edit the <code>PATH</code> variable, and add &#8220;:/path/to/homebrew/bin&#8221;</li>
</ul>
<p>For example, if you have homebrew installed in <code>~/.homebrew</code> then you might add <code>:/Users/drnic/.homebrew/bin</code></p>
<p>. My complete <code>$PATH</code> in TextMate is:</p>
<pre>/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/usr/local/bin/:/Users/drnic/.homebrew/bin</pre>
<p>Save a dodgy Ruby file and see the beautifully helpful syntax message.</p>
<h3 id="install_rubytmbundle">Install Ruby.tmbundle</h3>
<p>To install via Git:</p>
<pre><code>mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/drnic/ruby-tmbundle.git "Ruby.tmbundle"
osascript -e 'tell app "TextMate" to reload bundles'
</code></pre>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/' rel='bookmark' title='Permanent Link: Trialing RedCar instead of TextMate &#8211; replacing my aliases'>Trialing RedCar instead of TextMate &#8211; replacing my aliases</a> <small>I&#8217;m interested to trial RedCar in my life, instead of...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>TextMate easter egg: find bundle commands by key combo</title>
		<link>http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/</link>
		<comments>http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 23:54:22 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=292</guid>
		<description><![CDATA[I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging bundle command/snippet is being activated by Ctrl+P or Shift+Ctrl+G?&#8221; I&#8217;ve silently pined for it. (Answer: params[:id] in Rails, and all the Git bundle commands, respectively). Really I&#8217;m an idiot because the correct thing to do is to ask on ##textmate, &#8220;is there a way to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging bundle command/snippet is being activated by Ctrl+P or Shift+Ctrl+G?&#8221; I&#8217;ve silently pined for it. (<em>Answer:</em> <code>params[:id]</code> in Rails, and all the Git bundle commands, respectively).</p>
<p>Really I&#8217;m an idiot because the correct thing to do is to ask on <code>##textmate</code>, &#8220;is there a way to &#8230;?&#8221; but because I figured I knew everything about TextMate I just assumed you couldn&#8217;t search for bundle commands by their key combo.</p>
<p>I was pairing with <a href="http://github.com/chendo">chendo</a> and he had obviously stopped listening to me monologuing about how to do TDD with <a href="http://www.thoughtbot.com/projects/shoulda">Shoulda</a> and was randomly clicking things on TextMate.</p>
<p>He found the following:</p>
<p><div class="wp-caption alignnone" style="width: 518px"><img alt="Find bundle items by key binding" src="http://img.skitch.com/20081008-b4f5egjwat94ffm9u95c3n7s8h.png" title="Find bundle items by key binding" width="508" height="305" /><p class="wp-caption-text">Find bundle items by key binding</p></div></p>
<p>Gold.</p>
<h3>Updated image</h3>
<p>Comments suggest that &#8220;what to do&#8221; isn&#8217;t clear above. My bad.</p>
<p>To get this working, there are 3 steps:</p>
<ol>
<li>Press Ctrl+Cmd+To to bring up the &#8220;Select Bundle Item&#8221; box. This feature of Textmate is awesome. You can enter the text of a bundle item and it will try to find what you are looking for.</li>
<li>Click the magnifying glass</li>
<li>Select &#8216;Key equivalent&#8217;</li>
</ol>
<p>And here&#8217;s a picture:</p>
<p><a href="http://skitch.com/drnic/25xs/select-bundle-item-key-equivalent-option"><img alt="" src="http://img.skitch.com/20081016-1uc3djmt45ks839p9ydrtrassg.png" title="How to find Key Equivalent" class="alignnone" width="510" height="308" /></a></p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>My attempt at sake task management</title>
		<link>http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/</link>
		<comments>http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 04:02:11 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Rake]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=289</guid>
		<description><![CDATA[I&#8217;ve used sake intermittently in my workflow. It competes against me writing helper/admin scripts in my ~/ruby/bin folder. Normally, executable Ruby scripts have won. But I think I have a new solution that could make sake a permanent winner for me. Ruby scripts are easy to create and execute. You just open new file, change [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/' rel='bookmark' title='Permanent Link: Hacking someone&#8217;s gem with github and gemcutter'>Hacking someone&#8217;s gem with github and gemcutter</a> <small> Ever used a rubygem, found a bug, and just...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kitchenzing.com/product.php?pcode=SBB888"><img src='http://www.kitchenzing.com/images/products/SB888-6piecesake.jpg' alt='Sake set' class='alignright' width="200" border="0" /></a></p>
<p>I&#8217;ve used <a href="http://errtheblog.com/posts/60-sake-bomb">sake</a> intermittently in my workflow. It competes against me writing helper/admin scripts in my <code>~/ruby/bin</code> folder. Normally, executable Ruby scripts have won. But I think I have a new solution that could make sake a permanent winner for me.</p>
<p>Ruby scripts are easy to create and execute. You just open new file, change the TextMate grammar to &#8216;Ruby&#8217;, type &#8216;rb&#8217; and press TAB and you&#8217;re off and running (the &#8216;rb&#8217; snippet generates <code>#!/usr/bin/env ruby</code> or a variation of that). You then make the file executable and BAM! you can run the script from any folder in your environment.</p>
<p>Sake tasks are more annoying to write. After creating a new file, you need to create the namespace and task wrappers for your functionality, such as:</p>
<pre>namespace 'foo' do
  namespace 'bar' do
    desc "This task ..."
    task :baz do

    end
  end
end</pre>
<p>Your task isn&#8217;t instantly executable either. After each change, you need to uninstall the task (<code>sake -u foo:bar:baz</code>) and then reinstall the sake file (<code>sake -i foo/bar/baz.sake</code>) and then run it (<code>sake foo:bar:baz</code>). Perhaps there&#8217;s a way to inline edit a sake task, but I can&#8217;t see it from the help options.</p>
<p>But once you&#8217;ve got your script installed in sake, you get all the wonders that sake provides: a named list (with summary) of tasks (<code>sake -T</code>) and the ability to run those tasks anywhere. Ok, that&#8217;s really only one advantage over standard Ruby scripts. But I like it. Oh, namespacing. The <code>baz</code> task exists in a namespace <code>foo:bar</code>. That&#8217;s nice too.</p>
<p>So to make me happy, I need a solution to the dubious &#8220;create-install-execute&#8221; process above. I also want the raw source for all my sake tasks in one place so I can fix/add/change them, reinstall them and move on with my life. I want simple.</p>
<p>So I&#8217;ve forked <a href="http://ozmm.org/">Chris Wanstrath</a>&#8217;s empty <a href="http://github.com/defunkt/sake-tasks/tree/master">sake-tasks</a> repo (<a href="http://github.com/drnic/sake-tasks/tree/master">mine</a>) and added some infrastructure for managing sake tasks. Of course the repo itself is the repository for my sake tasks (which includes a lot from <a href="http://www.lukemelia.com/">Luke Melia</a>), but most importantly it has a single rake task to reinstall all the tasks without any manual fuss.</p>
<p>The rest of this article assumes you want to have your own repository for your own sake tasks hosted on github. This paragraph is probably unnecessary, but I don&#8217;t want to be accused of not being mildly thorough.</p>
<h3 id="fork_the_sake_tasks_repo">Fork the sake-tasks repo</h3>
<p>For thoroughness and a chance to demonstrate some gold-medal git-fu, I&#8217;ll show two ways: fork my repo and forking the original repo from Chris and pulling my stuff into yours. It&#8217;s git, it&#8217;s distributed, you can do anything.</p>
<p>If you want to fork my repo and skip a nifty git lesson, go to my <a href="http://github.com/drnic/sake-tasks/tree/master">sake-tasks</a> repo and click &#8220;fork&#8221;. Then follow the clone instructions as you normally do when you are blatantly, systematically duplicating someone else&#8217;s hard work, using a command that will look something like:</p>
<pre>git clone git@github.com:your-github-username/sake-tasks.git</pre>
<p>Now, lazy man, you can skip to the next step.</p>
<p>If you want to flex your git-fu, then go and fork Chris&#8217; <a href="http://github.com/defunkt/sake-tasks/tree/master">repo</a> instead. Again, follow the clone instructions. </p>
<p><img src="http://img.skitch.com/20080819-x6k16gsb4axearp6g5if6ntxs2.jpg" alt="empty repo from defunkt"/></p>
<p>Now take a moment to reflect on just how empty your repository is. A fine moment in open-source where you&#8217;ve essentially cloned an empty repository. Hardly worth the effort, but since Chris is a creator of github then if he creates an empty repository then who am I to disagree. Empty it shall start. </p>
<p>Now let&#8217;s pull in the code and tasks from my repo. My repo could be any git repo anywhere on the tubes. </p>
<p><a href="http://drnicwilliams.com/2008/02/03/using-git-within-a-team/">One way</a> you could pull my code into your local repository is to add my repo as a remote and then pull in the goodness:</p>
<pre>git remote add drnic git://github.com/drnic/sake-tasks.git
git pull drnic master</pre>
<p>This is useful if you ever plan on re-pulling from a target repo again in the future.</p>
<p>If you just want to pull from someone&#8217;s repo one time only, then you can merge these two lines together:</p>
<pre>git pull git://github.com/drnic/sake-tasks.git master</pre>
<p>If you get occasional pull requests for your projects, then the latter option is handy to know.</p>
<p>Your local repo is now different to your remote repo (your fork on github) so push it back to your remote:</p>
<pre>git push origin master</pre>
<h3 id="installing_the_sake_tasks">Installing the sake tasks</h3>
<p>I originally created my sake-tasks fork so I could store a <a href="http://github.com/drnic/sake-tasks/tree/master/git/manpages/install.sake">git:manpages:install</a> task. I&#8217;ve just upgraded to git 1.6 (note to self: I want an &#8216;upgrade to latest git version via src&#8217; task; <strong>UPDATE</strong> the repository now includes a <code>git:src:install</code> task to do this) and found some <a href="http://subtlegradient.com/articles/2008/02/21/install_git_leopard">instructions</a> for installing the pre-built manpages. Then I got over excited and refactored all of Luke Melia&#8217;s git+mysql+ssh tasks in to my repo so it looked like I&#8217;d done a lot of work.</p>
<p>To install all the tasks, first install sake:</p>
<pre>sudo gem install sake</pre>
<p>Then run the install task (check below for the list of tasks to be installed):</p>
<p>WARNING: This will uninstall any tasks you already have by the same name.</p>
<pre>rake install</pre>
<p>Now, check that your sake tasks are installed:</p>
<pre>sake -T</pre>
<p>Gives you:</p>
<pre>sake git:analyze:commits:flog_frequent   # Flog the most commonly revised files in the git history
sake git:close                           # Delete the current branch and switch back to master
sake git:manpages:install                # Install man pages for current git version
sake git:open                            # Create a new branch off master
sake git:pull                            # Pull new commits from the repository
sake git:push                            # Push all changes to the repository
sake git:status                          # Show the current status of the checkout
sake git:topic                           # Create a new topic branch
sake git:update                          # Pull new commits from the repository
sake mysql:dump                          # Dump the database to FILE (depends on mysql:params)
sake mysql:load                          # Load the database from FILE (depends on mysql:params)
sake ssh:install_public_key              # Install your public key on a remote server.</pre>
<p>Sexy.</p>
<h3 id="adding_new_recipes_tasks">Adding new recipes/tasks</h3>
<p>The installer rake task rake install works by assuming that each .sake file contains one sake task. This allows the rake task to uninstall the tasks from sake first, and then re-install it (sake barfs if you attempt to reinstall an existing task). Without the one-task-per-file rule, the solution would be to load all the sake tasks as rake tasks into memory. But I like one-task-per-file; it seems clean.</p>
<p>So, to create a task <code>foo:bar:baz</code>, you&#8217;ll need to add a folder <code>foo/bar</code> and create a file <code>baz.sake</code> inside it. Within that file you would then specify your task using namespace and task method calls:</p>
<pre>namespace 'foo' do
  namespace 'bar' do
    desc "This task ..."
    task :baz do

    end
  end
end
</pre>
<p>To install new tasks or reinstall modified tasks, just run the rake task (<code>rake install</code> or <code>rake</code>).</p>
<h4 id="textmate_users">TextMate users</h4>
<p>The latest <a href="http://github.com/drnic/ruby-tmbundle">Ruby.tmbundle</a> on github includes a task command that generates the above namespace/task snippet based on the path + file name. That is, inside the foo/bar/baz.sake file, make sure your grammar is &#8216;Ruby&#8217; or &#8216;Ruby on Rails&#8217; and then type &#8220;task&#8221; and press TAB. The above snippet will be generated ready for you to specify your task.</p>
<h3 id="summary">Summary</h3>
<p>So now I have a single place for all my original sake source and a simple rake task to re-install the tasks if I add or modify them. And because its all in one git repo, if other people fork it and add their own tasks then I can steal them.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2009/11/04/hacking-someones-gem-with-github-and-gemcutter/' rel='bookmark' title='Permanent Link: Hacking someone&#8217;s gem with github and gemcutter'>Hacking someone&#8217;s gem with github and gemcutter</a> <small> Ever used a rubygem, found a bug, and just...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/08/19/my-attempt-at-sake-task-management/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Using Ruby within TextMate snippets and commands</title>
		<link>http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/</link>
		<comments>http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 01:51:56 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=279</guid>
		<description><![CDATA[I didn&#8217;t know you could run Ruby within TextMate snippets. As a consequence, a lot of the TextMate bundles I work on either have simplistic Snippets or the advanced code is run via Commands with code pushed into explicit Ruby files in the Support folder. But sometimes I just want a clever snippet. For example, [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t know you could run Ruby within TextMate snippets. As a consequence, a lot of the TextMate bundles <a href="http://github.com/search?q=drnic+tmbundle">I work on</a> either have simplistic Snippets or the advanced code is run via Commands with code pushed into explicit Ruby files in the Support folder.</p>
<p>But sometimes I just want a clever snippet. For example, I want the &#8216;cla&#8217; snippet to use the current filename to create the default class name instead of the current &#8216;ClassName&#8217; default. I want default foreign key names to be meaningful.</p>
<p>I&#8217;ve now figured this out (thanks to Ciaran Walsh), and &#8230;</p>
<p>Um, lost already? Ok, let me show you via screencast on <strong>Snippets and Commands with Ruby</strong> (<a href='http://drnicwilliams.com/wp-content/uploads/2008/06/textmate-snippets-running-ruby.mov'>QuickTime (11Mb)</a>):</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1152272&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1152272&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1152272?pg=embed&#038;sec=1152272">TextMate Snippets running Ruby</a> from <a href="http://www.vimeo.com/user289979?pg=embed&#038;sec=1152272">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&#038;sec=1152272">Vimeo</a>.</p>
<h3>Want to learn more about living with TextMate and Ruby?</h3>
<p>The TextMate website has a <a href="http://macromates.com/screencasts">series of videos</a>, including one by the Ruby.tmbundle&#8217;s own <a href="http://blog.grayproductions.net">James Edward Gray II</a> (JEG2).</p>
<p>In addition, there is the latest <a href="http://peepcode.com/products/textmate-for-rails-2">TextMate for Rails 2</a> Peepcode written by myself and spoken by Geoffrey Grosenbach. Its cheap at $9, good value at $15.50, and perhaps overpriced in the $20-$30 range. Lucky its only $9. </p>
<h3>The snippets used throughout the video</h3>
<p>The current Ruby.tmbundle snippet (activated via &#8216;cla&#8217;):</p>
<pre>class ${1:ClassName}
	$0
end</pre>
<p>An attempt to use regular expressions to convert the filename to a classname:</p>
<pre>class ${1:${TM_FILENAME/[[:alpha:]]+|(_)/(?1::\u$0)/g}}
	$0
end</pre>
<p>The final snippet, with embedded Ruby to do the heavy lifting (note: added &#8216;singluarize&#8217; to the snippet):</p>
<pre>
class ${1:`#!/usr/bin/env ruby
    require 'rubygems'
    require "active_support"
    puts ENV['TM_FILENAME'].gsub(/\.rb$/, '').camelize.singularize
    `}
	$0
end</pre>
<p>Add this to your own Ruby.tmbundle, or <a href="http://github.com/drnic/ruby-tmbundle">clone mine</a> (which is a clone of the original <a href="http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle">subversion repo</a>).</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
<enclosure url="http://drnicwilliams.com/wp-content/uploads/2008/06/textmate-snippets-running-ruby.mov" length="11969747" type="video/quicktime" />
		</item>
		<item>
		<title>How to yell at people with GitHub from TextMate</title>
		<link>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/</link>
		<comments>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/#comments</comments>
		<pubDate>Wed, 28 May 2008 05:48:59 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=276</guid>
		<description><![CDATA[Sometimes when you are perusing code you ask the question: why the hell is that there? or why does this even work? Now you can instantly navigate from that erroneous line to the git commit where it was added, and then using github&#8217;s commenting system add a full-flavoured remark about that person&#8217;s code. I&#8217;m not [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes when you are perusing code you ask the question: why the hell is that there? or why does this even work?</p>
<p>Now you can instantly navigate from that erroneous line to the git commit where it was added, and then using github&#8217;s commenting system add a full-flavoured remark about that person&#8217;s code. I&#8217;m not sure if profanity is against the GitHub Terms of Service, but I&#8217;d rather ask forgiveness than permission.</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1077669&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1077669&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1077669?pg=embed&#038;sec=1077669">TextMate + GitHub &#8211; how to comment/discuss on a line via GitHub</a> from <a href="http://www.vimeo.com/user289979?pg=embed&#038;sec=1077669">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&#038;sec=1077669">Vimeo</a>.</p>
<p>Download and installation instructions are <a href="http://github.com/drnic/github-tmbundle/">available in all good bookstores</a>.</p>
<h3>Just for TextMate?</h3>
<p>There is an editor for Windows &#8211; <a href="http://www.e-texteditor.com/">E-TextEditor</a> &#8211; that was designed to support TextMate bundles. So far, the GitHub bundle doesn&#8217;t use any special features of TextMate&#8217;s latest-and-greatest UI libraries, so it should be usable on E-TextEditor.</p>
<p>Also, a <a href="http://github.com/solars/github-vim/tree/master">VIM project</a> has been created to port the GitHub bundle, by Christoph Blank. Cristoph can be found hanging around #hobo on irc as &#8216;solars&#8217;, if you want more goodies in the VIM bundle.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>GitHub and TextMate Unite</title>
		<link>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/</link>
		<comments>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/#comments</comments>
		<pubDate>Mon, 26 May 2008 07:30:16 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=275</guid>
		<description><![CDATA[I wanted to go from a source file to the equivalent file on github. I wanted a selection of lines in TextMate editor to also be selected when I was taken to github.com. I wanted to cut back on my senseless killing of innocent pasties. Finally, I wanted to make a nice little video to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I wanted to go from a source file to the equivalent file on github. I wanted a selection of lines in TextMate editor to also be selected when I was taken to github.com. I wanted to cut back on my senseless killing of innocent <a href="http://pastie.caboo.se">pasties</a>. </p>
<p>Finally, I wanted to make a nice <a href="http://www.vimeo.com/1066882">little video</a> to show off the new <a href="http://github.com/drnic/github-tmbundle">GitHub.tmbundle</a>.</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1066882&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1066882&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1066882?pg=embed&amp;sec=1066882">TextMate and GitHub: Show the current file in GitHub</a> from <a href="http://www.vimeo.com/user289979?pg=embed&amp;sec=1066882">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1066882">Vimeo</a>.</p>
<h2 id="which_remote_repository_is_it_choosing">Which remote repository is it choosing?</h2>
<p>If you have multiple remote references to github.com repositories, then the algorithm picks one in the following order:</p>
<ol>
<li>A remote named &#8216;github&#8217;</li>
<li>A remote named &#8216;origin&#8217;</li>
<li>The first remote for a github.com repository</li>
</ol>
<p>What else could go in a GitHub textmate bundle?</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>TextMate bundles for Merb</title>
		<link>http://drnicwilliams.com/2008/05/12/textmate-bundles-for-merb/</link>
		<comments>http://drnicwilliams.com/2008/05/12/textmate-bundles-for-merb/#comments</comments>
		<pubDate>Mon, 12 May 2008 00:31:33 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Merb]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=273</guid>
		<description><![CDATA[If you are using TextMate (OS X) or E Text Editor (Windows) then you&#8217;ll be dead keen to know there is a TextMate bundle for Merb, and another one for Datamapper. [This is cross-posted on the new Merbunity community site for Merb] Currently, you can access the bundles via git: cd "~/Library/Application Support/TextMate/Bundles" git clone [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/' rel='bookmark' title='Permanent Link: TextMate easter egg: find bundle commands by key combo'>TextMate easter egg: find bundle commands by key combo</a> <small>I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>If you are using TextMate (OS X) or E Text Editor (Windows) then you&#8217;ll be dead keen to know there is a TextMate bundle for Merb, and another one for Datamapper.</p>
<p>[This is <a href="http://merbunity.com/news/3">cross-posted</a> on the new <a href="http://merbunity.com">Merbunity</a> community site for Merb] </p>
<p>Currently, you can access the bundles via git:</p>
<pre>cd "~/Library/Application Support/TextMate/Bundles"
git clone git://github.com/drnic/datamapper-tmbundle.git Datamapper.tmbundle
git clone git://github.com/drnic/merb-tmbundle.git Merb.tmbundle</pre>
<p>Now “Reload Bundles” or restart TextMate.</p>
<p>You can now select from three Merb syntax/scopes. Press Shift+Alt+Cmd+M to see the options (below)</p>
<p><a href="http://skitch.com/drnic/m87s/merb-textmate-bundle-select-orm"><img src="http://img.skitch.com/20080512-bajj7kagph5g33c8h7ba79rm6t.jpg" alt="Merb TextMate bundle - select ORM"></a></p>
<ul>
<li>If you select Merb (Datamapper) you will have access to the Merb bundle <span class="caps">AND</span> the Datamapper bundle.</li>
<li>If you select Merb (ActiveRecord) you have access to the Merb bundle <span class="caps">AND</span> the Ruby on Rails bundle.</li>
<li>If you select Merb (Sequel) then nothing special happens as there isn’t a Sequel bundle yet. Want to create one?</li>
</ul>
<p>Currently there is no separation in the Rails bundle for ActiveRecord and non-ActiveRecord snippets and commands, so if you use Merb (ActiveRecord) there will be some snippets + commands that you don’t want from Rails. In future, there may be more separation to help the Merb bundle. Also, TextMate 2 may help this cause.</p>
<p>As always, to learn what snippets are available at any given cursor position, use Ctrl+Cmd+T.</p>
<p>If you have new snippets for any of the bundles, I suggest forking the git repositories, pushing up the changes to github and sending Pull Requests to me (drnic).</p>
<h2>Sponsored by Engine Yard</h2>
<p>The initial development of this bundle was sponsored by <a href="http://engineyard.com">Engine Yard</a> because they care.</p>
<h2>Rails bundle</h2>
<p>There is also the hughly popular Ruby on Rails bundle for TextMate that you can use. Download from <a href="http://railsbundle.com/">http://railsbundle.com/</a> or via <a href="http://github.com/drnic/ruby-on-rails-tmbundle/tree/master">github</a>.</p>
<p>If you want to learn everything about the new Ruby on Rails bundle for TextMate and daily life with TextMate (short cuts, editing bundles) then I highly recommend the new <a href="http://peepcode.com/products/textmate-for-rails-2">TextMate for Rails 2</a> Peepcode:</p>
<p><a href="http://peepcode.com/products/textmate-for-rails-2"><img src="https://peepcode.com/system/previews/textmate2/textmate-title.png" alt="TextMate for Rails 2" /></a></p>
<p>This recommendation comes from inside information on the quality of the Peepcode&#8230; it was written by me, and incorporates the vocal skills of the operatic Geoffrey Grosenbach.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/10/09/textmate-easter-egg-find-bundle-commands-by-key-combo/' rel='bookmark' title='Permanent Link: TextMate easter egg: find bundle commands by key combo'>TextMate easter egg: find bundle commands by key combo</a> <small>I&#8217;ve dreamed of the ability to ask TextMate &#8220;what frigging...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/12/textmate-bundles-for-merb/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Rails 2.0 TextMate bundle &#8211; Tasty Tidbit &#8211; respond_to and view navigation</title>
		<link>http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/</link>
		<comments>http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 22:23:26 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/</guid>
		<description><![CDATA[The new release of the Rails TextMate bundle is coming soon. Its guaranteed to be shiny, sparkly and will fit in with any home or office decor. More importantly, it will be upgraded for Rails 2.0. Today is the first Tasty Tidbit &#8211; a demonstration of one of the snazzy new features coming to your [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>The new release of the Rails TextMate bundle is coming soon. Its guaranteed to be shiny, sparkly and will fit in with any home or office decor. More importantly, it will be upgraded for Rails 2.0.</p>
<p>Today is the first Tasty Tidbit &#8211; a demonstration of one of the snazzy new features coming to your Macintosh soon.</p>
<p>In this Tasty Tidbit, we look at respond_to and the ability to create and navigate to view templates based on the selected format block, such as wants.js -> .js.rjs.</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler"><param name="movie" value="http://www.viddler.com/player/52b07473/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/52b07473/" width="437" height="370" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler" ></embed></object></p>
<p>Cannot see the embedded video? Want the Hi-Def version? <a href="http://www.viddler.com/show_movie!orgFile.action?movieToken=52b07473">Download the video</a> (5 Mb).</p>
<h3>Contribute to the Bundle</h3>
<p>To clone the git repository and start sharing your own personal goodness, see <a href="http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/">previous article</a>.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
<enclosure url="http://www.viddler.com/show_movie!orgFile.action?movieToken=52b07473" length="0" type="video/quicktime" />
		</item>
		<item>
		<title>Get ready for the TextMate &#8220;Trundle to Rails 2.0 Bundle&#8221;</title>
		<link>http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/</link>
		<comments>http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 03:11:59 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/</guid>
		<description><![CDATA[Have you noticed lately that the Rails TextMate git pull origin two_point_oohbundle (also installed with e &#8211; the Text Editor for Windows) isn&#8217;t quite as helpful as it once was &#8211; guiding and amplifying your rails app development. Your resourceful/restful rails apps are now filled with named routes, but none of the helpers (link_to, redirect_to, [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div>
<a style="float: right; padding: 5px" href='http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/attachment/257/' rel='attachment wp-att-257' title='logo_bundle.png'><img src='http://drnicwilliams.com/wp-content/uploads/2008/01/logo_bundle.png' alt='logo_bundle.png' /></a></p>
<p>Have you noticed lately that the Rails <a href="http://macromates.com">TextMate</a> git pull origin two_point_oohbundle (also installed with <a href="http://www.e-texteditor.com/">e &#8211; the Text Editor</a> for Windows) isn&#8217;t quite as helpful as it once was &#8211; guiding and amplifying your rails app development.
</div>
<p>Your resourceful/restful rails apps are now filled with named routes, but none of the helpers (link_to, redirect_to, etc) use them. The default view template was still <code>rhtml</code> for a long time (latest svn trunk fixes this to be <code>html.erb</code>, though Marc Jeanson is having a crack at supporting both through a per-project config file). </p>
<p>Or perhaps you were hoping for some snippets for new features of Rails 2.0: assert_difference (asd), assert_select (ass), respond_to (rst). </p>
<p><strong>Or just maybe, you&#8217;ve been updating your local bundle to Rails 2.0 already?</strong> Please say yes, please say yes. If you are saying &#8220;yes&#8221;, read at the bottom for how/where to send me the patches. If you are saying &#8220;no&#8221;, read at the bottom for how/where to start creating patches and sending them to me.</p>
<h3>Firstly, DHH didn&#8217;t write the Rails bundle</h3>
<p>I didn&#8217;t know this &#8211; I just assumed the guy who created Rails and helped promote TextMate also created the Ruby on Rails TextMate bundle. Instead if was WWF&#8217;s &#8220;The Rock&#8221; himself <a href="http://blog.inquirylabs.com/category/software-engineering/">Duane Johnson</a> (figurines sold separately, and may look different to the real Duane Johnson who writes Rails code instead of prancing around in his underpants with other adult males in confined spaces).</p>
<p>The TextMate SVN logs say that it the bundle was first committed in Jan 2005. Its now Jan 2008. That&#8217;s three years of maintaining a suite of code that thousands of people take for granted every day writing Rails code. What a champion.</p>
<p>Like the Australian Cricket team&#8217;s wicketkeeper, <a href="http://en.wikipedia.org/wiki/Adam_Gilchrist">Adam Gilchrist</a>, he&#8217;s also retiring at the top of his game.</p>
<h3>New Maintainer&#8230; me</h3>
<p>Instead of maintaining my own projects, I&#8217;ve decided to maintain this one. I love the TextMate bundles. Before I had a Mac, I <a href="http://drnicwilliams.com/category/radrails/">ported them across to RadRails</a> and many RadRailers entered a golden era of snippet happiness.</p>
<p>My bundle-fu may not be the equivalent of Bruce Lee, but I&#8217;m keen to see my favourite Rails tool live on strong.</p>
<h3>Bleeding edge bundle</h3>
<p>Whilst the TextMate SVN administrators process the maintainer change request (Allan is on holidays somewhere and he took the house keys with him), you might think all is lost!</p>
<p>Never. </p>
<p>The straight-off-the-cow bleeding edge Rails bundle can be accessed via Git. Specifically the branch <a href="http://github.com/drnic/ruby-on-rails-tmbundle/tree/two_point_ooh">two_point_ooh</a>.</p>
<p>So, let&#8217;s all do away with our pre-existing Rails bundle and live on the edge.</p>
<pre>
cd ~/"Library/Application Support/TextMate/Bundles/"
mv "Ruby on Rails.tmbundle" "RoR.tmbundle.orig"
git clone git://github.com/drnic/ruby-on-rails-tmbundle.git "Ruby on Rails.tmbundle"
cd "Ruby on Rails.tmbundle"
git checkout --track -b two_point_ooh origin/two_point_ooh
git pull
</pre>
<p>Now, back in TextMate, go to menu &#8220;Bundles&#8221; > &#8220;Bundle Editor&#8221; > &#8220;Reload Bundles&#8221;.</p>
<p>You, my friend, are sitting pretty.</p>
<h3>Upgrading to when newer blood is on the bleeding edge</h3>
<p>Coming back for more?</p>
<pre>
cd ~/"Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle"
git checkout two_point_ooh  # optional; only if you changed to another branch etc
git pull
</pre>
<p>Now, back in TextMate, go to menu &#8220;Bundles&#8221; > &#8220;Bundle Editor&#8221; > &#8220;Reload Bundles&#8221;.</p>
<p>Bathe yourself in glory. Splash it all over yourself.</p>
<h3>Submitting patches</h3>
<p>If you go into TextMate, launch the Bundle Editor (Cmd+Alt+Ctrl+B) and change something in the Ruby on Rails bundle, then files will added/changed within your local git clone. </p>
<p>What I mean is, you can very simply submit patches now. [When I say "simply", I mean, "I think this is the best approach but I could be completely wrong here..."] Git is so cool that I don&#8217;t know what its doing most of the time; but let&#8217;s hang in there as a team.</p>
<pre>
cd ~/"Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle"
git add .   # to add any new files/snippets/commands you created; TextMate uses one file per snippet
git commit -a -m "Useful message about this patch goes here"
git diff -p HEAD^ HEAD
</pre>
<p>[Theoretically] this creates a patch based on your most recent commit. So you can easily create patches for changes even if your repository and the remote/central/bleeding edge repository look different.</p>
<p>If your patch was created over several commits, then replace HEAD^ with HEAD~4, if there were 4 commits.</p>
<p>I think. God I could be wrong about this though.</p>
<p>Just try your best and if it works, let me know and I&#8217;ll remove all this &#8220;I don&#8217;t know what I&#8217;m talking about&#8221; text and future readers will think I know everything. Web 2.0 rocks.</p>
<h3>Send patches to&#8230;</h3>
<p>Me <a href="mailto:drnicwilliams@gmail.com">drnicwilliams@gmail.com</a> <strong>[update] </strong>or via the <strong>new</strong> <a href="http://groups.google.com/group/rails-textmate">Google Group</a>.</p>
<p><strong>Update:</strong> Note there is a new Google Group (<a href="http://groups.google.com/group/rubyonrails-textmate">rails-textmate</a>) created in Feb 2009 due to Spam and loss of admin control on original group.</p>
<p>Want to fork the git repo? Use a free account at <a href="http://gitorious.org/">Gitorious</a> or <a href="http://github.com">GitHub</a>.</p>
<table style="background-color: #fff; padding: 5px;" cellspacing=0>
<tr>
<td>
  <img src="http://groups.google.com/groups/img/3nb/groups_bar.gif" height=26 width=132 alt="Google Groups">
  </td>
</tr>
<tr>
<td style="padding-left: 5px;font-size: 125%">
  <b>Ruby on Rails: TextMate</b>
  </td>
</tr>
<tr>
<td style="padding-left: 5px">
  <a href="http://groups.google.com/group/rails-textmate">Visit this group</a>
  </td>
</tr>
</table>
<h3>Trundle to Rails 2.0 Bundle</h3>
<p>Arguably, we just keep patching the bundle forever and bleeding edges will continue to live happily within the blood and muck of said existence.</p>
<p>But, lots of other people want nicely zipped up bundles. No doubt &#8220;e &#8211; the Text Editor&#8221; will want a &#8220;released&#8221; version so they can clean it of all the ugly things they can&#8217;t yet replicate like Macros. And eventually I&#8217;ll push it all down to the SVN repo and it will be released with future TextMate upgrades.</p>
<p>So, there will be a &#8220;Rails 2.0 compatible&#8221; grand opening one day soon. Probably before 14th of March 2008, when I&#8217;m giving a &#8220;What&#8217;s new in Rails 2.0?&#8221; talk at QCON London. Showing off the new bundle will be sweet. </p>
<p>That gives us 6 wks to refactor this bundle to make it a shining example of all that is wonderful in Rails 2.0. Every patch helps.</p>
<p>[Please consider Rails 1.2.6 and before developers when conceiving of patches, and please consult your doctor if pain persists.]</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
	</channel>
</rss>

