Sha256: eec9ba610531a86df3b59e298d774c38ed74601d534d9a5c48f6a8a627ec8be4

Contents?: true

Size: 679 Bytes

Versions: 8

Compression:

Stored size: 679 Bytes

Contents

require 'rake'

module RGitFlow
  module Console

    protected

    def run(command, *arguments)
      show_command = [command, *arguments].join ' '

      if respond_to? 'debug'
        debug show_command
      end

      unless system(command, *arguments)
        if respond_to? 'error'
          error "Command failed: #{show_command}"
        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

8 entries across 8 versions & 1 rubygems

Version Path
rgitflow-0.2.1.pre.alpha.pre.28 lib/rgitflow/console.rb
rgitflow-0.2.0.pre.alpha.pre.27 lib/rgitflow/console.rb
rgitflow-0.2.0.pre.alpha.pre.26 lib/rgitflow/console.rb
rgitflow-0.2.0.pre.alpha.pre.25 lib/rgitflow/console.rb
rgitflow-0.2.0 lib/rgitflow/console.rb
rgitflow-0.2.0.pre.alpha.pre.23 lib/rgitflow/console.rb
rgitflow-0.2.0.pre.alpha.pre.22 lib/rgitflow/console.rb
rgitflow-0.2.0.pre.alpha.pre.21 lib/rgitflow/console.rb