Created
July 21, 2011 22:16
-
-
Save acook/1098370 to your computer and use it in GitHub Desktop.
Only use certain gems in a Gemfile if they are already installed, otherwise ignore them.
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
# In some development environments, different developers have different needs | |
# and prefer to use different development gems. Now since Gemfiles are Just Ruby, | |
# it's pretty easy to work around the different environments. | |
#################################################################################### | |
# to use: | |
# 1) put the following code into your Gemfile | |
# 2) change the `optional_development_gems` array to your custom list | |
# 3) install none, any, or all of the gems in that list | |
# 4) export custom_gems=enabled | |
# 5) bundle install | |
if ENV['custom_gems'] == 'enabled' then | |
optional_development_gems = %w{wirble autotest autotest-rails autotest-fsevent autotest-growl term-ansicolor} | |
optional_development_gems.each do |g| | |
gem(g) if Gem::Specification.find_by_name(g | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for the new version of Gem (1.8.8).