summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-12-02Merge branch 'test/debug-failures' into 'master' azul
test: more meaningful error messages in case of failures See merge request !8
2016-11-30test: more meaningful error messages in case of failuresAzul
2016-10-17Merge branch 'release/0.9' into 'master' azul
Release 0.9 Version 0.9.0 Allow queries by fingerprint (using keyservers to reply) and support key lookup from other nickservers. This is a major rewrite both in terms of our dependencies and our architecture. We moved the server and http_client from eventmachine to Celluloid based libraries. This allows for a more concise syntax and proper https handling. In addition we now support ruby 2.3, use a Logger instead of stdout and handle network errors properly See merge request !7
2016-10-17Version 0.9.00.9.0Azul
Allow queries by fingerprint (using keyservers to reply) and support key lookup from other nickservers. This is a major rewrite both in terms of our dependencies and our architecture. We moved the server and http_client from eventmachine to Celluloid based libraries. This allows for a more concise syntax and proper https handling. In addition we now support ruby 2.3, use a Logger instead of stdout and handle network errors properly
2016-10-17Merge branch 'feature/log-requests-and-errors' into 'master' azul
Log requests and errors proper logging See merge request !6
2016-10-02doc: prepara CHANGES.md for 0.9.0Azul
2016-10-02minor: gitignore byebug_historyAzul
2016-10-02minor: include Gemfile.lockAzul
2016-10-02doc: add sequence diagrams for high level overviewAzul
2016-10-02silence Celluloid.logger in testsAzul
Introduced CelluloidTest as a test class for all tests that depend on Celluloid being up and running.
2016-09-30change default adapter to CelluloidHttpAzul
Turns out without this nickserver will not respond to multiple concurrent requests.
2016-09-30logger: log celluloid errors to default logAzul
2016-09-30minor: test: fix * interpreted as arg prefix warningAzul
2016-09-30logger: log to STDOUT when run in foregroundAzul
2016-09-30logging: use proper loggerAzul
This way the logs do not interfere with test output
2016-09-29use stderr for errorsAzul
2016-09-29skip tests with ConnectionErrorsAzul
We handle these errors nicely in the dispatcher and have tests for that. Tests should fail or err out when running into exceptions we are not handling yet. But for these it's better to just skip.
2016-09-24log HTTP::ConnectionErrors, respond with json bodyAzul
2016-09-24use plain http.rb rather than celluloid i/oAzul
Turns out http.rb does not support celluloid i/o andymore and we were not making use of it anyway. Here's what https://github.com/httprb/http/wiki/Thread-Safety says: (NOTE: this gem previously supported Celluloid::IO, but that support was removed to add the current timeout backend. It may be added back in a future version) So now we have a plain http.rb adapter and use that as the default. This prevents actors from crashing in the adapter (as we don't have any).
2016-09-24test: rename so no name is duplicatedAzul
2016-09-23basic logging and recovery from exceptions raisedAzul
2016-09-23test: some very basic functional testsAzul
2016-09-23Merge branch 'feature/deal-with-network-failures' into 'master' azul
Feature/deal with network failures Also activates the new nicknym lookup. See merge request !5
2016-09-22return nil on 404 in hkp sourceAzul
This way the other RequestHandlers can give it a try. If none handles it we'll get a 404 anyway. But maybe there's been an exception before so a 502 should be send.
2016-09-22hand on connection errors to dispatcher so it can handle itAzul
2016-09-22feature: 502 on ConnectionErrorsAzul
If one source raises a 502 and no other handler has any result we'll respond with a 502 - bad gateway.
2016-09-21doc: explain the purpose of different integration testsAzul
2016-09-21feature: activate nicknym lookupAzul
2016-09-21rescue and track exceptions in handler chainAzul
2016-09-19refactor: separate handler chain from dispatcherAzul
Handler Chain is of handlers that respond to call. Invoking handle(*args) on the chain will call the handlers with the given args until one of them returns a result that is truethy (i.e. not false or nil). Extracted from the dispatcher so we can also handle exceptions there in the future. (So that if one of the network connections to the request_handlers fails we can continue while still tracking the failed exception.)
2016-09-16gitignore: vendorAzul
2016-09-16deal with network issues in nicknym sourceAzul
This is a first step. In case the suspected nicknym server cannot be reached we will now move on and try other sources. It's robably not what we want in the long run. In order to know wether no key exists or we just failed to connect to some servers a different http response code would be nice if network errors occured. This simplifies testing such scenarios in the unit test and makes the remote tests skip on network failure.
2016-09-16Merge branch 'bugfix/load-error-in-bin' into 'master' azul
bugfix: load order issue in server, include test Includes our first functional test. This one only makes sure loading the bin/nickserver actually works fine. Enough to catch this bug. See merge request !4
2016-09-16bugfix: load order issue in server, include testAzul
Includes our first functional test. This one only makes sure loading the bin/nickserver actually works fine. Enough to catch this bug.
2016-09-16Merge branch 'feature/query-leap-servers' into 'master' azul
test: properly test nicknym source + fixes See merge request !3
2016-09-16test: properly test nicknym source + fixesAzul
2016-09-12test: separate remote tests into own directoryAzul
Dropped the webmock dependency. We have our own http adapter. So we can stub that to inject a mock. As an added bonus this does not mess with other http requests. Also wrote down testing strategy. Not completely implemented yet.
2016-09-12test: first steps towards a remote nicknym testAzul
2016-09-12[wip] nicknym source query implementedAzul
Also changed Nickserver::Response to not include the status code. This may be okay for error responses but in most cases we want to have a parsable message and not some status code prepended to it.
2016-09-10refactor: remove global require in test_helperAzul
require all the things we depend upon where we depend upon them.
2016-08-31wip: key lookup by address via leaps nicknymAzul
I added a RequestHandler that uses Nicknym::Source - but that has not been implemented yet.
2016-08-30refactor: make the RequestHandler classes callableAzul
Whenever a RequestHandler class is called we instantiate it with the request. Then we call handle on the instance. This way we can access the request and its content via accessors rather than only in the handle method.
2016-08-30refactor: rename EmailHandler to HkpEmailHandlerAzul
2016-08-30feature: keep trying if no Host header givenAzul
So far we would error out if no host was specified in the config or the request. It's true that we can't do local lookup if we don't know our own domain. However we can still use HKP. In the future we will query leaps own API for other providers. If the host was not set in the initial request we might even proxy a request to ourselves. Providing the Host header will prevent an infinite loop in that case.
2016-08-29Merge branch 'refactor/request-handling' into 'master' azul
refactor: restructure the way we handle requests to make it more consistent. Requests are handled at a lot of different ways in different styles right now. Let's make this more consistent and flexible to add email lookup at other leap providers. See merge request !2
2016-08-29refactor: split EmailHandler in 3Azul
InvalidEmailHandler - handle emails with an invalid format LocalEmailHandler - handle emails on the local domain EmailHandler - handle all other emails by using hkp This is a preparation to add leap provider email lookup and remove hkp eventually. But for now we keep the behaviour the same and only refactor.
2016-08-29cleanup: remove outdated ideasAzul
Lookup and InvalidSource were experiments for a design for the dispatching. Our new dispatcher seems better.
2016-08-29refactor: let handlers check if they are applicableAzul
Instead of testing the preconditions for each handler in the dispatcher the dispatcher hands a request to one handler after the other until one of them responds. This is similar to the Chain of Responsibility patter but we iterate over the 'handler_chain' array instead of a linked list. To change the order of handlers or add other handlers change the array in the handler_chain function.
2016-08-29refactor: split up ResponseHandlerAzul
Now we have a Dispatcher and two ResponseHandlers that have the same interface. Moving towards a Chain of Responsibility pattern.
2016-08-29expose Request class from RequestHandlerAzul
This way we can separate the EmailHandler and the FingerprintHandler as well.