Added support for https:// repo URLs. #867.

This commit is contained in:
Parker Moore 2012-12-19 23:45:34 -05:00
parent b97839f0d2
commit 3c92c5b407

View File

@ -382,7 +382,7 @@ task :setup_github_pages, :repo do |t, args|
else else
repo_url = get_stdin("Enter the read/write url for your repository: ") repo_url = get_stdin("Enter the read/write url for your repository: ")
end end
user = repo_url.match(/:([^\/]+)/)[1] user = repo_url.match(/(:([^\/]+)|(github.com\/([^\/]+)))/)[2] || repo_url.match(/(:([^\/]+)|(github.com\/([^\/]+)))/)[4]
branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master' branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master'
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : '' project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
url = "http://#{user}.github.com" url = "http://#{user}.github.com"