gemsmith 18.0.0 → 18.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7078991f9fcbcb707c47a3bbc7fb390725c3048c26de414728624f01a5a42a9e
4
- data.tar.gz: aefb802ad6d7e39a454c553b40921c596c5000adee42e14f5e195eafcda95e0b
3
+ metadata.gz: 28fb66ba1ffc978d88dad82d5b14e898581da78cb8c599c9ba702b6a68c6ad21
4
+ data.tar.gz: 8cb98c3f67fcbc64cac58706430431b14429a7a5ad0399f14d03db04eb3f9215
5
5
  SHA512:
6
- metadata.gz: 66f5dbee7fd91d463f89b8e95819eac28af1ee9af66bc1314d32103cd085a238c6dd8c8e7011e02ef588781f9397e3db3aacfb35b03a545f3e1fc67ea2591a6a
7
- data.tar.gz: fd91bff49d27af059de47ace1aafacc50b0a4e7938e1b8627f5cb6b856498a64fab0bb4bcf4cbec47a339bf54f09d52e1d18788bc47bdaf849f615c5f83a6f0c
6
+ metadata.gz: afe90b17b858eae6e574b1f41af7b5ed9f7b95b421ff52a4726ce2a837116a3ceb759ab610e2a5eef06a088070773c96ce7467449e18ac3f6354a86efef18fbb
7
+ data.tar.gz: 47302fcdba57685e3c5b1f46cc082974194eb81217e350960aed20fd696c75a0741dc795cea271b1266955035b86e8c719ea5d1ef56fcbbf1842e9fb71654b63
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -39,7 +39,7 @@ gem install gemsmith
39
39
  If upgrading from 17.0.0 to 18.0.0, you'll want to be aware of the following changes:
40
40
 
41
41
  * The `--dead_end` build option has been removed.
42
- * The Milestoner configuraition has been updated to support ASCII Doc format by default and the
42
+ * The Milestoner configuration has been updated to support ASCII Doc format by default and the
43
43
  ability to sign tags has been removed (this happens dynamically based on your Git configuration
44
44
  which gives you more flexibility).
45
45
 
@@ -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,19 @@ gem cert --build you@example.com
290
291
  chmod 600 gem-*.pem
291
292
  ----
292
293
 
293
- The resulting `.pem` key files can be referenced via the `:private_key:` and `:public_key:` keys
294
- within the `$HOME/.gemsmithrc` file.
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:
296
+
297
+ [source,ruby]
298
+ ----
299
+ # frozen_string_literal: true
300
+
301
+ Gem::Specification.new do |spec|
302
+ # Truncated for brevity.
303
+ spec.signing_key = Gem.default_key_path
304
+ spec.cert_chain = [Gem.default_cert_path]
305
+ end
306
+ ----
295
307
 
296
308
  To learn more about gem certificates, read about RubyGems
297
309
  link:https://guides.rubygems.org/security[Security].
@@ -321,7 +333,7 @@ Gem::Specification.new do |spec|
321
333
  end
322
334
  ----
323
335
 
324
- 💡 The gemspec metadata _must_ be strings per the
336
+ 💡 The gemspec metadata (i.e. keys and values) _must_ be strings per the
325
337
  link:https://guides.rubygems.org/specification-reference/#metadata[RubyGems Specification].
326
338
 
327
339
  Use of the `allowed_push_host` key provides two important capabilities:
@@ -349,19 +361,19 @@ https://private.example.com: Basic dXNlcjpwYXNzd29yZA==
349
361
 
350
362
  Notice how the first line contains credentials for the public RubyGems server while the second line
351
363
  is for our private example server. You'll also notice that the key is not a symbol but a URL string
352
- to our private server. This is important as this is how we link our gem specification metadata to
353
- 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:
354
366
 
355
367
  ....
356
- # Gem specificaiton metadata which defines the private host to publish to.
368
+ # Gem specification metadata which defines the private host to publish to.
357
369
  spec.metadata = {"allowed_push_host" => "https://private.example.com"}
358
370
 
359
371
  # Gem credentials where the URL value above becomes the key which enables authentication.
360
372
  https://private.example.com: Basic dXNlcjpwYXNzd29yZA==
361
373
  ....
362
374
 
363
- When the above are linked together like this, you enable Gemsmith to publish your gem using only the
364
- following command:
375
+ When the above are linked together, you enable Gemsmith to publish your gem using only the following
376
+ command:
365
377
 
366
378
  [source,bash]
367
379
  ----
@@ -369,8 +381,9 @@ gemsmith --publish
369
381
  ----
370
382
 
371
383
  This is especially powerful when publishing to
372
- link:https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry[GitHub's
373
- Packages registory] which would look like this when properly configured (truncated for brevity):
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):
374
387
 
375
388
  ....
376
389
  # Gem specification
@@ -384,6 +397,62 @@ Lastly, should you need to delete a credential (due to a bad login/password for
384
397
  open the `$HOME/.gem/credentials` in your default editor and remove the line(s) you don't need. Upon
385
398
  next publish of your gem, you'll be prompted for the missing credentials.
386
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
+
387
456
  == Promotion
388
457
 
389
458
  Once your gem is released, let the world know about your accomplishment by posting an update to
@@ -391,7 +460,6 @@ these sites:
391
460
 
392
461
  * link:https://rubyflow.com[RubyFlow]
393
462
  * link:https://ruby.libhunt.com[Ruby Library Hunt]
394
- * link:https://rubydaily.org[RubyDaily]
395
463
  * link:https://awesome-ruby.com[Awesome Ruby]
396
464
  * link:https://www.ruby-toolbox.com[Ruby Toolbox]
397
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.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.0"
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 %>"
@@ -28,9 +29,6 @@ Gem::Specification.new do |spec|
28
29
  <% if configuration.build_cli %>
29
30
  spec.add_dependency "dry-container", "~> 0.9"
30
31
  <% end %>
31
- <% if configuration.build_cli %>
32
- spec.add_dependency "pastel", "~> 0.8"
33
- <% end %>
34
32
  <% if configuration.build_refinements %>
35
33
  spec.add_dependency "refinements", "~> 9.2"
36
34
  <% end %>
@@ -34,7 +34,7 @@ module Gemsmith
34
34
  executor.capture3(check_yubikey.success, "oath", "accounts", "code", "--single", "RubyGems")
35
35
  .then { |stdout, _stderr, status| status.success? ? ["--otp", stdout.chomp] : [] }
36
36
  rescue Errno::ENOENT => error
37
- logger.warn { "Unable to obtain YubiKey One-Time Password. #{error}." }
37
+ logger.debug { "Unable to obtain YubiKey One-Time Password. #{error}." }
38
38
  []
39
39
  end
40
40
 
@@ -44,7 +44,7 @@ module Gemsmith
44
44
  if status.success?
45
45
  Success stdout.chomp
46
46
  else
47
- logger.warn { "Unable to find YubiKey Manager. #{stderr}." }
47
+ logger.debug { "Unable to find YubiKey Manager. #{stderr}." }
48
48
  Failure()
49
49
  end
50
50
  end
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- �L0oq��U��š�'���T[��rHy�$��i2amje �g?ȅ]X������a�X^��#ޟ_���إ�|�S*L 0������(�xn[B���}p�k�qtP��7׫�,�{
1
+ ��\m��p�_��f��E`|����ДPS
2
+ Iw�9��1�A��D��˝6�>t�<vc<���pU��@N���\�!����E�0�.��{� KY��oܲg� �>�&�+G�{�U�(F>yR��W�/3�w K|�53O�t$�g��K�7�c0�? @�d�xĿ�`ݮ=��j;�����5�p�Eb���J��gz������'b�m���r�ש� ?=f����vS�q��(y���h
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.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-10 00:00:00.000000000 Z
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.0'
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.0'
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.11
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