bake-modernize 0.14.4 → 0.15.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cec63d20974df25945fd6814f8d3482ebf15d2c6a8f8f115bb52fdc7bb1edbe2
4
- data.tar.gz: 1de8853d24bea2632cf43d45212c0e54a729d04a7628c0ef310d2c25fe0eec9b
3
+ metadata.gz: 715e7310bed56e56203b7b689bae99fcfaea4d1466d314cc2ce91b6902550596
4
+ data.tar.gz: 20bd920437aaf896ff8dbc71c7ddcd9cd29a3d4a32ebc099234cd366df6e8e91
5
5
  SHA512:
6
- metadata.gz: 0b2a8578649c5c1af9ddb4c9c9798e5da8bf7f72d38f0124736fcceface78e92c6c2c3b042721a8a0993b240b24b78d5594ea9f3352ed4139d6cc53eab0e88b6
7
- data.tar.gz: 4b642194ec8bf3dc1b85bb6809b9cb26c397677beff1af7886496251ab3303dd1c68ad33ce05f7d5548c12d60ebeac2d583093eaa46513427ba833e77ebb2018
6
+ metadata.gz: fe0673005c97cfe3dabe1e11db1e6412194544b7eb0f3a68849381c505003d007f2ededbb470bdcb93801efc6fee608e0aa94722b01c1129e2726383c7e244dc
7
+ data.tar.gz: 43edd77b36cbdd4438447dce0b065c89127b531e7e227444ddf717a063c6d4d2c6859963215860dce04a8f5a79db80a96d15877d1c915fbf64f457d563e6e9f2
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2022, by Samuel Williams.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
5
 
6
6
  require 'bake/modernize'
7
7
 
@@ -71,6 +71,11 @@ def update_source_file_authors(authorship, path, modifications)
71
71
  output.push input.shift
72
72
  end
73
73
 
74
+ # Drop any old copyright statements.
75
+ while input.first =~ /Copyright/i
76
+ input.shift
77
+ end
78
+
74
79
  if input.first =~ /^\#.*?\:/
75
80
  output.push input.shift
76
81
  if input.first.chomp.empty?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2022, by Samuel Williams.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
5
 
6
6
  require 'rugged'
7
7
  require 'yaml'
@@ -34,13 +34,27 @@ module Bake
34
34
  # Skip empty lines
35
35
  next if line =~ /^\s*$/
36
36
  # Parse line
37
- # Format: Full Name <email@address>
38
- line.match(/^(.*) <(.*)>$/) do |match|
39
- @names[match[2]] = match[1]
37
+
38
+
39
+ user = extract_from_line(line)
40
+ if commit_email = user[:commit_email] and proper_name = user[:proper_name]
41
+ @names[commit_email] = proper_name
40
42
  end
41
43
  end
42
44
  end
43
45
  end
46
+
47
+ # Format: Proper Name <proper@email.xx> Commit Name <commit@email.xx>
48
+ PATTERN = /
49
+ (?<proper_name>[^<]+)?
50
+ (\s+<(?<proper_email>[^>]+)>)?
51
+ (\s+(?<commit_name>[^<]+)?)?
52
+ \s+<(?<commit_email>[^>]+)>
53
+ /x
54
+
55
+ def extract_from_line(line)
56
+ line.match(PATTERN)
57
+ end
44
58
  end
45
59
 
46
60
  class Contributors
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2020-2022, by Samuel Williams.
4
+ # Copyright, 2020-2023, by Samuel Williams.
5
5
 
6
6
  module Bake
7
7
  module Modernize
8
- VERSION = "0.14.4"
8
+ VERSION = "0.15.1"
9
9
  end
10
10
  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.14.4
4
+ version: 0.15.1
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-01-18 00:00:00.000000000 Z
41
+ date: 2023-02-13 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: async-http
@@ -111,7 +111,7 @@ dependencies:
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  - !ruby/object:Gem::Dependency
114
- name: rspec
114
+ name: sus
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  requirements: []
175
- rubygems_version: 3.4.1
175
+ rubygems_version: 3.4.6
176
176
  signing_key:
177
177
  specification_version: 4
178
178
  summary: Automatically modernize parts of your project/gem.
metadata.gz.sig CHANGED
Binary file