Skip to content

Commit

Permalink
Update to libcnb v2 alpha, update to mockery 2.x
Browse files Browse the repository at this point in the history
Signed-off-by: Ozzy Osborne <[email protected]>
  • Loading branch information
BarDweller committed Aug 11, 2023
1 parent e071b20 commit 6553c32
Show file tree
Hide file tree
Showing 40 changed files with 117 additions and 74 deletions.
2 changes: 1 addition & 1 deletion bard/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"io"
"strings"

"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2/log"
"github.com/heroku/color"
)

Expand Down
2 changes: 1 addition & 1 deletion bindings/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
)

// Predicate should return true if it matches a given binding.
Expand Down
2 changes: 1 addition & 1 deletion bindings/resolve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package bindings_test
import (
"testing"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

Expand Down
2 changes: 1 addition & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package libpak

import (
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"

"github.com/paketo-buildpacks/libpak/bard"
"github.com/paketo-buildpacks/libpak/internal"
Expand Down
4 changes: 2 additions & 2 deletions build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"path/filepath"
"testing"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion buildpack_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"reflect"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
"github.com/imdario/mergo"
)

Expand Down
2 changes: 1 addition & 1 deletion buildpack_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package libpak_test
import (
"testing"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

Expand Down
2 changes: 1 addition & 1 deletion carton/build_image_dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"testing"

"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion carton/buildmodule_dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"testing"

"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
4 changes: 2 additions & 2 deletions carton/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package carton

import (
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"

"github.com/paketo-buildpacks/libpak/effect"
)

//go:generate mockery -name EntryWriter -case=underscore
//go:generate mockery --name EntryWriter --case=underscore

// EntryWriter is the interface implemented by a type that wants to write an entry.
type EntryWriter interface {
Expand Down
2 changes: 1 addition & 1 deletion carton/lifecycle_dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"testing"

"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
16 changes: 15 additions & 1 deletion carton/mocks/entry_writer.go

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

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

"github.com/BurntSushi/toml"
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
"github.com/heroku/color"

"github.com/paketo-buildpacks/libpak"
Expand Down
2 changes: 1 addition & 1 deletion carton/package_dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"testing"

"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion carton/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"path/filepath"
"testing"

"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion dependency_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"time"

"github.com/BurntSushi/toml"
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
"github.com/heroku/color"

"github.com/paketo-buildpacks/libpak/bard"
Expand Down
2 changes: 1 addition & 1 deletion dependency_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"time"

"github.com/BurntSushi/toml"
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
"github.com/sclevine/spec"
Expand Down
2 changes: 1 addition & 1 deletion detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package libpak

import (
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"

"github.com/paketo-buildpacks/libpak/bard"
"github.com/paketo-buildpacks/libpak/internal"
Expand Down
4 changes: 2 additions & 2 deletions detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"path/filepath"
"testing"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion effect/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type Execution struct {
Stderr io.Writer
}

//go:generate mockery -name Executor -case=underscore
//go:generate mockery --name Executor --case=underscore

// Executor is the interface for types that can execute an Execution.
type Executor interface {
Expand Down
16 changes: 15 additions & 1 deletion effect/mocks/executor.go

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

3 changes: 1 addition & 2 deletions formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ import (
"testing"

. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/paketo-buildpacks/libpak"
"github.com/sclevine/spec"
)

func testFormatter(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package libpak

import (
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"

"github.com/paketo-buildpacks/libpak/bard"
"github.com/paketo-buildpacks/libpak/internal"
Expand Down
4 changes: 2 additions & 2 deletions generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"path/filepath"
"testing"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/BurntSushi/toml v1.3.2
github.com/Masterminds/semver/v3 v3.2.1
github.com/buildpacks/libcnb v1.24.1-0.20230724194433-19d88148ffa1
github.com/buildpacks/libcnb/v2 v2.0.0-alpha.1
github.com/creack/pty v1.1.18
github.com/h2non/filetype v1.1.3
github.com/heroku/color v0.0.6
Expand All @@ -28,9 +28,9 @@ require (
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
30 changes: 8 additions & 22 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
github.com/buildpacks/libcnb v1.24.1-0.20230627130937-5d3d3f6e6d16 h1:rx4pWmx2K/BnT0K41xX0BCGCvnQFLMGza7MTD474EwE=
github.com/buildpacks/libcnb v1.24.1-0.20230627130937-5d3d3f6e6d16/go.mod h1:SALIsTZ/aKTjVImBl20gf4QaZV6UQNV4WX2I4a6Am4A=
github.com/buildpacks/libcnb v1.24.1-0.20230724194433-19d88148ffa1 h1:1PiXtoBeUfsfcf3jD9O5n2FNKER9Ild7uvGig9eN8U0=
github.com/buildpacks/libcnb v1.24.1-0.20230724194433-19d88148ffa1/go.mod h1:Q7dE9sksaUWe0gjQdMLkxpSmopYXVisVOGYVBXWuwrY=
github.com/buildpacks/libcnb/v2 v2.0.0-alpha.1 h1:Re6ij+R/7CkWsOJUpQU76v5Ki7MTjUpLn0XEzsDbbZE=
github.com/buildpacks/libcnb/v2 v2.0.0-alpha.1/go.mod h1:kqJbwxQrjebmQJQsB6zdR56nM/5vwvQAKwe9/HZgVB0=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
Expand Down Expand Up @@ -43,12 +41,7 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/onsi/ginkgo/v2 v2.9.7 h1:06xGQy5www2oN160RtEZoTvnP2sPhEfePYmCDc2szss=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc=
github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ=
github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o=
github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
Expand All @@ -70,22 +63,15 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
Expand Down
2 changes: 1 addition & 1 deletion internal/toml_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"

"github.com/BurntSushi/toml"
"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
"github.com/heroku/color"

"github.com/paketo-buildpacks/libpak/bard"
Expand Down
2 changes: 1 addition & 1 deletion internal/toml_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"path/filepath"
"testing"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
"github.com/heroku/color"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
Expand Down
2 changes: 1 addition & 1 deletion layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/BurntSushi/toml"
"github.com/heroku/color"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"

"github.com/paketo-buildpacks/libpak/internal"
"github.com/paketo-buildpacks/libpak/sbom"
Expand Down
2 changes: 1 addition & 1 deletion layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"testing"
"time"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
"github.com/sclevine/spec"
Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
package libpak

import (
"github.com/buildpacks/libcnb"

"github.com/buildpacks/libcnb/v2"
"github.com/paketo-buildpacks/libpak/internal"
)

Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"path/filepath"
"testing"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/mocks"
. "github.com/onsi/gomega"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
Expand Down
Loading

0 comments on commit 6553c32

Please sign in to comment.