vagrant
https://github.com/mitchellh/vagrant
Ruby
Vagrant is a tool for building and distributing development environments.
Vagrant::Util::Which.which
Cross-platform way of finding an executable in the PATH.
which('ruby') #=> /usr/bin/ruby
This code is adapted from the following post by mislav:
http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-rubyEdit
git clone [email protected]:mitchellh/vagrant.git
cd vagrant
open lib/vagrant/util/which.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Vagrant--Util--Which-which-for-pr
# Commit to gitgit add lib/vagrant/util/which.rbgit commit -m "better docs for Vagrant::Util::Which.which"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Vagrant--Util--Which-which-for-pr
hub pull-request
# Celebrate!