Skip to content

Commit

Permalink
Aligns file structure to top-level package with run command (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmoran authored Jun 10, 2020
1 parent afab469 commit 87297c0
Show file tree
Hide file tree
Showing 26 changed files with 28 additions and 33 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions bundler/build_test.go → build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/chronos"
"github.com/paketo-buildpacks/packit/postal"
"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler/bundler/fakes"
"github.com/paketo-community/bundler"
"github.com/paketo-community/bundler/fakes"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ api = "0.2"
name = "Bundler Buildpack"

[metadata]
include_files = ["bin/build", "bin/detect", "buildpack.toml"]
include_files = ["bin/build", "bin/detect", "bin/run", "buildpack.toml"]
pre_package = "./scripts/build.sh"
[metadata.default-versions]
bundler = "2.x.x"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
13 changes: 0 additions & 13 deletions cmd/detect/main.go

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions bundler/detect_test.go → detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler/bundler/fakes"
"github.com/paketo-community/bundler"
"github.com/paketo-community/bundler/fakes"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bundler/log_emitter_test.go → log_emitter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/paketo-buildpacks/packit"
"github.com/paketo-buildpacks/packit/postal"
"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/paketo-buildpacks/packit"
"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion bundler/plan_refinery_test.go → plan_refinery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/paketo-buildpacks/packit/postal"
"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
26 changes: 17 additions & 9 deletions cmd/build/main.go → run/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,30 @@ import (
"github.com/paketo-buildpacks/packit/cargo"
"github.com/paketo-buildpacks/packit/chronos"
"github.com/paketo-buildpacks/packit/postal"
"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler"
)

func main() {
buildpackYMLParser := bundler.NewBuildpackYMLParser()
gemfileLockParser := bundler.NewGemfileLockParser()
logEmitter := bundler.NewLogEmitter(os.Stdout)
entryResolver := bundler.NewPlanEntryResolver(logEmitter)
dependencyManager := postal.NewService(cargo.NewTransport())
planRefinery := bundler.NewPlanRefinery()
versionShimmer := bundler.NewVersionShimmer()

packit.Build(bundler.Build(
entryResolver,
dependencyManager,
planRefinery,
logEmitter,
chronos.DefaultClock,
versionShimmer,
))
packit.Run(
bundler.Detect(
buildpackYMLParser,
gemfileLockParser,
),
bundler.Build(
entryResolver,
dependencyManager,
planRefinery,
logEmitter,
chronos.DefaultClock,
versionShimmer,
),
)
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"

"github.com/paketo-community/bundler/bundler"
"github.com/paketo-community/bundler"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down

0 comments on commit 87297c0

Please sign in to comment.