lib/git_httpsable/push/repository.rb in git_httpsable-push-0.1.1 vs lib/git_httpsable/push/repository.rb in git_httpsable-push-0.1.2

- old
+ new

@@ -17,11 +17,11 @@ URI::Generic.build( scheme: scheme, userinfo: userinfo, host: host(parsed.host), port: port, - path: parsed.path + path: absolute_path(parsed.path) ) git.push(converted_url.to_s, branch, options) rescue StandardError => e raise e if e.is_a?(GitHttpsablePushError) @@ -68,9 +68,13 @@ ENV['GIT_SERVER_HOST'] || host end def port ENV['GIT_SERVER_PORT'] || nil + end + + def absolute_path(path) + path.start_with?('/') ? path : '/' + path end end end end