9 lines
179 B
Ruby
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
|