Created
April 18, 2011 18:06
-
-
Save epitron/925824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command "require", "Require gem(s)" do |*gems| | |
gems = gems.join(' ').gsub(',', '').split(/\s+/) | |
gems.each do |gem| | |
begin | |
if require gem | |
output.puts "#{gem.yellow} loaded" | |
else | |
output.puts "#{gem.white} already loaded" | |
end | |
rescue LoadError => e | |
output.puts "#{gem.red} not found" | |
# TODO: Prompt to install the gem! | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment