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

Commit

Permalink
Merge #6798 into 2-0-stable (#7182)
Browse files Browse the repository at this point in the history
Merge #6798 into `2-0-stable`
  • Loading branch information
colby-swandale authored Jun 12, 2019
2 parents f54469e + 50c3395 commit 293d743
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def add_git_sources
# end
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
# TODO: 2.0 upgrade this setting to the default
if Bundler.settings["github.https"]
if Bundler.feature_flag.github_https?
Bundler::SharedHelpers.major_deprecation 3, "The `github.https` setting will be removed"
"https://github.com/#{repo_name}.git"
else
Expand Down
6 changes: 3 additions & 3 deletions spec/bundler/dsl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

it "converts :github to :git" do
subject.gem("sparks", :github => "indirect/sparks")
github_uri = "git://github.com/indirect/sparks.git"
github_uri = "https://github.com/indirect/sparks.git"
expect(subject.dependencies.first.source.uri).to eq(github_uri)
end

Expand All @@ -62,7 +62,7 @@

it "converts 'rails' to 'rails/rails'" do
subject.gem("rails", :github => "rails")
github_uri = "git://github.com/rails/rails.git"
github_uri = "https://github.com/rails/rails.git"
expect(subject.dependencies.first.source.uri).to eq(github_uri)
end

Expand Down Expand Up @@ -253,7 +253,7 @@
end

subject.dependencies.each do |d|
expect(d.source.uri).to eq("git://github.com/spree/spree.git")
expect(d.source.uri).to eq("https://github.com/spree/spree.git")
end
end
end
Expand Down
13 changes: 1 addition & 12 deletions spec/other/major_deprecation_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

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

Expand Down Expand Up @@ -198,17 +198,6 @@
end

context "with github gems" do
it "warns about the https change" do
msg = <<-EOS
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:
git_source(:github) {|repo_name| "https://github.com/\#{repo_name}.git" }
EOS
expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
subject.gem("sparks", :github => "indirect/sparks")
end

it "upgrades to https on request" do
Bundler.settings.temporary "github.https" => true
msg = <<-EOS
Expand Down

0 comments on commit 293d743

Please sign in to comment.