Module: Mist::Repository

Included in:
Mist
Defined in:
lib/mist/repository.rb

Instance Method Summary collapse

Instance Method Details

#reload_repository!Object



12
13
14
# File 'lib/mist/repository.rb', line 12

def reload_repository!
  @repository = nil
end

#repositoryObject



2
3
4
5
6
7
8
9
10
# File 'lib/mist/repository.rb', line 2

def repository
  @repository ||= begin
    if File.directory? Mist.repository_location.join('.git')
      Git.open(Mist.repository_location.to_s, :log => Rails.logger)
    else
      Git.init(Mist.repository_location.to_s, :log => Rails.logger)
    end
  end
end