stone_checksums 1.0.3 → 1.0.5
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 +35 -7
- data/CITATION.cff +6 -6
- data/CONTRIBUTING.md +93 -38
- data/FUNDING.md +8 -15
- data/LICENSE.md +10 -0
- data/{LICENSE.txt → MIT.md} +1 -1
- data/README.md +154 -192
- data/SECURITY.md +1 -1
- data/certs/pboling.pem +27 -0
- data/lib/gem_checksums.rb +47 -4
- data/lib/stone_checksums/version.rb +2 -5
- data/lib/stone_checksums.rb +2 -0
- data/sig/stone_checksums/version.rbs +6 -0
- data/sig/stone_checksums.rbs +0 -3
- data.tar.gz.sig +0 -0
- metadata +63 -30
- metadata.gz.sig +0 -0
- data/REEK +0 -0
data/SECURITY.md
CHANGED
data/certs/pboling.pem
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
|
|
3
|
+
ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
|
|
4
|
+
A2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM
|
|
5
|
+
DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
|
|
6
|
+
LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA
|
|
7
|
+
uoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61
|
|
8
|
+
LRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoa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6OFfPzq
|
|
23
|
+
QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA
|
|
24
|
+
0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p
|
|
25
|
+
DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt
|
|
26
|
+
L9nRqA==
|
|
27
|
+
-----END CERTIFICATE-----
|
data/lib/gem_checksums.rb
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# Std lib
|
|
4
4
|
require "digest/sha2"
|
|
5
5
|
require "fileutils"
|
|
6
|
+
require "rubygems/package"
|
|
6
7
|
|
|
7
8
|
# external gems
|
|
8
9
|
require "version_gem"
|
|
@@ -93,7 +94,7 @@ In bash shell:
|
|
|
93
94
|
# Header: identify the gem and version being run
|
|
94
95
|
begin
|
|
95
96
|
puts "[ stone_checksums #{::StoneChecksums::Version::VERSION} ]"
|
|
96
|
-
rescue
|
|
97
|
+
rescue
|
|
97
98
|
# If for any reason the version constant isn't available, skip header gracefully
|
|
98
99
|
end
|
|
99
100
|
|
|
@@ -153,12 +154,14 @@ Tip: set GEM_CHECKSUMS_ASSUME_YES=true to proceed non-interactively (still requi
|
|
|
153
154
|
# Sort by newest last
|
|
154
155
|
# [ "my_gem-2.3.9.gem", "my_gem-2.3.11.pre.alpha.4.gem", "my_gem-2.3.15.gem", ... ]
|
|
155
156
|
gems.sort_by! { |gem| Gem::Version.new(gem[VERSION_REGEX]) }
|
|
156
|
-
gem_pkg = gems.last
|
|
157
|
+
gem_pkg = preferred_project_package(gems) || gems.last
|
|
157
158
|
gem_path_parts = gem_pkg.split("/")
|
|
158
159
|
gem_name = gem_path_parts.last
|
|
159
|
-
puts "Found: #{gems.length} gems;
|
|
160
|
+
puts "Found: #{gems.length} gems; selected #{gem_name}"
|
|
160
161
|
end
|
|
161
162
|
|
|
163
|
+
validate_project_package!(gem_pkg)
|
|
164
|
+
|
|
162
165
|
pkg_bits = File.read(gem_pkg)
|
|
163
166
|
|
|
164
167
|
# SHA-512 digest is 8 64-bit words
|
|
@@ -205,7 +208,7 @@ rm -f #{digest256_32bit_path}
|
|
|
205
208
|
RESULTS
|
|
206
209
|
|
|
207
210
|
if git_dry_run_flag
|
|
208
|
-
|
|
211
|
+
`#{git_cmd}`
|
|
209
212
|
else
|
|
210
213
|
# `exec` will replace the current process with the git process, and exit.
|
|
211
214
|
# Within the generate method, Ruby code placed after the `exec` *will not be run*:
|
|
@@ -216,6 +219,46 @@ rm -f #{digest256_32bit_path}
|
|
|
216
219
|
end
|
|
217
220
|
end
|
|
218
221
|
module_function :generate
|
|
222
|
+
|
|
223
|
+
def validate_project_package!(gem_pkg)
|
|
224
|
+
project_spec = current_project_spec
|
|
225
|
+
return unless project_spec
|
|
226
|
+
return unless validate_package_against_project?(gem_pkg, project_spec)
|
|
227
|
+
|
|
228
|
+
package_spec = Gem::Package.new(gem_pkg).spec
|
|
229
|
+
return if package_spec.name == project_spec.name && package_spec.version == project_spec.version
|
|
230
|
+
|
|
231
|
+
raise Error, [
|
|
232
|
+
"Built gem version mismatch for #{gem_pkg}.",
|
|
233
|
+
"Current gemspec resolves to #{project_spec.name} #{project_spec.version}, but selected package is #{package_spec.name} #{package_spec.version}.",
|
|
234
|
+
"Remove stale packages or pass the intended .gem path explicitly before generating checksums."
|
|
235
|
+
].join("\n")
|
|
236
|
+
rescue Gem::Package::Error => error
|
|
237
|
+
raise Error, "Unable to inspect built gem #{gem_pkg}: #{error.message}"
|
|
238
|
+
end
|
|
239
|
+
module_function :validate_project_package!
|
|
240
|
+
|
|
241
|
+
def current_project_spec
|
|
242
|
+
gemspecs = Dir["*.gemspec"]
|
|
243
|
+
return unless gemspecs.length == 1
|
|
244
|
+
|
|
245
|
+
Gem::Specification.load(gemspecs.first)
|
|
246
|
+
end
|
|
247
|
+
module_function :current_project_spec
|
|
248
|
+
|
|
249
|
+
def preferred_project_package(gems)
|
|
250
|
+
project_spec = current_project_spec
|
|
251
|
+
return unless project_spec
|
|
252
|
+
|
|
253
|
+
expected_name = "#{project_spec.name}-#{project_spec.version}.gem"
|
|
254
|
+
gems.find { |gem| File.basename(gem) == expected_name }
|
|
255
|
+
end
|
|
256
|
+
module_function :preferred_project_package
|
|
257
|
+
|
|
258
|
+
def validate_package_against_project?(gem_pkg, project_spec)
|
|
259
|
+
File.basename(File.expand_path(PACKAGE_DIR)) == "pkg" || File.basename(gem_pkg).start_with?("#{project_spec.name}-")
|
|
260
|
+
end
|
|
261
|
+
module_function :validate_package_against_project?
|
|
219
262
|
end
|
|
220
263
|
|
|
221
264
|
GemChecksums::Version.class_eval do
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Semantic version for the StoneChecksums gem
|
|
4
3
|
module StoneChecksums
|
|
5
|
-
# Version-related constants for StoneChecksums
|
|
6
4
|
module Version
|
|
7
|
-
|
|
8
|
-
# @return [String]
|
|
9
|
-
VERSION = "1.0.3"
|
|
5
|
+
VERSION = "1.0.5"
|
|
10
6
|
end
|
|
7
|
+
VERSION = Version::VERSION # Traditional Constant Location
|
|
11
8
|
end
|
data/lib/stone_checksums.rb
CHANGED
data/sig/stone_checksums.rbs
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- "|7eter l-|. l3oling"
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain:
|
|
10
10
|
- |
|
|
@@ -46,7 +46,7 @@ dependencies:
|
|
|
46
46
|
version: '1.1'
|
|
47
47
|
- - ">="
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: 1.1.
|
|
49
|
+
version: 1.1.13
|
|
50
50
|
type: :runtime
|
|
51
51
|
prerelease: false
|
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -56,35 +56,41 @@ dependencies:
|
|
|
56
56
|
version: '1.1'
|
|
57
57
|
- - ">="
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
|
-
version: 1.1.
|
|
59
|
+
version: 1.1.13
|
|
60
60
|
- !ruby/object:Gem::Dependency
|
|
61
61
|
name: kettle-dev
|
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
|
64
64
|
- - "~>"
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: '
|
|
66
|
+
version: '2.3'
|
|
67
|
+
- - ">="
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: 2.3.0
|
|
67
70
|
type: :development
|
|
68
71
|
prerelease: false
|
|
69
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
70
73
|
requirements:
|
|
71
74
|
- - "~>"
|
|
72
75
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '
|
|
76
|
+
version: '2.3'
|
|
77
|
+
- - ">="
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: 2.3.0
|
|
74
80
|
- !ruby/object:Gem::Dependency
|
|
75
81
|
name: bundler-audit
|
|
76
82
|
requirement: !ruby/object:Gem::Requirement
|
|
77
83
|
requirements:
|
|
78
84
|
- - "~>"
|
|
79
85
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: 0.9.
|
|
86
|
+
version: 0.9.3
|
|
81
87
|
type: :development
|
|
82
88
|
prerelease: false
|
|
83
89
|
version_requirements: !ruby/object:Gem::Requirement
|
|
84
90
|
requirements:
|
|
85
91
|
- - "~>"
|
|
86
92
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: 0.9.
|
|
93
|
+
version: 0.9.3
|
|
88
94
|
- !ruby/object:Gem::Dependency
|
|
89
95
|
name: rake
|
|
90
96
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -125,34 +131,60 @@ dependencies:
|
|
|
125
131
|
requirements:
|
|
126
132
|
- - "~>"
|
|
127
133
|
- !ruby/object:Gem::Version
|
|
128
|
-
version: '3.
|
|
134
|
+
version: '3.1'
|
|
135
|
+
- - ">="
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: 3.1.4
|
|
129
138
|
type: :development
|
|
130
139
|
prerelease: false
|
|
131
140
|
version_requirements: !ruby/object:Gem::Requirement
|
|
132
141
|
requirements:
|
|
133
142
|
- - "~>"
|
|
134
143
|
- !ruby/object:Gem::Version
|
|
135
|
-
version: '3.
|
|
144
|
+
version: '3.1'
|
|
145
|
+
- - ">="
|
|
146
|
+
- !ruby/object:Gem::Version
|
|
147
|
+
version: 3.1.4
|
|
136
148
|
- !ruby/object:Gem::Dependency
|
|
137
149
|
name: kettle-test
|
|
138
150
|
requirement: !ruby/object:Gem::Requirement
|
|
139
151
|
requirements:
|
|
140
152
|
- - "~>"
|
|
141
153
|
- !ruby/object:Gem::Version
|
|
142
|
-
version: '
|
|
154
|
+
version: '2.0'
|
|
143
155
|
- - ">="
|
|
144
156
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
157
|
+
version: 2.0.9
|
|
146
158
|
type: :development
|
|
147
159
|
prerelease: false
|
|
148
160
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
161
|
requirements:
|
|
150
162
|
- - "~>"
|
|
151
163
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '
|
|
164
|
+
version: '2.0'
|
|
153
165
|
- - ">="
|
|
154
166
|
- !ruby/object:Gem::Version
|
|
155
|
-
version:
|
|
167
|
+
version: 2.0.9
|
|
168
|
+
- !ruby/object:Gem::Dependency
|
|
169
|
+
name: turbo_tests2
|
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
|
171
|
+
requirements:
|
|
172
|
+
- - "~>"
|
|
173
|
+
- !ruby/object:Gem::Version
|
|
174
|
+
version: '3.1'
|
|
175
|
+
- - ">="
|
|
176
|
+
- !ruby/object:Gem::Version
|
|
177
|
+
version: 3.1.6
|
|
178
|
+
type: :development
|
|
179
|
+
prerelease: false
|
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
181
|
+
requirements:
|
|
182
|
+
- - "~>"
|
|
183
|
+
- !ruby/object:Gem::Version
|
|
184
|
+
version: '3.1'
|
|
185
|
+
- - ">="
|
|
186
|
+
- !ruby/object:Gem::Version
|
|
187
|
+
version: 3.1.6
|
|
156
188
|
- !ruby/object:Gem::Dependency
|
|
157
189
|
name: ruby-progressbar
|
|
158
190
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -173,21 +205,21 @@ dependencies:
|
|
|
173
205
|
requirements:
|
|
174
206
|
- - "~>"
|
|
175
207
|
- !ruby/object:Gem::Version
|
|
176
|
-
version: '
|
|
208
|
+
version: '2.0'
|
|
177
209
|
- - ">="
|
|
178
210
|
- !ruby/object:Gem::Version
|
|
179
|
-
version:
|
|
211
|
+
version: 2.0.4
|
|
180
212
|
type: :development
|
|
181
213
|
prerelease: false
|
|
182
214
|
version_requirements: !ruby/object:Gem::Requirement
|
|
183
215
|
requirements:
|
|
184
216
|
- - "~>"
|
|
185
217
|
- !ruby/object:Gem::Version
|
|
186
|
-
version: '
|
|
218
|
+
version: '2.0'
|
|
187
219
|
- - ">="
|
|
188
220
|
- !ruby/object:Gem::Version
|
|
189
|
-
version:
|
|
190
|
-
description: "\
|
|
221
|
+
version: 2.0.4
|
|
222
|
+
description: "\U0001F997 Generate both SHA256 & SHA512 checksums into the checksums
|
|
191
223
|
directory, and git commit them.\n gem install stone_checksums\nThen, use the rake
|
|
192
224
|
task or the script:\n rake build:generate_checksums\n gem_checksums\nControl options
|
|
193
225
|
with ENV variables!\nFund overlooked open source projects - bottom of stack, dev/test
|
|
@@ -203,9 +235,8 @@ extra_rdoc_files:
|
|
|
203
235
|
- CODE_OF_CONDUCT.md
|
|
204
236
|
- CONTRIBUTING.md
|
|
205
237
|
- FUNDING.md
|
|
206
|
-
- LICENSE.
|
|
238
|
+
- LICENSE.md
|
|
207
239
|
- README.md
|
|
208
|
-
- REEK
|
|
209
240
|
- RUBOCOP.md
|
|
210
241
|
- SECURITY.md
|
|
211
242
|
files:
|
|
@@ -214,11 +245,12 @@ files:
|
|
|
214
245
|
- CODE_OF_CONDUCT.md
|
|
215
246
|
- CONTRIBUTING.md
|
|
216
247
|
- FUNDING.md
|
|
217
|
-
- LICENSE.
|
|
248
|
+
- LICENSE.md
|
|
249
|
+
- MIT.md
|
|
218
250
|
- README.md
|
|
219
|
-
- REEK
|
|
220
251
|
- RUBOCOP.md
|
|
221
252
|
- SECURITY.md
|
|
253
|
+
- certs/pboling.pem
|
|
222
254
|
- exe/gem_checksums
|
|
223
255
|
- lib/gem_checksums.rb
|
|
224
256
|
- lib/gem_checksums/rakelib/gem_checksums.rake
|
|
@@ -228,15 +260,16 @@ files:
|
|
|
228
260
|
- lib/stone_checksums/version.rb
|
|
229
261
|
- sig/gem_checksums.rbs
|
|
230
262
|
- sig/stone_checksums.rbs
|
|
263
|
+
- sig/stone_checksums/version.rbs
|
|
231
264
|
homepage: https://github.com/galtzo-floss/stone_checksums
|
|
232
265
|
licenses:
|
|
233
266
|
- MIT
|
|
234
267
|
metadata:
|
|
235
|
-
homepage_uri: https://stone-checksums.galtzo.com
|
|
236
|
-
source_code_uri: https://github.com/galtzo-floss/stone_checksums/tree/v1.0.
|
|
237
|
-
changelog_uri: https://github.com/galtzo-floss/stone_checksums/blob/v1.0.
|
|
268
|
+
homepage_uri: https://stone-checksums.galtzo.com
|
|
269
|
+
source_code_uri: https://github.com/galtzo-floss/stone_checksums/tree/v1.0.5
|
|
270
|
+
changelog_uri: https://github.com/galtzo-floss/stone_checksums/blob/v1.0.5/CHANGELOG.md
|
|
238
271
|
bug_tracker_uri: https://github.com/galtzo-floss/stone_checksums/issues
|
|
239
|
-
documentation_uri: https://www.rubydoc.info/gems/stone_checksums/1.0.
|
|
272
|
+
documentation_uri: https://www.rubydoc.info/gems/stone_checksums/1.0.5
|
|
240
273
|
funding_uri: https://github.com/sponsors/pboling
|
|
241
274
|
wiki_uri: https://github.com/galtzo-floss/stone_checksums/wiki
|
|
242
275
|
news_uri: https://www.railsbling.com/tags/stone_checksums
|
|
@@ -244,7 +277,7 @@ metadata:
|
|
|
244
277
|
rubygems_mfa_required: 'true'
|
|
245
278
|
rdoc_options:
|
|
246
279
|
- "--title"
|
|
247
|
-
- "stone_checksums - \
|
|
280
|
+
- "stone_checksums - \U0001F997 Generate both SHA256 & SHA512 checksums of RubyGem
|
|
248
281
|
libraries"
|
|
249
282
|
- "--main"
|
|
250
283
|
- README.md
|
|
@@ -266,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
266
299
|
- !ruby/object:Gem::Version
|
|
267
300
|
version: '0'
|
|
268
301
|
requirements: []
|
|
269
|
-
rubygems_version:
|
|
302
|
+
rubygems_version: 4.0.10
|
|
270
303
|
specification_version: 4
|
|
271
|
-
summary: "\
|
|
304
|
+
summary: "\U0001F997 Generate both SHA256 & SHA512 checksums of RubyGem libraries"
|
|
272
305
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/REEK
DELETED
|
File without changes
|