Example #1
0
    def logs(self):
        from bob import settings

        def iterate_response():
            root = os.path.expanduser(settings['bobb.log_dir'])
            for file_name in list_logs(root):
                yield str(os.path.relpath(file_name, root))
                yield str('\n')

        return api.Response(app_iter=iterate_response())
Example #2
0
    def travis(self):
        try:
            result = forms.travis.WebhookForm(self.request.json)
        except ValueError:
            # http://docs.travis-ci.com/user/notifications/
            # Webhooks are delivered with a application/x-www-form-urlencoded
            # content type using HTTP POST, with the body including a payload
            # parameter that contains the JSON webhook payload in a URL-encoded
            # format.
            result = forms.travis.WebhookForm(
                json.loads(self.request.POST['payload']))

        logger.info(result)

        if result['build']:
            response = forms.queue_build(result['organization'],
                                         result['name'], result['branch'])
        else:
            response = 'nope nope nope'

        return api.Response(response)
Example #3
0
 def github(self):
     forms.github.WebhookForm(self.request.json)
     return api.Response('github.created')
Example #4
0
 def index(self):
     return api.Response('sub.index')
Example #5
0
File: health.py Project: soitun/bob
 def index(self):
     return api.Response(__version__)
Example #6
0
 def index(self):
     return api.Response('bar.index')
Example #7
0
 def index(self):
     return api.Response('qux.index')
Example #8
0
 def options(self):
     return api.Response('foo.options')
Example #9
0
 def baz(self):
     return api.Response('baz.index')
Example #10
0
 def delete(self):
     return api.Response('foo.deleted')
Example #11
0
 def upsert(self):
     return api.Response('foo.upsert')
Example #12
0
 def update(self):
     return api.Response('foo.updated')
Example #13
0
 def create(self):
     return api.Response('foo.created')
Example #14
0
 def show(self):
     return api.Response(str(self.context.entity))
Example #15
0
 def index(self):
     return api.Response('foo.index')
Example #16
0
 def show(self):
     return api.Response('{}{}'.format(self.context.entity,
                                       self.context.parent.parent.entity))