gemsmith 18.0.1 → 18.1.1
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 +2 -3
- data/README.adoc +90 -19
- data/gemsmith.gemspec +3 -2
- data/lib/gemsmith/builders/specification.rb +2 -0
- data/lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb +18 -5
- 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: efa40f1261ef7850d3675a9a7ce4dc529a9440767c74ea7ac51737367feb176a
|
4
|
+
data.tar.gz: b7d00bdacacd6031710d3c60867db5a76c23af9043916baf5c97c8b86a455fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a0bb9fb6b20c9314b513a6c63b0d7e0f508ad968df59e4e50c2b31f28e1de0b25ab0e277ddc2ec3f203247394b93f930cc4cd5f347a8cd2a407d220030395e4
|
7
|
+
data.tar.gz: 2bab2e73aaf57e439302744e2a0099130b4da472eba6908abf78bfbb3f0ca0df34d1cd6190e8ba7c300a0d580a5ffefde31782e137426c41ec033467a9f06e6f
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
��
|
2
|
-
|
3
|
-
�%A�,�i�jA���"<�H�%��
|
1
|
+
�:��͏L���^ڦlFi�5Ca�k�P�AS�gΝU�ǎN3�S��qB/s�9���QR]?�$Ӻ��gq��D��ޅ��'�b)�d0^����A���; ��2�����/�����"� ���ͱ��P��ﵝ�O���{h �i���<_k��2Oc�t��UuL�Юfpg(M��7��
|
2
|
+
5r��hG0��C�>U���j�f�̵���F�"�0�+ǖ�ؔɋ��ۧ���+���r
|
data/README.adoc
CHANGED
@@ -25,15 +25,6 @@ toc::[]
|
|
25
25
|
. link:https://www.ruby-lang.org[Ruby].
|
26
26
|
. link:https://rubygems.org[RubyGems].
|
27
27
|
|
28
|
-
== Setup
|
29
|
-
|
30
|
-
To install, run:
|
31
|
-
|
32
|
-
[source,bash]
|
33
|
-
----
|
34
|
-
gem install gemsmith
|
35
|
-
----
|
36
|
-
|
37
28
|
== Upgrade
|
38
29
|
|
39
30
|
If upgrading from 17.0.0 to 18.0.0, you'll want to be aware of the following changes:
|
@@ -43,6 +34,15 @@ If upgrading from 17.0.0 to 18.0.0, you'll want to be aware of the following cha
|
|
43
34
|
ability to sign tags has been removed (this happens dynamically based on your Git configuration
|
44
35
|
which gives you more flexibility).
|
45
36
|
|
37
|
+
== Setup
|
38
|
+
|
39
|
+
To install, run:
|
40
|
+
|
41
|
+
[source,bash]
|
42
|
+
----
|
43
|
+
gem install gemsmith
|
44
|
+
----
|
45
|
+
|
46
46
|
== Usage
|
47
47
|
|
48
48
|
=== Command Line Interface (CLI)
|
@@ -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.
|
@@ -221,6 +222,20 @@ the following:
|
|
221
222
|
Feel free to take the combined Rubysmith + Gemsmith configuration, modify, and save as your own
|
222
223
|
custom `configuration.yml`.
|
223
224
|
|
225
|
+
It is recommended that you provide URLs for your project which would be all keys found in this
|
226
|
+
section:
|
227
|
+
|
228
|
+
[source,yaml]
|
229
|
+
----
|
230
|
+
:project:
|
231
|
+
:url:
|
232
|
+
# Add sub-key values here.
|
233
|
+
----
|
234
|
+
|
235
|
+
When these values exist, you'll benefit from having this information added to your generated
|
236
|
+
`gemspec` and project documentation. Otherwise -- if these values are empty -- they are removed from
|
237
|
+
new gem generation.
|
238
|
+
|
224
239
|
=== Workflows
|
225
240
|
|
226
241
|
When building/testing your gem locally, a typical workflow is:
|
@@ -290,8 +305,8 @@ gem cert --build you@example.com
|
|
290
305
|
chmod 600 gem-*.pem
|
291
306
|
----
|
292
307
|
|
293
|
-
The resulting
|
294
|
-
|
308
|
+
The resulting `.pem` key files can be referenced via the `signing_key` and `cert_chain` of your
|
309
|
+
`.gemspec` which Gemsmith provides for you via the `--security` build option. Example:
|
295
310
|
|
296
311
|
[source,ruby]
|
297
312
|
----
|
@@ -332,7 +347,7 @@ Gem::Specification.new do |spec|
|
|
332
347
|
end
|
333
348
|
----
|
334
349
|
|
335
|
-
💡 The gemspec metadata _must_ be strings per the
|
350
|
+
💡 The gemspec metadata (i.e. keys and values) _must_ be strings per the
|
336
351
|
link:https://guides.rubygems.org/specification-reference/#metadata[RubyGems Specification].
|
337
352
|
|
338
353
|
Use of the `allowed_push_host` key provides two important capabilities:
|
@@ -360,8 +375,8 @@ https://private.example.com: Basic dXNlcjpwYXNzd29yZA==
|
|
360
375
|
|
361
376
|
Notice how the first line contains credentials for the public RubyGems server while the second line
|
362
377
|
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:
|
378
|
+
to our private server. This is important because this is how we link our gem specification metadata
|
379
|
+
to our private credentials. To illustrate further, here are both files truncated and shown together:
|
365
380
|
|
366
381
|
....
|
367
382
|
# Gem specification metadata which defines the private host to publish to.
|
@@ -371,8 +386,8 @@ spec.metadata = {"allowed_push_host" => "https://private.example.com"}
|
|
371
386
|
https://private.example.com: Basic dXNlcjpwYXNzd29yZA==
|
372
387
|
....
|
373
388
|
|
374
|
-
When the above are linked together
|
375
|
-
|
389
|
+
When the above are linked together, you enable Gemsmith to publish your gem using only the following
|
390
|
+
command:
|
376
391
|
|
377
392
|
[source,bash]
|
378
393
|
----
|
@@ -380,8 +395,9 @@ gemsmith --publish
|
|
380
395
|
----
|
381
396
|
|
382
397
|
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
|
398
|
+
link:https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry[GitHub
|
399
|
+
Packages] which would look like this when properly configured (truncated for brevity while using
|
400
|
+
fake data):
|
385
401
|
|
386
402
|
....
|
387
403
|
# Gem specification
|
@@ -395,6 +411,62 @@ Lastly, should you need to delete a credential (due to a bad login/password for
|
|
395
411
|
open the `$HOME/.gem/credentials` in your default editor and remove the line(s) you don't need. Upon
|
396
412
|
next publish of your gem, you'll be prompted for the missing credentials.
|
397
413
|
|
414
|
+
=== GitHub Actions/Packages Automation
|
415
|
+
|
416
|
+
Earlier, I hinted at using GitHub Packages but what if you could automate the entire publishing
|
417
|
+
process? Well, good news, you can by using GitHub Actions to publish your packages. Here's the YAML
|
418
|
+
necessary to accomplish this endeavor:
|
419
|
+
|
420
|
+
``` yaml
|
421
|
+
name: Gemsmith
|
422
|
+
|
423
|
+
on:
|
424
|
+
push:
|
425
|
+
branches: main
|
426
|
+
|
427
|
+
jobs:
|
428
|
+
build:
|
429
|
+
runs-on: ubuntu-latest
|
430
|
+
container:
|
431
|
+
image: ruby:latest
|
432
|
+
permissions:
|
433
|
+
contents: write
|
434
|
+
packages: write
|
435
|
+
|
436
|
+
steps:
|
437
|
+
- name: Checkout
|
438
|
+
uses: actions/checkout@v3
|
439
|
+
with:
|
440
|
+
fetch-depth: '0'
|
441
|
+
ref: ${{github.head_ref}}
|
442
|
+
- name: Setup
|
443
|
+
run: |
|
444
|
+
git config user.email "engineering@example.com"
|
445
|
+
git config user.name "Gemsmith Publisher"
|
446
|
+
mkdir -p $HOME/.gem
|
447
|
+
printf "%s\n" "https://rubygems.pkg.github.com/example: Bearer ${{secrets.GITHUB_TOKEN}}" > $HOME/.gem/credentials
|
448
|
+
chmod 0600 $HOME/.gem/credentials
|
449
|
+
- name: Install
|
450
|
+
run: gem install gemsmith
|
451
|
+
- name: Publish
|
452
|
+
run: |
|
453
|
+
if git describe --tags --abbrev=0 > /dev/null 2>&1; then
|
454
|
+
gemsmith --publish
|
455
|
+
else
|
456
|
+
printf "%s\n" "First gem version must be manually created. Skipping."
|
457
|
+
fi
|
458
|
+
```
|
459
|
+
|
460
|
+
The above will ensure the following:
|
461
|
+
|
462
|
+
* Only the first version requires manual publishing (hence the check for existing Git tags).
|
463
|
+
* Duplicate versions are always skipped.
|
464
|
+
* Only when a new version is detected (by changing your gemspec version) and you are on the `main`
|
465
|
+
branch will a new version be automatically published.
|
466
|
+
|
467
|
+
This entire workflow is explained in my
|
468
|
+
link:https://www.alchemists.io/talks/ruby_git_hub_packages[talk] on this exact subject too.
|
469
|
+
|
398
470
|
== Promotion
|
399
471
|
|
400
472
|
Once your gem is released, let the world know about your accomplishment by posting an update to
|
@@ -402,7 +474,6 @@ these sites:
|
|
402
474
|
|
403
475
|
* link:https://rubyflow.com[RubyFlow]
|
404
476
|
* link:https://ruby.libhunt.com[Ruby Library Hunt]
|
405
|
-
* link:https://rubydaily.org[RubyDaily]
|
406
477
|
* link:https://awesome-ruby.com[Awesome Ruby]
|
407
478
|
* link:https://www.ruby-toolbox.com[Ruby Toolbox]
|
408
479
|
* 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.
|
5
|
+
spec.version = "18.1.1"
|
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"
|
@@ -8,12 +8,25 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.license = "<%= configuration.license_label_version %>"
|
9
9
|
|
10
10
|
spec.metadata = {
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
<% unless configuration.computed_project_url_issues.empty? %>
|
12
|
+
"bug_tracker_uri" => "<%= configuration.computed_project_url_issues %>",
|
13
|
+
<% end %>
|
14
|
+
<% unless configuration.computed_project_url_versions.empty? %>
|
15
|
+
"changelog_uri" => "<%= configuration.computed_project_url_versions %>",
|
16
|
+
<% end %>
|
17
|
+
<% unless configuration.computed_project_url_home.empty? %>
|
18
|
+
"documentation_uri" => "<%= configuration.computed_project_url_home %>",
|
19
|
+
<% end %>
|
20
|
+
<% unless configuration.computed_project_url_funding.empty? %>
|
21
|
+
"funding_uri" => "<%= configuration.computed_project_url_funding %>",
|
22
|
+
<% end %>
|
14
23
|
"label" => "<%= configuration.project_label %>",
|
15
|
-
|
16
|
-
|
24
|
+
<% if configuration.computed_project_url_source.empty? %>
|
25
|
+
"rubygems_mfa_required" => "true"
|
26
|
+
<% else %>
|
27
|
+
"rubygems_mfa_required" => "true",
|
28
|
+
"source_code_uri" => "<%= configuration.computed_project_url_source %>"
|
29
|
+
<% end %>
|
17
30
|
}
|
18
31
|
|
19
32
|
<% if configuration.build_security %>
|
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.
|
4
|
+
version: 18.1.1
|
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-
|
31
|
+
date: 2022-05-01 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
|