BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e2ffb869
Commit
e2ffb869
authored
May 15, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dm-dependency-linker-file-type' into 'master'
Select dependency linker based on file type See merge request !11357
parents
709ce8a4
38d84f83
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
base_linker.rb
lib/gitlab/dependency_linker/base_linker.rb
+8
-2
gemfile_linker.rb
lib/gitlab/dependency_linker/gemfile_linker.rb
+1
-3
file_detector.rb
lib/gitlab/file_detector.rb
+1
-0
No files found.
lib/gitlab/dependency_linker/base_linker.rb
View file @
e2ffb869
module
Gitlab
module
Gitlab
module
DependencyLinker
module
DependencyLinker
class
BaseLinker
class
BaseLinker
def
self
.
link
(
plain_text
,
highlighted_text
)
class_attribute
:file_type
new
(
plain_text
,
highlighted_text
).
link
def
self
.
support?
(
blob_name
)
Gitlab
::
FileDetector
.
type_of
(
blob_name
)
==
file_type
end
def
self
.
link
(
*
args
)
new
(
*
args
).
link
end
end
attr_accessor
:plain_text
,
:highlighted_text
attr_accessor
:plain_text
,
:highlighted_text
...
...
lib/gitlab/dependency_linker/gemfile_linker.rb
View file @
e2ffb869
module
Gitlab
module
Gitlab
module
DependencyLinker
module
DependencyLinker
class
GemfileLinker
<
BaseLinker
class
GemfileLinker
<
BaseLinker
def
self
.
support?
(
blob_name
)
self
.
file_type
=
:gemfile
blob_name
==
'Gemfile'
||
blob_name
==
'gems.rb'
end
private
private
...
...
lib/gitlab/file_detector.rb
View file @
e2ffb869
...
@@ -12,6 +12,7 @@ module Gitlab
...
@@ -12,6 +12,7 @@ module Gitlab
version:
'version'
,
version:
'version'
,
gitignore:
'.gitignore'
,
gitignore:
'.gitignore'
,
koding:
'.koding.yml'
,
koding:
'.koding.yml'
,
gemfile:
/\A(Gemfile|gems\.rb)\z/
,
gitlab_ci:
'.gitlab-ci.yml'
,
gitlab_ci:
'.gitlab-ci.yml'
,
avatar:
/\Alogo\.(png|jpg|gif)\z/
,
avatar:
/\Alogo\.(png|jpg|gif)\z/
,
route_map:
'route-map.yml'
route_map:
'route-map.yml'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment