gemsmith 19.5.1 → 19.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +25 -10
- data/gemsmith.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +27 -20
- 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: b0bab61fb9a27a5e8d869fb0dadcd0c8e50783e7a5774bca1ef860aa63312563
|
4
|
+
data.tar.gz: d5709a594be8f2f26d68c203be0b79abc49f06131bebf39a15af11f41e8fc799
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c1410312afb797e4f59d8d06aa4de04f4bcfab090935ec16c557e615db40238ceb59f73260eb10fdd0419b7d8cddd2fc747d4d5a44ceb82f7c6d3c5b060436e
|
7
|
+
data.tar.gz: 1467120baf6b1d6a561d8920ad930afb9b98c5ee73fb2970b2e5a51d470594097a5b683476c088b170b215aaec60aadf1dc7b6abc27e26e995b48cc3e7da062f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
:toclevels: 5
|
3
3
|
:figure-caption!:
|
4
4
|
|
5
|
+
:ruby_gems_link: link:https://rubygems.org[RubyGems]
|
6
|
+
|
5
7
|
= Gemsmith
|
6
8
|
|
7
9
|
Gemsmith is a command line interface for smithing Ruby gems. Perfect for when you need a
|
@@ -23,7 +25,7 @@ toc::[]
|
|
23
25
|
|
24
26
|
. A UNIX-based system.
|
25
27
|
. link:https://www.ruby-lang.org[Ruby].
|
26
|
-
.
|
28
|
+
. {ruby_gems_link}.
|
27
29
|
|
28
30
|
== Setup
|
29
31
|
|
@@ -291,13 +293,20 @@ To create a certificate for your gems, run the following:
|
|
291
293
|
|
292
294
|
[source,bash]
|
293
295
|
----
|
294
|
-
cd ~/.
|
295
|
-
gem cert --build you@example.com
|
296
|
-
|
296
|
+
cd ~/.gem
|
297
|
+
gem cert --build you@example.com --days 730
|
298
|
+
gem cert --add gem-public_cert.pem
|
299
|
+
cp gem-public_cert.pem <path/to/server/public/folder>/gems.pem
|
297
300
|
----
|
298
301
|
|
299
|
-
The
|
300
|
-
|
302
|
+
The above breaks down as follows:
|
303
|
+
|
304
|
+
* *Source*: The `~/.gem` directory is where your credentials and certificates are stored. This is also where the `Gem.default_key_path` and `Gem.default_cert_path` methods look for your certificates. I'll talk more about these shortly.
|
305
|
+
* *Build*: Builds your `gem-private_key.pem` and `gem-public_cert.pem` certificates with a two year duration (i.e. `365 * 2`) before expiring. You can also see this information on the {ruby_gems_link} page for your gem (scroll to the bottom). Security-wise, this isn't great but the way {ruby_gems_link} certification is implemented and enforced is weak to begin with. Regardless, this is important to do in order to be a good citizen within the ecosystem. You'll also be prompted for a private key passphrase so make sure it is long and complicated and then store it in your favorite password manager.
|
306
|
+
* *Add*: Once your public certificate has been built, you'll need to add it to your registry so {ruby_gems_link} can look up and verify your certificate upon gem install.
|
307
|
+
* *Web*: You'll need to copy your public certificate to the public folder of your web server so you can host this certificate for others to install. I rename my public certificate as `gems.pem` to keep the URL simple but you can name it how you like and document usage for others. For example, here's how you'd add my public certificate (same as done locally but via a URL this time): `gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)`.
|
308
|
+
|
309
|
+
Earlier, I mentioned `Gem.default_key_path` and `Gem.default_cert_path` are paths to where your certificates are stored in your `~/.gem` directory. Well, the `signing_key` and `cert_chain` of your `.gemspec` needs to use these paths. Gemsmith automates for you when the `--security` build option is used (enabled by default). For example, when using Gemsmith to build a new gem, you'll see the following configuration generated in your `.gemspec`:
|
301
310
|
|
302
311
|
[source,ruby]
|
303
312
|
----
|
@@ -310,13 +319,19 @@ Gem::Specification.new do |spec|
|
|
310
319
|
end
|
311
320
|
----
|
312
321
|
|
313
|
-
To
|
314
|
-
|
322
|
+
The above wires all of this functionality together so you can easily build and publish your gems with minimal effort while increasing your security. 🎉 To test the security of your newly minted gem, you can install it with the `--trust-policy` set to high security for maximum benefit. Example:
|
323
|
+
|
324
|
+
[source,bash]
|
325
|
+
----
|
326
|
+
gem install <your_gem> --trust-policy HighSecurity
|
327
|
+
----
|
328
|
+
|
329
|
+
To learn more about gem certificates, check out the RubyGems
|
330
|
+
link:https://guides.rubygems.org/security[Security] documentation.
|
315
331
|
|
316
332
|
=== Private Gem Servers
|
317
333
|
|
318
|
-
By default, the following command will publicly publish your gem to
|
319
|
-
link:https://rubygems.org[RubyGems]:
|
334
|
+
By default, the following command will publicly publish your gem to {ruby_gems_link}:
|
320
335
|
|
321
336
|
[source,bash]
|
322
337
|
----
|
data/gemsmith.gemspec
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemsmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 19.5.
|
4
|
+
version: 19.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -10,25 +10,32 @@ bindir: exe
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ8wDQYDVQQDDAZicm9v
|
14
|
+
a2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQBGRYC
|
15
|
+
aW8wHhcNMjMwMzIyMTYxNDQxWhcNMjUwMzIxMTYxNDQxWj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zbDWTsZeZGglS4E+4Jxpau1lU9HhOIcKolv6LeC6UdALTFudY+GLb8Xw
|
31
|
+
REXgaJkjzzhkUSILmEnRwEbY08dVSl7ZAaxVI679vfI2yapLlIwpbBgmQTiTvPr3
|
32
|
+
qyyLUno9flYEOv9fmGHunSrM+gE0/0niGTXa5GgXBXYGS2he4LQGgSBfGp/cTwMU
|
33
|
+
rDKJRcusZ12lNBeDfgqACz/BBJF8FLodgk6rGMRZz7+ZmjjHEmpG5bQpR6Q2BuWL
|
34
|
+
XMtYk/QzaWuhiR7pWjiF8jbdd7RO6or0ohq7iFkokz/5xrtQ/vPzU2RQ3Qc6YaKw
|
35
|
+
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
|
+
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
30
37
|
-----END CERTIFICATE-----
|
31
|
-
date: 2023-03-
|
38
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
32
39
|
dependencies:
|
33
40
|
- !ruby/object:Gem::Dependency
|
34
41
|
name: cogger
|
@@ -293,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
300
|
- !ruby/object:Gem::Version
|
294
301
|
version: '0'
|
295
302
|
requirements: []
|
296
|
-
rubygems_version: 3.4.
|
303
|
+
rubygems_version: 3.4.9
|
297
304
|
signing_key:
|
298
305
|
specification_version: 4
|
299
306
|
summary: A command line interface for smithing Ruby gems.
|
metadata.gz.sig
CHANGED
Binary file
|