Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
11e22835
Commit
11e22835
authored
Jun 23, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't match tilde and exclamation mark as part of requirements.txt package name
parent
5cd1a48d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
changelogs/unreleased/dm-requirements-txt-tilde.yml
changelogs/unreleased/dm-requirements-txt-tilde.yml
+5
-0
lib/gitlab/dependency_linker/requirements_txt_linker.rb
lib/gitlab/dependency_linker/requirements_txt_linker.rb
+1
-1
spec/lib/gitlab/dependency_linker/requirements_txt_linker_spec.rb
.../gitlab/dependency_linker/requirements_txt_linker_spec.rb
+4
-0
No files found.
changelogs/unreleased/dm-requirements-txt-tilde.yml
0 → 100644
View file @
11e22835
---
title
:
Don't match tilde and exclamation mark as part of requirements.txt package
name
merge_request
:
author
:
lib/gitlab/dependency_linker/requirements_txt_linker.rb
View file @
11e22835
...
@@ -6,7 +6,7 @@ module Gitlab
...
@@ -6,7 +6,7 @@ module Gitlab
private
private
def
link_dependencies
def
link_dependencies
link_regex
(
/^(?<name>(?![a-z+]+:)[^#.-][^ ><=;\[]+)/
)
do
|
name
|
link_regex
(
/^(?<name>(?![a-z+]+:)[^#.-][^ ><=
~!
;\[]+)/
)
do
|
name
|
"https://pypi.python.org/pypi/
#{
name
}
"
"https://pypi.python.org/pypi/
#{
name
}
"
end
end
...
...
spec/lib/gitlab/dependency_linker/requirements_txt_linker_spec.rb
View file @
11e22835
...
@@ -54,6 +54,8 @@ describe Gitlab::DependencyLinker::RequirementsTxtLinker, lib: true do
...
@@ -54,6 +54,8 @@ describe Gitlab::DependencyLinker::RequirementsTxtLinker, lib: true do
Sphinx>=1.3
Sphinx>=1.3
docutils>=0.7
docutils>=0.7
markupsafe
markupsafe
pytest~=3.0
foop!=3.0
CONTENT
CONTENT
end
end
...
@@ -78,6 +80,8 @@ describe Gitlab::DependencyLinker::RequirementsTxtLinker, lib: true do
...
@@ -78,6 +80,8 @@ describe Gitlab::DependencyLinker::RequirementsTxtLinker, lib: true do
expect
(
subject
).
to
include
(
link
(
'Sphinx'
,
'https://pypi.python.org/pypi/Sphinx'
))
expect
(
subject
).
to
include
(
link
(
'Sphinx'
,
'https://pypi.python.org/pypi/Sphinx'
))
expect
(
subject
).
to
include
(
link
(
'docutils'
,
'https://pypi.python.org/pypi/docutils'
))
expect
(
subject
).
to
include
(
link
(
'docutils'
,
'https://pypi.python.org/pypi/docutils'
))
expect
(
subject
).
to
include
(
link
(
'markupsafe'
,
'https://pypi.python.org/pypi/markupsafe'
))
expect
(
subject
).
to
include
(
link
(
'markupsafe'
,
'https://pypi.python.org/pypi/markupsafe'
))
expect
(
subject
).
to
include
(
link
(
'pytest'
,
'https://pypi.python.org/pypi/pytest'
))
expect
(
subject
).
to
include
(
link
(
'foop'
,
'https://pypi.python.org/pypi/foop'
))
end
end
it
'links URLs'
do
it
'links URLs'
do
...
...
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