Sha256: f57cc3fb6181aed2b4866238fcfc46d54293a5090a050e54c9f5627f880eca15

Contents?: true

Size: 611 Bytes

Versions: 2

Compression:

Stored size: 611 Bytes

Contents

require 'rake'

module RGitFlow
  module Console

    protected

    def execute(command)
      if respond_to? 'debug'
        debug command.to_s
      end

      unless system(command.to_s)
        if respond_to? 'error'
          error "Command failed: #{command.to_s}"
        end
        abort
      end

      nil
    end

    def invoke(name)
      Rake.application[name].reenable
      Rake.application[name].invoke
    end

    def task?(name)
      Rake::Task.task_defined? name
    end

    def multi_task(prefix, names)
      task prefix => names.map { |name| "#{prefix}:#{name}" }
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rgitflow-0.2.2 lib/rgitflow/console.rb
rgitflow-0.2.1.pre.alpha.pre.32 lib/rgitflow/console.rb