gemsmith 18.0.2 → 18.1.0
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 +67 -10
- data/gemsmith.gemspec +3 -2
- data/lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb +1 -0
- data.tar.gz.sig +0 -0
- metadata +6 -5
- 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: 28fb66ba1ffc978d88dad82d5b14e898581da78cb8c599c9ba702b6a68c6ad21
|
4
|
+
data.tar.gz: 8cb98c3f67fcbc64cac58706430431b14429a7a5ad0399f14d03db04eb3f9215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afe90b17b858eae6e574b1f41af7b5ed9f7b95b421ff52a4726ce2a837116a3ceb759ab610e2a5eef06a088070773c96ce7467449e18ac3f6354a86efef18fbb
|
7
|
+
data.tar.gz: 47302fcdba57685e3c5b1f46cc082974194eb81217e350960aed20fd696c75a0741dc795cea271b1266955035b86e8c719ea5d1ef56fcbbf1842e9fb71654b63
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -71,6 +71,7 @@ BUILD OPTIONS:
|
|
71
71
|
--[no-]console Add console script. Default: true.
|
72
72
|
--[no-]contributions Add contributions documentation. Default: true.
|
73
73
|
--[no-]debug Add Debug gem. Default: true.
|
74
|
+
--[no-]funding Add GitHub funding configuration. Default: false.
|
74
75
|
--[no-]git Add Git. Default: true.
|
75
76
|
--[no-]git_hub Add GitHub templates. Default: false.
|
76
77
|
--[no-]git-lint Add Git Lint gem. Default: true.
|
@@ -290,8 +291,8 @@ gem cert --build you@example.com
|
|
290
291
|
chmod 600 gem-*.pem
|
291
292
|
----
|
292
293
|
|
293
|
-
The resulting
|
294
|
-
|
294
|
+
The resulting `.pem` key files can be referenced via the `signing_key` and `cert_chain` of your
|
295
|
+
`.gemspec` which Gemsmith provides for you via the `--security` build option. Example:
|
295
296
|
|
296
297
|
[source,ruby]
|
297
298
|
----
|
@@ -332,7 +333,7 @@ Gem::Specification.new do |spec|
|
|
332
333
|
end
|
333
334
|
----
|
334
335
|
|
335
|
-
💡 The gemspec metadata _must_ be strings per the
|
336
|
+
💡 The gemspec metadata (i.e. keys and values) _must_ be strings per the
|
336
337
|
link:https://guides.rubygems.org/specification-reference/#metadata[RubyGems Specification].
|
337
338
|
|
338
339
|
Use of the `allowed_push_host` key provides two important capabilities:
|
@@ -360,8 +361,8 @@ https://private.example.com: Basic dXNlcjpwYXNzd29yZA==
|
|
360
361
|
|
361
362
|
Notice how the first line contains credentials for the public RubyGems server while the second line
|
362
363
|
is for our private example server. You'll also notice that the key is not a symbol but a URL string
|
363
|
-
to our private server. This is important
|
364
|
-
our private credentials. To illustrate further, here are both files truncated and shown together:
|
364
|
+
to our private server. This is important because this is how we link our gem specification metadata
|
365
|
+
to our private credentials. To illustrate further, here are both files truncated and shown together:
|
365
366
|
|
366
367
|
....
|
367
368
|
# Gem specification metadata which defines the private host to publish to.
|
@@ -371,8 +372,8 @@ spec.metadata = {"allowed_push_host" => "https://private.example.com"}
|
|
371
372
|
https://private.example.com: Basic dXNlcjpwYXNzd29yZA==
|
372
373
|
....
|
373
374
|
|
374
|
-
When the above are linked together
|
375
|
-
|
375
|
+
When the above are linked together, you enable Gemsmith to publish your gem using only the following
|
376
|
+
command:
|
376
377
|
|
377
378
|
[source,bash]
|
378
379
|
----
|
@@ -380,8 +381,9 @@ gemsmith --publish
|
|
380
381
|
----
|
381
382
|
|
382
383
|
This is especially powerful when publishing to
|
383
|
-
link:https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry[GitHub
|
384
|
-
Packages
|
384
|
+
link:https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry[GitHub
|
385
|
+
Packages] which would look like this when properly configured (truncated for brevity while using
|
386
|
+
fake data):
|
385
387
|
|
386
388
|
....
|
387
389
|
# Gem specification
|
@@ -395,6 +397,62 @@ Lastly, should you need to delete a credential (due to a bad login/password for
|
|
395
397
|
open the `$HOME/.gem/credentials` in your default editor and remove the line(s) you don't need. Upon
|
396
398
|
next publish of your gem, you'll be prompted for the missing credentials.
|
397
399
|
|
400
|
+
=== GitHub Actions/Packages Automation
|
401
|
+
|
402
|
+
Earlier, I hinted at using GitHub Packages but what if you could automate the entire publishing
|
403
|
+
process? Well, good news, you can by using GitHub Actions to publish your packages. Here's the YAML
|
404
|
+
necessary to accomplish this endeavor:
|
405
|
+
|
406
|
+
``` yaml
|
407
|
+
name: Gemsmith
|
408
|
+
|
409
|
+
on:
|
410
|
+
push:
|
411
|
+
branches: main
|
412
|
+
|
413
|
+
jobs:
|
414
|
+
build:
|
415
|
+
runs-on: ubuntu-latest
|
416
|
+
container:
|
417
|
+
image: ruby:latest
|
418
|
+
permissions:
|
419
|
+
contents: write
|
420
|
+
packages: write
|
421
|
+
|
422
|
+
steps:
|
423
|
+
- name: Checkout
|
424
|
+
uses: actions/checkout@v3
|
425
|
+
with:
|
426
|
+
fetch-depth: '0'
|
427
|
+
ref: ${{github.head_ref}}
|
428
|
+
- name: Setup
|
429
|
+
run: |
|
430
|
+
git config user.email "engineering@example.com"
|
431
|
+
git config user.name "Gemsmith Publisher"
|
432
|
+
mkdir -p $HOME/.gem
|
433
|
+
printf "%s\n" "https://rubygems.pkg.github.com/example: Bearer ${{secrets.GITHUB_TOKEN}}" > $HOME/.gem/credentials
|
434
|
+
chmod 0600 $HOME/.gem/credentials
|
435
|
+
- name: Install
|
436
|
+
run: gem install gemsmith
|
437
|
+
- name: Publish
|
438
|
+
run: |
|
439
|
+
if git describe --tags --abbrev=0 > /dev/null 2>&1; then
|
440
|
+
gemsmith --publish
|
441
|
+
else
|
442
|
+
printf "%s\n" "First gem version must be manually created. Skipping."
|
443
|
+
fi
|
444
|
+
```
|
445
|
+
|
446
|
+
The above will ensure the following:
|
447
|
+
|
448
|
+
* Only the first version requires manual publishing (hence the check for existing Git tags).
|
449
|
+
* Duplicate versions are always skipped.
|
450
|
+
* Only when a new version is detected (by changing your gemspec version) and you are on the `main`
|
451
|
+
branch will a new version be automatically published.
|
452
|
+
|
453
|
+
This entire workflow is explained in my
|
454
|
+
link:https://www.alchemists.io/talks/ruby_git_hub_packages[talk] on this exact subject too.
|
455
|
+
|
398
456
|
== Promotion
|
399
457
|
|
400
458
|
Once your gem is released, let the world know about your accomplishment by posting an update to
|
@@ -402,7 +460,6 @@ these sites:
|
|
402
460
|
|
403
461
|
* link:https://rubyflow.com[RubyFlow]
|
404
462
|
* link:https://ruby.libhunt.com[Ruby Library Hunt]
|
405
|
-
* link:https://rubydaily.org[RubyDaily]
|
406
463
|
* link:https://awesome-ruby.com[Awesome Ruby]
|
407
464
|
* link:https://www.ruby-toolbox.com[Ruby Toolbox]
|
408
465
|
* link:https://www.ruby-lang.org/en/community[Ruby Community]
|
data/gemsmith.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "gemsmith"
|
5
|
-
spec.version = "18.0
|
5
|
+
spec.version = "18.1.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://www.alchemists.io/projects/gemsmith"
|
@@ -13,6 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
"bug_tracker_uri" => "https://github.com/bkuhlmann/gemsmith/issues",
|
14
14
|
"changelog_uri" => "https://www.alchemists.io/projects/gemsmith/versions",
|
15
15
|
"documentation_uri" => "https://www.alchemists.io/projects/gemsmith",
|
16
|
+
"funding_uri" => "https://github.com/sponsors/bkuhlmann",
|
16
17
|
"label" => "Gemsmith",
|
17
18
|
"rubygems_mfa_required" => "true",
|
18
19
|
"source_code_uri" => "https://github.com/bkuhlmann/gemsmith"
|
@@ -28,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
28
29
|
spec.add_dependency "dry-monads", "~> 1.4"
|
29
30
|
spec.add_dependency "milestoner", "~> 14.0"
|
30
31
|
spec.add_dependency "refinements", "~> 9.2"
|
31
|
-
spec.add_dependency "rubysmith", "~> 3.
|
32
|
+
spec.add_dependency "rubysmith", "~> 3.1"
|
32
33
|
spec.add_dependency "runcom", "~> 8.2"
|
33
34
|
spec.add_dependency "spek", "~> 0.2"
|
34
35
|
spec.add_dependency "versionaire", "~> 10.0"
|
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
"bug_tracker_uri" => "<%= configuration.computed_project_url_issues %>",
|
12
12
|
"changelog_uri" => "<%= configuration.computed_project_url_versions %>",
|
13
13
|
"documentation_uri" => "<%= configuration.computed_project_url_home %>",
|
14
|
+
"funding_uri" => "<%= configuration.computed_project_url_funding %>",
|
14
15
|
"label" => "<%= configuration.project_label %>",
|
15
16
|
"rubygems_mfa_required" => "true",
|
16
17
|
"source_code_uri" => "<%= configuration.computed_project_url_source %>"
|
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: 18.0
|
4
|
+
version: 18.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
|
29
29
|
RFE=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2022-04-
|
31
|
+
date: 2022-04-30 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: auto_injector
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '3.
|
123
|
+
version: '3.1'
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '3.
|
130
|
+
version: '3.1'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: runcom
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -261,6 +261,7 @@ metadata:
|
|
261
261
|
bug_tracker_uri: https://github.com/bkuhlmann/gemsmith/issues
|
262
262
|
changelog_uri: https://www.alchemists.io/projects/gemsmith/versions
|
263
263
|
documentation_uri: https://www.alchemists.io/projects/gemsmith
|
264
|
+
funding_uri: https://github.com/sponsors/bkuhlmann
|
264
265
|
label: Gemsmith
|
265
266
|
rubygems_mfa_required: 'true'
|
266
267
|
source_code_uri: https://github.com/bkuhlmann/gemsmith
|
@@ -279,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
280
|
- !ruby/object:Gem::Version
|
280
281
|
version: '0'
|
281
282
|
requirements: []
|
282
|
-
rubygems_version: 3.3.
|
283
|
+
rubygems_version: 3.3.12
|
283
284
|
signing_key:
|
284
285
|
specification_version: 4
|
285
286
|
summary: A command line interface for smithing Ruby gems.
|
metadata.gz.sig
CHANGED
Binary file
|