summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-01 13:18:19 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-12 10:15:44 +0100
commitc3cbd4b9bdfd1aa7cd1f1d30301127656b26438a (patch)
tree58791104f0d5ec562c04d41380bdbec82d5d3123
parent8cbbb3985607bbfffa2d26666da163631c4c5acd (diff)
downloadbundler-c3cbd4b9bdfd1aa7cd1f1d30301127656b26438a.tar.gz
Get the final spec about DSL sources passing
For now, warn only users that are opting out that the setting will be removed in the future.
-rw-r--r--lib/bundler/dsl.rb2
-rw-r--r--spec/other/major_deprecation_spec.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 3b9f432ee7..977a50d5c0 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -292,9 +292,9 @@ module Bundler
RUBY
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
if Bundler.feature_flag.github_https?
- Bundler::SharedHelpers.major_deprecation 2, "The `github.https` setting will be removed"
"https://github.com/#{repo_name}.git"
else
+ Bundler::SharedHelpers.major_deprecation 2, "Setting `github.https` to false is deprecated and won't be supported in the future."
"git://github.com/#{repo_name}.git"
end
end
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 075046efa0..a65d50b7a3 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -185,14 +185,15 @@ The :github git source is deprecated, and will be removed in Bundler 3.0. Change
end
context "with github gems" do
- xit "warns about the https change" do
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, "The `github.https` setting will be removed")
+ it "warns about the https change if people are opting out" do
+ Bundler.settings.temporary "github.https" => false
+ expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
+ expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, "Setting `github.https` to false is deprecated and won't be supported in the future.")
subject.gem("sparks", :github => "indirect/sparks")
end
it "upgrades to https by default", :bundler => "2" do
expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, "The `github.https` setting will be removed")
subject.gem("sparks", :github => "indirect/sparks")
github_uri = "https://github.com/indirect/sparks.git"
expect(subject.dependencies.first.source.uri).to eq(github_uri)
@@ -201,7 +202,6 @@ The :github git source is deprecated, and will be removed in Bundler 3.0. Change
it "upgrades to https on request", :bundler => "< 2" do
Bundler.settings.temporary "github.https" => true
expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(3, msg)
- expect(Bundler::SharedHelpers).to receive(:major_deprecation).with(2, "The `github.https` setting will be removed")
subject.gem("sparks", :github => "indirect/sparks")
github_uri = "https://github.com/indirect/sparks.git"
expect(subject.dependencies.first.source.uri).to eq(github_uri)