Class: Hubeye::Hooks::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/hubeye/hooks/git.rb

Class Method Summary collapse

Class Method Details

.fetch(local_repo_name, remote_name, branch_name) ⇒ Object



5
6
7
8
9
# File 'lib/hubeye/hooks/git.rb', line 5

def self.fetch(local_repo_name, remote_name, branch_name)
  Dir.chdir(File.expand_path(local_repo_name)) do
    system "git fetch #{remote_name} #{branch_name}"
  end
end

.pull(local_repo_name, remote_name, branch_name) ⇒ Object



11
12
13
14
15
# File 'lib/hubeye/hooks/git.rb', line 11

def self.pull(local_repo_name, remote_name, branch_name)
  Dir.chdir(File.expand_path(local_repo_name)) do
    system "git pull #{remote_name} #{branch_name}"
  end
end