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-01 13:18:19 +0100
commit9f53723ae0e28241ce4c933d931ec28fd2052c5b (patch)
tree1ee3a9a6dfdbfc75386e2e2b40df376c47635901
parentddceca41f9358e903092158bda38909914ee7f5f (diff)
downloadbundler-http_and_custom_sources_deprecation.tar.gz
Get the final spec about DSL sources passinghttp_and_custom_sources_deprecation
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 2954fb4020..a53fd7a26f 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 fb1fc803e0..d8cafe1a56 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -158,14 +158,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)
@@ -174,7 +175,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)