apache / apache/groovy-geb

No Simple Way to Replace or Customize `DownloadSupport` Implementation

Open
#204 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Groovy
Stars
1.2k
Forks
235
PR merge metrics
No merged PRs in 30d

Description

I need to use a custom implementation of `DownloadSupport` in a `GebSpec`, but I found it quite difficult to replace the default implementation.

The best approach I could come up with was to create a `Trait` that implements `DownloadSupport`, essentially duplicating most of the functionality from `DefaultDownloadSupport` while modifying just one detail: the `private URL resolveUrl(Map)` method.

If `resolveUrl(Map)` wasn't private, or if there were a more straightforward way to override or swap the `DownloadSupport` implementation, this process would be much simpler and more flexible.

Contributor guide

Open the contributing guide

Research direction

Start by reading DownloadSupport, DefaultDownloadSupport, and GebSpec to understand how the default implementation is selected and how resolveUrl(Map) is used. Determine an extension or replacement path that avoids duplicating DefaultDownloadSupport, then verify that a GebSpec can customize the implementation while preserving existing download behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.