Skip to content

Commit 5cc0c34

Browse files
deivid-rodriguezhsbt
authored andcommitted
We don't need to allow some warning because:
Always build gems with RubyGems programmatically
1 parent 4fabe2c commit 5cc0c34

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

bundler/spec/commands/install_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118

119119
it "does not state that it's constantly reinstalling empty gems" do
120120
build_repo4 do
121-
build_gem "empty", "1.0.0", no_default: true, allowed_warning: "no files specified"
121+
build_gem "empty", "1.0.0", no_default: true
122122
end
123123

124124
install_gemfile <<~G

bundler/spec/support/helpers.rb

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,7 @@ def gem_command(command, options = {})
192192
# command is expired too. So give `gem install` commands a bit more time.
193193
options[:timeout] = 120
194194

195-
allowed_warning = options.delete(:allowed_warning)
196-
197-
output = sys_exec("#{Path.gem_bin} #{command}", options)
198-
stderr = last_command.stderr
199-
200-
raise stderr if stderr.include?("WARNING") && !allowed_rubygems_warning?(stderr, allowed_warning)
201-
output
195+
sys_exec("#{Path.gem_bin} #{command}", options)
202196
end
203197

204198
def sys_exec(cmd, options = {}, &block)
@@ -537,14 +531,6 @@ def empty_repo4
537531

538532
private
539533

540-
def allowed_rubygems_warning?(text, extra_allowed_warning)
541-
allowed_warnings = ["open-ended", "is a symlink", "rake based", "expected RubyGems version"]
542-
allowed_warnings << extra_allowed_warning if extra_allowed_warning
543-
allowed_warnings.any? do |warning|
544-
text.include?(warning)
545-
end
546-
end
547-
548534
def match_source(contents)
549535
match = /source ["']?(?<source>http[^"']+)["']?/.match(contents)
550536
return unless match

0 commit comments

Comments
 (0)