couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hdiedrich <...@git.apache.org>
Subject [GitHub] couchdb-chttpd pull request: Dynamic endpoints handlers
Date Fri, 28 Nov 2014 17:08:24 GMT
GitHub user hdiedrich opened a pull request:

    https://github.com/apache/couchdb-chttpd/pull/10

    Dynamic endpoints handlers

    chttpd hardcoded handlers are replaced with with dynamic url handlers,
    which are functions in a dynamically created module, assembled from
    priv/chttpd_handler.cfg files from all interested applications.
    
    For couched these are currently: chttpd, mem3 and global_changes.
    
    This is a special branch that pull the prepared branches (of the same name)
    of chttpd, mem3 and global_changes, which have the config files.
    
    Run 'make check' to test the handlers. They are implicitly tested by other
    tests and there is a whitebox callback test chttpd_handler_callback_test,
    which calls the dynamic functions directly and mocks the funs that they
    return. This tests precisely the relationship between the *_handler function
    clauses and the returned function.
    
    There are more tests to come, both testing the endpoints via http, and the
    configuration assembly.
    
    BugzID: 27037

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hdiedrich/couchdb-chttpd 27037-5-dynamic-endpoint-handlers

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-chttpd/pull/10.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #10
    
----
commit 2fe0c7e1c1b701e8aee7631ad548085c9eaac55b
Author: H. Diedrich <hdiedrich@eonblast.com>
Date:   2014-11-28T15:08:12Z

    Dynamic endpoints handlers
    
    chttpd hardcoded handlers are replaced with with dynamic url handlers,
    which are functions in a dynamically created module, assembled from
    priv/chttpd_handler.cfg files from all interested applications.
    
    For couched these are currently: chttpd, mem3 and global_changes.
    
    This is a special branch that pull the prepared branches (of the same name)
    of chttpd, mem3 and global_changes, which have the config files.
    
    Run 'make check' to test the handlers. They are implicitly tested by other
    tests and there is a whitebox callback test chttpd_handler_callback_test,
    which calls the dynamic functions directly and mocks the funs that they
    return. This tests precisely the relationship between the *_handler function
    clauses and the returned function.
    
    There are more tests to come, both testing the endpoints via http, and the
    configuration assembly.
    
    BugzID: 27037

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message