summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-12-07 19:10:46 +0100
committergit <svn-admin@ruby-lang.org>2021-12-08 07:59:34 +0900
commitf0ef9ffed1afe6a4add8959ed54b986d952c0a31 (patch)
tree6c8313b8c7af77f2494722f4079ea73e7962c3d2 /spec
parent6beb05c2ad924eed761e6a31fcc397a5faa57553 (diff)
[rubygems/rubygems] Cancel deprecation of custom git sources
https://github.com/rubygems/rubygems/commit/99cd6e0627
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/other/major_deprecation_spec.rb69
1 files changed, 0 insertions, 69 deletions
diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb
index b228027c03..c6490ad255 100644
--- a/spec/bundler/other/major_deprecation_spec.rb
+++ b/spec/bundler/other/major_deprecation_spec.rb
@@ -534,75 +534,6 @@ RSpec.describe "major deprecations" do
pending "fails with a helpful error", :bundler => "3"
end
- describe Bundler::Dsl do
- before do
- @rubygems = double("rubygems")
- allow(Bundler::Source::Rubygems).to receive(:new) { @rubygems }
- end
-
- context "with github gems" do
- it "does not warn about removal", :bundler => "< 3" do
- expect(Bundler.ui).not_to receive(:warn)
- subject.gem("sparks", :github => "indirect/sparks")
- github_uri = "https://github.com/indirect/sparks.git"
- expect(subject.dependencies.first.source.uri).to eq(github_uri)
- end
-
- it "warns about removal", :bundler => "3" do
- msg = <<-EOS
-The :github git source is deprecated, and will be removed in the future. 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.ui).to receive(:warn).with("[DEPRECATED] #{msg}")
- subject.gem("sparks", :github => "indirect/sparks")
- github_uri = "https://github.com/indirect/sparks.git"
- expect(subject.dependencies.first.source.uri).to eq(github_uri)
- end
- end
-
- context "with bitbucket gems" do
- it "does not warn about removal", :bundler => "< 3" do
- expect(Bundler.ui).not_to receive(:warn)
- subject.gem("not-really-a-gem", :bitbucket => "mcorp/flatlab-rails")
- end
-
- it "warns about removal", :bundler => "3" do
- msg = <<-EOS
-The :bitbucket git source is deprecated, and will be removed in the future. Add this code to the top of your Gemfile to ensure it continues to work:
-
- git_source(:bitbucket) do |repo_name|
- user_name, repo_name = repo_name.split("/")
- repo_name ||= user_name
- "https://\#{user_name}@bitbucket.org/\#{user_name}/\#{repo_name}.git"
- end
-
- EOS
- expect(Bundler.ui).to receive(:warn).with("[DEPRECATED] #{msg}")
- subject.gem("not-really-a-gem", :bitbucket => "mcorp/flatlab-rails")
- end
- end
-
- context "with gist gems" do
- it "does not warn about removal", :bundler => "< 3" do
- expect(Bundler.ui).not_to receive(:warn)
- subject.gem("not-really-a-gem", :gist => "1234")
- end
-
- it "warns about removal", :bundler => "3" do
- msg = <<-EOS
-The :gist git source is deprecated, and will be removed in the future. Add this code to the top of your Gemfile to ensure it continues to work:
-
- git_source(:gist) {|repo_name| "https://gist.github.com/\#{repo_name}.git" }
-
- EOS
- expect(Bundler.ui).to receive(:warn).with("[DEPRECATED] #{msg}")
- subject.gem("not-really-a-gem", :gist => "1234")
- end
- end
- end
-
context "bundle show" do
before do
install_gemfile <<-G