Exemplo n.º 1
0
    def all(self):
        repos = []
        repo_dir = Path(self.path, 'conf/repos')

        for obj in repo_dir.walk():
            if obj.isdir():
                continue

            files = re.compile('(\w+.conf$)').findall(str(obj))
            if files:
                repos += files

        return [
            Repository.get_by_name(repo[:-5], self.path, self.git)
            for repo in set(repos)
        ]
Exemplo n.º 2
0
 def get(self, entity):
     return Repository.get_by_name(entity, self.path, self.git)