summaryrefslogtreecommitdiff
path: root/lib/nickserver/couch_db/source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nickserver/couch_db/source.rb')
-rw-r--r--lib/nickserver/couch_db/source.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/nickserver/couch_db/source.rb b/lib/nickserver/couch_db/source.rb
index 874fe4f..b30fdfc 100644
--- a/lib/nickserver/couch_db/source.rb
+++ b/lib/nickserver/couch_db/source.rb
@@ -1,18 +1,15 @@
#
# This class allows querying couch for public keys.
#
+require 'nickserver/source'
require 'nickserver/couch_db/response'
require 'nickserver/config'
module Nickserver::CouchDB
- class Source
+ class Source < Nickserver::Source
VIEW = '/_design/Identity/_view/pgp_key_by_email'
- def initialize(adapter)
- @adapter = adapter
- end
-
def query(nick)
adapter.get url, query: query_for(nick) do |status, body|
yield Response.new(nick, status: status, body: body)
@@ -29,11 +26,6 @@ module Nickserver::CouchDB
{ reduce: "false", key: "\"#{nick}\"" }
end
- def adapter
- @adapter
- # Nickserver::Adapters::Http.new(config)
- end
-
attr_reader :config
end
end