class GemHadar

def push_task

def push_task
  version_push_task
  master_push_task
  gem_push_task
  task :modified do
    unless (files = `git status --porcelain`.gsub(/^\s*\S\s+/, '').lines).empty?
      warn "There are still modified files:\n#{files * ''}"
      exit 1
    end
  end
  desc "Push master and version #{version} all git remotes: #{git_remotes * ' '}"
  task :push => %i[ modified build master:push version:push gem:push ]
end