Skip to content

Commit a07b789

Browse files
Drop bundler 1.17 tests
1 parent 720c50b commit a07b789

14 files changed

Lines changed: 7 additions & 229 deletions

File tree

integration/simple_app_test.go

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -216,135 +216,6 @@ func testSimpleApp(t *testing.T, context spec.G, it spec.S) {
216216
Expect(logs).NotTo(ContainLines(MatchRegexp(`\* rspec-support`)))
217217
})
218218

219-
context("the version of bundler in the Gemfile.lock is 1.17.x", func() {
220-
it("creates a working OCI image", func() {
221-
var logs fmt.Stringer
222-
var err error
223-
224-
source, err = occam.Source(filepath.Join("testdata", "bundler_version_1_17"))
225-
Expect(err).NotTo(HaveOccurred())
226-
227-
// must build with MRI 3.0 or 3.1, as some Bundler 1.17 code is not compatible with Ruby 3.2
228-
// for example: `/usr/local/bundle/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.`
229-
image, logs, err = pack.WithVerbose().Build.
230-
WithBuildpacks(
231-
settings.Buildpacks.MRI.Online,
232-
settings.Buildpacks.Bundler.Online,
233-
settings.Buildpacks.BundleInstall.Online,
234-
settings.Buildpacks.BundleList.Online,
235-
).
236-
WithEnv(map[string]string{"BP_MRI_VERSION": "3.1"}).
237-
WithPullPolicy("never").
238-
Execute(name, source)
239-
Expect(err).NotTo(HaveOccurred())
240-
Expect(logs).To(ContainLines(
241-
MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, settings.Buildpack.Name)),
242-
" Executing build environment install process",
243-
" Running 'bundle config --global clean true'",
244-
))
245-
Expect(logs).To(ContainLines(
246-
MatchRegexp(fmt.Sprintf(" Running 'bundle config --global path /layers/%s/build-gems'", strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
247-
))
248-
Expect(logs).To(ContainLines(" Running 'bundle config --global cache_path --parseable'"))
249-
Expect(logs).To(ContainLines(" Running 'bundle install'"))
250-
Expect(logs).To(ContainLines(
251-
MatchRegexp(` Completed in \d+\.?\d*`),
252-
))
253-
Expect(logs).To(ContainLines(
254-
" Executing launch environment install process",
255-
" Running 'bundle config --global clean true'",
256-
))
257-
Expect(logs).To(ContainLines(MatchRegexp(fmt.Sprintf(" Running 'bundle config --global path /layers/%s/launch-gems'", strings.ReplaceAll(settings.Buildpack.ID, "/", "_")))))
258-
Expect(logs).To(ContainLines(" Running 'bundle config --global without development:test'"))
259-
Expect(logs).To(ContainLines(" Running 'bundle config --global cache_path --parseable'"))
260-
Expect(logs).To(ContainLines(" Running 'bundle install'"))
261-
Expect(logs).To(ContainLines(
262-
MatchRegexp(` Completed in \d+\.?\d*`),
263-
))
264-
Expect(logs).To(ContainLines(
265-
" Configuring build environment",
266-
MatchRegexp(fmt.Sprintf(` BUNDLE_USER_CONFIG -> "/layers/%s/build-gems/config"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
267-
))
268-
Expect(logs).To(ContainLines(
269-
" Configuring launch environment",
270-
MatchRegexp(fmt.Sprintf(` BUNDLE_USER_CONFIG -> "/layers/%s/launch-gems/config"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))),
271-
))
272-
273-
Expect(logs).To(ContainLines(
274-
"Paketo Buildpack for Bundle List",
275-
))
276-
Expect(logs).To(ContainLines(
277-
" Gems included by the bundle:",
278-
MatchRegexp(` \* bundler`),
279-
MatchRegexp(` \* coderay`),
280-
MatchRegexp(` \* diff-lcs`),
281-
MatchRegexp(` \* method_source`),
282-
MatchRegexp(` \* mustermann`),
283-
MatchRegexp(` \* nio4r`),
284-
MatchRegexp(` \* pry`),
285-
MatchRegexp(` \* puma`),
286-
MatchRegexp(` \* rack`),
287-
MatchRegexp(` \* rack-protection`),
288-
MatchRegexp(` \* rspec`),
289-
MatchRegexp(` \* rspec-core`),
290-
MatchRegexp(` \* rspec-expectations`),
291-
MatchRegexp(` \* rspec-mocks`),
292-
MatchRegexp(` \* rspec-support`),
293-
MatchRegexp(` \* ruby2_keywords`),
294-
MatchRegexp(` \* sinatra`),
295-
MatchRegexp(` \* tilt`),
296-
))
297-
298-
container, err = docker.Container.Run.
299-
WithCommand("bundle config && bundle list && bundle exec rackup -o 0.0.0.0").
300-
WithEnv(map[string]string{"PORT": "9292"}).
301-
WithPublish("9292").
302-
WithPublishAll().
303-
Execute(image.ID)
304-
Expect(err).NotTo(HaveOccurred())
305-
306-
Eventually(container).Should(BeAvailable())
307-
Eventually(container).Should(Serve(ContainSubstring("Hello world!")).OnPort(9292))
308-
309-
logs, err = docker.Container.Logs.Execute(container.ID)
310-
Expect(err).NotTo(HaveOccurred())
311-
layerPath := fmt.Sprintf("/layers/%s", strings.ReplaceAll(settings.Buildpack.ID, "/", "_"))
312-
Expect(logs).To(ContainLines(
313-
"retry",
314-
"Set for the current user ("+layerPath+"/launch-gems/config): 5",
315-
))
316-
Expect(logs).To(ContainLines(
317-
"clean",
318-
`Set for the current user (`+layerPath+`/launch-gems/config): "true"`,
319-
))
320-
Expect(logs).To(ContainLines(
321-
"path",
322-
`Set for the current user (`+layerPath+`/launch-gems/config): "`+layerPath+`/launch-gems"`,
323-
))
324-
Expect(logs).To(ContainLines(
325-
"without",
326-
"Set for the current user ("+layerPath+"/launch-gems/config): [:development, :test]",
327-
))
328-
Expect(logs).To(ContainLines(
329-
"user_config",
330-
`Set via BUNDLE_USER_CONFIG: "`+layerPath+`/launch-gems/config"`,
331-
))
332-
333-
Expect(logs).To(ContainLines(
334-
"Gems included by the bundle:",
335-
MatchRegexp(` \* bundler`),
336-
MatchRegexp(` \* mustermann`),
337-
MatchRegexp(` \* nio4r`),
338-
MatchRegexp(` \* puma`),
339-
MatchRegexp(` \* rack`),
340-
MatchRegexp(` \* rack-protection`),
341-
MatchRegexp(` \* ruby2_keywords`),
342-
MatchRegexp(` \* sinatra`),
343-
MatchRegexp(` \* tilt`),
344-
))
345-
})
346-
})
347-
348219
context("validating SBOM", func() {
349220
var (
350221
sbomDir string

integration/testdata/bundler_version_1_17/.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

integration/testdata/bundler_version_1_17/Gemfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

integration/testdata/bundler_version_1_17/Gemfile.lock

Lines changed: 0 additions & 52 deletions
This file was deleted.

integration/testdata/bundler_version_1_17/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

integration/testdata/bundler_version_1_17/app.rb

Lines changed: 0 additions & 19 deletions
This file was deleted.

integration/testdata/bundler_version_1_17/config.ru

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
ruby '~> 3.0'
3+
ruby '~> 3.2.0'
44

55
gem 'sinatra'
66
gem 'puma'

integration/testdata/offline_app/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DEPENDENCIES
2525
sinatra
2626

2727
RUBY VERSION
28-
ruby 3.1.4p223
28+
ruby 3.2.10p0
2929

3030
BUNDLED WITH
3131
2.2.33
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
ruby '~> 3.0'
3+
ruby '~> 3.2.0'
44

55
gem 'sinatra'
66
gem 'puma'

0 commit comments

Comments
 (0)