bake-modernize 0.17.5 → 0.17.7
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/modernize/gemspec.rb +6 -15
- data/lib/bake/modernize/license.rb +16 -9
- data/lib/bake/modernize/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 476b1dc7aba7fb3b9e3753cf63a46ac4b40a7f514d21aac1a1e5941fbbe6b044
|
|
4
|
+
data.tar.gz: 2e8c30ab6839975ad456ea8d990a65a904fcea266c0aeea2f82851db49d9df33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 23f1b336cf45fbb3e5607bc4c133545d7e7b057e85f408758221bbcb1dc0019df318e1862fcb20cef2a4bc7d9ec609bc00e7630b7e0b218025f9c29e61f3853d
|
|
7
|
+
data.tar.gz: bf9d06fea25608b41dbd95564e8747084c998efabde130fab3c9b427791ad8e2e8569175cb83eaf587fed9f2bedc3d8c769c0b9617e31dfe3cb945c3dcca81c9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/bake/modernize/gemspec.rb
CHANGED
|
@@ -14,7 +14,6 @@ def gemspec
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# The latest end-of-life Ruby version.
|
|
17
|
-
LATEST_END_OF_LIFE_RUBY = ::Gem::Version.new("2.7")
|
|
18
17
|
MINIMUM_RUBY_VERSION = ::Gem::Requirement.new(">= 3.0")
|
|
19
18
|
|
|
20
19
|
# Rewrite the specified gemspec.
|
|
@@ -26,7 +25,7 @@ def update(path: default_gemspec_path, output: $stdout)
|
|
|
26
25
|
version_path = version_path(root)
|
|
27
26
|
|
|
28
27
|
constant = File.read(version_path)
|
|
29
|
-
.scan(/module\s+(.*?)$/)
|
|
28
|
+
.scan(/(class|module)\s+(.*?)$/)
|
|
30
29
|
.flatten
|
|
31
30
|
.join("::")
|
|
32
31
|
|
|
@@ -88,20 +87,11 @@ def update(path: default_gemspec_path, output: $stdout)
|
|
|
88
87
|
output.puts "\tspec.extensions = #{extensions.inspect}"
|
|
89
88
|
end
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Console.logger.warn(self, "Required Ruby version #{required_ruby_version} is end-of-life!")
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
output.puts "\t"
|
|
98
|
-
output.puts "\tspec.required_ruby_version = #{required_ruby_version.to_s.inspect}"
|
|
99
|
-
end
|
|
100
|
-
else
|
|
101
|
-
output.puts "\t"
|
|
102
|
-
output.puts "\tspec.required_ruby_version = #{MINIMUM_RUBY_VERSION.to_s.dump}"
|
|
103
|
-
end
|
|
90
|
+
# Update the required Ruby version:
|
|
91
|
+
output.puts "\t"
|
|
92
|
+
output.puts "\tspec.required_ruby_version = #{MINIMUM_RUBY_VERSION.to_s.dump}"
|
|
104
93
|
|
|
94
|
+
# Update the required Rubygems version:
|
|
105
95
|
if spec.runtime_dependencies.any?
|
|
106
96
|
output.puts "\t"
|
|
107
97
|
spec.runtime_dependencies.sort.each do |dependency|
|
|
@@ -109,6 +99,7 @@ def update(path: default_gemspec_path, output: $stdout)
|
|
|
109
99
|
end
|
|
110
100
|
end
|
|
111
101
|
|
|
102
|
+
# Try to move development dependencies to `gems.rb`:
|
|
112
103
|
if spec.development_dependencies.any?
|
|
113
104
|
unless move_development_dependencies(spec.development_dependencies)
|
|
114
105
|
output.puts "\t"
|
|
@@ -122,10 +122,14 @@ module Bake
|
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
class Authorship
|
|
125
|
-
Modification = Struct.new(:author, :time, :path) do
|
|
125
|
+
Modification = Struct.new(:author, :time, :path, :id) do
|
|
126
126
|
def full_name
|
|
127
127
|
author[:name]
|
|
128
128
|
end
|
|
129
|
+
|
|
130
|
+
def key
|
|
131
|
+
self.id || "#{self.author[:email]}:#{self.time.iso8601}"
|
|
132
|
+
end
|
|
129
133
|
end
|
|
130
134
|
|
|
131
135
|
Copyright = Struct.new(:dates, :author) do
|
|
@@ -140,14 +144,17 @@ module Bake
|
|
|
140
144
|
end
|
|
141
145
|
|
|
142
146
|
def initialize
|
|
143
|
-
@paths = {}
|
|
147
|
+
@paths = Hash.new{|h,k| h[k] = []}
|
|
148
|
+
@commits = Hash.new{|h,k| h[k] = []}
|
|
144
149
|
end
|
|
145
150
|
|
|
146
151
|
attr :paths
|
|
147
152
|
|
|
148
|
-
def add(path, author, time)
|
|
149
|
-
|
|
150
|
-
|
|
153
|
+
def add(path, author, time, id = nil)
|
|
154
|
+
modification = Modification.new(author, time, path, id)
|
|
155
|
+
|
|
156
|
+
@commits[modification.key] << modification
|
|
157
|
+
@paths[path] << modification
|
|
151
158
|
end
|
|
152
159
|
|
|
153
160
|
def extract(root = Dir.pwd)
|
|
@@ -168,9 +175,9 @@ module Bake
|
|
|
168
175
|
def sorted_authors
|
|
169
176
|
authors = Hash.new{|h,k| h[k] = 0}
|
|
170
177
|
|
|
171
|
-
@
|
|
172
|
-
modifications.each do |
|
|
173
|
-
authors[
|
|
178
|
+
@commits.each do |key, modifications|
|
|
179
|
+
modifications.map(&:full_name).uniq.each do |full_name|
|
|
180
|
+
authors[full_name] += 1
|
|
174
181
|
end
|
|
175
182
|
end
|
|
176
183
|
|
|
@@ -230,7 +237,7 @@ module Bake
|
|
|
230
237
|
end
|
|
231
238
|
end
|
|
232
239
|
|
|
233
|
-
|
|
240
|
+
add(new_path, author, commit.time, commit.oid)
|
|
234
241
|
end
|
|
235
242
|
end
|
|
236
243
|
end
|
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.17.
|
|
4
|
+
version: 0.17.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
|
38
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
|
39
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
|
40
40
|
-----END CERTIFICATE-----
|
|
41
|
-
date: 2023-
|
|
41
|
+
date: 2023-07-02 00:00:00.000000000 Z
|
|
42
42
|
dependencies:
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: async-http
|
metadata.gz.sig
CHANGED
|
Binary file
|