From aed9ae1743eaf433f192a4602b2c6012ffb02a25 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 25 May 2016 14:59:16 +0200 Subject: fix our own warnings --- lib/nickserver/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/nickserver/config.rb') diff --git a/lib/nickserver/config.rb b/lib/nickserver/config.rb index 46b6bef..13e284b 100644 --- a/lib/nickserver/config.rb +++ b/lib/nickserver/config.rb @@ -59,7 +59,7 @@ module Nickserver YAML.load(File.read(file_path)).each do |key, value| begin self.send("#{key}=", value) - rescue NoMethodError => exc + rescue NoMethodError STDERR.puts "ERROR in file #{file_path}, '#{key}' is not a valid option" exit(1) end -- cgit v1.2.3 From a89e2ba55399e6bddd9e052cf2064ed0056c958a Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 8 Jun 2016 12:44:38 +0200 Subject: refactor: use new couch_db classes from fetch_key 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. --- lib/nickserver/config.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/nickserver/config.rb') diff --git a/lib/nickserver/config.rb b/lib/nickserver/config.rb index 13e284b..b1def7c 100644 --- a/lib/nickserver/config.rb +++ b/lib/nickserver/config.rb @@ -36,6 +36,21 @@ module Nickserver self.validate end + def self.couch_url + [ 'http://', + couch_auth, + couch_host, + ':', + couch_port, + '/', + couch_database + ].join + end + + def self.couch_auth + "#{couch_user}:#{couch_password}@" if couch_user + end + private def self.validate -- cgit v1.2.3