Permalink
Browse files

Use vendors in `nut publish`.

  • Loading branch information...
1 parent d56099f commit e0d078e5a1d60f57522be65f9a8c678ba4593924 @AlekSi committed Feb 17, 2013
Showing with 4 additions and 4 deletions.
  1. +3 −3 integration_test/remote_test.go
  2. +1 −1 nut/publish.go
@@ -33,15 +33,15 @@ func (*R) TestPublishGet(c *C) {
gitNoDiff(c, TestNut2)
_, stderr = runNut(c, TestNut1, "publish -v test_nut1-0.0.1.nut")
- c.Check(strings.HasSuffix(stderr, `Nut "test_nut1" version "0.0.1" published.`), Equals, true)
+ c.Check(strings.HasSuffix(stderr, `Nut AlekSi/test_nut1 version 0.0.1 published.`), Equals, true)
gitNoDiff(c, TestNut1)
_, stderr = runNut(c, TestNut1, "publish -v test_nut1-0.0.1.nut", 1)
- c.Check(strings.HasSuffix(stderr, `Nut "test_nut1" version "0.0.1" already exists.`), Equals, true)
+ c.Check(strings.HasSuffix(stderr, `Nut AlekSi/test_nut1 version 0.0.1 already exists.`), Equals, true)
gitNoDiff(c, TestNut1)
_, stderr = runNut(c, TestNut2, "publish -v test_nut2-0.0.2.nut")
- c.Check(strings.HasSuffix(stderr, `Nut "test_nut2" version "0.0.2" published.`), Equals, true)
+ c.Check(strings.HasSuffix(stderr, `Nut AlekSi/test_nut2 version 0.0.2 published.`), Equals, true)
gitNoDiff(c, TestNut2)
// _, stderr = runNut(c, "", "get -v test_nut2/0.0.2")
View
@@ -49,7 +49,7 @@ func runPublish(cmd *Command) {
for _, arg := range cmd.Flag.Args() {
b, nf := ReadNut(arg)
- url.Path = fmt.Sprintf("/%s/%s", nf.Name, nf.Version)
+ url.Path = fmt.Sprintf("/%s/%s/%s", nf.Vendor, nf.Name, nf.Version)
if publishV {
log.Printf("Putting %s to %s ...", arg, url)

0 comments on commit e0d078e

Please sign in to comment.