Skip to content

Commit

Permalink
Changed the package imports to use the fork.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaningrooves committed Jun 23, 2016
1 parent 0d9d4a4 commit 92acbca
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 27 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ Test2doc will generate markdown documentation for this endpoint in the [API Blue
### Get Widget [GET]
retrieves a single Widget
+ Response 200
+ Response 200
+ Body
{
"Id": 2,
"Name": "Pencil",
"Role": "Utensil"
}
}
```

Which you can then parse and host w/ *Apiary.io*, eg [here](http://docs.testingit.apiary.io/#).
Which you can then parse and host w/ *Apiary.io*, eg [here](http://docs.testingit.apiary.io/#).
Or use a custom parser and host yourself.

![screenshot](http://s17.postimg.org/6mz3ich1b/Screen_Shot_2015_11_06_at_9_38_46_AM.png)
Expand All @@ -65,7 +65,7 @@ Very few additions, and only to your testing code.
```go

import (
"github.com/adams-sarah/test2doc/test"
"github.com/ivaningrooves/test2doc/test"
)

var server *test.Server
Expand Down Expand Up @@ -109,20 +109,20 @@ func TestMain(m *testing.M) {
`gorilla/mux` configurations

```go
// NOTE: if you are using gorilla/mux, you must set the router's
// NOTE: if you are using gorilla/mux, you must set the router's
// 'KeepContext' to true, so that url parameters can be accessed
// after the request has been handled.
router := NewRouter()
router.KeepContext = true

// Use mux.Vars func as URLVarExtractor
test.RegisterURLVarExtractor(mux.Vars)
```

`julienschmidt/httprouter` configurations

```go
// MakeURLVarExtractor returns a func which extracts
// MakeURLVarExtractor returns a func which extracts
// url vars from a request for test2doc documentation generation
func MakeURLVarExtractor(router *httprouter.Router) parse.URLVarExtractor {
return func(req *http.Request) map[string]string {
Expand Down Expand Up @@ -198,7 +198,7 @@ for f in ${files[@]}; do
done
```

where `apib.tmpl` includes the doc header information.
where `apib.tmpl` includes the doc header information.
Something like:

```
Expand Down Expand Up @@ -241,8 +241,6 @@ retrieves a single Widget

### Installation

`go get github.com/adams-sarah/test2doc/...`
`go get github.com/ivaningrooves/test2doc/...`

<br>


2 changes: 1 addition & 1 deletion doc/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"text/template"

"github.com/adams-sarah/test2doc/doc/parse"
"github.com/ivaningrooves/test2doc/doc/parse"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion doc/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"text/template"

"github.com/adams-sarah/test2doc/doc/parse"
"github.com/ivaningrooves/test2doc/doc/parse"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion doc/parse/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const camelCase = "[A-Z]?[^A-Z]*"

// GetTitle extracts a title from the function name,
// where longFnName is of the form:
// github.com/adams-sarah/test2doc/example.GetWidget
// github.com/ivaningrooves/test2doc/example.GetWidget
// and the out title would be:
// Handle Get Widget
func GetTitle(longFnName string) string {
Expand Down
2 changes: 1 addition & 1 deletion doc/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/url"
"strings"

"github.com/adams-sarah/test2doc/doc/parse"
"github.com/ivaningrooves/test2doc/doc/parse"
)

type URL struct {
Expand Down
2 changes: 1 addition & 1 deletion example/foos/foos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"

"github.com/adams-sarah/test2doc/example/foos"
"github.com/ivaningrooves/test2doc/example/foos"
)

func (t *mainSuite) TestGetFoos() {
Expand Down
4 changes: 2 additions & 2 deletions example/foos/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"

"github.com/adams-sarah/prettytest"
"github.com/adams-sarah/test2doc/example"
"github.com/adams-sarah/test2doc/test"
"github.com/gorilla/mux"
"github.com/ivaningrooves/test2doc/example"
"github.com/ivaningrooves/test2doc/test"
)

var router *mux.Router
Expand Down
4 changes: 2 additions & 2 deletions example/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"log"
"net/http"

"github.com/adams-sarah/test2doc/example/foos"
"github.com/adams-sarah/test2doc/example/widgets"
"github.com/gorilla/mux"
"github.com/ivaningrooves/test2doc/example/foos"
"github.com/ivaningrooves/test2doc/example/widgets"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions example/widgets/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"

"github.com/adams-sarah/prettytest"
"github.com/adams-sarah/test2doc/example"
"github.com/adams-sarah/test2doc/test"
"github.com/gorilla/mux"
"github.com/ivaningrooves/test2doc/example"
"github.com/ivaningrooves/test2doc/test"
)

var router *mux.Router
Expand Down
2 changes: 1 addition & 1 deletion example/widgets/widgets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"net/http"

"github.com/adams-sarah/test2doc/example/widgets"
"github.com/ivaningrooves/test2doc/example/widgets"
)

func (t *mainSuite) TestGetWidgets() {
Expand Down
3 changes: 2 additions & 1 deletion test/responsewriter.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package test

import (
"github.com/adams-sarah/test2doc/doc/parse"
"log"
"net/http"
"net/http/httptest"
"runtime"

"github.com/ivaningrooves/test2doc/doc/parse"
)

type ResponseWriter struct {
Expand Down
4 changes: 2 additions & 2 deletions test/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"net/http/httptest"

"github.com/adams-sarah/test2doc/doc"
"github.com/adams-sarah/test2doc/doc/parse"
"github.com/ivaningrooves/test2doc/doc"
"github.com/ivaningrooves/test2doc/doc/parse"
)

// resources = map[uri]Resource
Expand Down
2 changes: 1 addition & 1 deletion test/urlparameters.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package test

import "github.com/adams-sarah/test2doc/doc/parse"
import "github.com/ivaningrooves/test2doc/doc/parse"

func RegisterURLVarExtractor(fn parse.URLVarExtractor) {
parse.SetURLVarExtractor(&fn)
Expand Down

0 comments on commit 92acbca

Please sign in to comment.