Skip to content
代码片段 群组 项目
提交 e6767f59 编辑于 作者: 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
No related branches found
No related tags found
无相关合并请求
# 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 GlRepository ...@@ -19,7 +21,7 @@ module GlRepository
}.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 @@ def self.parse(gl_repository) ...@@ -39,5 +41,11 @@ def self.parse(gl_repository)
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,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册