зеркало из https://github.com/mislav/hub.git
GitHub remote urls don't have to necessarily end in ".git"
This commit is contained in:
Родитель
539b4c52dd
Коммит
c69991f3a4
|
@ -233,8 +233,9 @@ module Hub
|
|||
end
|
||||
|
||||
def project
|
||||
if urls.find { |u| u =~ %r{\bgithub\.com[:/](.+)/(.+).git$} }
|
||||
GithubProject.new local_repo, $1, $2
|
||||
if urls.find { |u| u =~ %r{\bgithub\.com[:/](.+)/(.+)\z} }
|
||||
owner = $1
|
||||
GithubProject.new local_repo, owner, $2.sub(/\.git$/, '')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1045,6 +1045,11 @@ config
|
|||
assert_command "browse --", "open https://github.com/defunkt/hub"
|
||||
end
|
||||
|
||||
def test_hub_browse_current_https_uri
|
||||
stub_repo_url "https://github.com/defunkt/hub"
|
||||
assert_command "browse", "open https://github.com/defunkt/hub"
|
||||
end
|
||||
|
||||
def test_hub_browse_commit_from_current
|
||||
assert_command "browse -- commit/6616e4", "open https://github.com/defunkt/hub/commit/6616e4"
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче