diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2025-06-23 13:26:52 +0200 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-13 06:28:46 +0000 |
| commit | 253485484c08aa56b1ea154b880eea217656d195 (patch) | |
| tree | 9f021da582e0ec35d3c2184745f24efc7c8a60a6 | |
| parent | 3c68b781dcf63fe29dbde569e534ab0e2b3eec0c (diff) | |
[ruby/rubygems] We don't need to allow some warning because:
Always build gems with RubyGems programmatically
https://github.com/ruby/rubygems/commit/5cc0c34e64
| -rw-r--r-- | spec/bundler/commands/install_spec.rb | 2 | ||||
| -rw-r--r-- | spec/bundler/support/helpers.rb | 16 |
2 files changed, 2 insertions, 16 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index 8506005746..c3d0f281a0 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -118,7 +118,7 @@ RSpec.describe "bundle install with gem sources" do it "does not state that it's constantly reinstalling empty gems" do build_repo4 do - build_gem "empty", "1.0.0", no_default: true, allowed_warning: "no files specified" + build_gem "empty", "1.0.0", no_default: true end install_gemfile <<~G diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb index 719a6e65d2..12ff09b714 100644 --- a/spec/bundler/support/helpers.rb +++ b/spec/bundler/support/helpers.rb @@ -192,13 +192,7 @@ module Spec # command is expired too. So give `gem install` commands a bit more time. options[:timeout] = 120 - allowed_warning = options.delete(:allowed_warning) - - output = sys_exec("#{Path.gem_bin} #{command}", options) - stderr = last_command.stderr - - raise stderr if stderr.include?("WARNING") && !allowed_rubygems_warning?(stderr, allowed_warning) - output + sys_exec("#{Path.gem_bin} #{command}", options) end def sys_exec(cmd, options = {}, &block) @@ -537,14 +531,6 @@ module Spec private - def allowed_rubygems_warning?(text, extra_allowed_warning) - allowed_warnings = ["open-ended", "is a symlink", "rake based", "expected RubyGems version"] - allowed_warnings << extra_allowed_warning if extra_allowed_warning - allowed_warnings.any? do |warning| - text.include?(warning) - end - end - def match_source(contents) match = /source ["']?(?<source>http[^"']+)["']?/.match(contents) return unless match |
