diff options
author | Bundlerbot <bot@bundler.io> | 2018-11-26 23:09:40 +0000 |
---|---|---|
committer | Colby Swandale <me@colby.fyi> | 2019-05-28 22:14:30 +1000 |
commit | 1953cfdbd34b8f701ea2a330820b6bfb6b56c638 (patch) | |
tree | 746651cc17d8fe117bb5ebda3920dec60e4366b0 | |
parent | f54469ebb68b331ac676e5f0dbbdc41c70e9540a (diff) | |
download | bundler-1953cfdbd34b8f701ea2a330820b6bfb6b56c638.tar.gz |
Merge #6798
6798: Use https in the Github shortcut by default in Bundler 2 r=colby-swandale a=colby-swandale
This PR is setting Git gems to be fetched over https by default.
Note: This PR is successing #6791
Closes #6785
Co-authored-by: Colby Swandale <me@colby.fyi>
(cherry picked from commit cf45792213fadf97f7aa6464de8ebd79f09725d2)
-rw-r--r-- | lib/bundler/dsl.rb | 2 | ||||
-rw-r--r-- | spec/bundler/dsl_spec.rb | 6 | ||||
-rw-r--r-- | spec/other/major_deprecation_spec.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 90ac073c36..285b155197 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -305,7 +305,7 @@ module Bundler # 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 diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb index 94d54ad877..8aeca6414a 100644 --- a/spec/bundler/dsl_spec.rb +++ b/spec/bundler/dsl_spec.rb @@ -44,7 +44,7 @@ RSpec.describe Bundler::Dsl do 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 @@ -62,7 +62,7 @@ RSpec.describe Bundler::Dsl do 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 @@ -253,7 +253,7 @@ RSpec.describe Bundler::Dsl do 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 diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 50800dbb0c..04f71e2eca 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -198,7 +198,7 @@ RSpec.describe "major deprecations", :bundler => "< 3" do end context "with github gems" do - it "warns about the https change" do + it "warns about the https change", :bundler => "3" 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: |