class Object

Public Instance Methods

__p(path) click to toggle source

@private

# File lib/rgitflow/autoload.rb, line 2
def __p(path) File.join(RGitFlow::ROOT, 'rgitflow', *path.split('/')); end
blank?() click to toggle source
# File lib/rgitflow/core_ext/object.rb, line 2
def blank?
  respond_to?(:empty?) ? empty? : !self
end
push(remote, branch = 'master', opts = {}) click to toggle source
# File lib/rgitflow/git_ext/lib.rb, line 4
def push(remote, branch = 'master', opts = {})
  # Small hack to keep backwards compatibility with the 'push(remote, branch, tags)' method signature.
  opts = {:tags => opts} if [true, false].include?(opts)

  arr_opts = []
  arr_opts << '--force'  if opts[:force] || opts[:f]
  arr_opts << '--delete' if opts[:delete] || opts[:d]
  arr_opts << remote

  command('push', arr_opts + [branch])
  command('push', ['--tags'] + arr_opts) if opts[:tags]
end