diff options
author | Azul <azul@riseup.net> | 2016-05-25 14:59:16 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-05-25 14:59:16 +0200 |
commit | aed9ae1743eaf433f192a4602b2c6012ffb02a25 (patch) | |
tree | 63d134b574bc4063d1263118e7b719e9b66c4cde | |
parent | 9598e42722c13030b757b7b4ab47de0d50228d5c (diff) |
fix our own warnings
-rw-r--r-- | lib/nickserver/config.rb | 2 | ||||
-rw-r--r-- | lib/nickserver/daemon.rb | 4 | ||||
-rw-r--r-- | test/unit/hkp_test.rb | 1 |
3 files changed, 3 insertions, 4 deletions
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 diff --git a/lib/nickserver/daemon.rb b/lib/nickserver/daemon.rb index 7d0f02a..9b06a3c 100644 --- a/lib/nickserver/daemon.rb +++ b/lib/nickserver/daemon.rb @@ -60,7 +60,7 @@ module Nickserver def daemonize return bail("Process is already started") if daemon_running? - pid = fork do + _pid = fork do exit if fork Process.setsid exit if fork @@ -219,7 +219,7 @@ module Nickserver end def override_default_config(flag, value) - flag = flag.sub /^--/, '' + flag = flag.sub(/^--/, '') if Config.respond_to?("#{flag}=") Config.send("#{flag}=", value) else diff --git a/test/unit/hkp_test.rb b/test/unit/hkp_test.rb index fc3cf97..c315726 100644 --- a/test/unit/hkp_test.rb +++ b/test/unit/hkp_test.rb @@ -67,7 +67,6 @@ class HkpTest < Minitest::Test def test_fetch_key_too_short uid = 'chiiph@leap.se' - key_id = '9A753A6B' stub_sks_vindex_reponse(uid, body: file_content(:short_key_vindex_result)) test_em_errback "Nickserver::Hkp::FetchKey.new.get '#{uid}'" do |error| |