Sha256: ba0a66de2539088ea1e9c32d1a6cb71e14ff0bbb90b00cbbaed029701a6c551d
Contents?: true
Size: 1.16 KB
Versions: 2
Compression:
Stored size: 1.16 KB
Contents
# encoding: utf-8 #-- # Copyright (C) 2012 Gitorious AS # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. #++ require "dolt/git/shell" require "dolt/git/repository" module Dolt class DiskRepoResolver def initialize(root) @root = root end def resolve(repo) git = Dolt::Git::Shell.new(File.join(root, repo)) Dolt::Git::Repository.new(repo, git) end def all Dir.entries(root).reject do |e| e =~ /^\.+$/ || File.file?(File.join(root, e)) end end private def root; @root; end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dolt-0.1.1 | ./lib/dolt/disk_repo_resolver.rb |
dolt-0.1.0 | ./lib/dolt/disk_repo_resolver.rb |