mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Append a newline to the checksum file
https://github.com/rubygems/rubygems/commit/48ea2778e9
This commit is contained in:
parent
c2e8e1f6a4
commit
8f9623741a
2 changed files with 2 additions and 2 deletions
|
@ -109,7 +109,7 @@ module Bundler
|
|||
require "digest/sha2"
|
||||
checksum = ::Digest::SHA512.file(built_gem_path).hexdigest
|
||||
target = File.join(base, "checksums", file_name)
|
||||
File.write(target, checksum)
|
||||
File.write(target, checksum + "\n")
|
||||
Bundler.ui.confirm "#{name} #{version} checksum written to checksums/#{file_name}."
|
||||
end
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ RSpec.describe Bundler::GemHelper do
|
|||
it "calculates SHA512 of the content" do
|
||||
subject.build_checksum(Pathname(IO::NULL))
|
||||
sha_path = app_path.join("checksums", "#{File.basename(IO::NULL)}.sha512")
|
||||
expect(File.read(sha_path)).to eql(Digest::SHA512.hexdigest(""))
|
||||
expect(File.read(sha_path).chomp).to eql(Digest::SHA512.hexdigest(""))
|
||||
end
|
||||
|
||||
context "when build was successful" do
|
||||
|
|
Loading…
Add table
Reference in a new issue