debian-mirror-gitlab/lib/gitlab/namespace_sanitizer.rb
2018-12-13 13:39:08 +05:30

9 lines
179 B
Ruby

# frozen_string_literal: true
module Gitlab
class NamespaceSanitizer
def self.sanitize(namespace)
namespace.gsub(/[^-a-z0-9]/, '-').gsub(/^-+/, '')
end
end
end