Change data-dog/godog references to cucumber/godog

* update makefile
Этот коммит содержится в:
Jayson Smith 2020-02-06 08:38:28 -07:00
родитель 37f5ec316c
коммит b9b8a8cd4f
34 изменённых файлов: 53 добавлений и 55 удалений

Просмотреть файл

@ -6,8 +6,8 @@ test:
@echo "running all tests" @echo "running all tests"
@go install ./... @go install ./...
@go fmt ./... @go fmt ./...
@golint github.com/DATA-DOG/godog @golint github.com/cucumber/godog
@golint github.com/DATA-DOG/godog/cmd/godog @golint github.com/cucumber/godog/cmd/godog
go vet ./... go vet ./...
go test -race go test -race
godog -f progress -c 4 godog -f progress -c 4
@ -23,7 +23,7 @@ bump:
@if [ -z "$(VERSION)" ]; then echo "Provide version like: 'VERSION=$(VERS) make bump'"; exit 1; fi @if [ -z "$(VERSION)" ]; then echo "Provide version like: 'VERSION=$(VERS) make bump'"; exit 1; fi
@echo "bumping version from: $(VERS) to $(VERSION)" @echo "bumping version from: $(VERS) to $(VERSION)"
@sed -i.bak 's/$(VERS)/$(VERSION)/g' godog.go @sed -i.bak 's/$(VERS)/$(VERSION)/g' godog.go
@sed -i.bak 's/$(VERS)/$(VERSION)/g' examples/api/version.feature @sed -i.bak 's/$(VERS)/$(VERSION)/g' examples/api/features/version.feature
@find . -name '*.bak' | xargs rm @find . -name '*.bak' | xargs rm
cover: cover:

Просмотреть файл

@ -9,7 +9,7 @@ import (
var astContextSrc = `package main var astContextSrc = `package main
import ( import (
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
) )
func MyContext(s *godog.Suite) { func MyContext(s *godog.Suite) {
@ -18,7 +18,7 @@ func MyContext(s *godog.Suite) {
var astTwoContextSrc = `package lib var astTwoContextSrc = `package lib
import ( import (
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
) )
func ApiContext(s *godog.Suite) { func ApiContext(s *godog.Suite) {

Просмотреть файл

@ -26,11 +26,11 @@ var gopaths = filepath.SplitList(build.Default.GOPATH)
var goarch = build.Default.GOARCH var goarch = build.Default.GOARCH
var goos = build.Default.GOOS var goos = build.Default.GOOS
var godogImportPath = "github.com/DATA-DOG/godog" var godogImportPath = "github.com/cucumber/godog"
var runnerTemplate = template.Must(template.New("testmain").Parse(`package main var runnerTemplate = template.Must(template.New("testmain").Parse(`package main
import ( import (
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
{{if .Contexts}}_test "{{.ImportPath}}"{{end}} {{if .Contexts}}_test "{{.ImportPath}}"{{end}}
"os" "os"
) )

Просмотреть файл

@ -25,13 +25,13 @@ var (
compiler = filepath.Join(tooldir, "compile") compiler = filepath.Join(tooldir, "compile")
linker = filepath.Join(tooldir, "link") linker = filepath.Join(tooldir, "link")
gopaths = filepath.SplitList(build.Default.GOPATH) gopaths = filepath.SplitList(build.Default.GOPATH)
godogImportPath = "github.com/DATA-DOG/godog" godogImportPath = "github.com/cucumber/godog"
// godep // godep
runnerTemplate = template.Must(template.New("testmain").Parse(`package main runnerTemplate = template.Must(template.New("testmain").Parse(`package main
import ( import (
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
{{if .Contexts}}_test "{{.ImportPath}}"{{end}} {{if .Contexts}}_test "{{.ImportPath}}"{{end}}
{{if .XContexts}}_xtest "{{.ImportPath}}_test"{{end}} {{if .XContexts}}_xtest "{{.ImportPath}}_test"{{end}}
{{if .XContexts}}"testing/internal/testdeps"{{end}} {{if .XContexts}}"testing/internal/testdeps"{{end}}
@ -60,7 +60,7 @@ func main() {
// temp file for import // temp file for import
tempFileTemplate = template.Must(template.New("temp").Parse(`package {{.Name}} tempFileTemplate = template.Must(template.New("temp").Parse(`package {{.Name}}
import "github.com/DATA-DOG/godog" import "github.com/cucumber/godog"
var _ = godog.Version var _ = godog.Version
`)) `))

Просмотреть файл

@ -36,7 +36,7 @@ func TestGodogBuildWithModuleOutsideGopathAndHavingOnlyFeature(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if out, err := exec.Command("go", "mod", "edit", "-require", "github.com/DATA-DOG/godog@v0.7.12").CombinedOutput(); err != nil { if out, err := exec.Command("go", "mod", "edit", "-require", "github.com/cucumber/godog@v0.7.12").CombinedOutput(); err != nil {
t.Log(string(out)) t.Log(string(out))
t.Fatal(err) t.Fatal(err)
} }

Просмотреть файл

@ -27,7 +27,7 @@ var builderTestFile = `package godogs
import ( import (
"fmt" "fmt"
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
) )
func thereAreGodogs(available int) error { func thereAreGodogs(available int) error {
@ -66,7 +66,7 @@ var builderXTestFile = `package godogs_test
import ( import (
"fmt" "fmt"
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
"godogs" "godogs"
) )
@ -275,7 +275,7 @@ func TestGodogBuildWithinGopath(t *testing.T) {
} }
defer os.RemoveAll(gopath) defer os.RemoveAll(gopath)
pkg := filepath.Join(gopath, "src", "github.com", "DATA-DOG") pkg := filepath.Join(gopath, "src", "github.com", "cucumber")
if err := os.MkdirAll(pkg, 0755); err != nil { if err := os.MkdirAll(pkg, 0755); err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -325,7 +325,7 @@ func TestGodogBuildWithVendoredGodogAndMod(t *testing.T) {
} }
defer os.RemoveAll(gopath) defer os.RemoveAll(gopath)
pkg := filepath.Join(dir, "vendor", "github.com", "DATA-DOG") pkg := filepath.Join(dir, "vendor", "github.com", "cucumber")
if err := os.MkdirAll(pkg, 0755); err != nil { if err := os.MkdirAll(pkg, 0755); err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -371,7 +371,7 @@ func TestGodogBuildWithVendoredGodogWithoutModule(t *testing.T) {
} }
defer os.RemoveAll(gopath) defer os.RemoveAll(gopath)
pkg := filepath.Join(dir, "vendor", "github.com", "DATA-DOG") pkg := filepath.Join(dir, "vendor", "github.com", "cucumber")
if err := os.MkdirAll(pkg, 0755); err != nil { if err := os.MkdirAll(pkg, 0755); err != nil {
t.Fatal(err) t.Fatal(err)
} }

Просмотреть файл

@ -8,8 +8,8 @@ import (
"path/filepath" "path/filepath"
"syscall" "syscall"
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
) )
var parsedStatus int var parsedStatus int

Просмотреть файл

@ -7,7 +7,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
) )
type csiState int type csiState int

Просмотреть файл

@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
) )
func getVersion(w http.ResponseWriter, r *http.Request) { func getVersion(w http.ResponseWriter, r *http.Request) {

Просмотреть файл

@ -7,8 +7,8 @@ import (
"net/http/httptest" "net/http/httptest"
"reflect" "reflect"
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
type apiFeature struct { type apiFeature struct {

Просмотреть файл

@ -10,8 +10,8 @@ import (
"strings" "strings"
txdb "github.com/DATA-DOG/go-txdb" txdb "github.com/DATA-DOG/go-txdb"
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func init() { func init() {

Просмотреть файл

@ -7,8 +7,8 @@ import (
"os" "os"
"testing" "testing"
"github.com/DATA-DOG/godog" "github.com/cucumber/godog"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
) )
var opt = godog.Options{Output: colors.Colored(os.Stdout)} var opt = godog.Options{Output: colors.Colored(os.Stdout)}

Просмотреть файл

@ -9,7 +9,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
) )
var descFeaturesArgument = "Optional feature(s) to run. Can be:\n" + var descFeaturesArgument = "Optional feature(s) to run. Can be:\n" +

Просмотреть файл

@ -7,7 +7,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
) )
func TestFlagsShouldRandomizeAndGenerateSeed(t *testing.T) { func TestFlagsShouldRandomizeAndGenerateSeed(t *testing.T) {

4
fmt.go
Просмотреть файл

@ -13,8 +13,8 @@ import (
"time" "time"
"unicode" "unicode"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
// some snippet formatting regexps // some snippet formatting regexps

Просмотреть файл

@ -19,7 +19,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func init() { func init() {

Просмотреть файл

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
const nanoSec = 1000000 const nanoSec = 1000000

Просмотреть файл

@ -9,7 +9,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func init() { func init() {

Просмотреть файл

@ -9,8 +9,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
var sampleGherkinFeature = ` var sampleGherkinFeature = `

Просмотреть файл

@ -8,8 +8,8 @@ import (
"strings" "strings"
"unicode/utf8" "unicode/utf8"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func init() { func init() {

Просмотреть файл

@ -7,7 +7,7 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func init() { func init() {

Просмотреть файл

@ -7,8 +7,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func TestProgressFormatterOutput(t *testing.T) { func TestProgressFormatterOutput(t *testing.T) {

Просмотреть файл

@ -30,7 +30,7 @@ func TestPrintingFormatters(t *testing.T) {
suite.Step(`^odd (\d+) and even (\d+) number$`, oddEvenStepDef) suite.Step(`^odd (\d+) and even (\d+) number$`, oddEvenStepDef)
pkg := os.Getenv("GODOG_TESTED_PACKAGE") pkg := os.Getenv("GODOG_TESTED_PACKAGE")
os.Setenv("GODOG_TESTED_PACKAGE", "github.com/DATA-DOG/godog") os.Setenv("GODOG_TESTED_PACKAGE", "github.com/cucumber/godog")
for _, feat := range features { for _, feat := range features {
for name := range AvailableFormatters() { for name := range AvailableFormatters() {
expectOutputPath := strings.Replace(feat.Path, "features", name, 1) expectOutputPath := strings.Replace(feat.Path, "features", name, 1)

Просмотреть файл

@ -1,6 +1,6 @@
package godog package godog
import "github.com/DATA-DOG/godog/gherkin" import "github.com/cucumber/godog/gherkin"
// examples is a helper func to cast gherkin.Examples // examples is a helper func to cast gherkin.Examples
// or gherkin.BaseExamples if its empty // or gherkin.BaseExamples if its empty

5
go.mod
Просмотреть файл

@ -1,9 +1,8 @@
module github.com/DATA-DOG/godog module github.com/cucumber/godog
go 1.12 go 1.13
require ( require (
github.com/DATA-DOG/go-txdb v0.1.3 github.com/DATA-DOG/go-txdb v0.1.3
github.com/go-sql-driver/mysql v1.5.0 github.com/go-sql-driver/mysql v1.5.0
github.com/lib/pq v1.3.0 // indirect
) )

1
go.sum
Просмотреть файл

@ -2,4 +2,3 @@ github.com/DATA-DOG/go-txdb v0.1.3 h1:R4v6OuOcy2O147e2zHxU0B4NDtF+INb5R9q/CV7AEM
github.com/DATA-DOG/go-txdb v0.1.3/go.mod h1:DhAhxMXZpUJVGnT+p9IbzJoRKvlArO2pkHjnGX7o0n0= github.com/DATA-DOG/go-txdb v0.1.3/go.mod h1:DhAhxMXZpUJVGnT+p9IbzJoRKvlArO2pkHjnGX7o0n0=
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=

Просмотреть файл

@ -39,4 +39,4 @@ Godog was inspired by Behat and Cucumber the above description is taken from it'
package godog package godog
// Version of package - based on Semantic Versioning 2.0.0 http://semver.org/ // Version of package - based on Semantic Versioning 2.0.0 http://semver.org/
const Version = "v0.7.14" const Version = "v0.8.0"

2
run.go
Просмотреть файл

@ -10,7 +10,7 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
) )
const ( const (

Просмотреть файл

@ -10,8 +10,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func okStep() error { func okStep() error {

Просмотреть файл

@ -10,7 +10,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
var matchFuncDefRef = regexp.MustCompile(`\(([^\)]+)\)`) var matchFuncDefRef = regexp.MustCompile(`\(([^\)]+)\)`)

Просмотреть файл

@ -5,7 +5,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
func TestShouldSupportIntTypes(t *testing.T) { func TestShouldSupportIntTypes(t *testing.T) {

Просмотреть файл

@ -15,7 +15,7 @@ import (
"time" "time"
"unicode/utf8" "unicode/utf8"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
var errorInterface = reflect.TypeOf((*error)(nil)).Elem() var errorInterface = reflect.TypeOf((*error)(nil)).Elem()

Просмотреть файл

@ -11,7 +11,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/DATA-DOG/godog/gherkin" "github.com/cucumber/godog/gherkin"
) )
// SuiteContext provides steps for godog suite execution and // SuiteContext provides steps for godog suite execution and

Просмотреть файл

@ -4,7 +4,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/DATA-DOG/godog/colors" "github.com/cucumber/godog/colors"
) )
var ( var (