Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create a sha256 checksum if none is expected in the recipe.

  • Loading branch information...
commit 3e8edee5292a7469f4ed60e394831ccd600f5bd4 1 parent c91144b
@bernd authored
View
2  lib/fpm/cookery/source_integrity_check.rb
@@ -33,6 +33,8 @@ def verify!
unless digest
@error = true
+ @digest = :sha256
+ @checksum_actual = build_checksum(@digest)
end
if @checksum_expected.to_s != @checksum_actual.to_s
View
6 spec/source_integrity_check_spec.rb
@@ -35,8 +35,8 @@ def local_path
check.checksum_expected.must_equal nil
end
- it "has checksum_actual set to nil" do
- check.checksum_actual.must_equal nil
+ it "has checksum_actual set to the sha256 checksum" do
+ check.checksum_actual.must_equal '285a6b8098ecc9040ece8f621e37c20edba39545c5d195c4894f410ed9d44b22'
end
it "has filename set" do
@@ -44,7 +44,7 @@ def local_path
end
it "has digest set to nil" do
- check.digest.must_equal nil
+ check.digest.must_equal :sha256
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.