bin/gitlink in gitlink-0.0.4 vs bin/gitlink in gitlink-0.0.5
- old
+ new
@@ -60,14 +60,15 @@
remote[0] == @remote
end
raise "this project does not have any remotes" if remotes.empty?
- project_params = remotes.first.match(/\.*(.com|.net|.org|.biz|.edu)(:|\/)(.*)(.git|\s)/)
+ project_params = remotes.first.match(/(?:.com)[:\/](.*)(?:.git)/)
unsupported_url_message = "Your remote has an unsupported URL. Feel free to make an issue at github.com/cacqw7/gitlink"
raise unsupported_url_message if project_params.size == 0
- project_params = project_params[3]
+ project_params = project_params[1]
+ puts "project_params: #{project_params} "
@base_project_url = "http://github.com/#{project_params}"
@current_branch = %x(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
@current_branch.chomp!
true