Created
January 16, 2010 03:45
-
-
Save eric1234/278631 to your computer and use it in GitHub Desktop.
Will generate a heroku gem manifest from the rails app itself. Ideal as a sake task.
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
| desc "Generate Heroku gems manifest from environment.rb" | |
| task 'heroku:gems:manifest' do | |
| manifest = nil | |
| IO.popen('-') do |io| | |
| if io | |
| manifest = io.read | |
| else | |
| system 'script/runner', %q{ | |
| out = Rails.configuration.gems.collect do |gem| | |
| gem.send(:install_command)[1..-1] * " " | |
| end * "\n" | |
| puts out | |
| } | |
| end | |
| end | |
| File.open('.gems', 'w') {|f| f << manifest} | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment