Module: RGitFlow::Console

Included in:
Tasks::Task
Defined in:
lib/rgitflow/console.rb

Instance Method Summary collapse

Instance Method Details

#invoke(name) ⇒ Object (protected)



25
26
27
28
# File 'lib/rgitflow/console.rb', line 25

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

#multi_task(prefix, names) ⇒ Object (protected)



34
35
36
# File 'lib/rgitflow/console.rb', line 34

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

#run(command, *arguments) ⇒ Object (protected)



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rgitflow/console.rb', line 8

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

#task?(name) ⇒ Boolean (protected)

Returns:

  • (Boolean)


30
31
32
# File 'lib/rgitflow/console.rb', line 30

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