Permalink
Browse files

add heroku:dotgems

  • Loading branch information...
1 parent 3974fab commit 68a465c33d13f8ab84f738df2e9587eb7f9d8ce9 @bleything committed Feb 9, 2011
Showing with 19 additions and 2 deletions.
  1. +1 −1 README.md
  2. +18 −1 lib/hoe/heroku.rb
View
@@ -10,7 +10,7 @@ A [Hoe] plugin that helps you get your stuff on Heroku.
## FEATURES:
-* generates your `.gems` file
+* `rake heroku:dotgems` -- generates your `.gems` file
## REQUIREMENTS:
View
@@ -3,7 +3,24 @@ module Heroku
VERSION = "0.0.1"
def define_heroku_tasks
- # fill me in
+
+ namespace :heroku do
+ desc "Create .gems manifest"
+ task :dotgems do
+ list = []
+
+ self.extra_deps.each do |gem, version|
+ out = []
+ out << gem
+ out << "--version '#{version}'" if version
+
+ list << out.join(' ')
+ end
+
+ File.open( '.gems', 'w' ) {|f| f.puts list.join("\n") }
+ end
+ end
+
end
end

0 comments on commit 68a465c

Please sign in to comment.