-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from dwyl/update-specs
Update specs
- Loading branch information
Showing
3 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ defmodule Gogs.GitMock do | |
iex> GitMock.clone("any-url-containing-the-word-error-to-trigger-failure") | ||
{:error, %Git.Error{message: "git clone error (mock)"}} | ||
""" | ||
@spec clone(String.t()) :: {:ok, Git.Repository.t()} | {:error, Git.Error} | ||
@spec clone(String.t() | list(String.t())) :: {:ok, Git.Repository.t()} | {:error, Git.Error} | ||
def clone(url) do | ||
case Useful.typeof(url) do | ||
# e.g: ["ssh://[email protected]/myorg/error-test.git", "tmp/test-repo"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ defmodule GogsHelpers do | |
"[email protected]:" | ||
""" | ||
@spec make_url(String.t(), integer()) :: String.t() | ||
@spec make_url(String.t(), integer() | nil) :: String.t() | ||
def make_url(git_url, port \\ 0) | ||
def make_url(git_url, port) when port > 0, do: "ssh://git@#{git_url}:#{port}/" | ||
def make_url(git_url, _port), do: "git@#{git_url}:" | ||
|
@@ -104,6 +104,7 @@ defmodule GogsHelpers do | |
else | ||
Path.join([temp_dir(@git_dir), org, repo]) |> Path.expand() | ||
end | ||
|
||
# coveralls-ignore-stop | ||
end | ||
|
||
|