class Onboard::RepoBridge

Attributes

args[R]
g[R]
info[R]

Public Class Methods

new(args = {}) click to toggle source
# File lib/onboard/repo_bridge.rb, line 13
def initialize(args = {})
  @args = args
  @g = Repo.new(args)
  @info = g.info
end

Public Instance Methods

co() click to toggle source
# File lib/onboard/repo_bridge.rb, line 19
def co
  g.co
end
push() click to toggle source
# File lib/onboard/repo_bridge.rb, line 35
def push
  msg = "Pushing all changes to #{info['remotes'][0]}..."
  Msg.new(msg).format
  g.push
  say('  [done]', :green)
end
up() click to toggle source
# File lib/onboard/repo_bridge.rb, line 23
def up
  msg = "Committing #{args['project']} on #{info['current_branch']} branch..."
  Msg.new(msg).format
  changes = g.commit("#{args['path']}/#{args['project']}")
  if changes.empty? == false
    say('  [done]', :green)
  else
    puts "\nNo changes to commit for #{args['project']}"
  end
  changes
end