summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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.
2016-08-27refactor: push down adapter dependency injection to sourcesAzul
The original idea was that we would have all the celluloid related things injected in reel_server. However it seems unlikely that we will use a different http system anytime soon. Removing some layers of dependency injection to reduce complexity. We can easily bring this back if we want.
2016-08-26refactor: split up RequestHandler even moreAzul
2016-08-26refactor: Request helper class in RequestHandlerAzul
We have a specific way of encoding the thing we are looking for in the request. I added a small helper class to access the fingerprint and email. This also cleans up the RequestHandler code to some extend.
2016-08-26[update] trying to silence warningsAzul
These warnings were showing on gitlab ci. $ bundle exec rake test /usr/local/bin/ruby -w -Ilib:test -I/builds/leap/nickserver/vendor/ruby/2.1.0/gems/rake-11.2.2/lib /builds/leap/nickserver/vendor/ruby/2.1.0/gems/rake-11.2.2/lib/rake/rake_test_loader.rb test/**/*_test.rb /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/rubygems_integration.rb:468: warning: method redefined; discarding old find_spec_for_exe /usr/local/lib/ruby/site_ruby/2.1.0/rubygems.rb:261: warning: previous definition of find_spec_for_exe was here I, [2016-08-26T15:34:46.162843 #325] INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ] /builds/leap/nickserver/test/unit/request_handler_test.rb:28: warning: mismatched indentations at 'end' with 'def' at 21 /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_protocols not initialized /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_select_cb not initialized Run options: --seed 61653 # Running: .................../builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_protocols not initialized /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_select_cb not initialized .../builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_protocols not initialized /builds/leap/nickserver/vendor/ruby/2.1.0/gems/celluloid-io-0.17.3/lib/celluloid/io/ssl_socket.rb:22: warning: instance variable @npn_select_cb not initialized ................. Finished in 2.029982s, 19.2120 runs/s, 10.8375 assertions/s.
2016-07-13[FEATURE] fetch key by fingerprintZara Gebru
- add fingerprint unit tests - add integration test - implement by_fingerprint
2016-07-12[refactor] encapsulate get key by emailZara Gebru
in order to get key by fp as well
2016-07-04fix start / stop scriptAzul
I have to admit I don't completely understand what is going on here. https://github.com/celluloid/celluloid/wiki/Frequently-Asked-Questions says you can either use sleep after initiating the actors or call run on them. But this might not be true for reel. At least run did not work and now new; sleep seems to work fine.
2016-07-02refactor: turn EmailAddress into a class, cleanupAzul
2016-07-02refactor: replace blocks/yields with returnsAzul
This became possible because we now use celluloid. Celluloid handles asynchronity without the need for callbacks or blocks.
2016-07-02minor: silence warnings and cleanupAzul
2016-06-30use proper ssl connection with ca_file - green!Azul
2016-06-30actually use celluloid io for http requestsAzul
2016-06-30fix host header handling and testsAzul
2016-06-30Trying to replace EM base server with reelAzul
some tests are still broken. But at least they are running now.
2016-06-24first attempt at using celluloid instead of em - brokenAzul
Main problem right now is the outdated version of webmock.
2016-06-21refactor: change send_response -> respond in em_serverAzul
This way the interface mimics the one of Celluloid Reels request. request.respond status, content
2016-06-20seperate generic RequestHandler from EmServerAzul
The request handler takes a responder (the EmServer) and an adapter as initialization arguments. It will then respond to requests by querying the sources using the adapter and calling send_response on the responder.
2016-06-20add Nickserver::Source as superclassAzul
2016-06-20refactor: separate em specifics from generic serverAzul
2016-06-15we don't need FetchKeyInfo anymore including in SourceAzul
2016-06-14introduce Hkp::ClientAzul
wraps the hkp protocol
2016-06-14use adapter for FetchKeyInfoAzul
2016-06-11use the adapter not EM in hkp sourceAzul
2016-06-10turn Hkp::FetchKey into Hkp::SourceAzul
The source was really just an empty shell now that we pushed the em specific stuff further down.
2016-06-09refactor: remove EM specific stuff from Hkp::FetchKey interfaceAzul
2016-06-09add Hkp::Source with same interface as CouchDB::SourceAzul
2016-06-09refactor: introduce Hkp::ResponseAzul
2016-06-09refactor: inline method get_key_from_uidAzul
well kind of since we were yielding this is more inlining the block and renaming the method
2016-06-09refactor: remove middleman Couch::FetchKeyAzul
2016-06-08refactor: use new couch_db classes from fetch_keyAzul
This moves all the em_http related stuff into a single adapter. We're also not using callback and errback inside fetch_key or server for couch requests anymore. Changing the interface for hkp to do the same will follow.
2016-05-25silence all warnings of webmock and evma_httpserverAzul
2016-05-25fix our own warningsAzul
2016-05-25silence some warnings from evma_httpserverAzul
2016-05-25simplify KeyInfo. remove unneeded accessorsAzul
2016-05-25copy over all files from rewritten attemptAzul
I started a nickserver from scratch to implement the things that are independent of our choice of stack (eventmachine or other). This commit copies them over and tests both things in parallel.
2016-05-25rubocop: fix deprecated class methodsAzul
2016-05-25rubocop: initialize and use ruby 1.9 hash syntaxAzul
2016-05-25Version 0.3.00.3.0Azul
2016-04-10minor tweaks to hkp response parsingAzul
Only parse responses that have status code 200 (OK). Simplify status code handling a bit Also profiled it to see if duplicate calculations matter. They don't (2ms for validating 12 keys)
2016-04-10deprecation: File.exists? -> File.exist?Azul
2016-04-10bugfix: 404 if no key matches, fixes #6789Azul
I also separated the parsing of the hkp response from FetchKeyInfo. This way FetchKeyInfo has the EM specific code that has sideeffects and the logic is in a class without sideeffects and (almost) without state. The only state we keep is the KeyInfo array that contains all the information the server returns. This way we avoid parsing the response multiple times.
2016-04-10test: initial travis setupAzul
2014-11-24add a sleep to restart. appears to finally resolve ↵elijah
https://leap.se/code/issues/3526
2014-10-29bind nickserver only to localhostelijah
2014-10-29don't try to remove pid file when we get a singal to halt, we won't have ↵elijah
permissions anyway.
2014-10-29catch SIGINT and SIGHUPelijah
2014-08-05added kkp_ca_file config optionelijah
2013-12-24move config file location to /etc/nickserver.yml0.2.2elijah