stone_checksums 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +22 -4
- data/README.md +13 -17
- data/lib/gem_checksums.rb +20 -0
- data/lib/stone_checksums/version.rb +1 -1
- data/lib/stone_checksums.rb +9 -0
- data/sig/stone_checksums.rbs +1 -0
- data.tar.gz.sig +0 -0
- metadata +12 -12
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0c15617a844a6ff087841198d345d5fd0aa8c4eb0e79b6ae0551afaf505ae83
|
|
4
|
+
data.tar.gz: 2e8d2704f9b21aa3a7f58d26425aaf7f19b18b4551fdb0222c36f800f4592e8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7862a96776efd5e81d3af931bdd40c707f0d776f35ee1db50dc1b4e12e4f8beabb0b8841cdd7740bf3b27a3acd47e35c6fd321de196167de5462bda8ba950c2
|
|
7
|
+
data.tar.gz: 125024364af0c573f9e28f14748c55c6cd07bf8b3698489916b6924c188033750ce4c079345e9a7e2286ca41d946a0bc8e91ee2ff84b90c5e871e244109ad2a9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,25 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [1.0.11] - 2026-11-15
|
|
34
|
+
|
|
35
|
+
- TAG: [v1.0.11][1.0.11t]
|
|
36
|
+
- COVERAGE: 100.00% -- 140/140 lines in 8 files
|
|
37
|
+
- BRANCH COVERAGE: 97.92% -- 47/48 branches in 8 files
|
|
38
|
+
- 65.38% documented
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- [kc] kettle-jem/prepare: updated 9 project files:
|
|
43
|
+
- dependencies (9)
|
|
44
|
+
|
|
45
|
+
- [kc] kettle-jem/template: updated 16 project files:
|
|
46
|
+
- code and tests (1)
|
|
47
|
+
- dependencies (3)
|
|
48
|
+
- documentation (1)
|
|
49
|
+
- other (3)
|
|
50
|
+
- workflows (8)
|
|
51
|
+
|
|
33
52
|
## [1.0.10] - 2026-11-08
|
|
34
53
|
|
|
35
54
|
- TAG: [v1.0.10][1.0.10t]
|
|
@@ -148,9 +167,6 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
148
167
|
missing canonical version spec when a project only has shim namespace version
|
|
149
168
|
specs.
|
|
150
169
|
|
|
151
|
-
- kettle-jem-template-20260729-001 - Generated JRuby 9.4 workflows now use the
|
|
152
|
-
legacy manual bundle install path, avoiding setup-time Bundler full-index
|
|
153
|
-
failures against `gem.coop`.
|
|
154
170
|
- Restored the canonical `StoneChecksums::Version` spec so
|
|
155
171
|
`lib/stone_checksums/version_gem.rb` is covered by the release suite.
|
|
156
172
|
|
|
@@ -308,7 +324,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
308
324
|
|
|
309
325
|
- Initial release
|
|
310
326
|
|
|
311
|
-
[Unreleased]: https://github.com/galtzo-floss/stone_checksums/compare/v1.0.
|
|
327
|
+
[Unreleased]: https://github.com/galtzo-floss/stone_checksums/compare/v1.0.11...HEAD
|
|
328
|
+
[1.0.11]: https://github.com/galtzo-floss/stone_checksums/compare/v1.0.10...v1.0.11
|
|
329
|
+
[1.0.11t]: https://github.com/galtzo-floss/stone_checksums/releases/tag/v1.0.11
|
|
312
330
|
[1.0.10]: https://github.com/galtzo-floss/stone_checksums/compare/v1.0.9...v1.0.10
|
|
313
331
|
[1.0.10t]: https://github.com/galtzo-floss/stone_checksums/releases/tag/v1.0.10
|
|
314
332
|
[1.0.9]: https://github.com/galtzo-floss/stone_checksums/compare/v1.0.8...v1.0.9
|
data/README.md
CHANGED
|
@@ -36,8 +36,8 @@ bin/generate_checksums
|
|
|
36
36
|
|
|
37
37
|
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
38
38
|
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
39
|
-
| Works with JRuby | [![JRuby
|
|
40
|
-
| Works with Truffle Ruby | [![Truffle Ruby
|
|
39
|
+
| Works with JRuby | [![JRuby 10.0 Compat][💎jruby-10.0i]][🚎jruby-10.0-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
|
|
40
|
+
| Works with Truffle Ruby | [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
|
|
41
41
|
| Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
|
|
42
42
|
| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎ruby-3.0-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎ruby-3.1-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
|
|
43
43
|
| Works with MRI Ruby 2 | ![Ruby 2.2 Compat][💎ruby-2.2i] ![Ruby 2.3 Compat][💎ruby-2.3i] <br/> [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎ruby-2.4-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎ruby-2.5-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎ruby-2.6-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎ruby-2.7-wf]|
|
|
@@ -130,6 +130,16 @@ This library helps you generate checksums for your built gem and commit them.
|
|
|
130
130
|
The generated commit subject uses Conventional Commits and Gitmoji, for example
|
|
131
131
|
`chore(checksums): 🔒️ update checksums for v1.2.3`.
|
|
132
132
|
|
|
133
|
+
To verify an existing package against `checksums/<package>.sha256`:
|
|
134
|
+
|
|
135
|
+
```ruby
|
|
136
|
+
require "stone_checksums"
|
|
137
|
+
StoneChecksums.validate_sha256!("pkg/your_gem-1.2.3.gem")
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The method returns `true` on a match and raises `GemChecksums::Error` if a file
|
|
141
|
+
is missing or the digest differs. Pass `checksums_dir:` to use another directory.
|
|
142
|
+
|
|
133
143
|
- Bundler >= 2.7.0: No SOURCE_DATE_EPOCH needed. Bundler now uses a constant timestamp internally, making builds reproducible by default.
|
|
134
144
|
- Bundler < 2.7.0: You must set SOURCE_DATE_EPOCH before building the gem to get deterministic checksums, or upgrade Bundler.
|
|
135
145
|
- If you still want to proceed on old Bundler non-interactively, set GEM_CHECKSUMS_ASSUME_YES=true (SOURCE_DATE_EPOCH is still required).
|
|
@@ -432,14 +442,7 @@ Thanks for RTFM. ☺️
|
|
|
432
442
|
[🚎ruby-3.2-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/ruby-3.2.yml
|
|
433
443
|
[🚎ruby-3.3-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/ruby-3.3.yml
|
|
434
444
|
[🚎ruby-3.4-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/ruby-3.4.yml
|
|
435
|
-
[🚎jruby-9.2-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/jruby-9.2.yml
|
|
436
|
-
[🚎jruby-9.3-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/jruby-9.3.yml
|
|
437
|
-
[🚎jruby-9.4-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/jruby-9.4.yml
|
|
438
445
|
[🚎jruby-10.0-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/jruby-10.0.yml
|
|
439
|
-
[🚎truby-22.3-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/truffleruby-22.3.yml
|
|
440
|
-
[🚎truby-23.1-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/truffleruby-23.1.yml
|
|
441
|
-
[🚎truby-24.2-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/truffleruby-24.2.yml
|
|
442
|
-
[🚎truby-25.0-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/truffleruby-25.0.yml
|
|
443
446
|
[🚎truby-33.0-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/truffleruby-33.0.yml
|
|
444
447
|
[🚎2-cov-wf]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/coverage.yml
|
|
445
448
|
[🚎2-cov-wfi]: https://github.com/galtzo-floss/stone_checksums/actions/workflows/coverage.yml/badge.svg
|
|
@@ -474,15 +477,8 @@ Thanks for RTFM. ☺️
|
|
|
474
477
|
[💎ruby-3.4i]: https://img.shields.io/badge/Ruby-3.4-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
|
475
478
|
[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
|
|
476
479
|
[💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
|
|
477
|
-
[💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
478
|
-
[💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
479
|
-
[💎truby-24.2i]: https://img.shields.io/badge/Truffle_Ruby-24.2-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
480
|
-
[💎truby-25.0i]: https://img.shields.io/badge/Truffle_Ruby-25.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
481
480
|
[💎truby-33.0i]: https://img.shields.io/badge/Truffle_Ruby-33.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
482
481
|
[💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
|
|
483
|
-
[💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
484
|
-
[💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
485
|
-
[💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
486
482
|
[💎jruby-10.0i]: https://img.shields.io/badge/JRuby-10.0-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
487
483
|
[💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
|
|
488
484
|
[💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue
|
|
@@ -512,7 +508,7 @@ Thanks for RTFM. ☺️
|
|
|
512
508
|
[📌gitmoji]: https://gitmoji.dev
|
|
513
509
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
514
510
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
515
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
511
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.140-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
516
512
|
[🔐security]: https://github.com/galtzo-floss/stone_checksums/blob/main/SECURITY.md
|
|
517
513
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
518
514
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/gem_checksums.rb
CHANGED
|
@@ -219,6 +219,26 @@ rm -f #{digest256_32bit_path}
|
|
|
219
219
|
end
|
|
220
220
|
module_function :generate
|
|
221
221
|
|
|
222
|
+
# Verify that a built gem matches its recorded SHA-256 checksum.
|
|
223
|
+
#
|
|
224
|
+
# @param gem_path [String] path to the built gem
|
|
225
|
+
# @param checksums_dir [String] directory containing the .sha256 file
|
|
226
|
+
# @return [Boolean] true when the checksum matches
|
|
227
|
+
# @raise [Error] when a file is missing or the checksum does not match
|
|
228
|
+
def validate_sha256!(gem_path, checksums_dir: CHECKSUMS_DIR, **options)
|
|
229
|
+
raise Error, "Built gem not found: #{gem_path}" unless File.file?(gem_path)
|
|
230
|
+
|
|
231
|
+
checksum_path = File.join(checksums_dir, "#{File.basename(gem_path)}.sha256")
|
|
232
|
+
raise Error, "Expected checksum file not found: #{checksum_path}" unless File.file?(checksum_path)
|
|
233
|
+
|
|
234
|
+
expected = File.read(checksum_path).strip
|
|
235
|
+
actual = Digest::SHA256.file(gem_path).hexdigest
|
|
236
|
+
return true if actual == expected
|
|
237
|
+
|
|
238
|
+
raise Error, "SHA256 mismatch for #{gem_path}: expected #{expected} from #{checksum_path}, got #{actual}"
|
|
239
|
+
end
|
|
240
|
+
module_function :validate_sha256!
|
|
241
|
+
|
|
222
242
|
def validate_project_package!(gem_pkg)
|
|
223
243
|
project_spec = current_project_spec
|
|
224
244
|
return unless project_spec
|
|
@@ -4,7 +4,7 @@ module StoneChecksums
|
|
|
4
4
|
# Version namespace for this gem.
|
|
5
5
|
module Version
|
|
6
6
|
# Current gem version.
|
|
7
|
-
VERSION = "1.0.
|
|
7
|
+
VERSION = "1.0.11"
|
|
8
8
|
end
|
|
9
9
|
# Current gem version exposed at the traditional constant location.
|
|
10
10
|
VERSION = Version::VERSION # Traditional Constant Location
|
data/lib/stone_checksums.rb
CHANGED
|
@@ -38,6 +38,15 @@ module StoneChecksums
|
|
|
38
38
|
::GemChecksums.install_tasks
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
# Verify a built gem against its recorded SHA-256 checksum.
|
|
42
|
+
# @param gem_path [String] path to the built gem
|
|
43
|
+
# @param checksums_dir [String] directory containing the checksum
|
|
44
|
+
# @return [Boolean] true if the checksum matches
|
|
45
|
+
# @raise [GemChecksums::Error] if validation fails
|
|
46
|
+
def validate_sha256!(gem_path, checksums_dir: ::GemChecksums::CHECKSUMS_DIR, **options)
|
|
47
|
+
::GemChecksums.validate_sha256!(gem_path, checksums_dir: checksums_dir, **options)
|
|
48
|
+
end
|
|
49
|
+
|
|
41
50
|
# Generate SHA-256 and SHA-512 checksums for a built .gem and commit them.
|
|
42
51
|
#
|
|
43
52
|
# Behavior, options, and side effects are identical to
|
data/sig/stone_checksums.rbs
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stone_checksums
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -66,7 +66,7 @@ dependencies:
|
|
|
66
66
|
version: '3.1'
|
|
67
67
|
- - ">="
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 3.1.
|
|
69
|
+
version: 3.1.29
|
|
70
70
|
type: :development
|
|
71
71
|
prerelease: false
|
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -76,7 +76,7 @@ dependencies:
|
|
|
76
76
|
version: '3.1'
|
|
77
77
|
- - ">="
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
|
-
version: 3.1.
|
|
79
|
+
version: 3.1.29
|
|
80
80
|
- !ruby/object:Gem::Dependency
|
|
81
81
|
name: bundler-audit
|
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -174,7 +174,7 @@ dependencies:
|
|
|
174
174
|
version: '2.0'
|
|
175
175
|
- - ">="
|
|
176
176
|
- !ruby/object:Gem::Version
|
|
177
|
-
version: 2.0.
|
|
177
|
+
version: 2.0.30
|
|
178
178
|
type: :development
|
|
179
179
|
prerelease: false
|
|
180
180
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -184,7 +184,7 @@ dependencies:
|
|
|
184
184
|
version: '2.0'
|
|
185
185
|
- - ">="
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: 2.0.
|
|
187
|
+
version: 2.0.30
|
|
188
188
|
- !ruby/object:Gem::Dependency
|
|
189
189
|
name: turbo_tests2
|
|
190
190
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -194,7 +194,7 @@ dependencies:
|
|
|
194
194
|
version: '4.0'
|
|
195
195
|
- - ">="
|
|
196
196
|
- !ruby/object:Gem::Version
|
|
197
|
-
version: 4.0.
|
|
197
|
+
version: 4.0.2
|
|
198
198
|
type: :development
|
|
199
199
|
prerelease: false
|
|
200
200
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -204,7 +204,7 @@ dependencies:
|
|
|
204
204
|
version: '4.0'
|
|
205
205
|
- - ">="
|
|
206
206
|
- !ruby/object:Gem::Version
|
|
207
|
-
version: 4.0.
|
|
207
|
+
version: 4.0.2
|
|
208
208
|
- !ruby/object:Gem::Dependency
|
|
209
209
|
name: ruby-progressbar
|
|
210
210
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -228,7 +228,7 @@ dependencies:
|
|
|
228
228
|
version: '2.0'
|
|
229
229
|
- - ">="
|
|
230
230
|
- !ruby/object:Gem::Version
|
|
231
|
-
version: 2.0.
|
|
231
|
+
version: 2.0.16
|
|
232
232
|
type: :development
|
|
233
233
|
prerelease: false
|
|
234
234
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -238,7 +238,7 @@ dependencies:
|
|
|
238
238
|
version: '2.0'
|
|
239
239
|
- - ">="
|
|
240
240
|
- !ruby/object:Gem::Version
|
|
241
|
-
version: 2.0.
|
|
241
|
+
version: 2.0.16
|
|
242
242
|
description: "\U0001F5FF Generate both SHA256 & SHA512 checksums into the checksums
|
|
243
243
|
directory, and git commit them.\n gem install stone_checksums\nThen, use the rake
|
|
244
244
|
task or the script:\n rake build:generate_checksums\n gem_checksums\nControl options
|
|
@@ -269,10 +269,10 @@ licenses:
|
|
|
269
269
|
- MIT
|
|
270
270
|
metadata:
|
|
271
271
|
homepage_uri: https://stone-checksums.galtzo.com
|
|
272
|
-
source_code_uri: https://github.com/galtzo-floss/stone_checksums/tree/v1.0.
|
|
273
|
-
changelog_uri: https://github.com/galtzo-floss/stone_checksums/blob/v1.0.
|
|
272
|
+
source_code_uri: https://github.com/galtzo-floss/stone_checksums/tree/v1.0.11
|
|
273
|
+
changelog_uri: https://github.com/galtzo-floss/stone_checksums/blob/v1.0.11/CHANGELOG.md
|
|
274
274
|
bug_tracker_uri: https://github.com/galtzo-floss/stone_checksums/issues
|
|
275
|
-
documentation_uri: https://www.rubydoc.info/gems/stone_checksums/1.0.
|
|
275
|
+
documentation_uri: https://www.rubydoc.info/gems/stone_checksums/1.0.11
|
|
276
276
|
funding_uri: https://github.com/sponsors/pboling
|
|
277
277
|
wiki_uri: https://github.com/galtzo-floss/stone_checksums/wiki
|
|
278
278
|
news_uri: https://www.railsbling.com/tags/stone_checksums
|
metadata.gz.sig
CHANGED
|
Binary file
|