bake-modernize 0.8.0 → 0.9.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: 9a7da2f3243b5c36b0eb365a98e350868b8834db66f71b549cfc14a06103691c
4
- data.tar.gz: 976f7c5d8fc9198b479f80d210efce7c78664bca1a1dab6c4825c660229c0ffb
3
+ metadata.gz: 75c75ec487952e6ce97c8ffbbf8c4de7d3d656eaf7a9e49e656b71a96b5405b7
4
+ data.tar.gz: 67d94eb1b42c359de608198b8eee416922ed7759a18b26858a98e88136fea044
5
5
  SHA512:
6
- metadata.gz: 23b5d5a149758808e2c5802c8bb5ac9dd63afaf769b1a5257324243f2c56f96b46e0bbd34ccb86a47b87071855e4f1d9bee12fb7e33d98de04551c95cde819d7
7
- data.tar.gz: fdae79916724bc2d7f4ff8df55f6ebd7689dca2fbb0a3c94a8597a6302b1bfd9cd24f6a9a6910b9cbc4039287b62f4e05129ae8f5eded297cd4fadd70d30accd
6
+ metadata.gz: a49d876f77bb583e292957111984f7d981ad4c7a7e2e0383db211d633e3de57d705903ba756383b0948bdbacd5784f9ce34eaa8efdc07787466a807df698cb7c
7
+ data.tar.gz: 3988ea8f27d4aafdd8d3780c7098f372702fd114d3c4d95c3fc722dbf7940a7b2e9050d191df169fceb9ebd91434d7ee87b960816056d8ddd084dc1c023127f9
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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
- return "Dir.glob('{#{directories.keys.join(',')}}/**/*', File::FNM_DOTMATCH, base: __dir__)"
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)
@@ -207,5 +218,5 @@ def sorted_authors(spec)
207
218
  Process.wait(pid)
208
219
  input.close
209
220
 
210
- return authors.keys
221
+ return authors.sort_by{|k,v| [-v, k]}.map(&:first)
211
222
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Bake
22
22
  module Modernize
23
- VERSION = "0.8.0"
23
+ VERSION = "0.9.1"
24
24
  end
25
25
  end
@@ -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: Text
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 \;
@@ -2,6 +2,12 @@ name: Development
2
2
 
3
3
  on: [push, pull_request]
4
4
 
5
+ permissions:
6
+ contents: read
7
+
8
+ env:
9
+ CONSOLE_OUTPUT: Text
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,7 +39,7 @@ jobs:
34
39
  experimental: true
35
40
 
36
41
  steps:
37
- - uses: actions/checkout@v2
42
+ - uses: actions/checkout@v3
38
43
  - uses: ruby/setup-ruby@v1
39
44
  with:
40
45
  ruby-version: ${{matrix.ruby}}
@@ -42,4 +47,4 @@ jobs:
42
47
 
43
48
  - name: Run tests
44
49
  timeout-minutes: 5
45
- run: ${{matrix.env}} bundle exec rspec
50
+ run: bundle exec rspec
@@ -1,32 +1,41 @@
1
1
  name: Documentation
2
2
 
3
+ permissions:
4
+ contents: write
5
+
3
6
  on:
4
7
  push:
5
8
  branches:
6
9
  - main
7
10
 
11
+ permissions:
12
+ contents: write
13
+
14
+ env:
15
+ CONSOLE_OUTPUT: Text
16
+ BUNDLE_WITH: maintenance
17
+
8
18
  jobs:
9
19
  deploy:
10
20
  runs-on: ubuntu-latest
11
21
 
12
22
  steps:
13
- - uses: actions/checkout@v2
23
+ - uses: actions/checkout@v3
24
+
14
25
  - uses: ruby/setup-ruby@v1
15
- env:
16
- BUNDLE_WITH: maintenance
17
26
  with:
18
- ruby-version: 3.0
27
+ ruby-version: "3.1"
19
28
  bundler-cache: true
20
29
 
21
30
  - name: Installing packages
22
31
  run: sudo apt-get install wget
23
32
 
33
+ - name: Prepare GitHub Pages
34
+ run: bundle exec bake github:pages:prepare --directory docs
35
+
24
36
  - name: Generate documentation
25
37
  timeout-minutes: 5
26
- run: bundle exec bake utopia:project:static
38
+ run: bundle exec bake utopia:project:static --force no
27
39
 
28
- - name: Deploy documentation
29
- uses: JamesIves/github-pages-deploy-action@4.0.0
30
- with:
31
- branch: docs
32
- folder: docs
40
+ - name: Deploy GitHub Pages
41
+ run: bundle exec bake github:pages:commit --directory docs
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.8.0
4
+ version: 0.9.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-02-18 00:00:00.000000000 Z
40
+ date: 2022-06-13 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: async-http
@@ -138,6 +138,7 @@ 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/coverage.yml
141
142
  - template/actions/.github/workflows/development.yml
142
143
  - template/actions/.github/workflows/documentation.yml
143
144
  - template/editorconfig/.editorconfig
@@ -162,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
163
  - !ruby/object:Gem::Version
163
164
  version: '0'
164
165
  requirements: []
165
- rubygems_version: 3.2.32
166
+ rubygems_version: 3.3.7
166
167
  signing_key:
167
168
  specification_version: 4
168
169
  summary: Automatically modernize parts of your project/gem.
metadata.gz.sig CHANGED
Binary file