compat/download_strategy: improve messaging.
This should make it clearer how you can maintain this yourself (as well as being a better fit with `odeprecated`'s output).
This commit is contained in:
parent
4231197437
commit
9272579593
@ -10,7 +10,7 @@ require "download_strategy"
|
||||
class S3DownloadStrategy < CurlDownloadStrategy
|
||||
def initialize(url, name, version, **meta)
|
||||
odeprecated("S3DownloadStrategy",
|
||||
"maintaining S3DownloadStrategy in your own formula or tap")
|
||||
"a vendored S3DownloadStrategy in your own formula or tap (using require_relative)")
|
||||
super
|
||||
end
|
||||
|
||||
@ -52,7 +52,7 @@ class GitHubPrivateRepositoryDownloadStrategy < CurlDownloadStrategy
|
||||
|
||||
def initialize(url, name, version, **meta)
|
||||
odeprecated("GitHubPrivateRepositoryDownloadStrategy",
|
||||
"maintaining GitHubPrivateRepositoryDownloadStrategy in your own formula or tap")
|
||||
"a vendored GitHubPrivateRepositoryDownloadStrategy in your own formula or tap (using require_relative)")
|
||||
super
|
||||
parse_url_pattern
|
||||
set_github_token
|
||||
@ -106,7 +106,7 @@ end
|
||||
class GitHubPrivateRepositoryReleaseDownloadStrategy < GitHubPrivateRepositoryDownloadStrategy
|
||||
def initialize(url, name, version, **meta)
|
||||
odeprecated("GitHubPrivateRepositoryReleaseDownloadStrategy",
|
||||
"maintaining GitHubPrivateRepositoryReleaseDownloadStrategy in your own formula or tap")
|
||||
"a vendored GitHubPrivateRepositoryReleaseDownloadStrategy in your own formula or tap (using require_relative)")
|
||||
super
|
||||
end
|
||||
|
||||
@ -162,7 +162,7 @@ end
|
||||
class ScpDownloadStrategy < AbstractFileDownloadStrategy
|
||||
def initialize(url, name, version, **meta)
|
||||
odeprecated("ScpDownloadStrategy",
|
||||
"maintaining ScpDownloadStrategy in your own formula or tap")
|
||||
"a vendored ScpDownloadStrategy in your own formula or tap (using require_relative)")
|
||||
super
|
||||
parse_url_pattern
|
||||
end
|
||||
@ -214,11 +214,11 @@ class DownloadStrategyDetector
|
||||
case url
|
||||
when %r{^s3://}
|
||||
odeprecated("s3://",
|
||||
"maintaining S3DownloadStrategy in your own formula or tap")
|
||||
"a vendored S3DownloadStrategy in your own formula or tap (using require_relative)")
|
||||
S3DownloadStrategy
|
||||
when %r{^scp://}
|
||||
odeprecated("scp://",
|
||||
"maintaining ScpDownloadStrategy in your own formula or tap")
|
||||
"a vendored ScpDownloadStrategy in your own formula or tap (using require_relative)")
|
||||
ScpDownloadStrategy
|
||||
else
|
||||
super(url)
|
||||
@ -229,19 +229,20 @@ class DownloadStrategyDetector
|
||||
case symbol
|
||||
when :github_private_repo
|
||||
odeprecated(":github_private_repo",
|
||||
"maintaining GitHubPrivateRepositoryDownloadStrategy in your own formula or tap")
|
||||
"a vendored GitHubPrivateRepositoryDownloadStrategy in your own formula or tap (using require_relative)")
|
||||
GitHubPrivateRepositoryDownloadStrategy
|
||||
when :github_private_release
|
||||
odeprecated(":github_private_repo",
|
||||
"maintaining GitHubPrivateRepositoryReleaseDownloadStrategy in your own formula or tap")
|
||||
"a vendored GitHubPrivateRepositoryReleaseDownloadStrategy in your own formula or tap "\
|
||||
"(using require_relative)")
|
||||
GitHubPrivateRepositoryReleaseDownloadStrategy
|
||||
when :s3
|
||||
odeprecated(":s3",
|
||||
"maintaining S3DownloadStrategy in your own formula or tap")
|
||||
"a vendored S3DownloadStrategy in your own formula or tap (using require_relative)")
|
||||
S3DownloadStrategy
|
||||
when :scp
|
||||
odeprecated(":scp",
|
||||
"maintaining ScpDownloadStrategy in your own formula or tap")
|
||||
"a vendored ScpDownloadStrategy in your own formula or tap (using require_relative)")
|
||||
ScpDownloadStrategy
|
||||
else
|
||||
super(symbol)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user