bake-modernize 0.4.8 → 0.5.1

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: 807c08cb58545103502c56fdc2079f09f6804d6a0708d538094bfc6f0d9d39f7
4
- data.tar.gz: 7a06319c9bf8cefa96f88102c1f3fdb3536019d86953af829c49aef8473c5986
3
+ metadata.gz: a0bb6917474e508dee0d8c29dba65f12fa491acc3c2809f9f26b3a1653944bdc
4
+ data.tar.gz: 0aaaa589e1f564ef79b086565775931c6477d5aff9f17db310d0785a0c52057e
5
5
  SHA512:
6
- metadata.gz: 3002497d7f06c4847773080d82d2cc4c75380e6de0f8031c06420fc81d43709ea196baa905c05e837869a06ae614ef66f7a3c390028f78e2b722f01133ef7083
7
- data.tar.gz: a482304f5b9be2622b68f2b9edc8dd65a4aa0cbd72b99890ac24a48c164a585ed3e83c0790781eb24a4d0f72796955fe19d4ae5e2f4e31d9d487e2ebf9f24ef2
6
+ metadata.gz: 4ca8fc004425435849e3e3c6a04ed50bd0814c112af7a0293a0e413111efa8ee57521df541bbfd6f8d1fa5fe8c92ea26ff595ba1ecdf4d685ade571988ae1270
7
+ data.tar.gz: 1ad539b877ca200fcb01b8b35da07f17df691be9ef16c5cf6bcbbfe43afc55465ce32a4e0bb96bfb8020207df8de6dad6eb2071e9d5454ece3f3f3981d0582c7
checksums.yaml.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ ��׍���YwG<�ti������c��n�Ƴ�T��3��H�`���աt򾓻�R����6�7���H��z�9�1
2
+ a`
@@ -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
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
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Bake
22
22
  module Modernize
23
- VERSION = "0.4.8"
23
+ VERSION = "0.5.1"
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: [""]
@@ -3,7 +3,7 @@ name: Documentation
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - master
6
+ - main
7
7
 
8
8
  jobs:
9
9
  deploy:
@@ -15,7 +15,7 @@ jobs:
15
15
  env:
16
16
  BUNDLE_WITH: maintenance
17
17
  with:
18
- ruby-version: 2.7
18
+ ruby-version: 3.0
19
19
  bundler-cache: true
20
20
 
21
21
  - name: Installing packages
data.tar.gz.sig ADDED
Binary file
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.8
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2021-04-21 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/43abRK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4e4Ag6
35
+ y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
36
+ RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
37
+ HiLJ8VOFx6w=
38
+ -----END CERTIFICATE-----
39
+ date: 2021-09-19 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