bake-gem 0.12.1 → 0.13.1

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: 9b58013991ce4771130e9bc0b03a0bad9928e981cdcba488e14bcb6541199ccb
4
- data.tar.gz: 61ec5e7911011e5e888d03872197fea5eb7de373d8a311ca9709b2a5ac2b5f31
3
+ metadata.gz: 1921512c8e66685c7ced03e581fa8ecafea58e93720540dc80dd6ee84ebafaf9
4
+ data.tar.gz: 9ffa14838c160f994189bf54499420a891c6364d7629834c88b9babafdf30237
5
5
  SHA512:
6
- metadata.gz: 9769c00625679490e83bd66f9df10fd946880cb1ad8a5aad301db7a7d66bb19f0644026b84fcf9cd6a6666cf58abdabf77509ffc98decb389ebd7fb26af3b574
7
- data.tar.gz: 5e60162227459bb458b62d2d16ed404427e13507c3c64efb4f40af2cf0f02ae77b07b8c8c5cb27832610646a1924dc6e6c13763fbf51952ee77a1774935cd383
6
+ metadata.gz: 76ef768494dcf189e0aaf4651a7c3c03bc0d5f4bcd0e87ccb5fd5c890f8d20b49ffb2149e523ae912d752a15ad2614f8dd2a1aaf6d0b5091890d749d9fac105e
7
+ data.tar.gz: 27740a73d10724a9b88d5bf880621a4c80e644ad5a6accd714b4014b67ba055e1548a0d9a8c83accd08ecddafb892bf7c64ce269ca55a05d8e876739e606635e
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2025, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
5
 
6
6
  # Increment the patch number of the current version.
7
7
  def patch
@@ -28,7 +28,7 @@ def increment(bump, message: "Bump version.")
28
28
  gemspec = helper.gemspec
29
29
 
30
30
  helper.update_version(bump) do |version|
31
- Console.logger.info(self) {"Updated version: #{version}"}
31
+ Console.info(self, "Updated version:", version: version)
32
32
 
33
33
  # Ensure that any subsequent tasks use the correct version!
34
34
  gemspec.version = version.join
data/bake/gem/release.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # Released under the MIT License.
2
+ # Copyright, 2021-2026, by Samuel Williams.
1
3
 
2
4
  # frozen_string_literal: true
3
5
 
data/bake/gem.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2025, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
+ # Copyright, 2025, by Copilot.
5
6
 
6
7
  # Initialize the gem context with helper for gem operations.
7
8
  # @parameter context [Bake::Context] The bake execution context.
@@ -64,6 +65,7 @@ def release(tag: true)
64
65
  end
65
66
 
66
67
  @helper.push_release(current_branch: current_branch)
68
+ context["after_gem_release"]&.call(name: @helper.gemspec.name, version: version, tag: tag_name, path: path)
67
69
 
68
70
  return {
69
71
  name: @helper.gemspec.name,
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2025, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
+ # Copyright, 2025, by Copilot.
5
6
 
6
7
  require "rubygems"
7
8
  require "rubygems/package"
@@ -102,7 +103,17 @@ module Bake
102
103
  # @returns [String | Nil] The path to the version file, or nil if not found.
103
104
  def version_path
104
105
  if @gemspec
105
- @gemspec.files.grep(/lib(.*?)\/version.rb/).first
106
+ candidates = @gemspec.files.grep(/lib(.*?)\/version.rb/)
107
+
108
+ # If only one version file exists, use it:
109
+ return candidates.first if candidates.size == 1
110
+
111
+ # Try to match the gem name convention (e.g., "protocol-rack" -> "lib/protocol/rack/version.rb"):
112
+ expected_path = "lib/#{@gemspec.name.gsub('-', '/')}/version.rb"
113
+ return expected_path if candidates.include?(expected_path)
114
+
115
+ # Fall back to the shortest path (most likely to be the main gem version):
116
+ return candidates.min_by(&:length)
106
117
  end
107
118
  end
108
119
 
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2025, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
+ # Copyright, 2025, by Copilot.
5
6
 
6
7
  require "console"
7
8
  require "console/event/spawn"
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2025, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
5
 
6
6
  module Bake
7
7
  module Gem
8
- VERSION = "0.12.1"
8
+ VERSION = "0.13.1"
9
9
  end
10
10
  end
data/lib/bake/gem.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2024, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
+ # Copyright, 2025, by Copilot.
5
6
 
6
7
  require_relative "gem/version"
7
8
 
data/license.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2021-2024, by Samuel Williams.
3
+ Copyright, 2021-2026, by Samuel Williams.
4
+ Copyright, 2025, by Copilot.
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -14,6 +14,14 @@ Please see the [project documentation](https://ioquatix.github.io/bake-gem/) for
14
14
 
15
15
  Please see the [project releases](https://ioquatix.github.io/bake-gem/releases/index) for all releases.
16
16
 
17
+ ### v0.13.1
18
+
19
+ - Better `version.rb` detection in `version_path` method.
20
+
21
+ ### v0.13.0
22
+
23
+ - Add `after_gem_release` hook for post-release actions.
24
+
17
25
  ### v0.12.0
18
26
 
19
27
  - Add `guard_last_commit_not_version_bump` method to prevent consecutive version bumps.
@@ -50,6 +58,22 @@ We welcome contributions to this project.
50
58
  4. Push to the branch (`git push origin my-new-feature`).
51
59
  5. Create new Pull Request.
52
60
 
61
+ ### Running Tests
62
+
63
+ To run the test suite:
64
+
65
+ ``` shell
66
+ bundle exec sus
67
+ ```
68
+
69
+ ### Making Releases
70
+
71
+ To make a new release:
72
+
73
+ ``` shell
74
+ bundle exec bake gem:release:patch # or minor or major
75
+ ```
76
+
53
77
  ### Developer Certificate of Origin
54
78
 
55
79
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
data/releases.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Releases
2
2
 
3
+ ## v0.13.1
4
+
5
+ - Better `version.rb` detection in `version_path` method.
6
+
7
+ ## v0.13.0
8
+
9
+ - Add `after_gem_release` hook for post-release actions.
10
+
3
11
  ## v0.12.0
4
12
 
5
13
  - Add `guard_last_commit_not_version_bump` method to prevent consecutive version bumps.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Copilot
8
9
  bindir: bin
9
10
  cert_chain:
10
11
  - |
@@ -84,14 +85,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
85
  requirements:
85
86
  - - ">="
86
87
  - !ruby/object:Gem::Version
87
- version: '3.2'
88
+ version: '3.3'
88
89
  required_rubygems_version: !ruby/object:Gem::Requirement
89
90
  requirements:
90
91
  - - ">="
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
94
  requirements: []
94
- rubygems_version: 3.6.9
95
+ rubygems_version: 4.0.6
95
96
  specification_version: 4
96
97
  summary: Release management for Ruby gems.
97
98
  test_files: []
metadata.gz.sig CHANGED
Binary file