bake-modernize 0.17.4 → 0.17.5
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 +5 -17
- data/lib/bake/modernize/license.rb +12 -0
- data/lib/bake/modernize/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: f6bf8c1f1f973846d16af55aa30a9b62960b2db001d80e7a19506161a9992203
|
|
4
|
+
data.tar.gz: 047c44563a79018b3163b9dabf1498d23b9f538c3f18a403177b580fb3156157
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbea3be9c9830f12f1590704cfddd527bdc7a7876b0cd00b9b6e008c6c17e9a6282dfe2c975ced005292925b57c08e433f374a9de3ba7b49bf9de91d713cef15
|
|
7
|
+
data.tar.gz: 18b73153b2156878413a7dd34b232e12cb4477b2cedf070c4d11bf2ed10a758d7036bfe9c39f436956e24329a2e1a01d48bf3cf4523cf4370ef44806d9c1b8aa
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/bake/modernize/gemspec.rb
CHANGED
|
@@ -33,7 +33,7 @@ def update(path: default_gemspec_path, output: $stdout)
|
|
|
33
33
|
spec.metadata["funding_uri"] ||= detect_funding_uri(spec)
|
|
34
34
|
spec.metadata["documentation_uri"] ||= detect_documentation_uri(spec)
|
|
35
35
|
|
|
36
|
-
spec.authors = sorted_authors(
|
|
36
|
+
spec.authors = sorted_authors(Dir.pwd)
|
|
37
37
|
|
|
38
38
|
spec.metadata.delete_if{|_, value| value.nil?}
|
|
39
39
|
|
|
@@ -220,23 +220,11 @@ def detect_documentation_uri(spec)
|
|
|
220
220
|
end
|
|
221
221
|
end
|
|
222
222
|
|
|
223
|
-
def sorted_authors(
|
|
224
|
-
|
|
223
|
+
def sorted_authors(root)
|
|
224
|
+
authorship = Bake::Modernize::License::Authorship.new
|
|
225
|
+
authorship.extract(root)
|
|
225
226
|
|
|
226
|
-
|
|
227
|
-
output.close
|
|
228
|
-
|
|
229
|
-
authors = Hash.new{|h,k| h[k] = 0}
|
|
230
|
-
|
|
231
|
-
input.each_line do |author|
|
|
232
|
-
author = author.chomp!
|
|
233
|
-
authors[author] += 1
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
Process.wait(pid)
|
|
237
|
-
input.close
|
|
238
|
-
|
|
239
|
-
return authors.sort_by{|k,v| [-v, k]}.map(&:first)
|
|
227
|
+
return authorship.sorted_authors
|
|
240
228
|
end
|
|
241
229
|
|
|
242
230
|
IGNORE_GEMS = %w[
|
|
@@ -165,6 +165,18 @@ module Bake
|
|
|
165
165
|
return self
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
+
def sorted_authors
|
|
169
|
+
authors = Hash.new{|h,k| h[k] = 0}
|
|
170
|
+
|
|
171
|
+
@paths.each do |path, modifications|
|
|
172
|
+
modifications.each do |modification|
|
|
173
|
+
authors[modification.full_name] += 1
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
return authors.sort_by{|k,v| [-v, k]}.map(&:first)
|
|
178
|
+
end
|
|
179
|
+
|
|
168
180
|
def copyrights
|
|
169
181
|
copyrights_for_modifications(@paths.values.flatten)
|
|
170
182
|
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|