def run_gem
spec = Gem::Specification.new { |s|
s.name = @name
s.version = @version
@dependencies.each{ |d,v|
if v
s.add_dependency(d, v)
else
s.add_dependency(d)
end
}
s.platform = @platform
s.summary = @summary
s.requirements = @requirements
package_files = FileList.new
package_files.include(*@include)
package_files.exclude(*@exclude) if @exclude and not @exclude.empty?
s.files = package_files.to_a
s.require_path = 'lib'
s.autorequire = @autorequire if @autorequire
s.author = @author
s.email = @email
s.rubyforge_project = @project
s.homepage = @homepage
s.executables = @executables
s.bindir = "bin"
}
puts "Reap is shelling out work to the Gem Package Manager..."
Gem.manage_gems
Gem::Builder.new(spec).build
sh %{mv ./*.gem #{@dir}/}
end