bake-gem 0.13.0 → 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: 92e701ad0396f8ba45c9392081df802445fdf23e0181518927806d7d425b9979
4
- data.tar.gz: fd7c9dffebf368a8d080351163e6a9202fddc59cf4da6143d5184c1022c4e270
3
+ metadata.gz: 1921512c8e66685c7ced03e581fa8ecafea58e93720540dc80dd6ee84ebafaf9
4
+ data.tar.gz: 9ffa14838c160f994189bf54499420a891c6364d7629834c88b9babafdf30237
5
5
  SHA512:
6
- metadata.gz: 35eba973249b282bc4dafd5fcdf8ee58442a2a64bdcc8bc44a3f5c44e6c38ce014917b9300e2f94892413469ba49d3192d0e8c3667e7c652b5f289d9b5634a11
7
- data.tar.gz: 69140b5f782db2d5ddbaae4789cf8357b41b07fe99302ff519f19f2982f7e9f2e2760cf75780211cf9f6783b4bbaf2055c6ea2353255d22fb88dd49be1ba3f42
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
data/bake/gem/release.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Released under the MIT License.
2
- # Copyright, 2021-2025, by Samuel Williams.
2
+ # Copyright, 2021-2026, by Samuel Williams.
3
3
 
4
4
  # frozen_string_literal: true
5
5
 
data/bake/gem.rb CHANGED
@@ -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
  # Copyright, 2025, by Copilot.
6
6
 
7
7
  # Initialize the gem context with helper for gem operations.
@@ -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
  # Copyright, 2025, by Copilot.
6
6
 
7
7
  require "rubygems"
@@ -103,7 +103,17 @@ module Bake
103
103
  # @returns [String | Nil] The path to the version file, or nil if not found.
104
104
  def version_path
105
105
  if @gemspec
106
- @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)
107
117
  end
108
118
  end
109
119
 
@@ -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
  # Copyright, 2025, by Copilot.
6
6
 
7
7
  require "console"
@@ -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.13.0"
8
+ VERSION = "0.13.1"
9
9
  end
10
10
  end
data/lib/bake/gem.rb CHANGED
@@ -1,7 +1,7 @@
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
5
  # Copyright, 2025, by Copilot.
6
6
 
7
7
  require_relative "gem/version"
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2021-2025, by Samuel Williams.
3
+ Copyright, 2021-2026, by Samuel Williams.
4
4
  Copyright, 2025, by Copilot.
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
data/readme.md CHANGED
@@ -14,6 +14,10 @@ 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
+
17
21
  ### v0.13.0
18
22
 
19
23
  - Add `after_gem_release` hook for post-release actions.
@@ -54,6 +58,22 @@ We welcome contributions to this project.
54
58
  4. Push to the branch (`git push origin my-new-feature`).
55
59
  5. Create new Pull Request.
56
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
+
57
77
  ### Developer Certificate of Origin
58
78
 
59
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,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.13.1
4
+
5
+ - Better `version.rb` detection in `version_path` method.
6
+
3
7
  ## v0.13.0
4
8
 
5
9
  - Add `after_gem_release` hook for post-release actions.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 4.0.3
95
+ rubygems_version: 4.0.6
96
96
  specification_version: 4
97
97
  summary: Release management for Ruby gems.
98
98
  test_files: []
metadata.gz.sig CHANGED
Binary file