bake-modernize 0.8.2 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/modernize/actions.rb +22 -1
- data/bake/modernize/gemspec.rb +12 -1
- data/lib/bake/modernize/version.rb +1 -1
- data/template/actions/.github/workflows/coverage.yaml +57 -0
- data/template/actions/.github/workflows/documentation.yaml +41 -0
- data/template/actions/.github/workflows/test-external.yaml +36 -0
- data/template/actions/.github/workflows/{development.yml → test.yaml} +11 -6
- data.tar.gz.sig +0 -0
- metadata +7 -5
- metadata.gz.sig +0 -0
- data/template/actions/.github/workflows/documentation.yml +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca6a04bbfc198174280655c629b6bdcaac8fe08f9ca5ec79ce854507649678bb
|
4
|
+
data.tar.gz: d1491c619a975a72cdd03c46fbb52e4d3946608a650df10e9d1c59696d1b6cae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d5f5ca77e21a434dd60d6625858982cc0e3ebe6420a3e4a1cc79eda4c787549e54b9e10736dbea704bbd7ad3f1495517dcc401592ab4be84ca5ac54449f5bfc
|
7
|
+
data.tar.gz: 1d3326be2cdfc4ad94a8a903af3529bd0fe8cbbdd04e86e45a6f2bb70a06e853552a93de0cea71c4e3575b1d923fe5437e778d8e057c00eb8104c04f48853b38
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bake/modernize/actions.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
require 'bake/modernize'
|
3
3
|
require 'rugged'
|
4
4
|
require 'markly'
|
5
|
+
require 'build/files/system'
|
5
6
|
|
6
7
|
def actions
|
7
8
|
update(root: Dir.pwd)
|
@@ -14,6 +15,8 @@ def update(root:)
|
|
14
15
|
FileUtils.rm_rf(travis_path)
|
15
16
|
end
|
16
17
|
|
18
|
+
update_filenames(root)
|
19
|
+
|
17
20
|
template_root = Bake::Modernize.template_path_for('actions')
|
18
21
|
Bake::Modernize.copy_template(template_root, root)
|
19
22
|
|
@@ -23,6 +26,24 @@ end
|
|
23
26
|
|
24
27
|
private
|
25
28
|
|
29
|
+
def update_filenames(root)
|
30
|
+
actions_root = Build::Files::Path.new(root) + ".github/workflows"
|
31
|
+
yml_files = actions_root.glob("*.yml")
|
32
|
+
|
33
|
+
# Move all .yml files to .yaml files :)
|
34
|
+
yml_files.each do |path|
|
35
|
+
new_path = path.with(extension: ".yaml", basename: true)
|
36
|
+
FileUtils.mv(path, new_path)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Move development.yaml to test.yaml
|
40
|
+
development_path = actions_root + "development.yaml"
|
41
|
+
test_path = actions_root + "test.yaml"
|
42
|
+
if development_path.exist?
|
43
|
+
FileUtils.mv(development_path, test_path)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
26
47
|
def repository_url(root)
|
27
48
|
repository = Rugged::Repository.discover(root)
|
28
49
|
git_url = repository.remotes['origin'].url
|
@@ -33,7 +54,7 @@ def repository_url(root)
|
|
33
54
|
end
|
34
55
|
|
35
56
|
def badge_for(repository_url)
|
36
|
-
"[![Development Status](#{repository_url}/workflows/
|
57
|
+
"[![Development Status](#{repository_url}/workflows/Test/badge.svg)](#{repository_url}/actions?workflow=Test)"
|
37
58
|
end
|
38
59
|
|
39
60
|
def badge?(node)
|
data/bake/modernize/gemspec.rb
CHANGED
@@ -109,17 +109,28 @@ private
|
|
109
109
|
def directory_glob_for(spec, paths = spec.files)
|
110
110
|
directories = {}
|
111
111
|
root = File.dirname(spec.loaded_from)
|
112
|
+
dotfiles = false
|
112
113
|
|
113
114
|
paths.each do |path|
|
114
115
|
directory, _ = path.split(File::SEPARATOR, 2)
|
116
|
+
basename = File.basename(path)
|
115
117
|
|
116
118
|
full_path = File.expand_path(directory, root)
|
119
|
+
|
117
120
|
if File.directory?(full_path)
|
118
121
|
directories[directory] = true
|
119
122
|
end
|
123
|
+
|
124
|
+
if basename.start_with?('.')
|
125
|
+
dotfiles = true
|
126
|
+
end
|
120
127
|
end
|
121
128
|
|
122
|
-
|
129
|
+
if dotfiles
|
130
|
+
return "Dir.glob('{#{directories.keys.join(',')}}/**/*', File::FNM_DOTMATCH, base: __dir__)"
|
131
|
+
else
|
132
|
+
return "Dir['{#{directories.keys.join(',')}}/**/*', base: __dir__]"
|
133
|
+
end
|
123
134
|
end
|
124
135
|
|
125
136
|
def format_dependency(dependency)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
name: Coverage
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
permissions:
|
6
|
+
contents: read
|
7
|
+
|
8
|
+
env:
|
9
|
+
CONSOLE_OUTPUT: XTerm
|
10
|
+
COVERAGE: PartialSummary
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
name: ${{matrix.ruby}} on ${{matrix.os}}
|
15
|
+
runs-on: ${{matrix.os}}-latest
|
16
|
+
|
17
|
+
strategy:
|
18
|
+
matrix:
|
19
|
+
os:
|
20
|
+
- ubuntu
|
21
|
+
- macos
|
22
|
+
|
23
|
+
ruby:
|
24
|
+
- "3.1"
|
25
|
+
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v3
|
28
|
+
- uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{matrix.ruby}}
|
31
|
+
bundler-cache: true
|
32
|
+
|
33
|
+
- name: Run tests
|
34
|
+
timeout-minutes: 5
|
35
|
+
run: bundle exec rspec
|
36
|
+
|
37
|
+
- uses: actions/upload-artifact@v2
|
38
|
+
with:
|
39
|
+
name: coverage-${{matrix.os}}-${{matrix.ruby}}
|
40
|
+
path: .covered.db
|
41
|
+
|
42
|
+
validate:
|
43
|
+
needs: test
|
44
|
+
runs-on: ubuntu-latest
|
45
|
+
|
46
|
+
steps:
|
47
|
+
- uses: actions/checkout@v3
|
48
|
+
- uses: ruby/setup-ruby@v1
|
49
|
+
with:
|
50
|
+
ruby-version: "3.1"
|
51
|
+
bundler-cache: true
|
52
|
+
|
53
|
+
- uses: actions/download-artifact@v3
|
54
|
+
|
55
|
+
- name: Validate coverage
|
56
|
+
timeout-minutes: 5
|
57
|
+
run: bundle exec bake covered:validate --paths */.covered.db \;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
name: Documentation
|
2
|
+
|
3
|
+
permissions:
|
4
|
+
contents: write
|
5
|
+
|
6
|
+
on:
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
|
11
|
+
permissions:
|
12
|
+
contents: write
|
13
|
+
|
14
|
+
env:
|
15
|
+
CONSOLE_OUTPUT: XTerm
|
16
|
+
BUNDLE_WITH: maintenance
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
deploy:
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v3
|
24
|
+
|
25
|
+
- uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: "3.1"
|
28
|
+
bundler-cache: true
|
29
|
+
|
30
|
+
- name: Installing packages
|
31
|
+
run: sudo apt-get install wget
|
32
|
+
|
33
|
+
- name: Prepare GitHub Pages
|
34
|
+
run: bundle exec bake github:pages:prepare --directory docs
|
35
|
+
|
36
|
+
- name: Generate documentation
|
37
|
+
timeout-minutes: 5
|
38
|
+
run: bundle exec bake utopia:project:static --force no
|
39
|
+
|
40
|
+
- name: Deploy GitHub Pages
|
41
|
+
run: bundle exec bake github:pages:commit --directory docs
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: Test External
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
permissions:
|
6
|
+
contents: read
|
7
|
+
|
8
|
+
env:
|
9
|
+
CONSOLE_OUTPUT: XTerm
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
name: ${{matrix.ruby}} on ${{matrix.os}}
|
14
|
+
runs-on: ${{matrix.os}}-latest
|
15
|
+
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
os:
|
19
|
+
- ubuntu
|
20
|
+
- macos
|
21
|
+
|
22
|
+
ruby:
|
23
|
+
- "2.7"
|
24
|
+
- "3.0"
|
25
|
+
- "3.1"
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
- uses: ruby/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{matrix.ruby}}
|
32
|
+
bundler-cache: true
|
33
|
+
|
34
|
+
- name: Run tests
|
35
|
+
timeout-minutes: 10
|
36
|
+
run: bundle exec bake test:external
|
@@ -1,7 +1,13 @@
|
|
1
|
-
name:
|
1
|
+
name: Test
|
2
2
|
|
3
3
|
on: [push, pull_request]
|
4
4
|
|
5
|
+
permissions:
|
6
|
+
contents: read
|
7
|
+
|
8
|
+
env:
|
9
|
+
CONSOLE_OUTPUT: XTerm
|
10
|
+
|
5
11
|
jobs:
|
6
12
|
test:
|
7
13
|
name: ${{matrix.ruby}} on ${{matrix.os}}
|
@@ -15,12 +21,11 @@ jobs:
|
|
15
21
|
- macos
|
16
22
|
|
17
23
|
ruby:
|
18
|
-
- "2.6"
|
19
24
|
- "2.7"
|
20
25
|
- "3.0"
|
26
|
+
- "3.1"
|
21
27
|
|
22
28
|
experimental: [false]
|
23
|
-
env: [""]
|
24
29
|
|
25
30
|
include:
|
26
31
|
- os: ubuntu
|
@@ -34,12 +39,12 @@ jobs:
|
|
34
39
|
experimental: true
|
35
40
|
|
36
41
|
steps:
|
37
|
-
- uses: actions/checkout@
|
42
|
+
- uses: actions/checkout@v3
|
38
43
|
- uses: ruby/setup-ruby@v1
|
39
44
|
with:
|
40
45
|
ruby-version: ${{matrix.ruby}}
|
41
46
|
bundler-cache: true
|
42
47
|
|
43
48
|
- name: Run tests
|
44
|
-
timeout-minutes:
|
45
|
-
run:
|
49
|
+
timeout-minutes: 10
|
50
|
+
run: bundle exec bake test
|
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.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
|
38
38
|
HiLJ8VOFx6w=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2022-
|
40
|
+
date: 2022-08-06 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: async-http
|
@@ -138,8 +138,10 @@ files:
|
|
138
138
|
- bake/modernize/signing.rb
|
139
139
|
- lib/bake/modernize.rb
|
140
140
|
- lib/bake/modernize/version.rb
|
141
|
-
- template/actions/.github/workflows/
|
142
|
-
- template/actions/.github/workflows/documentation.
|
141
|
+
- template/actions/.github/workflows/coverage.yaml
|
142
|
+
- template/actions/.github/workflows/documentation.yaml
|
143
|
+
- template/actions/.github/workflows/test-external.yaml
|
144
|
+
- template/actions/.github/workflows/test.yaml
|
143
145
|
- template/editorconfig/.editorconfig
|
144
146
|
- template/readme/README.md
|
145
147
|
homepage: https://github.com/ioquatix/bake-modernize
|
@@ -162,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
164
|
- !ruby/object:Gem::Version
|
163
165
|
version: '0'
|
164
166
|
requirements: []
|
165
|
-
rubygems_version: 3.
|
167
|
+
rubygems_version: 3.3.7
|
166
168
|
signing_key:
|
167
169
|
specification_version: 4
|
168
170
|
summary: Automatically modernize parts of your project/gem.
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,33 +0,0 @@
|
|
1
|
-
name: Documentation
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
|
8
|
-
env:
|
9
|
-
BUNDLE_WITH: maintenance
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
deploy:
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
|
15
|
-
steps:
|
16
|
-
- uses: actions/checkout@v2
|
17
|
-
- uses: ruby/setup-ruby@v1
|
18
|
-
with:
|
19
|
-
ruby-version: 3.0
|
20
|
-
bundler-cache: true
|
21
|
-
|
22
|
-
- name: Installing packages
|
23
|
-
run: sudo apt-get install wget
|
24
|
-
|
25
|
-
- name: Generate documentation
|
26
|
-
timeout-minutes: 5
|
27
|
-
run: bundle exec bake utopia:project:static
|
28
|
-
|
29
|
-
- name: Deploy documentation
|
30
|
-
uses: JamesIves/github-pages-deploy-action@4.0.0
|
31
|
-
with:
|
32
|
-
branch: docs
|
33
|
-
folder: docs
|