Skip to content

Commit

Permalink
Merge pull request #34 from retr0h/bug-33
Browse files Browse the repository at this point in the history
Corrected bug where name contains a '.'
  • Loading branch information
retr0h authored Mar 23, 2019
2 parents ba63452 + e531a86 commit c1babe3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion giturlparse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
r'[:/]*'
r'(?P<port>[\d]+){0,1}'
r'(?P<pathname>\/((?P<owner>[\w\-]+)\/)?'
r'((?P<name>[\w\-]+)(\.git)?)?)$'),
r'((?P<name>[\w\-\.]+?)(\.git)?)?)$'),
re.compile(r'(git\+)?'
r'((?P<protocol>\w+)://)'
r'((?P<user>\w+)@)?'
Expand Down
24 changes: 24 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,30 @@ def first_match_urls():
'name': 'sphinx',
'owner': 'sphinx-doc',
},
# https://github.com/retr0h/git-url-parse/issues/33
'https://github.com/tterranigma/Stouts.openvpn': {
'pathname': '/tterranigma/Stouts.openvpn',
'protocols': ['https'],
'protocol': 'https',
'href': 'https://github.com/tterranigma/Stouts.openvpn',
'resource': 'github.com',
'user': None,
'port': None,
'name': 'Stouts.openvpn',
'owner': 'tterranigma',
},
# https://github.com/retr0h/git-url-parse/issues/33
'https://github.com/tterranigma/Stouts.openvpn.git': {
'pathname': '/tterranigma/Stouts.openvpn.git',
'protocols': ['https'],
'protocol': 'https',
'href': 'https://github.com/tterranigma/Stouts.openvpn.git',
'resource': 'github.com',
'user': None,
'port': None,
'name': 'Stouts.openvpn',
'owner': 'tterranigma',
},
}


Expand Down

0 comments on commit c1babe3

Please sign in to comment.