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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/modernize/actions.rb +48 -1
- data/bake/modernize/contributing.rb +4 -4
- data/bake/modernize.rb +1 -1
- data/lib/bake/modernize/version.rb +1 -1
- data/readme.md +4 -4
- data/template/actions/.github/workflows/documentation.yaml +1 -0
- data/template/actions/gems.rb +13 -0
- data/template/decode/gems.rb +0 -1
- data/template/readme/readme.md +4 -4
- data.tar.gz.sig +0 -0
- metadata +2 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d2c8f68b44f5a0bed33b2cb8eb9ad786c3ba342ef832a3172243fb307894ecb
|
|
4
|
+
data.tar.gz: 78eb847913bd1e072f95e57dba775607ae7c7a11dab4fde776b89b2411b2b29a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 63843fd466e38c738c79b09d181dc6893e3a828174281be123b6e31788daeea80955ae82b6ecc544b0b393bebc39bc1a5f01da847006a27b6de3cb6c01985d3a
|
|
7
|
+
data.tar.gz: 21c36dcb57e07b5b4a3108be1953f67b09ae04ecc4390984ce7d15659cee4c1d2c898a2d7ce4e568757d0c604ea7302c03d638117ea84e92121aa61d852bcf78
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/bake/modernize/actions.rb
CHANGED
|
@@ -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
|
-
```
|
|
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
|
-
```
|
|
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
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
|
-
```
|
|
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
|
-
```
|
|
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
|
data/template/decode/gems.rb
CHANGED
data/template/readme/readme.md
CHANGED
|
@@ -26,16 +26,16 @@ We welcome contributions to this project.
|
|
|
26
26
|
|
|
27
27
|
To run the test suite:
|
|
28
28
|
|
|
29
|
-
```
|
|
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
|
-
```
|
|
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.
|
|
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
|