# Path: rowan/http.py
# HTTP_STATUS_CODES = {
#     100: 'CONTINUE',
#     101: 'SWITCHING PROTOCOLS',
#     200: 'OK',
#     201: 'CREATED',
#     202: 'ACCEPTED',
#     203: 'NON-AUTHORITATIVE INFORMATION',
#     204: 'NO CONTENT',
#     205: 'RESET CONTENT',
#     206: 'PARTIAL CONTENT',
#     300: 'MULTIPLE CHOICES',
#     301: 'MOVED PERMANENTLY',
#     302: 'FOUND',
#     303: 'SEE OTHER',
#     304: 'NOT MODIFIED',
#     305: 'USE PROXY',
#     306: 'RESERVED',
#     307: 'TEMPORARY REDIRECT',
#     400: 'BAD REQUEST',
#     401: 'UNAUTHORIZED',
#     402: 'PAYMENT REQUIRED',
#     403: 'FORBIDDEN',
#     404: 'NOT FOUND',
#     405: 'METHOD NOT ALLOWED',
#     406: 'NOT ACCEPTABLE',
#     407: 'PROXY AUTHENTICATION REQUIRED',
#     408: 'REQUEST TIMEOUT',
#     409: 'CONFLICT',
#     410: 'GONE',
#     411: 'LENGTH REQUIRED',
#     412: 'PRECONDITION FAILED',
#     413: 'REQUEST ENTITY TOO LARGE',
#     414: 'REQUEST-URI TOO LONG',
#     415: 'UNSUPPORTED MEDIA TYPE',
#     416: 'REQUESTED RANGE NOT SATISFIABLE',
#     417: 'EXPECTATION FAILED',
#     500: 'INTERNAL SERVER ERROR',
#     501: 'NOT IMPLEMENTED',
#     502: 'BAD GATEWAY',
#     503: 'SERVICE UNAVAILABLE',
#     504: 'GATEWAY TIMEOUT',
#     505: 'HTTP VERSION NOT SUPPORTED',
# }
# QUOTED_RE = re.compile('"(.*)"')
# class HttpRequest(blackboard.Blackboard):
# class Statused(object):
# class HttpResponse(Statused):
# class JSONResponse(HttpResponse):
# class Http302(HttpResponse):
# class HttpError(Exception, Statused):
# class Http404(HttpError):
# class Http500(HttpError):
#     def __init__(self, wsgi_env):
#     def _parse_cookies(self, cookie_string):
#     def _get_body_raw(self):
#     def __init__(self, status_code):
#     def _get_status_code_string(self):
#     def __init__(
#         self, content=None, content_type='text/html', status_code=200
#         ):
#     def _get_content(self):
#     def write(self, content):
#     def set_cookie(
#         self, key, value, max_age=None, expires=None, path='/', domain=None
#         ):
#     def _get_headers(self):
#     def __init__(self, json_data, status_code=200):
#         def _convert(obj):
#     def __init__(self, location):
#     def _get_headers(self):
#     def __init__(self, message="", status_code=500):
#     def __init__(self, message=""):
#     def __init__(self, message=""):


import os
import logging
import jinja2
from rowan import http
from rowan.controllers import *


# View functions
def greet_someone(request):
    logging.getLogger('greet_someone').debug('Called')
    name = request.router_args[0]
    return http.HttpResponse(
        'Hello %s (no %s this time)' % (name, request.settings.shock)
        )

def shock_someone(request):
    logging.getLogger('shock_someone').debug('Called')
    template = request.services.templates.get_template('message.html')
    content = template.render(message=request.settings.shock)

# Path: rowan/http.py
# HTTP_STATUS_CODES = {
#     100: 'CONTINUE',
#     101: 'SWITCHING PROTOCOLS',
#     200: 'OK',
#     201: 'CREATED',
#     202: 'ACCEPTED',
#     203: 'NON-AUTHORITATIVE INFORMATION',
#     204: 'NO CONTENT',
#     205: 'RESET CONTENT',
#     206: 'PARTIAL CONTENT',
#     300: 'MULTIPLE CHOICES',
#     301: 'MOVED PERMANENTLY',
#     302: 'FOUND',
#     303: 'SEE OTHER',
#     304: 'NOT MODIFIED',
#     305: 'USE PROXY',
#     306: 'RESERVED',
#     307: 'TEMPORARY REDIRECT',
#     400: 'BAD REQUEST',
#     401: 'UNAUTHORIZED',
#     402: 'PAYMENT REQUIRED',
#     403: 'FORBIDDEN',
#     404: 'NOT FOUND',
#     405: 'METHOD NOT ALLOWED',
#     406: 'NOT ACCEPTABLE',
#     407: 'PROXY AUTHENTICATION REQUIRED',
#     408: 'REQUEST TIMEOUT',
#     409: 'CONFLICT',
#     410: 'GONE',
#     411: 'LENGTH REQUIRED',
#     412: 'PRECONDITION FAILED',
#     413: 'REQUEST ENTITY TOO LARGE',
#     414: 'REQUEST-URI TOO LONG',
#     415: 'UNSUPPORTED MEDIA TYPE',
#     416: 'REQUESTED RANGE NOT SATISFIABLE',
#     417: 'EXPECTATION FAILED',
#     500: 'INTERNAL SERVER ERROR',
#     501: 'NOT IMPLEMENTED',
#     502: 'BAD GATEWAY',
#     503: 'SERVICE UNAVAILABLE',
#     504: 'GATEWAY TIMEOUT',
#     505: 'HTTP VERSION NOT SUPPORTED',
# }
# QUOTED_RE = re.compile('"(.*)"')
# class HttpRequest(blackboard.Blackboard):
# class Statused(object):
# class HttpResponse(Statused):
# class JSONResponse(HttpResponse):
# class Http302(HttpResponse):
# class HttpError(Exception, Statused):
# class Http404(HttpError):
# class Http500(HttpError):
#     def __init__(self, wsgi_env):
#     def _parse_cookies(self, cookie_string):
#     def _get_body_raw(self):
#     def __init__(self, status_code):
#     def _get_status_code_string(self):
#     def __init__(
#         self, content=None, content_type='text/html', status_code=200
#         ):
#     def _get_content(self):
#     def write(self, content):
#     def set_cookie(
#         self, key, value, max_age=None, expires=None, path='/', domain=None
#         ):
#     def _get_headers(self):
#     def __init__(self, json_data, status_code=200):
#         def _convert(obj):
#     def __init__(self, location):
#     def _get_headers(self):
#     def __init__(self, message="", status_code=500):
#     def __init__(self, message=""):
#     def __init__(self, message=""):


# Path: examples/one_file/root.py
import os
import logging
import jinja2
from rowan import http
from rowan.controllers import *



# View functions
def greet_someone(request):
    logging.getLogger('greet_someone').debug('Called')
    name = request.router_args[0]
    return http.HttpResponse(
        'Hello %s (no %s this time)' % (name, request.settings.shock)
        )

def shock_someone(request):
    logging.getLogger('shock_someone').debug('Called')
    template = request.services.templates.get_template('message.html')
    content = template.render(message=request.settings.shock)

    return http.HttpResponse(content.encode('ascii', 'ignore'))