Пример #1
0
def branch_metrics(data, owner, repo, branch):
    """Get coverage metrics for a particular branch."""
    create = request.method == "PUT"
    project = yorm.find(Project, owner, repo, branch, create=create)
    if not project:
        raise exceptions.NotFound("No such project or branch.")

    return _handle_request(project, data)
Пример #2
0
def metrics(data, owner, repo):
    """Get coverage metrics for the default branch."""
    create = request.method == "PUT"
    project = yorm.find(Project, owner, repo, create=create)
    if not project:
        raise exceptions.NotFound("No such project.")

    return _handle_request(project, data)
Пример #3
0
 def read(self, key):
     return yorm.find(ConfigModel, self.root, key)
Пример #4
0
 def it_can_also_be_called_with_an_instance(instance):
     expect(yorm.find(instance, create=True)) == instance
Пример #5
0
 def delete(self, game):
     model = yorm.find(GameFileModel, game.key)
     if model:
         yorm.delete(model)
Пример #6
0
 def read(self, key):
     return yorm.find(GameFileModel, key)
Пример #7
0
 def it_can_also_be_called_with_an_instance(instance):
     expect(yorm.find(instance, create=True)) == instance
Пример #8
0
 def read(self, key):
     return yorm.find(ConfigModel, self.root, key)