From 2aa61f732d93d8f1053e0f8564fc4eb56433df06 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Sat, 14 May 2022 03:14:07 +1000 Subject: [PATCH] fix: missing branch param on base module --- shard.yml | 2 +- src/git-repository.cr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shard.yml b/shard.yml index 2f77f59..b293275 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: git-repository -version: 1.1.0 +version: 1.1.1 development_dependencies: ameba: diff --git a/src/git-repository.cr b/src/git-repository.cr index 47eafe3..6c9e226 100644 --- a/src/git-repository.cr +++ b/src/git-repository.cr @@ -5,7 +5,7 @@ module GitRepository VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify.downcase }} {% end %} - def self.new(repository : String | URI, username : String? = nil, password : String? = nil) : GitRepository::Interface + def self.new(repository : String | URI, username : String? = nil, password : String? = nil, branch : String? = nil) : GitRepository::Interface uri = repository.is_a?(URI) ? repository : URI.parse(repository) downcased_host = uri.host.try &.downcase @@ -16,7 +16,7 @@ module GitRepository # case "www.github.com", "github.com" # once we add specific providers else - GitRepository::Generic.new(uri.to_s, username, password) + GitRepository::Generic.new(uri.to_s, username, password, branch.presence) end end end