Commit 7cee70ec authored by georg's avatar georg
Browse files

Merge branch 'remove-ruby-2.1-hacks' into 'main'

ruby 2.1 support is gone

See merge request !369
parents 09067806 04c00b32
Pipeline #55379 passed with stage
in 4 minutes and 54 seconds
......@@ -4,13 +4,7 @@ module Schleuder
class Conf
include Singleton
# since the regexp got only included into stdlib 2.2
# TODO: remove once 2.1 support dropped
if RUBY_VERSION < '2.2'
EMAIL_REGEXP = /\A[a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z/
else
EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP
end
EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP
# TODO: drop v3 keys and only accept length of 40
FINGERPRINT_REGEXP = /\A(0x)?[a-f0-9]{32}([a-f0-9]{8})?\z/i
......
......@@ -7,11 +7,7 @@ module Schleuder
class Logger < Syslog::Logger
include LoggerNotifications
def initialize
if RUBY_VERSION.to_f < 2.1
super('Schleuder')
else
super('Schleuder', Syslog::LOG_MAIL)
end
super('Schleuder', Syslog::LOG_MAIL)
# We need some sender-address different from the superadmin-address.
@from = "#{`whoami`.chomp}@#{`hostname`.chomp}"
@adminaddresses = Conf.superadmin
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment