RestExpress/PluginExpress — pull request #4 by shageman (2014-03-17 17:16:32+00:00)
Title: Adding methods to routes trough multiple calls should work

Currently, when adding multiple methods, this code will work:

~~~JAVA
server.uri("/samples/uuid/{uuid}.{format}", config.getSampleUuidEntityController())
.method(HttpMethod.GET, HttpMethod.PUT, HttpMethod.DELETE)
.name(Constants.Routes.SINGLE_UUID_SAMPLE);
~~~

While this code won't: GET and PUT will not be registered by the cors plugin, as DELETE overrides their registration.

~~~JAVA
server.uri("/samples/uuid/{uuid}.{format}", config.getSampleUuidEntityController())
.method(HttpMethod.GET, HttpMethod.PUT)
.name(Constants.Routes.SINGLE_UUID_SAMPLE);
server.uri("/samples/uuid/{uuid}.{format}", config.getSampleUuidEntityController())
.method(HttpMethod.DELETE)
.name(Constants.Routes.SINGLE_UUID_SAMPLE);
~~~

This pull request intends to make that work.

We were not able to run the tests, as test dependencies are not stated in the pom file. If you let us know how to run them, we'll gladly check the code and submit again.