No Simple Way to Replace or Customize `DownloadSupport` Implementation
- 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
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