Module: RGitFlow::Console

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

Instance Method Summary collapse

Instance Method Details

#execute(command) ⇒ Object (protected)



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

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

#invoke(name) ⇒ Object (protected)



23
24
25
26
# File 'lib/rgitflow/console.rb', line 23

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

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



32
33
34
# File 'lib/rgitflow/console.rb', line 32

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

#task?(name) ⇒ Boolean (protected)

Returns:

  • (Boolean)


28
29
30
# File 'lib/rgitflow/console.rb', line 28

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