bake-modernize 0.4.10 → 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: 4463b6dd8ffa5b4e5bfdc0ef9660fdfe9628c358eedb3954cb9f575e71a59dab
4
- data.tar.gz: e395c8e58f9aad89b4391d4791513bb26b534bb4de3cbaf23d60085cf070cf7e
3
+ metadata.gz: 7e35d0298a0564cf3841a02af77316cc73f6897ce68d5a97190be96dd6430484
4
+ data.tar.gz: 39c00bbe0a0f2aaed44d67d49a2cbc3fffb421903f9aebe6873b3f5c76ca5aee
5
5
  SHA512:
6
- metadata.gz: 713ada088420a859d3995d0b416a5733a19e8e1824a7a02669cc8bcbdc056ddc8bf93548c17e6aa2191d6a8c9b6cc08cb2b362624bf9b05653fbfb3112536566
7
- data.tar.gz: eca853d99dd968c617b3c7d2184b6370ce1b5e07abc6aadbffeb9c39816674b6ad1c33542992f9fc7e32129c470af70b14ef2b7eb0d92ac086e5589190662a46
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
@@ -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.10"
23
+ VERSION = "0.5.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,13 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-modernize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
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: []
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/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL
20
+ L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn
21
+ 9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb
22
+ E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL
23
+ rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6sG6ZwyI47DBq2XqNC6tnAj
24
+ w+XmCywiTQrFzMMAvcA7rPI4F0nU1rZId51rOvvfxaONp+wgTi4P8owZLw0/j0m4
25
+ 8C20DYi6EYx4AHDXiLpElWh3AgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8E
26
+ BAMCBLAwHQYDVR0OBBYEFB6ZaeWKxQjGTI+pmz7cKRmMIywwMC4GA1UdEQQnMCWB
27
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWB
28
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEB
29
+ CwUAA4IBgQBVoM+pu3dpdUhZM1w051iw5GfiqclAr1Psypf16Tiod/ho//4oAu6T
30
+ 9fj3DPX/acWV9P/FScvqo4Qgv6g4VWO5ZU7z2JmPoTXZtYMunRAmQPFL/gSUc6aK
31
+ vszMHIyhtyzRc6DnfW2AiVOjMBjaYv8xXZc9bduniRVPrLR4J7ozmGLh4o4uJp7w
32
+ x9KCFaR8Lvn/r0oJWJOqb/DMAYI83YeN2Dlt3jpwrsmsONrtC5S3gOUle5afSGos
33
+ bYt5ocnEpKSomR9ZtnCGljds/aeO1Xgpn2r9HHcjwnH346iNrnHmMlC7BtHUFPDg
34
+ Ts92S47PTOXzwPBDsrFiq3VLbRjHSwf8rpqybQBH9MfzxGGxTaETQYOd6b4e4Ag6
35
+ y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
36
+ RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
37
+ HiLJ8VOFx6w=
38
+ -----END CERTIFICATE-----
11
39
  date: 2021-08-16 00:00:00.000000000 Z
12
40
  dependencies:
13
41
  - !ruby/object:Gem::Dependency
@@ -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
metadata.gz.sig ADDED
Binary file