class Stove::Plugin::Git
Private Instance Methods
branch()
click to toggle source
# File lib/stove/plugins/git.rb, line 66 def branch options[:branch] end
git(command, errors = true)
click to toggle source
# File lib/stove/plugins/git.rb, line 36 def git(command, errors = true) Stove::Log.debug("the command matches") Stove::Log.debug("Running `git #{command}', errors: #{errors}") Dir.chdir(cookbook.path) do response = %x|git #{command}| if errors && !$?.success? raise Error::GitTaggingFailed.new(command: command) if command =~ /^tag/ raise Error::GitFailed.new(command: command) end response end end
git_null(command)
click to toggle source
# File lib/stove/plugins/git.rb, line 51 def git_null(command) null = case RbConfig::CONFIG['host_os'] when /mswin|mingw|cygwin/ 'NUL' else '/dev/null' end git("#{command} 2>#{null}", false) end
remote()
click to toggle source
# File lib/stove/plugins/git.rb, line 62 def remote options[:remote] end