gem_toys 1.0.2 → 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 +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +26 -4
- data/lib/gem_toys/template/release.rb +8 -7
- data/lib/gem_toys/template.rb +7 -3
- data/lib/gem_toys/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a87146ba4aa41ff731f36ddc958da12e2001de1ea977bbda261f4cbf26c6e92
|
|
4
|
+
data.tar.gz: 9dd570e120a5ddba850dbbcc0600c0c02ff4db2be5fca2d78d486d4482b4ccf1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dceb5ff9637e44a068c986aa403aad621b0b4025d80a501cc7b79c5a53789bbe6473cc211205f6631a917cd641e3805c1ac2d2529160f58d04f34440be8e31a1
|
|
7
|
+
data.tar.gz: 6d3316bdda7ef2be25470c34051d32004a32ead517d5b7458ff30623fa76502e7862454cc18b46ce7ed93ca77a33983582540ff0371653002b9246cb3b5b45f9
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
|
|
13
|
+
## 1.1.0 (2026-08-10)
|
|
14
|
+
|
|
15
|
+
* Update dependencies.
|
|
16
|
+
* Switch from Cirrus CI to GitHub Actions.
|
|
17
|
+
* Try Dependabot.
|
|
18
|
+
|
|
5
19
|
## 1.0.2 (2026-02-01)
|
|
6
20
|
|
|
7
21
|
* Return Ruby 3.2 and 3.3 support.
|
data/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Gem Toys
|
|
2
2
|
|
|
3
|
-
[](https://github.com/AlexWayfer/gem_toys/actions)
|
|
4
|
+
[](https://depfu.com/repos/github/AlexWayfer/gem_toys)
|
|
4
5
|
[](https://codecov.io/gh/AlexWayfer/gem_toys)
|
|
5
|
-
[](https://qlty.sh/gh/AlexWayfer/projects/gem_toys)
|
|
6
7
|
[](https://inch-ci.org/github/AlexWayfer/gem_toys)
|
|
7
8
|
[](https://github.com/AlexWayfer/gem_toys/blob/main/LICENSE.txt)
|
|
8
9
|
[](https://rubygems.org/gems/gem_toys)
|
|
@@ -42,7 +43,9 @@ expand GemToys::Template,
|
|
|
42
43
|
## default is `"lib/#{project_name_with_slashes_instead_dashes}/version.rb"`
|
|
43
44
|
version_file_path: 'lib/my-awesome_gem.rb',
|
|
44
45
|
## default is `v`, so tags are like `v4.1.0`
|
|
45
|
-
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
|
|
46
49
|
|
|
47
50
|
# `gem` namespace created, aliases are optional, but handful
|
|
48
51
|
tool :g, delegate_relative: :gem
|
|
@@ -70,7 +73,7 @@ tool :g, delegate_relative: :gem
|
|
|
70
73
|
5. Commit these files.
|
|
71
74
|
6. Tag this commit with `vX.Y.Z`.
|
|
72
75
|
7. Push git commit and tag.
|
|
73
|
-
8. Push the new gem.
|
|
76
|
+
8. Push the new gem, unless `publish_gem: false` is configured.
|
|
74
77
|
|
|
75
78
|
## Development
|
|
76
79
|
|
|
@@ -82,6 +85,25 @@ To install this gem onto your local machine, run `toys gem install`.
|
|
|
82
85
|
|
|
83
86
|
To release a new version, run `toys gem release %version%`. See how it works [here](#release).
|
|
84
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
|
+
|
|
85
107
|
## Contributing
|
|
86
108
|
|
|
87
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,
|
|
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
|
data/lib/gem_toys/template.rb
CHANGED
|
@@ -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,
|
|
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
|
data/lib/gem_toys/version.rb
CHANGED
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.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:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: alt_memery
|
|
@@ -57,14 +57,14 @@ dependencies:
|
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: 0.
|
|
60
|
+
version: 0.25.0
|
|
61
61
|
type: :runtime
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: 0.
|
|
67
|
+
version: 0.25.0
|
|
68
68
|
description: 'Toys template for gems, like building, releasing, etc.
|
|
69
69
|
|
|
70
70
|
'
|
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
110
110
|
- !ruby/object:Gem::Version
|
|
111
111
|
version: '0'
|
|
112
112
|
requirements: []
|
|
113
|
-
rubygems_version:
|
|
113
|
+
rubygems_version: 4.0.20
|
|
114
114
|
specification_version: 4
|
|
115
115
|
summary: Toys template for gems
|
|
116
116
|
test_files: []
|