summaryrefslogtreecommitdiff
path: root/lib/nickserver/request_handlers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nickserver/request_handlers')
-rw-r--r--lib/nickserver/request_handlers/base.rb9
-rw-r--r--lib/nickserver/request_handlers/fingerprint_handler.rb2
-rw-r--r--lib/nickserver/request_handlers/hkp_email_handler.rb2
-rw-r--r--lib/nickserver/request_handlers/leap_email_handler.rb2
-rw-r--r--lib/nickserver/request_handlers/local_email_handler.rb2
5 files changed, 9 insertions, 8 deletions
diff --git a/lib/nickserver/request_handlers/base.rb b/lib/nickserver/request_handlers/base.rb
index e5d8992..495a6da 100644
--- a/lib/nickserver/request_handlers/base.rb
+++ b/lib/nickserver/request_handlers/base.rb
@@ -2,16 +2,17 @@ module Nickserver
module RequestHandlers
class Base
- def self.call(request)
- new(request).handle
+ def self.call(request, adapter = nil)
+ new(request, adapter).handle
end
- def initialize(request)
+ def initialize(request, adapter)
@request = request
+ @adapter = adapter
end
protected
- attr_reader :request
+ attr_reader :request, :adapter
end
end
end
diff --git a/lib/nickserver/request_handlers/fingerprint_handler.rb b/lib/nickserver/request_handlers/fingerprint_handler.rb
index 5b2dc7d..ac3c3c8 100644
--- a/lib/nickserver/request_handlers/fingerprint_handler.rb
+++ b/lib/nickserver/request_handlers/fingerprint_handler.rb
@@ -22,7 +22,7 @@ module Nickserver
end
def source
- Nickserver::Hkp::Source.new
+ Nickserver::Hkp::Source.new adapter
end
end
diff --git a/lib/nickserver/request_handlers/hkp_email_handler.rb b/lib/nickserver/request_handlers/hkp_email_handler.rb
index 2f73773..393ef87 100644
--- a/lib/nickserver/request_handlers/hkp_email_handler.rb
+++ b/lib/nickserver/request_handlers/hkp_email_handler.rb
@@ -16,7 +16,7 @@ module Nickserver
end
def source
- Nickserver::Hkp::Source.new
+ Nickserver::Hkp::Source.new adapter
end
end
diff --git a/lib/nickserver/request_handlers/leap_email_handler.rb b/lib/nickserver/request_handlers/leap_email_handler.rb
index bdebc23..bc3ddef 100644
--- a/lib/nickserver/request_handlers/leap_email_handler.rb
+++ b/lib/nickserver/request_handlers/leap_email_handler.rb
@@ -13,7 +13,7 @@ module Nickserver
protected
def source
- @source ||= Nicknym::Source.new
+ @source ||= Nicknym::Source.new adapter
end
def remote_email?
diff --git a/lib/nickserver/request_handlers/local_email_handler.rb b/lib/nickserver/request_handlers/local_email_handler.rb
index 9165ef2..08147a0 100644
--- a/lib/nickserver/request_handlers/local_email_handler.rb
+++ b/lib/nickserver/request_handlers/local_email_handler.rb
@@ -21,7 +21,7 @@ module Nickserver
end
def source
- Nickserver::CouchDB::Source.new
+ Nickserver::CouchDB::Source.new adapter
end
end