Merge branch 'bvl-upload-designs-fix-ce' into 'master'

Make Gitlab::GlRepository#types an instance method

See merge request gitlab-org/gitlab-ce!27902
This commit is contained in:
Douwe Maan 2019-05-01 11:52:57 +00:00
commit e6767f5922
2 changed files with 11 additions and 3 deletions

View file

@ -1,7 +1,9 @@
# frozen_string_literal: true
module Gitlab
module GlRepository
class GlRepository
include Singleton
PROJECT = RepoType.new(
name: :project,
access_checker_class: Gitlab::GitAccess,
@ -19,7 +21,7 @@ module Gitlab
}.freeze
def self.types
TYPES
instance.types
end
def self.parse(gl_repository)
@ -39,5 +41,11 @@ module Gitlab
def self.default_type
PROJECT
end
def types
TYPES
end
private_class_method :instance
end
end

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Gitlab
module GlRepository
class GlRepository
class RepoType
attr_reader :name,
:access_checker_class,