<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>just in ram</title>
	<atom:link href="http://justinram.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://justinram.wordpress.com</link>
	<description>A list of stuff I should remember but never do</description>
	<lastBuildDate>Thu, 18 Aug 2011 23:50:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='justinram.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>just in ram</title>
		<link>http://justinram.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://justinram.wordpress.com/osd.xml" title="just in ram" />
	<atom:link rel='hub' href='http://justinram.wordpress.com/?pushpress=hub'/>
		<item>
		<title>My first Redcar plugin</title>
		<link>http://justinram.wordpress.com/2011/08/19/my-first-redcar-plugin/</link>
		<comments>http://justinram.wordpress.com/2011/08/19/my-first-redcar-plugin/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 23:04:35 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/?p=545</guid>
		<description><![CDATA[As a small thank you to the Redcar team for such a great editor and in the spirit of giving a little bit back I&#8217;m documenting the process of creating my first plugin. Introduction I really like the idea of the Redcar editor. Its written in Ruby, its possible to write your own plugins what&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=545&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As a small thank you to the <a href="http://redcareditor.com/" title="Redcar" target="_blank">Redcar</a> team for such a great editor and in the spirit of giving a little bit back I&#8217;m documenting the process of creating my first plugin.</p>
<h4>Introduction</h4>
<p>I really like the idea of the <a href="http://redcareditor.com/" title="Redcar" target="_blank">Redcar</a> editor. Its written in Ruby, its possible to write your own plugins what&#8217;s not to like? Though I must confess I don&#8217;t use it as my day to day editor, I wonder if writing my own plugins will change that.</p>
<p>Let see how easy it is to write a plugin for <a href="http://redcareditor.com/" title="Redcar" target="_blank">Redcar</a>.</p>
<h4>What&#8217;s da big idea</h4>
<p>The idea for my first plugin is rather ambitious considering I&#8217;ve no idea how to write a plugin. I&#8217;d like to replicate some of the functionality of <a href="http://livereload.com/" target="_blank">Live Reload</a> &#8211; basically refresh a browser web page whenever I save a file in Redcar. This will save me constantly hitting refresh in the browser when working with <a href="http://documentcloud.github.com/backbone/" target="_blank">Backbone.js</a>.</p>
<p>I&#8217;m hoping to trap the save event of <a href="http://redcareditor.com/" title="Redcar" target="_blank">Redcar</a> and call out to my browser (Chrome) and tell it to refresh the page.</p>
<h4>Install Redcar</h4>
<p>I first followed the install instructions:</p>
<p><a href="http://github.com/redcar/redcar/wiki/installation" target="_blank">http://github.com/redcar/redcar/wiki/installation</a></p>
<p>All good no problems there (I&#8217;m running on a Mac OSX 10.7.1)</p>
<h4>Plugin Guides</h4>
<p>I then read the plugin guides I found here:</p>
<ul>
<li><a href="http://simplic.it/blog/my-first-redcar-plugin.html" target="_blank">http://simplic.it/blog/my-first-redcar-plugin.html</a></li>
<li><a href="http://quickwebdesign.net/documents/20110710_redcar_plugins.pdf" target="_blank">http://quickwebdesign.net/documents/20110710_redcar_plugins.pdf</a></li>
</ul>
<h4>Plugin.rb</h4>
<p>Setting up a plugin is really easy and well described in the guides listed above. Redcar itself is made up of a bunch of plugin&#8217;s so there are no end of great examples to follow in the source code (<a href="http://github.com/redcar/redcar" target="_blank">http://github.com/redcar/redcar</a>)</p>
<p>For trapping the save event I dug into the source code and came across the method <strong>project_refresh_task_type</strong> which is called on all plugins after a save. To hook into this process my plugin simply defines the method:</p>
<p><code><br />
def self.project_refresh_task_type<br />
    RefreshBrowser<br />
end<br />
</code></p>
<p>This may not be the best place to hook into save, Redcar has the concept of events and that may be a better place to look but for now this is working.</p>
<h4>Browser refresh script</h4>
<p>RefreshBrowser is a Redcar::Task which I have created to run the browser refresh script.</p>
<p>I managed to find a script to refresh the browser here:</p>
<p><a href="http://brettterpstra.com/watch-for-file-changes-and-refresh-your-browser-automatically/">http://brettterpstra.com/watch-for-file-changes-and-refresh-your-browser-automatically/</a></p>
<p>The script uses a keyword to identify which tab to refresh in the browser so I needed this to be saved and configurable somewhere. Luckily Redcar has a storage mechanism built right in.</p>
<h4>Storage</h4>
<p>Redcar&#8217;s storage mechanism allows you to easily store configuration data into a yaml file. </p>
<p><code><br />
def storage<br />
	@storage ||= Plugin::Storage.new('live_reload_plugin')<br />
	@storage.set_default('keyword', '')<br />
	@storage<br />
end<br />
</code></p>
<p>Here I am using this mechanism to store the &#8216;keyword&#8217; used by the RefreshBrowser task. This allows the user to edit the yaml file via the Redcar plugin preferences. It&#8217;s also possible to setup a nice edit page but for now this will do.</p>
<h4>Source</h4>
<p>You can find the source for this plugin here:</p>
<p><a href="http://github.com/justinramel/redcar_plugin_live_reload" target="_blank">http://github.com/justinramel/redcar_plugin_live_reload</a></p>
<h4>Was it easy?</h4>
<p>YES! The Redcar team have done a great job and made it incredibly easy to create your own plugins. In a couple of hours I made a useful plugin, useful to me at least. I&#8217;ve spent more time fussing over this blog post than developing the plugin.</p>
<p>So what you waiting for? Go give it a try!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/545/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=545&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2011/08/19/my-first-redcar-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>
	</item>
		<item>
		<title>Upload files to Sharepoint from linux</title>
		<link>http://justinram.wordpress.com/2011/07/20/upload-files-to-sharepoint-from-linux/</link>
		<comments>http://justinram.wordpress.com/2011/07/20/upload-files-to-sharepoint-from-linux/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 18:19:55 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/?p=572</guid>
		<description><![CDATA[Fortress It seemed almost impossible to penetrate the fortress that is Sharepoint with only NTLM authentication enabled. Turns out its really easy when you know how. curl to the rescue! You can upload files using curl directly into Sharepoint via it&#8217;s HTTP PUT interface. curl --ntlm --user username:password --upload-file myfile.xls https://sharepointserver.com/sites/mysite/myfile.xls Told you, easy when [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=572&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Fortress</h4>
<p>It seemed almost impossible to penetrate the fortress that is Sharepoint with only NTLM authentication enabled. Turns out its really easy when you know how.</p>
<h4>curl to the rescue!</h4>
<p>You can upload files using curl directly into Sharepoint via it&#8217;s HTTP PUT interface.</p>
<p><code>curl --ntlm --user username:password --upload-file myfile.xls https://sharepointserver.com/sites/mysite/myfile.xls</code></p>
<p>Told you, easy when you know how.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/572/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/572/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=572&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2011/07/20/upload-files-to-sharepoint-from-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>
	</item>
		<item>
		<title>Shibboleth settings for TorqueBox</title>
		<link>http://justinram.wordpress.com/2011/07/16/shibboleth-settings-for-torquebox/</link>
		<comments>http://justinram.wordpress.com/2011/07/16/shibboleth-settings-for-torquebox/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 21:14:52 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[torquebox]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/?p=562</guid>
		<description><![CDATA[Authentication Settings Notes on setting up Shibboleth against an Apache Reverse Proxy to TorqueBox. Config File: /etc/httpd/conf.d/shib.conf ShibUseHeaders On AuthType shibboleth ShibRequestSetting requireSession 1 require valid-user The &#8216;ShibUseHeaders On&#8216; setting tells Shibboleth to pass along its attributes as request headers so your sinatra/rails application can gain access to them allowing you to implement your own [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=562&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Authentication Settings</h4>
<p>Notes on setting up Shibboleth against an Apache Reverse Proxy to TorqueBox.</p>
<p>Config File: /etc/httpd/conf.d/shib.conf</p>
<p><code>  ShibUseHeaders On<br />
  AuthType shibboleth<br />
  ShibRequestSetting requireSession 1<br />
  require valid-user<br />
</code></p>
<p>The &#8216;<code>ShibUseHeaders On</code>&#8216; setting tells Shibboleth to pass along its attributes as request headers so your sinatra/rails application can gain access to them allowing you to implement your own authorisation system.</p>
<h4>Simple Authorisation</h4>
<p>If you don&#8217;t need a complex authorisation system and you don&#8217;t mind users seeing a standard Shibboleth authorisation error page:</p>
<p><a href="http://justinram.files.wordpress.com/2011/07/shib1.png"><img src="http://justinram.files.wordpress.com/2011/07/shib1.png?w=300&#038;h=81" alt="" title="shib" width="300" height="81" class="alignnone size-medium wp-image-567" /></a></p>
<p>You can implement this via your Shibboleth settings using the require statement:</p>
<p><code>  ShibUseHeaders On<br />
  AuthType shibboleth<br />
  ShibRequestSetting requireSession 1<br />
  <strong>require grouper_groups ~ MySecurityGroup</strong><br />
</code></p>
<p>Here we require the custom grouper_groups attribute matches on the regular expression after the &#8216;<code>~</code>&#8216;. Basically to access the protected url the user must be a member of the MySecurityGroup.</p>
<h5>Top Tip</h5>
<p>When playing with your Shib settings don&#8217;t forget to restart httpd to see the affect.<br />
<code>sudo /sbin/service httpd restart</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/562/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=562&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2011/07/16/shibboleth-settings-for-torquebox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>

		<media:content url="http://justinram.files.wordpress.com/2011/07/shib1.png?w=300" medium="image">
			<media:title type="html">shib</media:title>
		</media:content>
	</item>
		<item>
		<title>Setup Apache Reverse Proxy to Torquebox</title>
		<link>http://justinram.wordpress.com/2011/07/16/setup-apache-reverse-proxy-to-torquebox/</link>
		<comments>http://justinram.wordpress.com/2011/07/16/setup-apache-reverse-proxy-to-torquebox/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 20:16:31 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[torquebox]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/?p=557</guid>
		<description><![CDATA[Setup Apache as a Reverse Proxy in front of a standalone Torquebox server. Apache Setup Proxy Module For this to work Apache must have the mod_proxy module loaded: http://httpd.apache.org/docs/2.1/mod/mod_proxy.html Config file: /etc/httpd/conf/httpd.conf ProxyRequests Off # Switch off forward proxy ProxyPreserveHost On # Pass host name onto the proxy ProxyPass /myapp http://localhost:8080/myapp/ # Map url to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=557&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Setup Apache as a Reverse Proxy in front of a standalone Torquebox server.</p>
<h4>Apache Setup</h4>
<h5>Proxy Module</h5>
<p>For this to work Apache must have the mod_proxy module loaded:</p>
<p><a href="http://httpd.apache.org/docs/2.1/mod/mod_proxy.html">http://httpd.apache.org/docs/2.1/mod/mod_proxy.html</a></p>
<p>Config file: /etc/httpd/conf/httpd.conf</p>
<p><code>ProxyRequests     Off 						   # Switch off forward proxy<br />
ProxyPreserveHost On 							   # Pass host name onto the proxy<br />
ProxyPass         /myapp http://localhost:8080/myapp/  # Map url to remote server<br />
ProxyPassReverse  /myapp http://localhost:8080/myapp/  # Adjust header sent from remote server to match url<br />
</code><br />
Here we are passing all calls to the /myapp/ url on to the Torquebox server http://localhost:8080/myapp/</p>
<h4>TorqueBox Setup</h4>
<p>In your Torquebox application folder create a file &#8216;config/torquebox.yml&#8217; which contains a context which matches the Apache reverse proxy url.</p>
<p>torquebox.yml</p>
<p>web:<br />
  context: /myapp<br />
ruby:<br />
  version: 1.9</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/557/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/557/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/557/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=557&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2011/07/16/setup-apache-reverse-proxy-to-torquebox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>
	</item>
		<item>
		<title>TorqueBox &#8211; gem install error</title>
		<link>http://justinram.wordpress.com/2011/07/14/torquebox-gem-install-error/</link>
		<comments>http://justinram.wordpress.com/2011/07/14/torquebox-gem-install-error/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 10:42:27 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[torquebox]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/?p=546</guid>
		<description><![CDATA[TorqueBox Install I&#8217;m playing with latest version of TorqueBox (Currently 2.x.incremental.245) the easiest way to install it is via a gem: gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/ Full details on the TorqueBox blog (http://torquebox.org/news/2011/06/10/torquebox-gem/). Error Anyhoose when doing the gem install on my dev server (CentOS 5.6) I got the error: Error: Your application used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=546&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>TorqueBox Install</h4>
<p>I&#8217;m playing with latest version of TorqueBox (<a href="http://torquebox.org/2x/builds/">Currently 2.x.incremental.245</a>) the easiest way to install it is via a gem:</p>
<p><code>gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/</code></p>
<p>Full details on the TorqueBox blog (<a href="http://torquebox.org/news/2011/06/10/torquebox-gem/">http://torquebox.org/news/2011/06/10/torquebox-gem/</a>).</p>
<h4>Error</h4>
<p>Anyhoose when doing the gem install on my dev server (CentOS 5.6) I got the error:</p>
<p>Error: Your application used more memory than the safety cap of 500m.<br />
Specify -J-Xmx####m to increase it (#### = cap size in MB).</p>
<h4>Fix</h4>
<p>After a bit digging around it turns out you need to set the heap size when running the gem install:</p>
<p><code>jruby -J-Xmx900m -S gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/</code></p>
<p>More details on <a href="http://stackoverflow.com/questions/1758374/error-your-application-used-more-memory-than-the-safety-cap-of-500m-specify-j">stackoverflow</a>.</p>
<p>Hope that helps someone or maybe me if have to do this again!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/546/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=546&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2011/07/14/torquebox-gem-install-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>
	</item>
		<item>
		<title>SETUP GIT REPO</title>
		<link>http://justinram.wordpress.com/2011/07/12/setup-git-repo/</link>
		<comments>http://justinram.wordpress.com/2011/07/12/setup-git-repo/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 19:48:22 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://justinram.wordpress.com/?p=526</guid>
		<description><![CDATA[ADDING KEY TO SERVER scp ~/.ssh/id_rsa.pub git@myserver.com:~/.ssh/authorized_keys SERVER sudo mkdir /home/git/myrepo cd /home/git/myrepo sudo git --bare init sudo chown -R git:git /home/git/myrepo CLIENT mkdir myrepo cd myrepo git init # add some files git add . git commit -m "added some files" git remote add origin git@myserver.com:myrepo git push origin master rm -r myrepo/ git [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=526&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>ADDING KEY TO SERVER</h4>
<p><code>scp ~/.ssh/id_rsa.pub git@myserver.com:~/.ssh/authorized_keys</code></p>
<h4>SERVER</h4>
<p><code>sudo mkdir /home/git/myrepo<br />
cd /home/git/myrepo<br />
sudo git --bare init<br />
sudo chown -R git:git /home/git/myrepo<br />
</code></p>
<h4>CLIENT</h4>
<p><code>mkdir myrepo<br />
cd myrepo<br />
git init</p>
<p># add some files</p>
<p>git add .<br />
git commit -m "added some files"</p>
<p>git remote add origin git@myserver.com:myrepo<br />
git push origin master</p>
<p>rm -r myrepo/<br />
git clone git@yourserver.com:myrepo<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/526/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=526&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2011/07/12/setup-git-repo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails new app workflow</title>
		<link>http://justinram.wordpress.com/2011/01/11/rails-new-app-workflow/</link>
		<comments>http://justinram.wordpress.com/2011/01/11/rails-new-app-workflow/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 13:58:47 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">https://justinram.wordpress.com/?p=517</guid>
		<description><![CDATA[These are the steps I take when creating a new Rails app, documented here for when I forget. Create app rails new &#60;app_name&#62; cd &#60;app_name&#62; git git init git add . git commit –m &#8216;Initial commit&#8217; Remember: Rails generates a .gitignore file for us. rvm and gemsets rvm gemset create &#60;app_name&#62; echo &#8216;rvm use 1.9.2@&#60;app_name&#62;&#8217; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=517&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These are the steps I take when creating a new Rails app, documented here for when I forget.</p>
<h4>Create app</h4>
<p><font face="Consolas">rails new &lt;app_name&gt;</font></p>
<p><font face="Consolas">cd &lt;app_name&gt;</font></p>
<h4>git</h4>
<p><font face="Consolas">git init</font></p>
<p><font face="Consolas">git add .</font></p>
<p><font face="Consolas">git commit –m &#8216;Initial commit&#8217;</font></p>
<p><strong>Remember</strong>: Rails generates a .gitignore file for us.</p>
<h4>rvm and gemsets</h4>
<p><font face="Consolas">rvm gemset create &lt;app_name&gt;</font></p>
<p><font face="Consolas">echo &#8216;rvm use </font><font face="Consolas">1.9.2@&lt;app_name</font><font face="Consolas">&gt;&#8217;</font> &gt;&gt; .rvmrc</a></p>
<p><font face="Consolas">echo &#8216;.rvmrc&#8217; &gt;&gt; .gitignore</font></p>
<p>Creates a .rvmrc file in current directory that way when you cd into this directory rvm automatically switches to the correct version of ruby and the gemset we just created. </p>
<p>Change in and out of the directory to get rvm to kick in:</p>
<p><font face="Consolas">cd ..</font></p>
<p><font face="Consolas">cd &lt;app_name&gt;</font></p>
<h4>Gemfile</h4>
<p>Edit ./Gemfile and add the following lines.</p>
<p><font face="Consolas">gem &#8216;haml&#8217;</font></p>
<p><font face="Consolas">group :test do</font></p>
<p><font face="Consolas">&#160;&#160;&#160; gem &#8216;rspec&#8217;</font></p>
<p><font face="Consolas">&#160;&#160;&#160; gem &#8216;rspec-rails&#8217;</font></p>
<p><font face="Consolas">end</font></p>
<p>Then install and run bundler:</p>
<p><font face="Consolas">gem install bundler</font></p>
<p><font face="Consolas">bundle install</font></p>
<h4>rspec</h4>
<p>Generate the rspec files:</p>
<p><font face="Consolas">rails g rspec:install</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/517/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/517/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/517/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/517/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/517/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/517/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/517/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/517/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/517/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/517/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/517/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/517/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/517/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/517/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=517&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2011/01/11/rails-new-app-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>
	</item>
		<item>
		<title>vim-ruby-refactoring &#8211; Extract Method</title>
		<link>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-extract-method/</link>
		<comments>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-extract-method/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 00:32:57 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[ruby vim refactoring vim-ruby-refactoring]]></category>

		<guid isPermaLink="false">https://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-extract-method/</guid>
		<description><![CDATA[This post is part of a series which documents the vim-ruby-refactoring plugin. IMPORTANT: As well as installing the vim-ruby-refactoring plugin, you must also install the matchit.vim plugin for this refactoring to work. Extract Method Extracts a selection into a method and places it above the current method. The refactoring: http://www.refactoring.com/catalog/extractMethod.html Example Before refactoring: Visually select [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=507&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is part of a <a href="http://justinram.wordpress.com/2010/12/30/vim-ruby-refactoring-series/">series</a> which documents the <a href="https://github.com/ecomba/vim-ruby-refactoring" target="_blank">vim-ruby-refactoring</a> plugin.</p>
<p><strong>IMPORTANT:</strong> As well as installing the <a href="https://github.com/ecomba/vim-ruby-refactoring" target="_blank">vim-ruby-refactoring</a> plugin, you must also install the <a href="http://www.vim.org/scripts/script.php?script_id=39" target="_blank">matchit.vim</a> plugin for this refactoring to work.</p>
<h4>Extract Method</h4>
<p>Extracts a selection into a method and places it above the current method.</p>
<p>The refactoring: <a title="http://www.refactoring.com/catalog/extractMethod.html" href="http://www.refactoring.com/catalog/extractMethod.html">http://www.refactoring.com/catalog/extractMethod.html</a></p>
<h4>Example</h4>
<p>Before refactoring:   <br /><a href="http://justinram.files.wordpress.com/2010/12/extractmethod_before.png"><img style="display:inline;" title="ExtractMethod_Before" alt="ExtractMethod_Before" src="http://justinram.files.wordpress.com/2010/12/extractmethod_before_thumb.png?w=640&#038;h=351" width="640" height="351" /></a>    <br />Visually select lines you wish to extract    <br />Hit your <strong>&lt;leader-key&gt;</strong> then type <strong>rem     <br /></strong>You will now see a prompt to enter the new method name:&#160; <br />Method name: print_details</p>
<p>After refactoring:   <br /><a href="http://justinram.files.wordpress.com/2010/12/extractmethod_after.png"><img style="display:inline;" title="ExtractMethod_After" alt="ExtractMethod_After" src="http://justinram.files.wordpress.com/2010/12/extractmethod_after_thumb.png?w=640&#038;h=351" width="640" height="351" /></a>    <br />A new method <strong><em>print_details</em></strong> has been added above the <strong>print_owing</strong> method containing the contents of the selected lines.</p>
<p><strong>rem</strong> is the default binding for this refactoring, think <strong>R</strong>efactor <strong>E</strong>xtract <strong>M</strong>ethod.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/507/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=507&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-extract-method/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>

		<media:content url="http://justinram.files.wordpress.com/2010/12/extractmethod_before_thumb.png" medium="image">
			<media:title type="html">ExtractMethod_Before</media:title>
		</media:content>

		<media:content url="http://justinram.files.wordpress.com/2010/12/extractmethod_after_thumb.png" medium="image">
			<media:title type="html">ExtractMethod_After</media:title>
		</media:content>
	</item>
		<item>
		<title>vim-ruby-refactoring &#8211; Rename Instance Variable</title>
		<link>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-instance-variable/</link>
		<comments>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-instance-variable/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 00:14:03 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[ruby vim refactoring vim-ruby-refactoring]]></category>

		<guid isPermaLink="false">https://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-instance-variable/</guid>
		<description><![CDATA[This post is part of a series which documents the vim-ruby-refactoring plugin. IMPORTANT: As well as installing the vim-ruby-refactoring plugin, you must also install the matchit.vim plugin for this refactoring to work. Rename Instance Variable Renames the selected instance variable. Example Before refactoring: Visually select the instance variable you wish to rename Hit your &#60;leader-key&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=502&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is part of a <a href="http://justinram.wordpress.com/2010/12/30/vim-ruby-refactoring-series/">series</a> which documents the <a href="https://github.com/ecomba/vim-ruby-refactoring" target="_blank">vim-ruby-refactoring</a> plugin.</p>
<p><strong>IMPORTANT:</strong> As well as installing the <a href="https://github.com/ecomba/vim-ruby-refactoring" target="_blank">vim-ruby-refactoring</a> plugin, you must also install the <a href="http://www.vim.org/scripts/script.php?script_id=39" target="_blank">matchit.vim</a> plugin for this refactoring to work.</p>
<h4>Rename Instance Variable</h4>
<p>Renames the selected instance variable. </p>
<h4>Example</h4>
<p>Before refactoring:   <br /><a href="http://justinram.files.wordpress.com/2010/12/renameinstancevar_before.png"><img style="display:inline;" title="RenameInstanceVar_Before" alt="RenameInstanceVar_Before" src="http://justinram.files.wordpress.com/2010/12/renameinstancevar_before_thumb.png?w=640&#038;h=351" width="640" height="351" /></a>    <br />Visually select the instance variable you wish to rename    <br />Hit your <strong>&lt;leader-key&gt;</strong> then type <strong>rriv      <br /></strong>You will now see a prompt to enter the new variable name:&#160; <br />Rename to: new_name</p>
<p>After refactoring:   <br /><a href="http://justinram.files.wordpress.com/2010/12/renameinstancevar_after.png"><img style="display:inline;" title="RenameInstanceVar_After" alt="RenameInstanceVar_After" src="http://justinram.files.wordpress.com/2010/12/renameinstancevar_after_thumb.png?w=640&#038;h=351" width="640" height="351" /></a>    <br />The instance variable <em><strong>@name</strong></em> has been renamed to <strong><em>@new_name</em></strong> in both locations within the class.</p>
<p><strong>rriv</strong> is the default binding for this refactoring, think <strong>R</strong>efactor <strong>R</strong>ename <strong>I</strong>nstance <strong>V</strong>ariable.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/502/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/502/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/502/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=502&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-instance-variable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>

		<media:content url="http://justinram.files.wordpress.com/2010/12/renameinstancevar_before_thumb.png" medium="image">
			<media:title type="html">RenameInstanceVar_Before</media:title>
		</media:content>

		<media:content url="http://justinram.files.wordpress.com/2010/12/renameinstancevar_after_thumb.png" medium="image">
			<media:title type="html">RenameInstanceVar_After</media:title>
		</media:content>
	</item>
		<item>
		<title>vim-ruby-refactoring &#8211; Rename Local Variable</title>
		<link>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-local-variable/</link>
		<comments>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-local-variable/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 23:59:58 +0000</pubDate>
		<dc:creator>justinram</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[ruby vim refactoring vim-ruby-refactoring]]></category>

		<guid isPermaLink="false">https://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-local-variable/</guid>
		<description><![CDATA[This post is part of a series which documents the vim-ruby-refactoring plugin. IMPORTANT: As well as installing the vim-ruby-refactoring plugin, you must also install the matchit.vim plugin for this refactoring to work. Rename Local Variable Renames the selected local variable. Example Before refactoring: Visually select the local variable you wish to rename Hit your &#60;leader-key&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=496&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is part of a <a href="http://justinram.wordpress.com/2010/12/30/vim-ruby-refactoring-series/">series</a> which documents the <a href="https://github.com/ecomba/vim-ruby-refactoring" target="_blank">vim-ruby-refactoring</a> plugin.</p>
<p><strong>IMPORTANT:</strong> As well as installing the <a href="https://github.com/ecomba/vim-ruby-refactoring" target="_blank">vim-ruby-refactoring</a> plugin, you must also install the <a href="http://www.vim.org/scripts/script.php?script_id=39" target="_blank">matchit.vim</a> plugin for this refactoring to work.</p>
<h4>Rename Local Variable</h4>
<p>Renames the selected local variable. </p>
<h4>Example</h4>
<p>Before refactoring:   <br /><a href="http://justinram.files.wordpress.com/2010/12/renamevar_before.png"><img style="display:inline;" title="RenameVar_Before" alt="RenameVar_Before" src="http://justinram.files.wordpress.com/2010/12/renamevar_before_thumb.png?w=640&#038;h=351" width="640" height="351" /></a>    <br />Visually select the local variable you wish to rename    <br />Hit your <strong>&lt;leader-key&gt;</strong> then type <strong>rrlv      <br /></strong>You will now see a prompt to enter the new variable name:&#160; <br />Rename to: is_mac_os</p>
<p>After refactoring:   <br /><a href="http://justinram.files.wordpress.com/2010/12/renamevar_after.png"><img style="display:inline;" title="RenameVar_After" alt="RenameVar_After" src="http://justinram.files.wordpress.com/2010/12/renamevar_after_thumb.png?w=640&#038;h=351" width="640" height="351" /></a>    <br />The local variable <em><strong>mac_os</strong></em> has been renamed to <strong><em>is_mac_os</em></strong> in both locations within the method.</p>
<p><strong>rrlv</strong> is the default binding for this refactoring, think <strong>R</strong>efactor <strong>R</strong>ename <strong>L</strong>ocal <strong>V</strong>ariable.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/justinram.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/justinram.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/justinram.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/justinram.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/justinram.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/justinram.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/justinram.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/justinram.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/justinram.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/justinram.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/justinram.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/justinram.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/justinram.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/justinram.wordpress.com/496/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=justinram.wordpress.com&amp;blog=119676&amp;post=496&amp;subd=justinram&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://justinram.wordpress.com/2010/12/31/vim-ruby-refactoring-rename-local-variable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">justinram</media:title>
		</media:content>

		<media:content url="http://justinram.files.wordpress.com/2010/12/renamevar_before_thumb.png" medium="image">
			<media:title type="html">RenameVar_Before</media:title>
		</media:content>

		<media:content url="http://justinram.files.wordpress.com/2010/12/renamevar_after_thumb.png" medium="image">
			<media:title type="html">RenameVar_After</media:title>
		</media:content>
	</item>
	</channel>
</rss>
