Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 293d743

Browse files
author
Colby Swandale
authored
Merge #6798 into 2-0-stable (#7182)
Merge #6798 into `2-0-stable`
2 parents f54469e + 50c3395 commit 293d743

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

lib/bundler/dsl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def add_git_sources
305305
# end
306306
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
307307
# TODO: 2.0 upgrade this setting to the default
308-
if Bundler.settings["github.https"]
308+
if Bundler.feature_flag.github_https?
309309
Bundler::SharedHelpers.major_deprecation 3, "The `github.https` setting will be removed"
310310
"https://github.com/#{repo_name}.git"
311311
else

spec/bundler/dsl_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
it "converts :github to :git" do
4646
subject.gem("sparks", :github => "indirect/sparks")
47-
github_uri = "git://github.com/indirect/sparks.git"
47+
github_uri = "https://github.com/indirect/sparks.git"
4848
expect(subject.dependencies.first.source.uri).to eq(github_uri)
4949
end
5050

@@ -62,7 +62,7 @@
6262

6363
it "converts 'rails' to 'rails/rails'" do
6464
subject.gem("rails", :github => "rails")
65-
github_uri = "git://github.com/rails/rails.git"
65+
github_uri = "https://github.com/rails/rails.git"
6666
expect(subject.dependencies.first.source.uri).to eq(github_uri)
6767
end
6868

@@ -253,7 +253,7 @@
253253
end
254254

255255
subject.dependencies.each do |d|
256-
expect(d.source.uri).to eq("git://github.com/spree/spree.git")
256+
expect(d.source.uri).to eq("https://github.com/spree/spree.git")
257257
end
258258
end
259259
end

spec/other/major_deprecation_spec.rb

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
RSpec.describe "major deprecations", :bundler => "< 3" do
3+
RSpec.describe "major deprecations", :bundler => "<= 2" do
44
let(:warnings) { last_command.bundler_err } # change to err in 2.0
55
let(:warnings_without_version_messages) { warnings.gsub(/#{Spec::Matchers::MAJOR_DEPRECATION}Bundler will only support ruby(gems)? >= .*/, "") }
66

@@ -198,17 +198,6 @@
198198
end
199199

200200
context "with github gems" do
201-
it "warns about the https change" do
202-
msg = <<-EOS
203-
The :github git source is deprecated, and will be removed in Bundler 3.0. Change any "reponame" :github sources to "username/reponame". Add this code to the top of your Gemfile to ensure it continues to work:
204-
205-
git_source(:github) {|repo_name| "https://github.com/\#{repo_name}.git" }
206-
207-
EOS
208-
expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
209-
subject.gem("sparks", :github => "indirect/sparks")
210-
end
211-
212201
it "upgrades to https on request" do
213202
Bundler.settings.temporary "github.https" => true
214203
msg = <<-EOS

0 commit comments

Comments
 (0)