<?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>An Experiment in Bloggery &#187; Ruby</title>
	<atom:link href="http://kevin.sb.org/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevin.sb.org</link>
	<description>The occasional view into my life</description>
	<lastBuildDate>Fri, 09 Sep 2011 00:19:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Guarding against `‌` and Kernel#system() in your tests</title>
		<link>http://kevin.sb.org/2008/05/14/guarding-against-shelling-out-in-your-tests/</link>
		<comments>http://kevin.sb.org/2008/05/14/guarding-against-shelling-out-in-your-tests/#comments</comments>
		<pubDate>Wed, 14 May 2008 08:35:34 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://kevin.sb.org/?p=154</guid>
		<description><![CDATA[Update: I've refactored the code significantly and introduced the ability to explicitly unguard methods from within specs. One problem I find myself having when writing tests is ensuring that no execution ever leaves my little test sandbox. For example, when writing tests for github-gem I keep looking through the code to find every place a [...]]]></description>
			<content:encoded><![CDATA[<p><b>Update:</b> I've refactored the code significantly and introduced the ability to explicitly unguard methods from within specs.</p>
<p>One problem I find myself having when writing tests is ensuring that no execution ever leaves my little test sandbox. For example, when writing tests for <a href="http://github.com/kballard/github-gem">github-gem</a> I keep looking through the code to find every place a function ends up `shelling out` and it's tiresome and error-prone. I finally decided I was going about this backwards. Testing is supposed to find problems for me, right? So why not raise an error whenever `` or Kernel#system() is called and let the tests tell me what else I need to mock?</p>
<p>Put the following code in your spec_helper.rb file and an exception will be raised whenever `` or Kernel#system() is called during a test:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#9966CC; font-weight:bold;">Module</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> metaclass
    <span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#0000FF; font-weight:bold;">self</span>;self;end
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">module</span> <span style="color:#6666ff; font-weight:bold;">Spec::Example::ExampleGroupSubclassMethods</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> add_guard<span style="color:#006600; font-weight:bold;">&#40;</span>klass, name, is_class = <span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    guarded = <span style="color:#0000FF; font-weight:bold;">nil</span> <span style="color:#008000; font-style:italic;"># define variable now for scoping</span>
    target = <span style="color:#006600; font-weight:bold;">&#40;</span>is_class ? klass.<span style="color:#9900CC;">metaclass</span> : klass<span style="color:#006600; font-weight:bold;">&#41;</span>
    sep = <span style="color:#006600; font-weight:bold;">&#40;</span>is_class ? <span style="color:#996600;">&quot;.&quot;</span> : <span style="color:#996600;">&quot;#&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    target.<span style="color:#9900CC;">class_eval</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      guarded = instance_method<span style="color:#006600; font-weight:bold;">&#40;</span>name<span style="color:#006600; font-weight:bold;">&#41;</span>
      define_method name <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|*</span>args<span style="color:#006600; font-weight:bold;">|</span>
        <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#996600;">&quot;Testing guards violated: Cannot call #{klass}#{sep}#{name}&quot;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#0066ff; font-weight:bold;">@guards</span> <span style="color:#006600; font-weight:bold;">||</span>= <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#0066ff; font-weight:bold;">@guards</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>klass, name, is_class, guarded<span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> add_class_guard<span style="color:#006600; font-weight:bold;">&#40;</span>klass, name<span style="color:#006600; font-weight:bold;">&#41;</span>
    add_guard<span style="color:#006600; font-weight:bold;">&#40;</span>klass, name, <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> unguard<span style="color:#006600; font-weight:bold;">&#40;</span>klass, name, is_class = <span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    row = <span style="color:#0066ff; font-weight:bold;">@guards</span>.<span style="color:#9900CC;">find</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span><span style="color:#006600; font-weight:bold;">&#40;</span>k,n,i<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">|</span> k == klass <span style="color:#9966CC; font-weight:bold;">and</span> n == name <span style="color:#9966CC; font-weight:bold;">and</span> i == is_class <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#996600;">&quot;#{klass}#{is_class ? '.' : '#'}#{name} is not guarded&quot;</span> <span style="color:#9966CC; font-weight:bold;">if</span> row.<span style="color:#0000FF; font-weight:bold;">nil</span>?
    <span style="color:#006600; font-weight:bold;">&#40;</span>is_class ? klass.<span style="color:#9900CC;">metaclass</span> : klass<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">class_eval</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      define_method name, row.<span style="color:#9900CC;">last</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#0066ff; font-weight:bold;">@guards</span>.<span style="color:#9900CC;">delete</span> row
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> class_unguard<span style="color:#006600; font-weight:bold;">&#40;</span>klass, name<span style="color:#006600; font-weight:bold;">&#41;</span>
    unguard<span style="color:#006600; font-weight:bold;">&#40;</span>klass, name, <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> unguard_all
    <span style="color:#0066ff; font-weight:bold;">@guards</span> <span style="color:#006600; font-weight:bold;">||</span>= <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#0066ff; font-weight:bold;">@guards</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>klass, name, is_class, guarded<span style="color:#006600; font-weight:bold;">|</span>
      <span style="color:#006600; font-weight:bold;">&#40;</span>is_class ? klass.<span style="color:#9900CC;">metaclass</span> : klass<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">class_eval</span> <span style="color:#9966CC; font-weight:bold;">do</span>
        define_method name, guarded
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#0066ff; font-weight:bold;">@guards</span>.<span style="color:#9900CC;">clear</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#6666ff; font-weight:bold;">Spec::Runner</span>.<span style="color:#9900CC;">configure</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>configuration<span style="color:#006600; font-weight:bold;">|</span>
  configuration.<span style="color:#9900CC;">prepend_before</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9966CC; font-weight:bold;">class</span>.<span style="color:#9900CC;">send</span> :<span style="color:#9966CC; font-weight:bold;">include</span>, <span style="color:#6666ff; font-weight:bold;">Spec::Example::ExampleGroupSubclassMethods</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  configuration.<span style="color:#9900CC;">prepend_before</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:each</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    add_guard <span style="color:#CC00FF; font-weight:bold;">Kernel</span>, :<span style="color:#996600;">'`'</span>
    add_guard <span style="color:#CC00FF; font-weight:bold;">Kernel</span>, :<span style="color:#CC0066; font-weight:bold;">system</span>
    add_class_guard <span style="color:#CC00FF; font-weight:bold;">Process</span>, :<span style="color:#CC0066; font-weight:bold;">fork</span>
    add_class_guard Open3, <span style="color:#ff3333; font-weight:bold;">:popen3</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">defined</span>? Open3
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  configuration.<span style="color:#9900CC;">append_after</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:each</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    unguard_all
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Note: if you want, you can write <code style="color:#996600">:`</code> instead of <code style="color:#996600">:'`'</code>, but my syntax highlighter here doesn't like that.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2008/05/14/guarding-against-shelling-out-in-your-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back from the grave</title>
		<link>http://kevin.sb.org/2008/03/09/back-from-the-grave/</link>
		<comments>http://kevin.sb.org/2008/03/09/back-from-the-grave/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 19:14:30 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[typo]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://kevin.sb.org/2008/03/09/back-from-the-grave/</guid>
		<description><![CDATA[Well, after about 5 hours of hacking, I got a ruby script together to migrate all my data from Typo 4.11 to WordPress, so the site is back from the dead, and now running on an engine that DreamHost is actually happy with. Update: The conversion script is now available at GitHub.]]></description>
			<content:encoded><![CDATA[<p>Well, after about 5 hours of hacking, I got a ruby script together to migrate all my data from Typo 4.11 to WordPress, so the site is back from the dead, and now running on an engine that DreamHost is actually happy with.</p>

<p><strong>Update</strong>: The conversion script is now available at <a href="http://github.com/kballard/typo-wordpress/">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2008/03/09/back-from-the-grave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Haml: A new markup format for Rails</title>
		<link>http://kevin.sb.org/2007/01/19/haml-a-new-markup-format-for-rails/</link>
		<comments>http://kevin.sb.org/2007/01/19/haml-a-new-markup-format-for-rails/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 07:38:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Haml]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://bb44e772-6a69-431f-8024-0b7918fd09d1</guid>
		<description><![CDATA[Haml is a new markup format for Ruby on Rails apps that just hit 1.0. At first glance it looks pretty odd, but it turns out to be really easy to write in, and it&#8217;s shorter and, actually, easier to read than the equivalent eRB. I think I&#8217;m going to convert Typo to use Haml [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://haml.hamptoncatlin.com/">Haml</a> is a new markup format for Ruby on Rails apps that just hit 1.0. At first glance
it looks pretty odd, but it turns out to be really easy to write in, and it&#8217;s shorter and,
actually, easier to read than the equivalent eRB.</p>

<p>I think I&#8217;m going to convert <a href="http://www.typosphere.org">Typo</a> to use <a href="http://haml.hamptoncatlin.com/">Haml</a> for all its templates. I already did Azure&#8217;s layout
file and it was pretty simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2007/01/19/haml-a-new-markup-format-for-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Typo 4.0 is out</title>
		<link>http://kevin.sb.org/2006/07/23/typo-4-0-is-out/</link>
		<comments>http://kevin.sb.org/2006/07/23/typo-4-0-is-out/#comments</comments>
		<pubDate>Sun, 23 Jul 2006 04:15:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[typo]]></category>

		<guid isPermaLink="false">http://04c0fc07-e4f6-4bfe-aa5c-76b5eb28984d</guid>
		<description><![CDATA[Typo 4.0 is out! Many thanks to Scott Laird for his wonderful work on Akismet support and the new gem installer.]]></description>
			<content:encoded><![CDATA[<p><a href="http://scottstuff.net/blog/articles/2006/07/22/typo-4-0-0">Typo 4.0</a> is out! Many thanks to <a href="http://www.scottstuff.net">Scott Laird</a> for his wonderful work on <a href="http://www.akismet.com">Akismet</a> support and the new gem installer.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2006/07/23/typo-4-0-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nearing 4.0</title>
		<link>http://kevin.sb.org/2006/04/13/nearing-4-0/</link>
		<comments>http://kevin.sb.org/2006/04/13/nearing-4-0/#comments</comments>
		<pubDate>Thu, 13 Apr 2006 05:27:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[milestone]]></category>
		<category><![CDATA[slaird]]></category>
		<category><![CDATA[ticket]]></category>
		<category><![CDATA[typo]]></category>

		<guid isPermaLink="false">http://321f144e-6fc8-440e-bf47-75624c365d02</guid>
		<description><![CDATA[Well, it looks like we&#8217;re almost at the 4.0 milestone for Typo. Tonight I knocked off 7 tickets (a couple just got re-categorized, but others got fixed/closed). Now there&#8217;s just 1 left, and it&#8217;s slaird&#8217;s responsibility. Unfortunately I have no idea what the time frame is on finishing it. In any case, I&#8217;ll be pushing [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it looks like we&#8217;re almost at the 4.0 milestone for <a href="http://www.typosphere.org">Typo</a>. Tonight I knocked off 7 tickets (a couple just got re-categorized, but others got fixed/closed). Now there&#8217;s just 1 left, and it&#8217;s <a href="http://scottstuff.net/blog/">slaird</a>&#8217;s responsibility. Unfortunately I have no idea what the time frame is on finishing it.</p>

<p>In any case, I&#8217;ll be pushing to get 4.0 out the door as soon as possible.</p>

<p>BTW, anybody currently on trunk and Rails 1.1, I <em>highly</em> encourage you to upgrade to HEAD. Why? Because I squelched the exceedingly verbose logging of sidebar rendering (in a quick test, a single sidebar rendered on the front page shoved 70k into the log file). It&#8217;s a fairly ugly hack, but it&#8217;ll save you from having to wipe your logs every week.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2006/04/13/nearing-4-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 1.1 and Typo</title>
		<link>http://kevin.sb.org/2006/03/28/rails-1-1-and-typo/</link>
		<comments>http://kevin.sb.org/2006/03/28/rails-1-1-and-typo/#comments</comments>
		<pubDate>Tue, 28 Mar 2006 05:09:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[typo]]></category>

		<guid isPermaLink="false">http://4d6d45b0-5163-4798-942f-adfc39d48b55</guid>
		<description><![CDATA[Well, Rails 1.1 is out now. And that is a problem for Typo. See, when we tried running it under Rails 1.1rc1 we discovered that this new version of Rails has certain problems with components. Basically, Rails isn&#8217;t setting up the component namespaces that we&#8217;re expecting it to. I guess this is what I&#8217;ll be [...]]]></description>
			<content:encoded><![CDATA[<p>Well, <a href="http://weblog.rubyonrails.com/articles/2006/03/28/rails-1-1-rjs-active-record-respond_to-integration-tests-and-500-other-things">Rails 1.1</a> is out now. And that is a problem for <a href="http://www.typosphere.org">Typo</a>. See, when we tried running it under Rails 1.1rc1 we discovered that this new version of Rails has certain problems with components. Basically, Rails isn&#8217;t setting up the component namespaces that we&#8217;re expecting it to. I guess this is what I&#8217;ll be spending tomorrow evening hammering on.</p>

<p><strong>Update:</strong> As of 10:57 AM this morning, Typo <a href="http://typosphere.org/trac/wiki/DownloadCurrent">trunk</a> now supports Rails 1.1 (and should work with Rails 1.0 too).</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2006/03/28/rails-1-1-and-typo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graph of all Universal Type Identifiers</title>
		<link>http://kevin.sb.org/2006/03/16/graph-of-all-universal-type-identifiers/</link>
		<comments>http://kevin.sb.org/2006/03/16/graph-of-all-universal-type-identifiers/#comments</comments>
		<pubDate>Thu, 16 Mar 2006 05:49:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[graphviz]]></category>
		<category><![CDATA[omnigraffle]]></category>
		<category><![CDATA[omnigroup]]></category>
		<category><![CDATA[uti]]></category>

		<guid isPermaLink="false">http://027e741c-76ad-4944-a757-17f86390c98e</guid>
		<description><![CDATA[After a couple hours of hacking I managed to come up with a ruby script that generated a GraphViz dot file that describes all of the Universal Type Identifiers on the system. I&#8217;ll release it later once I make it a bit more usable, but right now I have a dot file to hand out. [...]]]></description>
			<content:encoded><![CDATA[<p>After a couple hours of hacking I managed to come up with a ruby script that generated a <a href="http://www.graphviz.org/">GraphViz</a> dot file that describes all of the Universal Type Identifiers on the system. I&#8217;ll release it later once I make it a bit more usable, but right now I have a dot file to hand out. If you don&#8217;t have <a href="http://www.graphviz.org/">GraphViz</a> installed you can download the <a href="http://www.pixelglow.com/graphviz/">dmg</a>, or you can use <a href="http://www.omnigroup.com">OmniGraffle</a>. Just open up the file in Graphviz.app or OmniGraffle.app - note however, that OmniGraffle seems to screw up the border and widths of all the nodes, so if you don&#8217;t have a registered version (and thus cannot edit the file), you should stick with Graphviz.</p>

<p>Download: <a href="/files/utigraph.zip">utigraph.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2006/03/16/graph-of-all-universal-type-identifiers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX on Rails</title>
		<link>http://kevin.sb.org/2006/01/15/ajax-on-rails/</link>
		<comments>http://kevin.sb.org/2006/01/15/ajax-on-rails/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 19:49:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[typo]]></category>

		<guid isPermaLink="false">http://4c888bee-7866-4d37-90b7-57829cbf2786</guid>
		<description><![CDATA[Just a quick post about AJAX on Rails, to test out my latest feature, which is Lightbox support for Typo: If you click that and it doesn&#8217;t overlay the image on top of the current page, then you&#8217;ve run into a bug in Safari that I&#8217;m trying to figure out the cause of. Grrrrr. The [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post about AJAX on Rails, to test out my latest feature, which is Lightbox support for Typo:</p>

<p><typo:lightbox img="19608403" thumbsize="small" displaysize="medium" /></p>

<p><strike>If you click that and it doesn&#8217;t overlay the image on top of the current page, then you&#8217;ve run into a bug in Safari that I&#8217;m trying to figure out the cause of. Grrrrr.</strike>
The bug has been worked around.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2006/01/15/ajax-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSS feed for crash reports</title>
		<link>http://kevin.sb.org/2006/01/05/rss-feed-for-crash-reports/</link>
		<comments>http://kevin.sb.org/2006/01/05/rss-feed-for-crash-reports/#comments</comments>
		<pubDate>Fri, 06 Jan 2006 02:04:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[crashreporter]]></category>
		<category><![CDATA[NetNewsWire]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://1391d297-5838-43c6-b81c-2a24d0caca2d</guid>
		<description><![CDATA[Inspired by a script mentioned on ranchero.com, I wrote a ruby script that generates an RSS feed for all the Crash Reporter logs on your machine. Just create a New Special Subscription in NetNewsWire, point it at the script, and you&#8217;re all set.]]></description>
			<content:encoded><![CDATA[<p>Inspired by a script <a href="http://ranchero.com/?comments=1&#038;postid=1248">mentioned</a> on <a href="http://ranchero.com">ranchero.com</a>, I wrote a ruby <a href="/files/showcrashreports.rb">script</a> that generates an RSS feed for all the Crash Reporter logs on your machine. Just create a New Special Subscription in <a href="http://ranchero.com/netnewswire/">NetNewsWire</a>, point it at the script, and you&#8217;re all set.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2006/01/05/rss-feed-for-crash-reports/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>MouseHole and JavaScript</title>
		<link>http://kevin.sb.org/2005/09/03/mousehole-and-javascript/</link>
		<comments>http://kevin.sb.org/2005/09/03/mousehole-and-javascript/#comments</comments>
		<pubDate>Sun, 04 Sep 2005 03:23:00 +0000</pubDate>
		<dc:creator>Kevin Ballard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mousehole]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://3d5d900f9c832f5b8654d85fc336d39c</guid>
		<description><![CDATA[So why has been talking about MouseHole lately. If you&#8217;re unaware, MouseHole is a ruby script that acts as a web proxy and filters HTML documents via ruby scripts. Or for a much better look at it, go look at what why wrote. Anyway, I wanted a way to do JavaScript cross-site AJAX tricks, like [...]]]></description>
			<content:encoded><![CDATA[<p>So <a href="http://www.whytheluckystiff.net">why</a> has been <a href="http://redhanded.hobix.com/inspect/mousehole11InPlainView.html">talking</a> about <a href="http://mousehole.rubyforge.org">MouseHole</a> lately. If you&#8217;re unaware, <a href="http://mousehole.rubyforge.org">MouseHole</a> is a ruby script that acts as a web proxy and filters HTML documents via ruby scripts. Or for a much better look at it, go look at what why <a href="http://redhanded.hobix.com/inspect/mousehole11InPlainView.html">wrote</a>.</p>

<p>Anyway, I wanted a way to do JavaScript cross-site AJAX tricks, like what <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a> enables. Unfortunately, because <a href="http://mousehole.rubyforge.org">MouseHole</a> is a pre-processor, not a JavaScript extension, it&#8217;s not possible. So I spent a few hours and wrote a way for <a href="http://mousehole.rubyforge.org">MouseHole</a> scripts to provide content that doesn&#8217;t actually exist (as opposed to mutating existing content). This way JavaScript can do an AJAX call within the same domain (so it doesn&#8217;t hit the security limitations) but that call is intercepted by your script, so you could pull info from other sites and send it back, or whatever you wish.</p>

<p>I haven&#8217;t actually done anything with this new capability yet aside from a rather silly example script which simply adds a button to Google that asks MouseHole for a random number. I&#8217;d really like to extend <a href="http://maps.google.com">Google Maps</a>, but that will require delving into how it works, and it&#8217;s far too late to do that now, as I need to get to bed.</p>

<p>Anyhow, I put together a patch and sent it to the MouseHole Scripters mailing list. If you check out MouseHole from the CVS <a href="http://www.rubyforge.org/projects/mousehole">repository</a>, you can apply my <a href="/files/mousehole-1.patch">patch</a> and test it. Or you can just wait to see if it gets added to <a href="http://mousehole.rubyforge.org">MouseHole</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevin.sb.org/2005/09/03/mousehole-and-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
