blob: 9c9620bc36a15721553e651b702a57821a457c60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module Gitlab
module DependencyLinker
class RequirementsTxtLinker < BaseLinker
self.file_type = :requirements_txt
private
def link_dependencies
link_regex(/^(?<name>(?![a-z+]+:)[^#.-][^ ><=~!;\[]+)/) do |name|
"https://pypi.python.org/pypi/#{name}"
end
link_regex(%r{^(?<name>https?://[^ ]+)}, &:itself)
end
end
end
end
|