pkgforge 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3439232590f082ba9d4a7101be993cdcda235b83
4
- data.tar.gz: 68cc9b64d2d4adfc2a05b8be20b813164502d2ac
3
+ metadata.gz: 41ffe55f7c506d38a4be46bfbcb89b7b7ec49f79
4
+ data.tar.gz: 6146d7d7d1a8c88165deb5bc079a85c026a81570
5
5
  SHA512:
6
- metadata.gz: b0facf0247c7c27f67838a387becdcf901263924030ab17867cd8125a44aa62e73d6dbd5c2178fff2288004ee7537546dfd9b330ab961bc308471cd2a93587f3
7
- data.tar.gz: 919b07580f1c2d004722e6e6adddddd599833c27018d0ac8d0ec30d987faa89842e96d29083f31b1f631626aac9ec6519bd7cada0800260878d5099d27d35a88
6
+ metadata.gz: 4046b67e1b623ddd4662d199aa615fd4514fddf28beee96663b5485ab3e7284bf792b186b10f5eb8aa13d34ace973f1b7f5b002e5ae9ae9eb65683501cba1bb5
7
+ data.tar.gz: 7360342df27396a35cf130d30303c92ff7cbff37f01eea9f51b0155dc57270825bbf2fc060e6be1fa501af96a40fa3b91b381c0f78a5bf637b0c93d7e315f0d2
@@ -52,13 +52,16 @@ module PkgForge
52
52
 
53
53
  Contract String, Maybe[String] => nil
54
54
  def verify_file(file, expected = nil)
55
- unless expected
56
- puts "No checksum provided for #{file}"
57
- return
55
+ case expected
56
+ when nil
57
+ raise "No checksum provided for #{file}"
58
+ when 'skip'
59
+ puts "Skipping checksum for #{file}"
60
+ else
61
+ actual = Digest::SHA256.file(file).hexdigest
62
+ return if actual == expected
63
+ raise "Checksum fail for #{file}: #{actual} (actual) != #{expected} (expected)" # rubocop:disable Metrics/LineLength
58
64
  end
59
- actual = Digest::SHA256.file(file).hexdigest
60
- return if actual == expected
61
- raise "Checksum fail for #{file}: #{actual} (actual) != #{expected} (expected)" # rubocop:disable Metrics/LineLength
62
65
  end
63
66
 
64
67
  Contract String, String => nil
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Declare version number
3
3
  module PkgForge
4
- VERSION = '0.19.0'.freeze
4
+ VERSION = '0.20.0'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkgforge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker