Bundler has had requests for search capabilities. Rule #2 of the Unix Philosophy is make each program do one thing well. The Silver Searcher is my current favorite searching tool. Its replaced grep and ack for all my code searching. Following rule #2, we don’t need bundler to search for us, we just need to compose it together with the best search tool.
Its a simple idea. Jim Gay wrote about it. I thought it was brilliant. I created an alias to make it easy to use:
Now, inside a project I can run ‘bs user’ to search for the word ‘user’ within all the gems included in my project. Is this fast? Yes! Inside a Spree sandbox - which has 81 gem dependencies - I can search for a common word like ‘user’ in 3.339s.
Thanks for the idea Jim!