bake-modernize 0.17.5 → 0.17.6
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 +16 -9
- 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: 90130235dfa991ea6c2a2e44747bd1af6a6af02ede3ca0d26fe883f5d270076d
|
|
4
|
+
data.tar.gz: '084c5bbc66e242bb232585034ccfef70e46cf53b563311d4d16abdcd775b3a53'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1a186343dfcb4cc628e8c83253c03449e34e9d76912285224bdc8d2ad322612d35a1768b1c0115adf1c480727507435cc59148c4a3a477a3117a58e1ae982ce
|
|
7
|
+
data.tar.gz: 8aa617e6cad8690923eabdd00dab64af5e2f292d663b92981e1e7fbc0d78baf7aa0c970840cfef63b1a6d128ee16608f55f3396b7313c8435c117fa899aca2b4
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -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
metadata.gz.sig
CHANGED
|
Binary file
|