class GemHadar
def master_push_task
def master_push_task namespace :master do git_remotes.each do |gr| namespace gr.to_sym do desc "Push master to git remote #{gr}" task :push do sh "git push #{gr} master" end end end desc "Push master #{version} to all git remotes: #{git_remotes * ' '}" task :push => git_remotes.map { |gr| :"master:#{gr}:push" } end end