bake-modernize 0.45.0 → 0.46.0
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/lib/bake/modernize/license.rb +14 -5
- data/lib/bake/modernize/version.rb +1 -1
- data.tar.gz.sig +3 -2
- 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: 992b5b95403456b3a11eb441febb6500078d31a484ecd48fadec8ae3e26ad235
|
4
|
+
data.tar.gz: 869db9aa228cdb177b9ccd7e6874828e8aff1d181a13b7ffaf411cbbda1be398
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f052902f3c11da2fa126817f84eb1bdecb0562cb8a4c6454b781f7226a847ffd9d3eeaa333daff2c27979fcdb6190fcd9ea64a37d02ec98460d71509cb3ded5
|
7
|
+
data.tar.gz: d5093403e4105527f9609d8833a3716b3f9e05ceea151bd650640415073ce8adf1b5df63badd81ce27093962855f862dd63a5a8929c4446aee2e23728cad7d3e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -110,27 +110,36 @@ module Bake
|
|
110
110
|
DEFAULT_PATH = "."
|
111
111
|
|
112
112
|
# Load contributors from a directory.
|
113
|
-
def self.for(root)
|
113
|
+
def self.for(root, mailmap: nil)
|
114
114
|
full_path = File.join(root, ".contributors.yaml")
|
115
115
|
|
116
116
|
if File.exist?(full_path)
|
117
|
-
contributors = self.new
|
117
|
+
contributors = self.new(mailmap: mailmap)
|
118
118
|
contributors.extract(full_path)
|
119
119
|
return contributors
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
123
|
# Create a new, empty, contributors list.
|
124
|
-
def initialize
|
124
|
+
def initialize(mailmap: nil)
|
125
125
|
@contributions = []
|
126
|
+
@mailmap = mailmap
|
126
127
|
end
|
127
128
|
|
129
|
+
# @attribute [Array(Hash)] The list of contributions.
|
130
|
+
attr :contributions
|
131
|
+
|
128
132
|
# Iterate over each contribution.
|
129
133
|
def each(&block)
|
130
134
|
@contributions.each do |contribution|
|
131
|
-
author = contribution[:author]
|
135
|
+
author = contribution[:author].dup
|
132
136
|
time = contribution[:time]
|
133
137
|
|
138
|
+
# Apply mailmap transformation if available
|
139
|
+
if @mailmap && author[:email] && mapped_name = @mailmap.names[author[:email]]
|
140
|
+
author[:name] = mapped_name
|
141
|
+
end
|
142
|
+
|
134
143
|
paths_for(contribution) do |path|
|
135
144
|
yield path, author, time
|
136
145
|
end
|
@@ -220,7 +229,7 @@ module Bake
|
|
220
229
|
mailmap = Mailmap.for(root)
|
221
230
|
skip_list = SkipList.for(root)
|
222
231
|
|
223
|
-
if contributors = Contributors.for(root)
|
232
|
+
if contributors = Contributors.for(root, mailmap: mailmap)
|
224
233
|
contributors.each do |path, author, time|
|
225
234
|
add(path, author, time)
|
226
235
|
end
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�1ړ��bna}�w=2�
|
2
|
+
&���#|�6�<�7�O���>�Y�!-筿h�%[�f7��s���k�6qG���@���;���IX�F{�ȔU�~|���
|
3
|
+
���
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|