Created
April 24, 2009 13:24
-
-
Save jqr/101101 to your computer and use it in GitHub Desktop.
Automatically Generate the Heroku gems manifest from gem dependencies
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
namespace :heroku do | |
desc "Generate the Heroku gems manifest from gem dependencies" | |
task :gems do | |
RAILS_ENV='production' | |
Rake::Task[:environment].invoke | |
list = Rails.configuration.gems.collect do |g| | |
command, *options = g.send(:install_command) | |
options.join(" ") + "\n" | |
end | |
File.open(File.join(RAILS_ROOT, '.gems'), 'w') do |f| | |
f.write(list) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment