Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept period in repo path regex #193

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rosdistro/repository_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

class RepositorySpecification(object):
# Match groups are server and path on server.
VCS_REGEX = re.compile(r'(?:https?:\/\/|ssh:\/\/|git:\/\/|git@)((?:[a-fA-F0-9]{40}@)?[\w.-]+)[:/]([\w/-]*)(?:\.git)?$')
VCS_REGEX = re.compile(r'(?:https?:\/\/|ssh:\/\/|git:\/\/|git@)((?:[a-fA-F0-9]{40}@)?[\w.-]+)[:/]([\w./-]*?)(?:\.git)?$')

def __init__(self, name, data):
self.name = name
Expand Down
3 changes: 3 additions & 0 deletions test/test_repository_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ def test_repository_specification():

r.url = 'https://[email protected]:a/b/c/d/e.git'
assert r.get_url_parts() == ('[email protected]', 'a/b/c/d/e')

r.url = 'https://example.com/a.b/c.d/e.git'
assert r.get_url_parts() == ('example.com', 'a.b/c.d/e')
Loading