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)
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)
def read(self, key): return yorm.find(ConfigModel, self.root, key)
def it_can_also_be_called_with_an_instance(instance): expect(yorm.find(instance, create=True)) == instance
def delete(self, game): model = yorm.find(GameFileModel, game.key) if model: yorm.delete(model)
def read(self, key): return yorm.find(GameFileModel, key)