Sha256: 62768fe6df24ef872abfc5db7851336be0f7d768d2bfa059983fee7e87de3576

Contents?: true

Size: 1.56 KB

Versions: 1

Compression:

Stored size: 1.56 KB

Contents

require_relative "../../cumuli"

namespace :cumuli do
  namespace :project do
    desc "install submodules and run setup scripts based on the project.yml"
    task :setup do
      Cumuli::ProjectManager::Manager.new.setup
    end

    desc "copy database config and rerun setup scripts"
    task :config do
      Cumuli::ProjectManager::Manager.new.setup_projects
    end

    desc "publish Procfile from projects.yml"
    task :publish do
      Cumuli::ProjectManager::Manager.new.publish
    end
  end

  namespace :ps do
    namespace :kill do
      desc "kill all foreman related processes"
      task :all do
        ps = Cumuli::PS.new
        ps.kill(ps.foremans.map(&:pid))
      end

      desc "kill the first spawned foreman process"
      task :root do
        ps = Cumuli::PS.new
        ps.kill
      end
    end

    desc "kill the root process"
    task :kill => ['cumuli:ps:kill:root']

    namespace :int do
      desc "interrupt all foreman related processes"
      task :all do
        ps = Cumuli::PS.new
        ps.int(ps.foremans.map(&:pid))
      end

      desc "kill the first spawned foreman process"
      task :root do
        ps = Cumuli::PS.new
        ps.int
      end
    end

    desc "interrupt the root process"
    task :int => ['cumuli:ps:int:root']
  end

  desc "look at the list of foreman related processes"
  task :ps do
    puts Cumuli::PS.new.report_all
  end

  desc "run a remote command with the right ruby: rake cumuli:remote ../my_app rake db:migrate"
  task :remote do |command|
    Cumuli::CLI::RemoteRakeCommand.new(ARGV).perform
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cumuli-0.5.0 lib/cumuli/tasks/cumuli.rake