parent
d3174c6e3f
commit
8fc054a735
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ class Site
|
|||
class Repository
|
||||
attr_reader :rugged, :changes, :path
|
||||
|
||||
# @param [String] la ruta del repositorio
|
||||
def initialize(path)
|
||||
@path = path
|
||||
@rugged = Rugged::Repository.new(path)
|
||||
|
@ -41,6 +42,8 @@ class Site
|
|||
#
|
||||
# XXX: Prestar atención a la velocidad de respuesta cuando tengamos
|
||||
# repositorios remotos.
|
||||
#
|
||||
# @return [Integer]
|
||||
def fetch
|
||||
if origin.check_connection :fetch
|
||||
@changes = rugged.fetch(origin)[:received_objects]
|
||||
|
@ -51,6 +54,7 @@ class Site
|
|||
|
||||
# Incorpora los cambios en el repositorio actual
|
||||
#
|
||||
# @return [Rugged::Commit]
|
||||
def merge(usuarie)
|
||||
merge = rugged.merge_commits(head_commit, remote_head_commit)
|
||||
|
||||
|
|
Loading…
Reference in a new issue