bake-modernize 0.4.7 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31c24582528f8dc6b7ef413151053e2c1d26f87f5e03a1e5a52ec93339cf0eea
4
- data.tar.gz: 3377c8eae2a52b7ab0a7d4ac23b0c0a0ed246cb4e8a590ff24ea755c2de5c22a
3
+ metadata.gz: 7e35d0298a0564cf3841a02af77316cc73f6897ce68d5a97190be96dd6430484
4
+ data.tar.gz: 39c00bbe0a0f2aaed44d67d49a2cbc3fffb421903f9aebe6873b3f5c76ca5aee
5
5
  SHA512:
6
- metadata.gz: 458353732464bdc2b4ea67a5754dbf033f1dd623eeac689f070595a81b034156d70a290c9bac210ac284019d8efc76ad58321b9a3960869965fec36d3b48c83f
7
- data.tar.gz: fdf544171924a8963d2da4bfc165a385146be4ed7a1f8ec4199f119768193129227bc4819095d432e3b60a0dd9d631fa036f6d0d3089f8b9a0eeb993b55e61c8
6
+ metadata.gz: 5d87745893e8058aa4563d721f71822a56e107715f1788cd7d595b589e160845568c47b38305afdf5bcca9df89349366b810b931c24a96f4d3afa22d3aa50beb
7
+ data.tar.gz: 2dcb68b023770bda8139d804fb5391b9f387621b66b7946c01dd7a59ab10e587491dc4763543be8fb22278d6e30b53b1f8e9859686af46d68c68f2c1d850cf4b
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ .P$탬T��]�#�PZ���>\�ɝ$���W���"��7�s}0-���2��S�/|n�� RT���� �^�܎J��@��*/�fH�}�k.6���a{�m
2
+ �|�� :�'�����X�e:�8}��n�ھ���X���[�ăK̵cuq�x��3J��(�հO����#��?3�%��!i�tM���!{P_Cw졋��|�S��E�$�%^-{,��
data/bake/modernize.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  def modernize
3
- call('modernize:actions', 'modernize:editorconfig', 'modernize:gemfile', 'modernize:gemspec')
3
+ call('modernize:git', 'modernize:actions', 'modernize:editorconfig', 'modernize:gemfile', 'modernize:signing', 'modernize:gemspec')
4
4
  end
@@ -12,7 +12,7 @@ end
12
12
  # Rewrite the specified gemspec.
13
13
  # @param
14
14
  def update(path: default_gemspec_path, output: $stdout)
15
- spec = Gem::Specification.load(path)
15
+ spec = ::Gem::Specification.load(path)
16
16
 
17
17
  root = File.dirname(path)
18
18
  version_path = version_path(root)
@@ -38,6 +38,14 @@ def update(path: default_gemspec_path, output: $stdout)
38
38
  output.puts "\tspec.authors = #{spec.authors.inspect}"
39
39
  output.puts "\tspec.license = #{spec.license.inspect}"
40
40
 
41
+ certificate_path = File.expand_path('release.cert', root)
42
+
43
+ if File.exist?(certificate_path)
44
+ output.puts "\t"
45
+ output.puts "\tspec.cert_chain = ['release.cert']"
46
+ output.puts "\tspec.signing_key = File.expand_path('~/.gem/release.pem')"
47
+ end
48
+
41
49
  if spec.homepage and !spec.homepage.empty?
42
50
  output.puts "\t"
43
51
  output.puts "\tspec.homepage = #{spec.homepage.inspect}"
@@ -0,0 +1,28 @@
1
+
2
+ require 'bake/modernize'
3
+
4
+ def git
5
+ update(root: Dir.pwd)
6
+ end
7
+
8
+ def update(root:)
9
+ if current_branch != "main"
10
+ # https://github.com/github/renaming
11
+ system("git", "branch", "-M", "main")
12
+ system("git", "push", "-u", "origin", "main")
13
+ end
14
+ end
15
+
16
+ private
17
+
18
+ def current_branch
19
+ require 'open3'
20
+
21
+ output, status = Open3.capture2("git", "branch", "--show-current")
22
+
23
+ unless status.success?
24
+ raise "Could not get current branch!"
25
+ end
26
+
27
+ return output
28
+ end
@@ -0,0 +1,15 @@
1
+
2
+ require 'bake/modernize'
3
+
4
+ def signing
5
+ update(root: Dir.pwd)
6
+ end
7
+
8
+ def update(root:)
9
+ release_certificate_path = File.expand_path("~/.gem/release.cert")
10
+ certificate_path = File.expand_path("release.cert", root)
11
+
12
+ if File.exist?(release_certificate_path)
13
+ FileUtils.cp(release_certificate_path, certificate_path)
14
+ end
15
+ end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Bake
22
22
  module Modernize
23
- VERSION = "0.4.7"
23
+ VERSION = "0.5.0"
24
24
  end
25
25
  end
@@ -14,10 +14,9 @@ jobs:
14
14
  - macos
15
15
 
16
16
  ruby:
17
- - 2.5
18
- - 2.6
19
- - 2.7
20
- - 3.0
17
+ - "2.6"
18
+ - "2.7"
19
+ - "3.0"
21
20
 
22
21
  experimental: [false]
23
22
  env: [""]
@@ -28,5 +28,5 @@ jobs:
28
28
  - name: Deploy documentation
29
29
  uses: JamesIves/github-pages-deploy-action@4.0.0
30
30
  with:
31
- branch: gh-pages
31
+ branch: docs
32
32
  folder: docs
metadata CHANGED
@@ -1,14 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-modernize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2021-02-14 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
14
+ ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
15
+ MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
16
+ aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
17
+ AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
18
+ xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj
19
+ eNMDgKsMJtC7u/43abRKx7TCURW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6
35
+ y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
36
+ RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
37
+ HiLJ8VOFx6w=
38
+ -----END CERTIFICATE-----
39
+ date: 2021-08-16 00:00:00.000000000 Z
12
40
  dependencies:
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: async-http
@@ -105,6 +133,8 @@ files:
105
133
  - bake/modernize/editorconfig.rb
106
134
  - bake/modernize/gemfile.rb
107
135
  - bake/modernize/gemspec.rb
136
+ - bake/modernize/git.rb
137
+ - bake/modernize/signing.rb
108
138
  - lib/bake/modernize.rb
109
139
  - lib/bake/modernize/version.rb
110
140
  - template/actions/.github/workflows/development.yml
@@ -131,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
161
  - !ruby/object:Gem::Version
132
162
  version: '0'
133
163
  requirements: []
134
- rubygems_version: 3.1.2
164
+ rubygems_version: 3.1.6
135
165
  signing_key:
136
166
  specification_version: 4
137
167
  summary: Automatically modernize parts of your project/gem.
metadata.gz.sig ADDED
Binary file