Skip to content

Commit

Permalink
Updates buildpack.toml with 3.1.1, 3.1.2, 2.7.5, 2.7.6, 3.0.3, 3.0.4 (#…
Browse files Browse the repository at this point in the history
…446)

* Add Jammy support

* remove outdated dependencies workflow

* Updating buildpack.toml with new versions 3.1.1, 3.1.2, 2.7.5, 2.7.6, 3.0.3, 3.0.4

* address PR review comments

* Update integration/reuse_layer_rebuild_test.go

Co-authored-by: Ryan Moran <[email protected]>

* Update integration/simple_app_test.go

Co-authored-by: Ryan Moran <[email protected]>

* use stack ID in integration test stack check

Co-authored-by: Sophie Wigmore <[email protected]>
Co-authored-by: Ryan Moran <[email protected]>
  • Loading branch information
3 people authored Nov 17, 2022
1 parent 9f1b8c0 commit ee3aa99
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 229 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/update-dependencies.yml

This file was deleted.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ The options for this setting are:
$BP_LOG_LEVEL="DEBUG"
```

## Compatibility

This buildpack is currently only supported on the Paketo Bionic and Jammy stack
distributions. Pre-compiled distributions of Ruby are provided for the Paketo stacks (i.e.
`io.buildpacks.stack.jammy` and `io.buildpacks.stacks.bionic`).

Jammy stack support only applies to Ruby version 3.1 and above at this time.

## Development

Paketo buildpacks are going through an uniformization of the dev experience across buildpacks,
Expand Down
55 changes: 42 additions & 13 deletions buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,84 +16,110 @@ api = "0.7"
include-files = ["bin/run", "bin/build", "bin/detect", "buildpack.toml"]
pre-package = "./scripts/build.sh"
[metadata.default-versions]
ruby = "2.7.*"
ruby = "3.1.*"

[[metadata.dependencies]]
checksum = "sha256:40a01f1c414b33b10d577b27ee2f826bc6fe30f060fa5e7286278c99fbb82541"
cpe = "cpe:2.3:a:ruby-lang:ruby:2.7.5:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1&download_url=https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.gz"
checksum = "sha256:1df53dc3f2d7f42404bf9225d5066e635e345ea3cb8553bcb9dcb66491e71ad8"
source = "https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.gz"
source-checksum = "sha256:2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://deps.paketo.io/ruby/ruby_2.7.5_linux_x64_bionic_1df53dc3.tgz"
uri = "https://artifacts.paketo.io/ruby/ruby_2.7.5_linux_x64_bionic_40a01f1c.tgz"
version = "2.7.5"

[[metadata.dependencies]]
checksum = "sha256:20cb73d706b00d6b3fb2bdd0ccf3bce956d8f17c1886209b2ede56a6859bd8fc"
cpe = "cpe:2.3:a:ruby-lang:ruby:2.7.6:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=e7203b0cc09442ed2c08936d483f8ac140ec1c72e37bb5c401646b7866cb5d10&download_url=https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.gz"
checksum = "sha256:4e2209e40ef34a2eb310ec853ed6cdb89ceae7892a479734fd0c0ac66ab7e18b"
source = "https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.gz"
source-checksum = "sha256:e7203b0cc09442ed2c08936d483f8ac140ec1c72e37bb5c401646b7866cb5d10"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://deps.paketo.io/ruby/ruby_2.7.6_linux_x64_bionic_4e2209e4.tgz"
uri = "https://artifacts.paketo.io/ruby/ruby_2.7.6_linux_x64_bionic_20cb73d7.tgz"
version = "2.7.6"

[[metadata.dependencies]]
checksum = "sha256:db0b410abba8a0bcfe058c7ef21e438aab5824446fe15f4ce4181bf1c1cb5926"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.0.3:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=3586861cb2df56970287f0fd83f274bd92058872d830d15570b36def7f1a92ac&download_url=https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.gz"
checksum = "sha256:ce7ad4388b30e4194c693cbbbadfa2472b11d1829c74bdc3405689a3d37f6c54"
source = "https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.gz"
source-checksum = "sha256:3586861cb2df56970287f0fd83f274bd92058872d830d15570b36def7f1a92ac"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://deps.paketo.io/ruby/ruby_3.0.3_linux_x64_bionic_ce7ad438.tgz"
uri = "https://artifacts.paketo.io/ruby/ruby_3.0.3_linux_x64_bionic_db0b410a.tgz"
version = "3.0.3"

[[metadata.dependencies]]
checksum = "sha256:9198d20052e1f95e387736b8c5e036c451796851f4284671ecfef30a00ad187a"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.0.4:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=70b47c207af04bce9acea262308fb42893d3e244f39a4abc586920a1c723722b&download_url=https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.4.tar.gz"
checksum = "sha256:75983def802f64201142c69b0ac03eb4548c9840bb529fdca9f887fcc2203ac5"
source = "https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.4.tar.gz"
source-checksum = "sha256:70b47c207af04bce9acea262308fb42893d3e244f39a4abc586920a1c723722b"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://deps.paketo.io/ruby/ruby_3.0.4_linux_x64_bionic_75983def.tgz"
uri = "https://artifacts.paketo.io/ruby/ruby_3.0.4_linux_x64_bionic_9198d200.tgz"
version = "3.0.4"

[[metadata.dependencies]]
checksum = "sha256:38a3dce4558e629165163f5c6fd3713ad051929ae1f76644f77f2c7fa4bea03b"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.1:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=fe6e4782de97443978ddba8ba4be38d222aa24dc3e3f02a6a8e7701c0eeb619d&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.1.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.1.tar.gz"
source-checksum = "sha256:fe6e4782de97443978ddba8ba4be38d222aa24dc3e3f02a6a8e7701c0eeb619d"
stacks = ["io.buildpacks.stacks.jammy"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.1_linux_x64_jammy_38a3dce4.tgz"
version = "3.1.1"

[[metadata.dependencies]]
checksum = "sha256:694d49c723fddc45763737be44931fe08ce73e7faffa976442b99d73c40ba0ff"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.1:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=fe6e4782de97443978ddba8ba4be38d222aa24dc3e3f02a6a8e7701c0eeb619d&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.1.tar.gz"
checksum = "sha256:2b27e266787b9e6c3574c872a8db72ba67fd426b0b47e11e11d21209a7849b73"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.1.tar.gz"
source-checksum = "sha256:fe6e4782de97443978ddba8ba4be38d222aa24dc3e3f02a6a8e7701c0eeb619d"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://deps.paketo.io/ruby/ruby_3.1.1_linux_x64_bionic_2b27e266.tgz"
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.1_linux_x64_bionic_694d49c7.tgz"
version = "3.1.1"

[[metadata.dependencies]]
checksum = "sha256:2df36ef8f98a8e45b5dae3a2c8c4b55298f35c3de707d4e9a46a1e7ebf285877"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.2:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.2.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.2.tar.gz"
source-checksum = "sha256:61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e"
stacks = ["io.buildpacks.stacks.jammy"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.2_linux_x64_jammy_2df36ef8.tgz"
version = "3.1.2"

[[metadata.dependencies]]
checksum = "sha256:8ec033a97e7c6074ce188eee74b465fe16e5870f06445e6fd1b001f5b8c567af"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.2:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["BSD-2-Clause", "BSD-2-Clause-NetBSD", "BSD-3-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "Bison-exception-2.2", "GPL-2.0-only", "GPL-2.0-or-later", "MIT", "MIT-0", "Ruby", "deprecated_GPL-2.0", "deprecated_GPL-2.0+"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.2.tar.gz"
checksum = "sha256:c7f061ce79b72d07541944ae8ca66d3470b3807643fa3ce71ed037155ae52929"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.2.tar.gz"
source-checksum = "sha256:61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://deps.paketo.io/ruby/ruby_3.1.2_linux_x64_bionic_c7f061ce.tgz"
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.2_linux_x64_bionic_8ec033a9.tgz"
version = "3.1.2"

[[metadata.dependency-constraints]]
Expand All @@ -113,3 +139,6 @@ api = "0.7"

[[stacks]]
id = "io.buildpacks.stacks.bionic"

[[stacks]]
id = "io.buildpacks.stacks.jammy"
2 changes: 1 addition & 1 deletion integration.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"builders" : ["paketobuildpacks/builder:buildpackless-base"],
"builders" : ["paketobuildpacks/builder:buildpackless-base", "paketobuildpacks/builder-jammy-buildpackless-base"],
"build-plan": "github.com/paketo-community/build-plan"
}
6 changes: 6 additions & 0 deletions integration/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ var settings struct {
}
}

var builder occam.Builder

func TestIntegration(t *testing.T) {
// Do not truncate Gomega matcher output
// The buildpack output text can be large and we often want to see all of it.
format.MaxLength = 0

Expect := NewWithT(t).Expect
pack := occam.NewPack()

root, err := filepath.Abs("./..")
Expect(err).ToNot(HaveOccurred())
Expand Down Expand Up @@ -79,6 +82,9 @@ func TestIntegration(t *testing.T) {

SetDefaultEventuallyTimeout(5 * time.Second)

builder, err = pack.Builder.Inspect.Execute()
Expect(err).NotTo(HaveOccurred())

suite := spec.New("Integration", spec.Report(report.Terminal{}), spec.Parallel())
suite("Logging", testLogging)
suite("Offline", testOffline)
Expand Down
38 changes: 19 additions & 19 deletions integration/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
settings.Buildpacks.BuildPlan.Online,
).
WithEnv(map[string]string{
"BP_MRI_VERSION": "2.7.x",
"BP_MRI_VERSION": "3.1.x",
}).
Execute(name, source)
Expect(err).ToNot(HaveOccurred(), logs.String)
Expand All @@ -68,29 +68,29 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)),
" Resolving MRI version",
" Candidate version sources (in priority order):",
" BP_MRI_VERSION -> \"2.7.x\"",
" BP_MRI_VERSION -> \"3.1.x\"",
" <unknown> -> \"\"",
))

Expect(logs).To(ContainLines(
MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 2\.7\.\d+`),
MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.1\.\d+`),
))

Expect(logs).To(ContainLines(
" Executing build process",
MatchRegexp(` Installing MRI 2\.7\.\d+`),
MatchRegexp(` Installing MRI 3\.1\.\d+`),
MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`),
))

Expect(logs).To(ContainLines(
" Configuring build environment",
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.gem/ruby/2\.7\.\d+:/layers/%s/mri/lib/ruby/gems/2\.7\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
` MALLOC_ARENA_MAX -> "2"`,
))

Expect(logs).To(ContainLines(
" Configuring launch environment",
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.gem/ruby/2\.7\.\d+:/layers/%s/mri/lib/ruby/gems/2\.7\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
` MALLOC_ARENA_MAX -> "2"`,
))
})
Expand All @@ -109,7 +109,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
settings.Buildpacks.BuildPlan.Online,
).
WithEnv(map[string]string{
"BP_MRI_VERSION": "2.7.x",
"BP_MRI_VERSION": "3.1.x",
"BP_LOG_LEVEL": "DEBUG",
}).
Execute(name, source)
Expand All @@ -119,12 +119,12 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)),
" Resolving MRI version",
" Candidate version sources (in priority order):",
" BP_MRI_VERSION -> \"2.7.x\"",
" BP_MRI_VERSION -> \"3.1.x\"",
" <unknown> -> \"\"",
))

Expect(logs).To(ContainLines(
MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 2\.7\.\d+`),
MatchRegexp(` Selected MRI version \(using BP_MRI_VERSION\): 3\.1\.\d+`),
))

Expect(logs).To(ContainLines(
Expand All @@ -134,9 +134,9 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {

Expect(logs).To(ContainLines(
" Executing build process",
MatchRegexp(` Installing MRI 2\.7\.\d+`),
MatchRegexp(` Installing MRI 3\.1\.\d+`),
fmt.Sprintf(" Installation path: /layers/%s/mri", strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
MatchRegexp(` Source URI\: https\:\/\/deps\.paketo\.io\/ruby\/ruby_2\.7\.\d+_linux_x64_bionic_.*\.tgz`),
MatchRegexp(` Source URI\: https\:\/\/artifacts\.paketo\.io\/ruby\/ruby_3\.1\.\d+_linux_x64_*_.*\.tgz`),
MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`),
))

Expand All @@ -146,13 +146,13 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {

Expect(logs).To(ContainLines(
" Configuring build environment",
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.gem/ruby/2\.7\.\d+:/layers/%s/mri/lib/ruby/gems/2\.7\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
` MALLOC_ARENA_MAX -> "2"`,
))

Expect(logs).To(ContainLines(
" Configuring launch environment",
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.gem/ruby/2\.7\.\d+:/layers/%s/mri/lib/ruby/gems/2\.7\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
` MALLOC_ARENA_MAX -> "2"`,
))
})
Expand All @@ -164,7 +164,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
source, err = occam.Source(filepath.Join("testdata", "simple_app"))
Expect(err).NotTo(HaveOccurred())

err = os.WriteFile(filepath.Join(source, "buildpack.yml"), []byte(`{ "mri": { "version": "2.7.x" } }`), 0600)
err = os.WriteFile(filepath.Join(source, "buildpack.yml"), []byte(`{ "mri": { "version": "3.1.x" } }`), 0600)
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -181,12 +181,12 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)),
" Resolving MRI version",
" Candidate version sources (in priority order):",
" buildpack.yml -> \"2.7.x\"",
" buildpack.yml -> \"3.1.x\"",
" <unknown> -> \"\"",
))

Expect(logs).To(ContainLines(
MatchRegexp(` Selected MRI version \(using buildpack\.yml\): 2\.7\.\d+`),
MatchRegexp(` Selected MRI version \(using buildpack\.yml\): 3\.1\.\d+`),
))

Expect(logs).To(ContainLines(
Expand All @@ -196,19 +196,19 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {

Expect(logs).To(ContainLines(
" Executing build process",
MatchRegexp(` Installing MRI 2\.7\.\d+`),
MatchRegexp(` Installing MRI 3\.1\.\d+`),
MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`),
))

Expect(logs).To(ContainLines(
" Configuring build environment",
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.gem/ruby/2\.7\.\d+:/layers/%s/mri/lib/ruby/gems/2\.7\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
` MALLOC_ARENA_MAX -> "2"`,
))

Expect(logs).To(ContainLines(
" Configuring launch environment",
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.gem/ruby/2\.7\.\d+:/layers/%s/mri/lib/ruby/gems/2\.7\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
MatchRegexp(fmt.Sprintf(` GEM_PATH -> "/home/cnb/.local/share/gem/ruby/3\.1\.\d+:/layers/%s/mri/lib/ruby/gems/3\.1\.\d+"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
` MALLOC_ARENA_MAX -> "2"`,
))
})
Expand Down
2 changes: 1 addition & 1 deletion integration/offline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func testOffline(t *testing.T, context spec.G, it spec.S) {
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(BeAvailable(), logs.String())
Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 2\.7\.\d+`)).OnPort(8080))
Eventually(container).Should(Serve(MatchRegexp(`Hello from Ruby 3\.1\.\d+`)).OnPort(8080))
})
})
}
Loading

0 comments on commit ee3aa99

Please sign in to comment.