[bundler/bundler] Make sure gem has been built before deleteng it
https://github.com/bundler/bundler/commit/32520c7020
This commit is contained in:
parent
a56bf5bfde
commit
580e093fdd
@ -226,20 +226,22 @@ RSpec.describe "The library itself" do
|
|||||||
|
|
||||||
it "can still be built" do
|
it "can still be built" do
|
||||||
Dir.chdir(root) do
|
Dir.chdir(root) do
|
||||||
begin
|
if ruby_core?
|
||||||
if ruby_core?
|
spec = Gem::Specification.load(gemspec.to_s)
|
||||||
spec = Gem::Specification.load(gemspec.to_s)
|
spec.bindir = "libexec"
|
||||||
spec.bindir = "libexec"
|
File.open(root.join("bundler.gemspec").to_s, "w") {|f| f.write spec.to_ruby }
|
||||||
File.open(root.join("bundler.gemspec").to_s, "w") {|f| f.write spec.to_ruby }
|
gem_command! :build, root.join("bundler.gemspec")
|
||||||
gem_command! :build, root.join("bundler.gemspec")
|
FileUtils.rm(root.join("bundler.gemspec"))
|
||||||
FileUtils.rm(root.join("bundler.gemspec"))
|
else
|
||||||
else
|
gem_command! :build, gemspec
|
||||||
gem_command! :build, gemspec
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
bundler_path = root.join("bundler-#{Bundler::VERSION}.gem")
|
||||||
|
|
||||||
|
begin
|
||||||
expect(err).to be_empty, "bundler should build as a gem without warnings, but\n#{err}"
|
expect(err).to be_empty, "bundler should build as a gem without warnings, but\n#{err}"
|
||||||
ensure
|
ensure
|
||||||
root.join("bundler-#{Bundler::VERSION}.gem").rmtree
|
bundler_path.rmtree
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user