gem_toys 1.1.0 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d162afb88ad18ae72449dac5b083e8dc4ba47f79b58d30672282d32feda1602f
4
- data.tar.gz: a213a6f96780da5bd30b33b4a7ee8472c381f74175ab9a64069e1c1d611a4001
3
+ metadata.gz: 5a87146ba4aa41ff731f36ddc958da12e2001de1ea977bbda261f4cbf26c6e92
4
+ data.tar.gz: 9dd570e120a5ddba850dbbcc0600c0c02ff4db2be5fca2d78d486d4482b4ccf1
5
5
  SHA512:
6
- metadata.gz: e0828ba5571ef3156459219be5a98a11a28e4424f3e48e79d3b8c7c114c1153438c3d20e132b16aecd5c36e81aba71c089ea0910540f3dd90ec410e13460c7d3
7
- data.tar.gz: ab3f70daaff6fe04e3b9b3ceabd365baa1d4b3e80119559a18118570cc5a0afd683affab06ddd3aa0b35f1b93f7d56e8566df151bd326ff165861475499a3517
6
+ metadata.gz: dceb5ff9637e44a068c986aa403aad621b0b4025d80a501cc7b79c5a53789bbe6473cc211205f6631a917cd641e3805c1ac2d2529160f58d04f34440be8e31a1
7
+ data.tar.gz: 6d3316bdda7ef2be25470c34051d32004a32ead517d5b7458ff30623fa76502e7862454cc18b46ce7ed93ca77a33983582540ff0371653002b9246cb3b5b45f9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.2.0 (2026-11-10)
6
+
7
+ * Require Toys 0.25.
8
+ * Update development dependencies.
9
+ * Replace the Code Climate badge with Qlty maintainability.
10
+ * Add `publish_gem: false` to delegate gem publishing to CI.
11
+ * Publish this gem from GitHub Actions when a version tag is pushed.
12
+
5
13
  ## 1.1.0 (2026-08-10)
6
14
 
7
15
  * Update dependencies.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/AlexWayfer/gem_toys/ci.yml?style=flat-square)](https://github.com/AlexWayfer/gem_toys/actions)
4
4
  [![Depfu](https://img.shields.io/depfu/AlexWayfer/gem_toys?style=flat-square)](https://depfu.com/repos/github/AlexWayfer/gem_toys)
5
5
  [![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/gem_toys/main.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/gem_toys)
6
- [![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/gem_toys.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/gem_toys)
6
+ [![Qlty maintainability](https://qlty.sh/gh/AlexWayfer/projects/gem_toys/maintainability.svg)](https://qlty.sh/gh/AlexWayfer/projects/gem_toys)
7
7
  [![Inline docs](https://inch-ci.org/github/AlexWayfer/gem_toys.svg?branch=main)](https://inch-ci.org/github/AlexWayfer/gem_toys)
8
8
  [![license](https://img.shields.io/github/license/AlexWayfer/gem_toys.svg?style=flat-square)](https://github.com/AlexWayfer/gem_toys/blob/main/LICENSE.txt)
9
9
  [![Gem](https://img.shields.io/gem/v/gem_toys.svg?style=flat-square)](https://rubygems.org/gems/gem_toys)
@@ -43,7 +43,9 @@ expand GemToys::Template,
43
43
  ## default is `"lib/#{project_name_with_slashes_instead_dashes}/version.rb"`
44
44
  version_file_path: 'lib/my-awesome_gem.rb',
45
45
  ## default is `v`, so tags are like `v4.1.0`
46
- version_tag_prefix: ''
46
+ version_tag_prefix: '',
47
+ ## default is `true`; use `false` when CI publishes the gem after the tag is pushed
48
+ publish_gem: false
47
49
 
48
50
  # `gem` namespace created, aliases are optional, but handful
49
51
  tool :g, delegate_relative: :gem
@@ -71,7 +73,7 @@ tool :g, delegate_relative: :gem
71
73
  5. Commit these files.
72
74
  6. Tag this commit with `vX.Y.Z`.
73
75
  7. Push git commit and tag.
74
- 8. Push the new gem.
76
+ 8. Push the new gem, unless `publish_gem: false` is configured.
75
77
 
76
78
  ## Development
77
79
 
@@ -83,6 +85,25 @@ To install this gem onto your local machine, run `toys gem install`.
83
85
 
84
86
  To release a new version, run `toys gem release %version%`. See how it works [here](#release).
85
87
 
88
+ ### Publishing this gem
89
+
90
+ This repository sets `publish_gem: false`: Toys prepares the version, dated changelog,
91
+ commit, and tag, and GitHub Actions publishes the gem when a `v*` tag is pushed.
92
+ The workflow checks the tag against the gem version and dated changelog, runs the checks,
93
+ and builds the gem before publishing.
94
+
95
+ Before the first automated release, configure a
96
+ [RubyGems trusted publisher](https://guides.rubygems.org/trusted-publishing/)
97
+ for `gem_toys` with these values:
98
+
99
+ * Repository owner: `AlexWayfer`
100
+ * Repository name: `gem_toys`
101
+ * Workflow filename: `release.yml`
102
+ * Environment: `release`
103
+
104
+ No RubyGems API key is stored in GitHub secrets. After a failed release, fix the cause and
105
+ re-run the failed workflow jobs for the same tag.
106
+
86
107
  ## Contributing
87
108
 
88
109
  Bug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/gem_toys).
@@ -11,18 +11,21 @@ module GemToys
11
11
  class Release
12
12
  include Toys::Template
13
13
 
14
- attr_reader :changelog_file_name, :version_file_path, :version_tag_prefix, :unreleased_title
14
+ attr_reader :changelog_file_name, :version_file_path, :version_tag_prefix,
15
+ :unreleased_title, :publish_gem
15
16
 
16
17
  def initialize(
17
18
  changelog_file_name:,
18
19
  version_file_path:,
19
20
  version_tag_prefix:,
20
- unreleased_title:
21
+ unreleased_title:,
22
+ publish_gem: true
21
23
  )
22
24
  @changelog_file_name = changelog_file_name
23
25
  @version_file_path = version_file_path
24
26
  @version_tag_prefix = version_tag_prefix
25
27
  @unreleased_title = unreleased_title
28
+ @publish_gem = publish_gem
26
29
  end
27
30
 
28
31
  on_expand do |template|
@@ -30,11 +33,7 @@ module GemToys
30
33
  include Release::Changelog
31
34
  include Release::Git
32
35
 
33
- self::VERSION_TYPES = %w[
34
- major
35
- minor
36
- patch
37
- ].freeze
36
+ self::VERSION_TYPES = %w[major minor patch].freeze
38
37
 
39
38
  self::MANUAL_CHECK_MENU = {
40
39
  yes: (proc do
@@ -73,6 +72,8 @@ module GemToys
73
72
  ## Commit, tag, push
74
73
  process_git
75
74
 
75
+ next unless template.publish_gem
76
+
76
77
  puts 'Pushing gem...'
77
78
  sh "gem push #{current_gem_file}"
78
79
  end
@@ -9,18 +9,21 @@ module GemToys
9
9
  class Template
10
10
  include Toys::Template
11
11
 
12
- attr_reader :changelog_file_name, :version_file_path, :version_tag_prefix, :unreleased_title
12
+ attr_reader :changelog_file_name, :version_file_path, :version_tag_prefix,
13
+ :unreleased_title, :publish_gem
13
14
 
14
15
  def initialize(
15
16
  changelog_file_name: 'CHANGELOG.md',
16
17
  version_file_path: nil,
17
18
  version_tag_prefix: 'v',
18
- unreleased_title: '## Unreleased'
19
+ unreleased_title: '## Unreleased',
20
+ publish_gem: true
19
21
  )
20
22
  @changelog_file_name = changelog_file_name
21
23
  @version_file_path = version_file_path
22
24
  @version_tag_prefix = version_tag_prefix
23
25
  @unreleased_title = unreleased_title
26
+ @publish_gem = publish_gem
24
27
  end
25
28
 
26
29
  on_expand do |template|
@@ -75,7 +78,8 @@ module GemToys
75
78
  changelog_file_name: template.changelog_file_name,
76
79
  version_file_path: template.version_file_path,
77
80
  version_tag_prefix: template.version_tag_prefix,
78
- unreleased_title: template.unreleased_title
81
+ unreleased_title: template.unreleased_title,
82
+ publish_gem: template.publish_gem
79
83
  end
80
84
  end
81
85
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GemToys
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_toys
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-08-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: alt_memery
@@ -55,22 +55,16 @@ dependencies:
55
55
  name: toys-core
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '0.19'
61
- - - "<"
58
+ - - "~>"
62
59
  - !ruby/object:Gem::Version
63
- version: '0.23'
60
+ version: 0.25.0
64
61
  type: :runtime
65
62
  prerelease: false
66
63
  version_requirements: !ruby/object:Gem::Requirement
67
64
  requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: '0.19'
71
- - - "<"
65
+ - - "~>"
72
66
  - !ruby/object:Gem::Version
73
- version: '0.23'
67
+ version: 0.25.0
74
68
  description: 'Toys template for gems, like building, releasing, etc.
75
69
 
76
70
  '
@@ -116,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
110
  - !ruby/object:Gem::Version
117
111
  version: '0'
118
112
  requirements: []
119
- rubygems_version: 3.6.2
113
+ rubygems_version: 4.0.20
120
114
  specification_version: 4
121
115
  summary: Toys template for gems
122
116
  test_files: []