class Toolshed::Git
Constants
- DEFAULT_BRANCH_FROM
- DEFAULT_GIT_TOOL
Attributes
force[RW]
from_remote_branch_name[RW]
from_remote_name[RW]
passed_branch_name[RW]
to_remote_branch_name[RW]
to_remote_name[RW]
validator[RW]
Public Class Methods
git_submodule_command()
click to toggle source
# File lib/toolshed/git.rb, line 41 def git_submodule_command git_submodule_command = '' git_submodule_command = "git submodule update #{Toolshed::Client.instance.git_quiet}" if Toolshed::Client.instance.use_git_submodules git_submodule_command end
new(options = {})
click to toggle source
# File lib/toolshed/git.rb, line 14 def initialize(options = {}) # options with defaults self.from_remote_name = Toolshed::Client.instance.pull_from_remote_name unless (options[:from_remote_name].nil?) self.from_remote_name = options[:from_remote_name] end self.to_remote_name = Toolshed::Client.instance.push_to_remote_name unless (options[:to_remote_name].nil?) self.to_remote_name = options[:to_remote_name] end # options that do not have a default unless (options[:from_remote_branch_name].nil?) self.from_remote_branch_name = options[:from_remote_branch_name] end unless (options[:to_remote_branch_name].nil?) self.to_remote_branch_name = options[:to_remote_branch_name] end self.validator = ::Toolshed::Git::Validator.new self.passed_branch_name = options[:branch_name] || '' self.force = (options.key?(:force_command)) ? '--force' : '' end
Public Instance Methods
remote_update()
click to toggle source
# File lib/toolshed/git.rb, line 48 def remote_update results = Toolshed::Base.wait_for_command("git remote update #{Toolshed::Client.instance.git_quiet}") results[:all].each do |out| Toolshed.logger.info out end end