<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comentários sobre: Running Rspec files from VIM, showing the results in Firefox</title>
	<atom:link href="http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/</link>
	<description>Relatos de um programador em contínua aprendizagem.</description>
	<lastBuildDate>Sat, 28 Nov 2009 06:03:51 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Por: Run Rspec within vim and seeing result in your Firefox2 &#171; Dynamic and Concise</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-225</link>
		<dc:creator>Run Rspec within vim and seeing result in your Firefox2 &#171; Dynamic and Concise</dc:creator>
		<pubDate>Wed, 11 Mar 2009 19:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-225</guid>
		<description>[...] Rspec within vim and seeing result in your&#160;Firefox2  Thanks to cassiomarques, we can run rspec from within vim and see the results in [...]</description>
		<content:encoded><![CDATA[<p>[...] Rspec within vim and seeing result in your&nbsp;Firefox2  Thanks to cassiomarques, we can run rspec from within vim and see the results in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: cassiomarques</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-224</link>
		<dc:creator>cassiomarques</dc:creator>
		<pubDate>Mon, 09 Mar 2009 17:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-224</guid>
		<description>Nice!</description>
		<content:encoded><![CDATA[<p>Nice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Yi Wen</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-223</link>
		<dc:creator>Yi Wen</dc:creator>
		<pubDate>Mon, 09 Mar 2009 17:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-223</guid>
		<description>A little bit of improvement, which will show the error in FF. Just like what TextMate would do in this situation:


begin
  ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(argv, STDERR, STDOUT))
rescue Exception =&gt; e
  File.open(&quot;#{report_file}&quot;, &quot;w&quot;) do &#124;file&#124;
    file.write e
  end
end

</description>
		<content:encoded><![CDATA[<p>A little bit of improvement, which will show the error in FF. Just like what TextMate would do in this situation:</p>
<p>begin<br />
  ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(argv, STDERR, STDOUT))<br />
rescue Exception =&gt; e<br />
  File.open(&#8220;#{report_file}&#8221;, &#8220;w&#8221;) do |file|<br />
    file.write e<br />
  end<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: cassiomarques</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-220</link>
		<dc:creator>cassiomarques</dc:creator>
		<pubDate>Fri, 06 Mar 2009 19:32:54 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-220</guid>
		<description>The piece of Ruby code inside .vimrc has a line system(command). This line is the one that actually runs the script run_spec.rb
If run_spec.rb returns an error, the return value for the system method will be &quot;false&quot;, otherwise it&#039;l be &quot;true&quot;. We could use it and write something like this inside the .vimrc RunSpec() function:

print &quot;An error has occurred!&quot; unless system(command)</description>
		<content:encoded><![CDATA[<p>The piece of Ruby code inside .vimrc has a line system(command). This line is the one that actually runs the script run_spec.rb<br />
If run_spec.rb returns an error, the return value for the system method will be &#8220;false&#8221;, otherwise it&#8217;l be &#8220;true&#8221;. We could use it and write something like this inside the .vimrc RunSpec() function:</p>
<p>print &#8220;An error has occurred!&#8221; unless system(command)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Yi Wen</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-219</link>
		<dc:creator>Yi Wen</dc:creator>
		<pubDate>Fri, 06 Mar 2009 15:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-219</guid>
		<description>yeah</description>
		<content:encoded><![CDATA[<p>yeah</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: cassiomarques</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-218</link>
		<dc:creator>cassiomarques</dc:creator>
		<pubDate>Fri, 06 Mar 2009 15:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-218</guid>
		<description>Did u mean display an error message in Vim?</description>
		<content:encoded><![CDATA[<p>Did u mean display an error message in Vim?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Yi Wen</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-217</link>
		<dc:creator>Yi Wen</dc:creator>
		<pubDate>Fri, 06 Mar 2009 15:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-217</guid>
		<description>I know I am asking too much. But if, let&#039;s say, the file under test has a grammar error. The run will just silently fail (since the html file has not been not generated yet). Is there a way to display error message?</description>
		<content:encoded><![CDATA[<p>I know I am asking too much. But if, let&#8217;s say, the file under test has a grammar error. The run will just silently fail (since the html file has not been not generated yet). Is there a way to display error message?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: cassiomarques</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-216</link>
		<dc:creator>cassiomarques</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:50:27 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-216</guid>
		<description>@Yi Wen,

Glad to know it worked! Now we&#039;ll just have to wait for the FF3 bug fix :)</description>
		<content:encoded><![CDATA[<p>@Yi Wen,</p>
<p>Glad to know it worked! Now we&#8217;ll just have to wait for the FF3 bug fix :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Yi Wen</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-215</link>
		<dc:creator>Yi Wen</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:41:33 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-215</guid>
		<description>I downloaded FF2, installed mozex on it. replace regex in open_vim with /vim:\/\/(.+)\?(\d+)/, and it works just great. Now the last great thing about TextMate is ported to vim :)</description>
		<content:encoded><![CDATA[<p>I downloaded FF2, installed mozex on it. replace regex in open_vim with /vim:\/\/(.+)\?(\d+)/, and it works just great. Now the last great thing about TextMate is ported to vim :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Yi Wen</title>
		<link>http://cassiomarques.wordpress.com/2009/01/09/running-rspec-files-from-vim-showing-the-results-in-firefox/#comment-214</link>
		<dc:creator>Yi Wen</dc:creator>
		<pubDate>Fri, 06 Mar 2009 05:03:44 +0000</pubDate>
		<guid isPermaLink="false">http://cassiomarques.wordpress.com/?p=192#comment-214</guid>
		<description>I tried mozex plugin. And it seems be able to actually the external app using its &quot;Universal&quot; handler. But I got the error message like this:
mozex error: universal command: cannot run executable &#039;/Applications/MacVim.app&#039; (args: file:///Users/ywen/.vim/bin/run_rspec.rb?37): [Exception... &quot;Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProcess.init]&quot;  nsresult: &quot;0x80004005 (NS_ERROR_FAILURE)&quot;  location: &quot;JS frame :: chrome://mozex/content/mozex.js :: mozexRunProgram :: line 1026&quot;  data: no]

JS frame :: chrome://mozex/content/mozex.js :: mozexError :: line 1358
JS frame :: chrome://mozex/content/mozex.js :: mozexRunProgram :: line 1031
JS frame :: chrome://mozex/content/mozex.js :: mozexHandleMouseDown :: line 370</description>
		<content:encoded><![CDATA[<p>I tried mozex plugin. And it seems be able to actually the external app using its &#8220;Universal&#8221; handler. But I got the error message like this:<br />
mozex error: universal command: cannot run executable &#8216;/Applications/MacVim.app&#8217; (args: file:///Users/ywen/.vim/bin/run_rspec.rb?37): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProcess.init]&#8221;  nsresult: &#8220;0&#215;80004005 (NS_ERROR_FAILURE)&#8221;  location: &#8220;JS frame :: chrome://mozex/content/mozex.js :: mozexRunProgram :: line 1026&#8243;  data: no]</p>
<p>JS frame :: chrome://mozex/content/mozex.js :: mozexError :: line 1358<br />
JS frame :: chrome://mozex/content/mozex.js :: mozexRunProgram :: line 1031<br />
JS frame :: chrome://mozex/content/mozex.js :: mozexHandleMouseDown :: line 370</p>
]]></content:encoded>
	</item>
</channel>
</rss>
