Commit e1e1c338 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'ee-ee-183-common-code-backport' into 'master'

Port of ee-183-common-code-backport to EE

See merge request gitlab-org/gitlab-ee!4860
parents 7574be1c 8895abaf
......@@ -68,6 +68,14 @@ module Gitlab
nil
end
# Used in EE
# Accepts either an Array or a String and returns an array
def ensure_array_from_string(string_or_array)
return string_or_array if string_or_array.is_a?(Array)
string_or_array.split(',').map(&:strip)
end
# EE below
def try_megabytes_to_bytes(size)
Integer(size).megabytes
......
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