Skip to content

Commit

Permalink
Merge pull request #15 from manifoldco/optionally-append-v1
Browse files Browse the repository at this point in the history
Append `/v1` if not already provided in base url
  • Loading branch information
ianlivingstone authored Apr 28, 2017
2 parents 938f68b + 8df87aa commit 200a4de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### Fixed

- A backwards incompatible change was accidently introduced in `v0.6.5`, `/v1`
would always be appended to the url, instead, `/v1` will only be appended if
the provided url does not end with `/v1`.

## [0.6.5] - 2017-04-27

### Fixed
Expand Down
4 changes: 3 additions & 1 deletion cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ func testCmd(ctx *cli.Context) error {
}

// Always append the '/v1' to the path
purl.Path = path.Join(purl.Path, "/v1")
if !strings.HasSuffix(purl.Path, "/v1") {
purl.Path = path.Join(purl.Path, "/v1")
}

k, err := getKeypair()
if err != nil {
Expand Down

0 comments on commit 200a4de

Please sign in to comment.