lib/seedbed.rb in seedbed-1.1.0 vs lib/seedbed.rb in seedbed-1.1.1

- old
+ new

@@ -49,15 +49,15 @@ def self.build_tree(b) fil = "" b.keys.each do |t| fil << "desc \"plants seeds for #{t}\" \n" - if b[t].empty? + fil << "task :#{t} => :environment do |tsk| \n" fil << "puts tsk.scope[2..-1].join('/') \n" fil << "SeedBed.plant( tsk.scope[2..-1].join('/') + '/' + '#{t}' )\n" fil << "end \n" - else + unless b[t].empty? fil << "namespace :#{t} do \n" fil << build_tree( b[t] ) fil << "\n" fil << "end \n" end