Class: AgileNotifier::Git
Defined Under Namespace
Classes: Repository
Instance Attribute Summary collapse
-
#repo ⇒ Object
Returns the value of attribute repo.
Attributes inherited from SCM
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dir) ⇒ Git
constructor
A new instance of Git.
Methods inherited from SCM
Constructor Details
#initialize(dir) ⇒ Git
Returns a new instance of Git.
7 8 9 |
# File 'lib/agile_notifier/git.rb', line 7 def initialize(dir) @repo = Repository.new(dir) end |
Instance Attribute Details
#repo ⇒ Object
Returns the value of attribute repo.
5 6 7 |
# File 'lib/agile_notifier/git.rb', line 5 def repo @repo end |
Class Method Details
.combine_commands(*commands) ⇒ Object
12 13 14 15 16 17 18 |
# 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 |
.run_command(command) ⇒ Object
20 21 22 |
# File 'lib/agile_notifier/git.rb', line 20 def run_command(command) `#{command}` end |