class AgileNotifier::Git

Attributes

repo[RW]

Public Class Methods

combine_commands(*commands) click to toggle source
# File lib/agile_notifier/git.rb, line 12
def combine_commands(*commands)
  separator = ' && '
  combined_commands = commands.inject('') do |cmds, cmd|
    cmds += "#{cmd}#{separator}"
  end
  combined_commands.gsub!(/#{separator}$/, '')
end
new(dir) click to toggle source
# File lib/agile_notifier/git.rb, line 7
def initialize(dir)
  @repo = Repository.new(dir)
end
run_command(command) click to toggle source
# File lib/agile_notifier/git.rb, line 20
def run_command(command)
  `#{command}`
end