Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

using outsourced folder lib #157

Merged
merged 1 commit into from
Nov 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package: github.com/getantibody/antibody
import:
- package: github.com/getantibody/folder
- package: github.com/caarlos0/gohome
- package: github.com/urfave/cli
- package: github.com/kardianos/osext
Expand Down
27 changes: 0 additions & 27 deletions naming/naming.go

This file was deleted.

23 changes: 0 additions & 23 deletions naming/naming_test.go

This file was deleted.

12 changes: 6 additions & 6 deletions project/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/getantibody/antibody/naming"
"github.com/getantibody/folder"
)

type gitProject struct {
Expand All @@ -18,12 +18,12 @@ type gitProject struct {

// NewClonedGit is a git project that was already cloned, so, only Update
// will work here.
func NewClonedGit(home, folder string) Project {
func NewClonedGit(home, folderName string) Project {
version := "master"
version, _ = branch(folder)
url := naming.FolderToURL(folder)
version, _ = branch(folderName)
url := folder.ToURL(folderName)
return gitProject{
folder: filepath.Join(home, folder),
folder: filepath.Join(home, folderName),
Version: version,
URL: url,
}
Expand Down Expand Up @@ -54,7 +54,7 @@ func NewGit(cwd, line string) Project {
case strings.HasPrefix(repo, "git@github.com:"):
url = repo
}
folder := filepath.Join(cwd, naming.URLToFolder(url))
folder := filepath.Join(cwd, folder.FromURL(url))
return gitProject{
Version: version,
URL: url,
Expand Down