bake-modernize 0.53.0 → 0.54.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: ed0bdef810b733fa0af04d88aa56e024e39de1d2d89e1639c37c7ffd3b95f1da
4
- data.tar.gz: 19782bdf37b3e9d5e4dfeff8cfb2fa1ab0450ac4d4375605fcd4c3e5c73df796
3
+ metadata.gz: 3e29be1b90da6f1941996ff2d3718afbe9fa5995c92e3c6c8d87e39849b92e94
4
+ data.tar.gz: 0c1c28743f4675f934795e73629d3aea5d6432be4ba2b47e992145fdd720e38d
5
5
  SHA512:
6
- metadata.gz: '0441971ac6e0264c9bd20e591b317fd0c0c476df4535a6c5f851e2c21d0a6ae1af82144920b8ded6d4cae823869eede0202e2876500d1b3f1a22ee935d672c1d'
7
- data.tar.gz: b4809ced242447396666ab9546fd1d5dc7b3d81f3ee8aff929f4027b83f551b4c4d636c2485ce52a2eec21154cdcaf2fb8668297760b3a8971e28934819fbb4e
6
+ metadata.gz: 0df5e11a2cb1a3540b4822b98bf63d58e1e6e63406f546a60fabb4d31601c2d06df8336fd11cf73507de34f7bf12cface002ac33876d57e9b121a28845ac8eca
7
+ data.tar.gz: f8cb82b9bd49453104303fc1d8e3313e7c723cf30ca1e8d8168239958b846ab50060102649fe4cb9c2af9d7d714c8b3897303d29ddf330ae9e8ea065d3fe3d37
checksums.yaml.gz.sig CHANGED
Binary file
@@ -27,6 +27,22 @@ We welcome contributions to this project.
27
27
  4. Push to the branch (`git push origin my-new-feature`).
28
28
  5. Create new Pull Request.
29
29
 
30
+ ### Running Tests
31
+
32
+ To run the test suite:
33
+
34
+ ``` shell
35
+ bundle exec sus
36
+ ```
37
+
38
+ ### Making Releases
39
+
40
+ To make a new release:
41
+
42
+ ``` shell
43
+ bundle exec bake gem:release:patch # or minor or major
44
+ ```
45
+
30
46
  ### Developer Certificate of Origin
31
47
 
32
48
  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.
@@ -22,7 +22,7 @@ def update(path: default_gemspec_path, output: $stdout)
22
22
  spec = ::Gem::Specification.load(path)
23
23
 
24
24
  root = File.dirname(path)
25
- version_path = version_path(root)
25
+ version_path = version_path(root, spec.name)
26
26
 
27
27
  constant = File.read(version_path)
28
28
  .scan(/(?:class|module)\s+(.*?)$/)
@@ -170,8 +170,18 @@ def default_gemspec_path
170
170
  Dir["*.gemspec"].first
171
171
  end
172
172
 
173
- def version_path(root)
174
- Dir["lib/**/version.rb", base: root].first
173
+ def version_path(root, gem_name)
174
+ candidates = Dir["lib/**/version.rb", base: root]
175
+
176
+ # If only one version file exists, use it:
177
+ return candidates.first if candidates.size == 1
178
+
179
+ # Try to match the gem name convention (e.g., "protocol-rack" -> "lib/protocol/rack/version.rb"):
180
+ expected_path = "lib/#{gem_name.gsub('-', '/')}/version.rb"
181
+ return expected_path if candidates.include?(expected_path)
182
+
183
+ # Fall back to the shortest path (most likely to be the main gem version):
184
+ return candidates.min_by(&:length)
175
185
  end
176
186
 
177
187
  require "async"
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Bake
7
7
  module Modernize
8
- VERSION = "0.53.0"
8
+ VERSION = "0.54.1"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -12,6 +12,10 @@ Please see the [project documentation](https://ioquatix.github.io/bake-modernize
12
12
 
13
13
  Please see the [project releases](https://ioquatix.github.io/bake-modernize/releases/index) for all releases.
14
14
 
15
+ ### v0.54.1
16
+
17
+ - Better `version.rb` detection in `modernize:gemspec`.
18
+
15
19
  ### v0.53.0
16
20
 
17
21
  - Make `modernize:releases` part of the default `modernize` task.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.54.1
4
+
5
+ - Better `version.rb` detection in `modernize:gemspec`.
6
+
3
7
  ## v0.53.0
4
8
 
5
9
  - Make `modernize:releases` part of the default `modernize` task.
@@ -22,6 +22,22 @@ We welcome contributions to this project.
22
22
  4. Push to the branch (`git push origin my-new-feature`).
23
23
  5. Create new Pull Request.
24
24
 
25
+ ### Running Tests
26
+
27
+ To run the test suite:
28
+
29
+ ``` shell
30
+ bundle exec sus
31
+ ```
32
+
33
+ ### Making Releases
34
+
35
+ To make a new release:
36
+
37
+ ``` shell
38
+ bundle exec bake gem:release:patch # or minor or major
39
+ ```
40
+
25
41
  ### Developer Certificate of Origin
26
42
 
27
43
  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.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-modernize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.53.0
4
+ version: 0.54.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  requirements: []
185
- rubygems_version: 4.0.3
185
+ rubygems_version: 4.0.6
186
186
  specification_version: 4
187
187
  summary: Automatically modernize parts of your project/gem.
188
188
  test_files: []
metadata.gz.sig CHANGED
Binary file