<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Underpants Gnome - Home</title>
  <id>tag:underpantsgnome.com,2010:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://underpantsgnome.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://underpantsgnome.com/" rel="alternate" type="text/html"/>
  <updated>2010-02-20T01:59:53Z</updated>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2010-02-20:966</id>
    <published>2010-02-20T01:54:00Z</published>
    <updated>2010-02-20T01:59:53Z</updated>
    <link href="http://underpantsgnome.com/2010/2/20/rvm-friendly-textmate-bundles" rel="alternate" type="text/html"/>
    <title>rvm friendly TextMate bundles</title>
<content type="html">
            &lt;p&gt;I forked and modified the &lt;a href=&quot;http://cukes.info/&quot;&gt;Cucumber&lt;/a&gt; and &lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;RSpec&lt;/a&gt; &lt;a href=&quot;http://macromates.com/&quot;&gt;TextMate&lt;/a&gt; bundles to setup the &lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;rvm&lt;/a&gt; environment based on an &lt;a href=&quot;http://rvm.beginrescueend.com/workflow/rvmrc/&quot;&gt;.rvmrc&lt;/a&gt; in your project directory.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://github.com/UnderpantsGnome/cucumber-tmbundle&quot;&gt;Cucumber Bundle&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://github.com/UnderpantsGnome/rspec-tmbundle&quot;&gt;RSpec Bundle&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Enjoy. Let me know if you find any quirks.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2010-02-19:965</id>
    <published>2010-02-19T23:13:00Z</published>
    <updated>2010-02-19T23:23:19Z</updated>
    <link href="http://underpantsgnome.com/2010/2/19/rvm-gemsets-textmate-yay-2" rel="alternate" type="text/html"/>
    <title>rvm + gemsets + TextMate == yay! * 2</title>
<content type="html">
            &lt;p&gt;Ok so in my last post I mentioned I wasn&#8217;t able to find a way to automatically use an existing .rvmrc file. I spent some time with it again this afternoon and was able to get it to work. So now if you are using TextMate and you want to run a ruby script that uses your rvm environment all you have to do is edit the commands you use and replace the #! and add a couple lines. The odd thing is this is pretty much exactly what I was trying before, though on a different machine.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash

[[ -f &quot;$HOME/.rvm/scripts/rvm&quot; ]] &#38;&#38; . $HOME/.rvm/scripts/rvm
[[ -f &quot;$TM_PROJECT_DIRECTORY/.rvmrc&quot; ]] &#38;&#38; . $TM_PROJECT_DIRECTORY/.rvmrc
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;And that&#8217;s it, you get your rvm config in TextMate.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2010-02-19:963</id>
    <published>2010-02-19T04:47:00Z</published>
    <updated>2010-02-19T05:22:45Z</updated>
    <category term="Ruby"/>
    <link href="http://underpantsgnome.com/2010/2/19/rvm-gemsets-textmate-yay" rel="alternate" type="text/html"/>
    <title>rvm + gemsets + TextMate == yay!</title>
<content type="html">
            &lt;p&gt;So I started playing with &lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;rvm&lt;/a&gt; a while back and loved the concept of being able to have a gems(et) for each project to completely eliminate gem clashing.&lt;/p&gt;


	&lt;p&gt;So I now have an &lt;a href=&quot;http://rvm.beginrescueend.com/workflow/rvmrc/&quot;&gt;.rvmrc&lt;/a&gt; in each project directory with the necessary gems installed, no more, no less.&lt;/p&gt;


	&lt;p&gt;I also have a &lt;a href=&quot;http://rvm.beginrescueend.com/gemsets/global/&quot;&gt;global&lt;/a&gt; gem set that has common gems in it that I use all over the place and aren&#8217;t really project specific so I don&#8217;t have to install them in every gems(et). Thanks Wayne!&lt;/p&gt;


	&lt;p&gt;Now, to take it to the next level I wanted to be able to use &#8984;+^+R to run the current &lt;a href=&quot;http://cukes.info/&quot;&gt;Cucumber&lt;/a&gt; scenario. So I needed to get &lt;a href=&quot;http://macromates.com/&quot;&gt;TextMate&lt;/a&gt; aware of my rvm gems(et). This requires setting 3 project specific variables in TextMate.&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;TM_RUBY&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;GEM&lt;/span&gt;_HOME&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;GEM&lt;/span&gt;_PATH&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;To get TM_RUBY cd into your project with a .rvmrc in it or set the environment with rvm your_ruby%gemset then run&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;which ruby&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;To get &lt;span class=&quot;caps&quot;&gt;GEM&lt;/span&gt;_HOME and &lt;span class=&quot;caps&quot;&gt;GEM&lt;/span&gt;_PATH run&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;env | grep GEM&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;To set these in your project you need to have the project drawer open and nothing selected, then click the &#8220;I&#8221; button in the bottom corner, then you can add your variables.&lt;/p&gt;


	&lt;p&gt;I tried to think up a way to have TextMate read the .rvmrc in the project directory, but I wasn&#8217;t able to get anything to setup the environment. If anybody has any suggestions I&#8217;d love to hear them.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-04-08:914</id>
    <published>2009-04-08T02:11:00Z</published>
    <updated>2009-04-08T02:22:36Z</updated>
    <link href="http://underpantsgnome.com/2009/4/8/i-prefer-gemtools-over-config-gem" rel="alternate" type="text/html"/>
    <title>I prefer GemTools over config.gem</title>
<content type="html">
            &lt;p&gt;So I know I&#8217;m obviously biased, but I prefer to use &lt;a href=&quot;http://github.com/UnderpantsGnome/gem_tools-gem/tree/master&quot;&gt;GemTools&lt;/a&gt; over the gem management feature in Rails. and here&#8217;s why.&lt;/p&gt;


I can deploy an app to a new server instance and not even need to have rails installed. All I have to do is 
&lt;code&gt;cap production deploy:setup &#38;&#38; cap production deploy&lt;/code&gt;
and my cap tasks will install the full stack, including Rails.

	&lt;p&gt;I can also use &lt;a href=&quot;http://github.com/UnderpantsGnome/gem_tools-gem/tree/master&quot;&gt;GemTools&lt;/a&gt; without Rails.&lt;/p&gt;


	&lt;p&gt;I know that I will get the version of my gems that my app expects.&lt;/p&gt;


	&lt;p&gt;I&#8217;ve seen issues with using vendored gems (hpricot I&#8217;m looking at you) where even with a frozen gem it will try and include the newest version of the gem installed locally.&lt;/p&gt;


	&lt;p&gt;Don&#8217;t get me wrong, any compiled gems are going to fail in a vendored cross platform environment if the person that vendoerd it was on a different platform.&lt;/p&gt;


These are just a couple of the reasons that I prefer to use
&lt;code&gt;gemtools install&lt;/code&gt; 
over config.gem

	&lt;p&gt;I&#8217;m sure I&#8217;m in the minority, but that&#8217;s ok.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-04-08:913</id>
    <published>2009-04-08T02:07:00Z</published>
    <updated>2009-04-08T02:11:17Z</updated>
    <link href="http://underpantsgnome.com/2009/4/8/why-fluid-for-mac-rocks" rel="alternate" type="text/html"/>
    <title>Why Fluid for Mac Rocks</title>
<content type="html">
            &lt;p&gt;So I tend to work on different projects for different people and it&#8217;s nice to be able to sandbox things in their own world.&lt;/p&gt;


	&lt;p&gt;I know &lt;a href=&quot;http://fluidapp.com/&quot;&gt;Fluid&lt;/a&gt; was created as an &lt;span class=&quot;caps&quot;&gt;SSB&lt;/span&gt; (Site Specific Browser) and it&#8217;s nice for that but for me it&#8217;s more of a &lt;span class=&quot;caps&quot;&gt;CSB&lt;/span&gt; (Client Specific Browser), I create a Fluid instance for each &#8220;client&#8221; then I can keep their wiki, issue tracker, time keeping and whatever else I need in a single app.&lt;/p&gt;


	&lt;p&gt;I find it saves me time and clutter.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-02-13:823</id>
    <published>2009-02-13T06:17:00Z</published>
    <updated>2009-02-20T06:26:33Z</updated>
    <category term="Rails"/>
    <category term="Ruby"/>
    <link href="http://underpantsgnome.com/2009/2/13/clearancecrypto" rel="alternate" type="text/html"/>
    <title>Clearance Crypto</title>
<content type="html">
            &lt;p&gt;So in my foray into the rails templates world I&#8217;ve stumbled onto a couple of authentication options that I wasn&#8217;t previously aware of.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/binarylogic/authlogic/tree/master&quot;&gt;Authlogic&lt;/a&gt; which is nice in that it moves all the actual authentication logic into a gem to make updates dead simple. The one thing I didn&#8217;t like was that you have to generate all of your own &lt;span class=&quot;caps&quot;&gt;MVC&lt;/span&gt; code. Though honestly this isn&#8217;t such an issue now that I have it all rolled in to a &lt;a href=&quot;https://github.com/pixels-and-bits/strappy/tree&quot;&gt;Rails 2.3 template&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/thoughtbot/clearance/tree&quot;&gt;Clearance&lt;/a&gt; is also nice in that it generates the &lt;span class=&quot;caps&quot;&gt;MVC&lt;/span&gt; code yet still keeps all the authentication logic in a gem for easy updates. The only thing I didn&#8217;t really care for, though I do understand why they did it, is the inability to choose the hash algorithm.&lt;/p&gt;
&lt;p&gt;Along comes &lt;a href=&quot;https://github.com/pixels-and-bits/clearance_crypto/tree&quot;&gt;ClearanceCrypto&lt;/a&gt; this provides a very similar way to choose the hashing algorithm like you can in Authlogic. The code was picked and tweaked from the Authlogic code to match the way Clearance checks the authentication.&lt;/p&gt;
&lt;p&gt;It&#8217;s very new and may have issues. Feel free to let me know if you find anything.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-02-13:822</id>
    <published>2009-02-13T06:13:00Z</published>
    <updated>2009-02-13T06:16:59Z</updated>
    <category term="Rails"/>
    <category term="Ruby"/>
    <link href="http://underpantsgnome.com/2009/2/13/rails-templates-part-3" rel="alternate" type="text/html"/>
    <title>Rails templates - Round 3</title>
<content type="html">
            &lt;p&gt;And yet another big change to &lt;a href=&quot;http://github.com/pixels-and-bits/strappy/tree/master&quot;&gt;Strappy&lt;/a&gt; there is a new branch that allows you to choose the authentication method you want to use (&lt;a href=&quot;http://github.com/binarylogic/authlogic/tree/master&quot;&gt;Authlogic&lt;/a&gt;, &lt;a href=&quot;https://github.com/thoughtbot/clearance/tree&quot;&gt;Clearance&lt;/a&gt; or &lt;a href=&quot;https://github.com/UnderpantsGnome/restful_authentication/tree&quot;&gt;restful_authentication&lt;/a&gt;) it&#8217;s currently located in a &lt;a href=&quot;http://github.com/pixels-and-bits/strappy/tree/choosy&quot;&gt;branch called choosy&lt;/a&gt; but will probably be moving to master soon.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-02-09:785</id>
    <published>2009-02-09T23:47:00Z</published>
    <updated>2009-02-09T23:51:22Z</updated>
    <link href="http://underpantsgnome.com/2009/2/9/rails-templates-round-2" rel="alternate" type="text/html"/>
    <title>Rails templates - Round 2</title>
<content type="html">
            &lt;p&gt;So of course as soon as I finished adding in the coverage to restful_authentication I found &lt;a href=&quot;http://github.com/binarylogic/authlogic/tree/master&quot;&gt;Authlogic&lt;/a&gt;...&lt;/p&gt;


	&lt;p&gt;So I went and revamped &lt;a href=&quot;http://github.com/pixels-and-bits/strappy/tree/master&quot;&gt;Strappy&lt;/a&gt; to use Authlogic and bootstrap a ready to roll app with user logins and password resets. The original version using restful_authentication is still there in a &lt;a href=&quot;http://github.com/pixels-and-bits/strappy/tree/restful_authentication&quot;&gt;branch&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Enjoy&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-02-09:784</id>
    <published>2009-02-09T23:43:00Z</published>
    <updated>2009-02-09T23:46:12Z</updated>
    <link href="http://underpantsgnome.com/2009/2/9/restful_authentication-and-coverage" rel="alternate" type="text/html"/>
    <title>restful_authentication and coverage</title>
<content type="html">
            &lt;p&gt;So I went and &lt;a href=&quot;https://github.com/UnderpantsGnome/restful_authentication/tree&quot;&gt;forked the restful_authentication&lt;/a&gt; plugin/generator and added in the tiny bit of specs it needed to give you a clean slate when using it. No more excuses for slacking coverage.&lt;/p&gt;


	&lt;p&gt;Enjoy.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-02-05:739</id>
    <published>2009-02-05T23:31:00Z</published>
    <updated>2009-02-05T23:42:26Z</updated>
    <category term="Rails"/>
    <category term="Ruby"/>
    <link href="http://underpantsgnome.com/2009/2/5/expose_model" rel="alternate" type="text/html"/>
    <title>expose_model</title>
<content type="html">
            &lt;p&gt;I read an &lt;a href=&quot;http://stephencelis.com/archive/2008/9/rails-controllers-views-and-variables&quot;&gt;article by Stpehen Celis&lt;/a&gt; way back when and liked the idea behind it, but not having to add the methods to all my controllers. So I rolled it up into a gem and can now get the same functionality by doing&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;class FooController &amp;lt; ApplicationController
  expose_model :foo
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;and get the foo and foos methods plus the helper_methods.&lt;/p&gt;


	&lt;p&gt;You can find it on &lt;a href=&quot;http://github.com/UnderpantsGnome/expose_model/tree/master&quot;&gt;github&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2009-02-05:738</id>
    <published>2009-02-05T23:29:00Z</published>
    <updated>2009-02-06T06:58:27Z</updated>
    <category term="Rails"/>
    <category term="Ruby"/>
    <link href="http://underpantsgnome.com/2009/2/5/rails-templates" rel="alternate" type="text/html"/>
    <title>Rails templates</title>
<content type="html">
            &lt;p&gt;Ok, I admit I&#8217;m a little late to the party.&lt;/p&gt;


	&lt;p&gt;I finally stumbled onto the rails templates and really like the idea. I was using bort but I wasn&#8217;t all that hapy with some of the decisions they made, like rolling all the migrations into one monolithic beast.&lt;/p&gt;


	&lt;p&gt;I took the forked version of bort and turned it into a rails template. Very nice.&lt;/p&gt;


	&lt;p&gt;You can find &lt;a href=&quot;http://github.com/pixels-and-bits/strappy/tree/master&quot;&gt;strappy here&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;The next step I plan on is making the &lt;a href=&quot;http://github.com/technoweenie/restful-authentication/tree/master&quot;&gt;restful_authentication&lt;/a&gt; generator build specs with 100% coverage. I see no reason to start an app at 88%&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2008-10-28:152</id>
    <published>2008-10-28T17:41:00Z</published>
    <updated>2008-10-28T17:48:28Z</updated>
    <link href="http://underpantsgnome.com/2008/10/28/textmate-mini-bundle" rel="alternate" type="text/html"/>
    <title>TextMate mini-Bundle</title>
<content type="html">
            &lt;p&gt;Use TextMate? Can&#8217;t stand trailing whitespace in your code?&lt;/p&gt;


	&lt;p&gt;Here is a mini-Bundle that wraps a macro around &#8984;-S to strip trailing whitespace and save the doc.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://underpantsgnome.com/assets/2008/10/28/Strip_Whitespace_on_Save.zip&quot;&gt;Strip Whitespace on Save&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Just unzip it and double-click it.&lt;/p&gt;


	&lt;p&gt;If you want to change the shortcut, open the Bundle Editor and change it in the settings.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2008-09-28:151</id>
    <published>2008-09-28T21:15:00Z</published>
    <updated>2008-09-28T21:16:15Z</updated>
    <link href="http://underpantsgnome.com/2008/9/28/bort-sweet" rel="alternate" type="text/html"/>
    <title>bort, sweet</title>
<content type="html">
            &lt;p&gt;I found &lt;a href=&quot;https://github.com/fudgestudios/bort/tree&quot;&gt;bort&lt;/a&gt; through &lt;a href=&quot;http://weblog.rubyonrails.com/2008/9/24/this-week-in-rails-september-24-2008&quot;&gt;This Week in Rails&lt;/a&gt; and thought it was awesome. So of course I forked it and started making tweaks to fit it into the apps I normally build.&lt;/p&gt;


	&lt;p&gt;Today I got to thinking that it might be nice to be able to easily update an existing bort based app to have the new features, like when they added OpenID this weekend. So I wrote a script to setup a new bort app or update an existing bort based app.&lt;/p&gt;


	&lt;p&gt;Warning the script is very new and hasn&#8217;t been used extensively so if you use it make sure you can easily roll back the changes. Like only applying an update to an app that is a clean state so that you can rollback the changes.&lt;/p&gt;


	&lt;p&gt;Here is my fork of &lt;a href=&quot;https://github.com/UnderpantsGnome/bort/tree&quot;&gt;bort&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2008-09-07:138</id>
    <published>2008-09-07T00:33:00Z</published>
    <updated>2008-12-02T21:37:32Z</updated>
    <link href="http://underpantsgnome.com/2008/9/7/weekend-diversion" rel="alternate" type="text/html"/>
    <title>Weekend Diversion</title>
<content type="html">
            &lt;p&gt;If you are a Neil Patrick Harris and/or a Joss Whedon fan, &lt;a href=&quot;http://www.drhorrible.com/&quot;&gt;here&#8217;s something&lt;/a&gt; for you.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://underpantsgnome.com/">
    <author>
      <name>michael</name>
    </author>
    <id>tag:underpantsgnome.com,2008-09-04:137</id>
    <published>2008-09-04T01:54:00Z</published>
    <updated>2008-09-04T01:55:51Z</updated>
    <category term="Ruby"/>
    <link href="http://underpantsgnome.com/2008/9/4/gemtools-updates" rel="alternate" type="text/html"/>
    <title>GemTools updates</title>
<content type="html">
            &lt;p&gt;So I found that I had borked the binary at some point. That&#8217;s what I get for not having the tests in yet. I fixed that in 0.0.3.&lt;/p&gt;


	&lt;p&gt;I just added a setup command that will create a gems.yml stub in a new project.&lt;/p&gt;
          </content>  </entry>
</feed>
