rspec view spec and dealing with current_user

Posted: March 30th, 2012 | Author: | Filed under: ruby | Tags: , , | No Comments »

I was trying to learn about view specs since doing everything in Cucumber has been considered to be a bit of overkill recently. I was looking for a solution to deal with current_user and this is what I’m using.

items/show.html.haml

show.html_spec.rb


vim config

Posted: March 24th, 2012 | Author: | Filed under: ruby | Tags: , | No Comments »

I’ve been working on a project which has a really nice set of vim plugins with a decent configuration. I’ve been trying to send in a few patches but it was a bit of a pain to use mine but keep it updated with the main repo. A bit of searching gave me a nice setup.

This clones my fork and also adds the parent as the upstream remote.

Now if you add this to your .gitconfig you can do an easy git pu to pull in changes from both branches.

Thanks
http://gitready.com/intermediate/2009/02/12/easily-fetching-upstream-changes.html


Vim + Ruby + CommandT = win

Posted: March 22nd, 2012 | Author: | Filed under: ruby, web | Tags: , | No Comments »

So I’ve been trying to get vim working on my macbook with the command-t plugin for file searching. I spent quite a while trying to get it working a while ago and finally did a really simple thing and it just worked.

I’m using rbenv with ruby 1.9.3-p125 as my main ruby, but you need to make sure that you compile command-t against whatever ruby vim as compiled with. The homebrew-dupes forumla uses the system ruby (which lives at /usr/bin/ruby) and even if you have rbenv global set to another ruby, you can always directly use the system ruby.

Thanks to:
https://github.com/Casecommons/vim-config
https://github.com/Casecommons/casecommons_workstation/blob/master/recipes/vim.rb