Commit e6767f59 authored by Douwe Maan's avatar Douwe Maan

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

Make Gitlab::GlRepository#types an instance method

See merge request gitlab-org/gitlab-ce!27902
parents e0074780 55457b2c
# frozen_string_literal: true # frozen_string_literal: true
module Gitlab module Gitlab
module GlRepository class GlRepository
include Singleton
PROJECT = RepoType.new( PROJECT = RepoType.new(
name: :project, name: :project,
access_checker_class: Gitlab::GitAccess, access_checker_class: Gitlab::GitAccess,
...@@ -19,7 +21,7 @@ module Gitlab ...@@ -19,7 +21,7 @@ module Gitlab
}.freeze }.freeze
def self.types def self.types
TYPES instance.types
end end
def self.parse(gl_repository) def self.parse(gl_repository)
...@@ -39,5 +41,11 @@ module Gitlab ...@@ -39,5 +41,11 @@ module Gitlab
def self.default_type def self.default_type
PROJECT PROJECT
end end
def types
TYPES
end
private_class_method :instance
end end
end end
# frozen_string_literal: true # frozen_string_literal: true
module Gitlab module Gitlab
module GlRepository class GlRepository
class RepoType class RepoType
attr_reader :name, attr_reader :name,
:access_checker_class, :access_checker_class,
......
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