summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-12-07 19:10:46 +0100
committergit <svn-admin@ruby-lang.org>2021-12-08 07:59:34 +0900
commitf0ef9ffed1afe6a4add8959ed54b986d952c0a31 (patch)
tree6c8313b8c7af77f2494722f4079ea73e7962c3d2 /lib/bundler
parent6beb05c2ad924eed761e6a31fcc397a5faa57553 (diff)
[rubygems/rubygems] Cancel deprecation of custom git sources
https://github.com/rubygems/rubygems/commit/99cd6e0627
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/dsl.rb27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 1108fc3b78..f7922b1fba 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -277,9 +277,6 @@ module Bundler
def add_git_sources
git_source(:github) do |repo_name|
- warn_deprecated_git_source(:github, <<-'RUBY'.strip, 'Change any "reponame" :github sources to "username/reponame".')
-"https://github.com/#{repo_name}.git"
- RUBY
if repo_name =~ GITHUB_PULL_REQUEST_URL
{
"git" => "https://github.com/#{$1}.git",
@@ -294,18 +291,10 @@ module Bundler
end
git_source(:gist) do |repo_name|
- warn_deprecated_git_source(:gist, '"https://gist.github.com/#{repo_name}.git"')
-
"https://gist.github.com/#{repo_name}.git"
end
git_source(:bitbucket) do |repo_name|
- warn_deprecated_git_source(:bitbucket, <<-'RUBY'.strip)
-user_name, repo_name = repo_name.split("/")
-repo_name ||= user_name
-"https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
- RUBY
-
user_name, repo_name = repo_name.split("/")
repo_name ||= user_name
"https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
@@ -490,22 +479,6 @@ repo_name ||= user_name
end
end
- def warn_deprecated_git_source(name, replacement, additional_message = nil)
- additional_message &&= " #{additional_message}"
- replacement = if replacement.count("\n").zero?
- "{|repo_name| #{replacement} }"
- else
- "do |repo_name|\n#{replacement.to_s.gsub(/^/, " ")}\n end"
- end
-
- Bundler::SharedHelpers.major_deprecation 3, <<-EOS
-The :#{name} git source is deprecated, and will be removed in the future.#{additional_message} Add this code to the top of your Gemfile to ensure it continues to work:
-
- git_source(:#{name}) #{replacement}
-
- EOS
- end
-
class DSLError < GemfileError
# @return [String] the description that should be presented to the user.
#