Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Commit 04c00b32 authored by ng's avatar ng
Browse files

ruby 2.1 support is gone

parent 09067806
Pipeline #55375 passed with stages
in 5 minutes and 46 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