bake-modernize 0.57.1 → 0.58.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: d34845503e53e2aa4732caf9b436005c0024ded3eb176a2cb949e2c954f7b265
4
- data.tar.gz: 3c11b8133d78eaef2570936d5a9592bec2862ba84e19d64f83a752b3ecb0d3fe
3
+ metadata.gz: 6d2c8f68b44f5a0bed33b2cb8eb9ad786c3ba342ef832a3172243fb307894ecb
4
+ data.tar.gz: 78eb847913bd1e072f95e57dba775607ae7c7a11dab4fde776b89b2411b2b29a
5
5
  SHA512:
6
- metadata.gz: 2e165510a118d0ef4824e343505ca39001404f64b0d57f3a6763323415a4a16843b41d02cb352b3180d2357ef0d7f72a0b3f9f4154d93a91110add8fc3c24813
7
- data.tar.gz: 1d0d8604ef3a80418d73d125da72bc1c1ebd0f39f2647bf03ea1fa461e1fde06c9af706b78717c5b7fbc1c39f7e9ba1bc66b71e83802cae6c0514a77493578cf
6
+ metadata.gz: 63843fd466e38c738c79b09d181dc6893e3a828174281be123b6e31788daeea80955ae82b6ecc544b0b393bebc39bc1a5f01da847006a27b6de3cb6c01985d3a
7
+ data.tar.gz: 21c36dcb57e07b5b4a3108be1953f67b09ae04ecc4390984ce7d15659cee4c1d2c898a2d7ce4e568757d0c604ea7302c03d638117ea84e92121aa61d852bcf78
checksums.yaml.gz.sig CHANGED
Binary file
@@ -22,7 +22,8 @@ def update(root:)
22
22
  update_filenames(root)
23
23
 
24
24
  template_root = Bake::Modernize.template_path_for("actions")
25
- Bake::Modernize.copy_template(template_root, root)
25
+ Bake::Modernize.copy_template(template_root + ".github", File.join(root, ".github"))
26
+ update_external_test(root)
26
27
 
27
28
  readme_path = ["README.md", "readme.md"].find{|path| File.exist?(File.expand_path(path, root))}
28
29
 
@@ -60,6 +61,52 @@ def update_filenames(root)
60
61
  end
61
62
  end
62
63
 
64
+ def update_external_test(root)
65
+ external_config_path = File.expand_path("config/external.yaml", root)
66
+ external_workflow_path = File.expand_path(".github/workflows/test-external.yaml", root)
67
+
68
+ if File.exist?(external_config_path)
69
+ update_external_test_gem(root, include: true)
70
+ else
71
+ FileUtils::Verbose.rm(external_workflow_path) if File.exist?(external_workflow_path)
72
+ update_external_test_gem(root, include: false)
73
+ end
74
+ end
75
+
76
+ def update_external_test_gem(root, include:)
77
+ gems_path = File.expand_path("gems.rb", root)
78
+
79
+ return unless File.exist?(gems_path)
80
+
81
+ require "async/ollama"
82
+
83
+ existing = File.read(gems_path)
84
+ updated = Async::Ollama::Transform.call(existing,
85
+ model: "qwen3-coder:latest",
86
+ instruction: external_test_gem_instruction(include),
87
+ template: external_test_gem_template(include),
88
+ )
89
+ File.write(gems_path, updated)
90
+ end
91
+
92
+ def external_test_gem_instruction(include)
93
+ if include
94
+ "Ensure the `bake-test-external` gem is included in the `test` group. Preserve existing gems, groups, options, comments and formatting. If the `test` group does not exist, create one. Do not duplicate the gem if it already exists."
95
+ else
96
+ "Remove the `bake-test-external` gem from the file. Preserve existing gems, groups, options, comments and formatting. Remove empty lines only when they were only separating the removed gem."
97
+ end
98
+ end
99
+
100
+ def external_test_gem_template(include)
101
+ template = File.read(Bake::Modernize.template_path_for("actions") + "gems.rb")
102
+
103
+ if include
104
+ return template
105
+ end
106
+
107
+ template.sub(/^\s*gem "bake-test-external"\n/, "")
108
+ end
109
+
63
110
  def repository_url(root)
64
111
  repository = Rugged::Repository.discover(root)
65
112
  git_url = repository.remotes["origin"].url
@@ -31,16 +31,16 @@ We welcome contributions to this project.
31
31
 
32
32
  To run the test suite:
33
33
 
34
- ``` shell
35
- bundle exec sus
34
+ ``` bash
35
+ $ bundle exec sus
36
36
  ```
37
37
 
38
38
  ### Making Releases
39
39
 
40
40
  To make a new release:
41
41
 
42
- ``` shell
43
- bundle exec bake gem:release:patch # or minor or major
42
+ ``` bash
43
+ $ bundle exec bake gem:release:patch # or minor or major
44
44
  ```
45
45
 
46
46
  ### Developer Certificate of Origin
data/bake/modernize.rb CHANGED
@@ -8,9 +8,9 @@ def modernize
8
8
  call(
9
9
  "modernize:git",
10
10
  "modernize:readme",
11
- "modernize:actions",
12
11
  "modernize:editorconfig",
13
12
  "modernize:gemfile",
13
+ "modernize:actions",
14
14
  "modernize:rubocop",
15
15
  "modernize:signing",
16
16
  "modernize:gemspec",
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Bake
7
7
  module Modernize
8
- VERSION = "0.57.1"
8
+ VERSION = "0.58.0"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -46,16 +46,16 @@ We welcome contributions to this project.
46
46
 
47
47
  To run the test suite:
48
48
 
49
- ``` shell
50
- bundle exec sus
49
+ ``` bash
50
+ $ bundle exec sus
51
51
  ```
52
52
 
53
53
  ### Making Releases
54
54
 
55
55
  To make a new release:
56
56
 
57
- ``` shell
58
- bundle exec bake gem:release:patch # or minor or major
57
+ ``` bash
58
+ $ bundle exec bake gem:release:patch # or minor or major
59
59
  ```
60
60
 
61
61
  ### Developer Certificate of Origin
@@ -4,6 +4,7 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
+ workflow_dispatch:
7
8
 
8
9
  # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
9
10
  permissions:
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2026, by Samuel Williams.
5
+
6
+ source "https://rubygems.org"
7
+
8
+ gemspec
9
+
10
+ group :test do
11
+ gem "bake-test"
12
+ gem "bake-test-external"
13
+ end
@@ -21,5 +21,4 @@ group :test do
21
21
  gem "covered"
22
22
 
23
23
  gem "bake-test"
24
- gem "bake-test-external"
25
24
  end
@@ -26,16 +26,16 @@ We welcome contributions to this project.
26
26
 
27
27
  To run the test suite:
28
28
 
29
- ``` shell
30
- bundle exec sus
29
+ ``` bash
30
+ $ bundle exec sus
31
31
  ```
32
32
 
33
33
  ### Making Releases
34
34
 
35
35
  To make a new release:
36
36
 
37
- ``` shell
38
- bundle exec bake gem:release:patch # or minor or major
37
+ ``` bash
38
+ $ bundle exec bake gem:release:patch # or minor or major
39
39
  ```
40
40
 
41
41
  ### Developer Certificate of Origin
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.57.1
4
+ version: 0.58.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -155,6 +155,7 @@ files:
155
155
  - template/actions/.github/workflows/test-coverage.yaml
156
156
  - template/actions/.github/workflows/test-external.yaml
157
157
  - template/actions/.github/workflows/test.yaml
158
+ - template/actions/gems.rb
158
159
  - template/copilot/.github/copilot-instructions.md
159
160
  - template/decode/gems.rb
160
161
  - template/editorconfig/.editorconfig
metadata.gz.sig CHANGED
Binary file