bake-modernize 0.16.2 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cbb2def702bb938f86a97262c3a0b0e2e677501ac4578a9423a4f46f72eb6e8
4
- data.tar.gz: 7dcfcc1ee886f972945a74332d74719966e5704536fc650cd5362136f45ee678
3
+ metadata.gz: '08439a38dc5093368958f4067f181d072c35631427bc7cdd4aaf0c01f92ac4b2'
4
+ data.tar.gz: 18f75636b41aa9ccfd73f75279a7450390b9a350f66d0f5e60a09f92dcba3dac
5
5
  SHA512:
6
- metadata.gz: fd67fbceaf2f65fd9e46500feb7062e1906ee7f869d550c39beefca77ab1b3c904f90cc2252df669164d7c83feb4ab46392ae65aa491fa336f9fb832ae33cc33
7
- data.tar.gz: 4340d7bc163482d08c3846ba51011ae0194b79cd1b1b05afdefda77fa5e1f9b48eabb64102f52d52c668d45fa8327764d90d519a0c1fad1200ab2dc5500cccf8
6
+ metadata.gz: ce96787d866cb394a12d382ac3907b336f9e0e1c6cd72428710b05f5d1a3500543672ab37e21e10b9048d63869c47740a756f687357560c21ab37ef9f6b73f88
7
+ data.tar.gz: 2f6bed57a621dd34e247af585947d7f13dbd9a468ab5335916335763455f44731b3f111ae7476ef51984c0ce2bc8e18ecdec6693df225c6a4180f8bbecdc74ee
checksums.yaml.gz.sig CHANGED
Binary file
@@ -7,15 +7,13 @@ require 'bake/modernize'
7
7
  require 'markly'
8
8
 
9
9
  def contributing
10
- update(root: Dir.pwd)
10
+ if conduct_path = Dir["conduct.md"]
11
+ FileUtils.rm_f(conduct_path)
12
+ end
13
+
11
14
  update_contributing(File.join(Dir.pwd, 'readme.md'))
12
15
  end
13
16
 
14
- def update(root:)
15
- template_root = Bake::Modernize.template_path_for('contributing')
16
- Bake::Modernize.copy_template(template_root, root)
17
- end
18
-
19
17
  private
20
18
 
21
19
  DEFAULT_CONTRIBUTING = <<~EOF
@@ -28,6 +26,14 @@ We welcome contributions to this project.
28
26
  3. Commit your changes (`git commit -am 'Add some feature'`).
29
27
  4. Push to the branch (`git push origin my-new-feature`).
30
28
  5. Create new Pull Request.
29
+
30
+ ### Developer Certificate of Origin
31
+
32
+ This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
33
+
34
+ ### Contributor Covenant
35
+
36
+ This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
31
37
  EOF
32
38
 
33
39
  def update_contributing(readme_path)
@@ -13,6 +13,10 @@ def gemspec
13
13
  File.write(path, buffer.string)
14
14
  end
15
15
 
16
+ # The latest end-of-life Ruby version.
17
+ LATEST_END_OF_LIFE_RUBY = ::Gem::Version.new("2.7")
18
+ MINIMUM_RUBY_VERSION = ::Gem::Requirement.new(">= 3.0")
19
+
16
20
  # Rewrite the specified gemspec.
17
21
  # @param
18
22
  def update(path: default_gemspec_path, output: $stdout)
@@ -86,9 +90,16 @@ def update(path: default_gemspec_path, output: $stdout)
86
90
 
87
91
  if required_ruby_version = spec.required_ruby_version
88
92
  unless required_ruby_version.none?
93
+ if required_ruby_version.satisfied_by?(LATEST_END_OF_LIFE_RUBY)
94
+ Console.logger.warn(self, "Required Ruby version #{required_ruby_version} is end-of-life!")
95
+ end
96
+
89
97
  output.puts "\t"
90
98
  output.puts "\tspec.required_ruby_version = #{required_ruby_version.to_s.inspect}"
91
99
  end
100
+ else
101
+ output.puts "\t"
102
+ output.puts "\tspec.required_ruby_version = #{MINIMUM_RUBY_VERSION.to_s.dump}"
92
103
  end
93
104
 
94
105
  if spec.runtime_dependencies.any?
@@ -174,8 +185,9 @@ def valid_uri?(uri)
174
185
  Sync do
175
186
  internet = Async::HTTP::Internet.new
176
187
  response = internet.head(uri)
188
+ response.close
177
189
 
178
- next response.success?
190
+ response.success?
179
191
  end
180
192
  end
181
193
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Bake
7
7
  module Modernize
8
- VERSION = "0.16.2"
8
+ VERSION = "0.17.0"
9
9
  end
10
10
  end
@@ -25,9 +25,13 @@ module Bake
25
25
  full_path = File.join(destination_path, path.relative_path)
26
26
 
27
27
  if File.directory?(path)
28
- FileUtils::Verbose.mkdir_p(full_path)
28
+ unless File.directory?(full_path)
29
+ FileUtils.mkdir_p(full_path)
30
+ end
29
31
  else
30
- FileUtils::Verbose.cp(path, full_path)
32
+ unless FileUtils.identical?(path, full_path)
33
+ FileUtils::Verbose.cp(path, full_path)
34
+ end
31
35
  end
32
36
  end
33
37
  end
data/readme.md CHANGED
@@ -23,3 +23,11 @@ We welcome contributions to this project.
23
23
  3. Commit your changes (`git commit -am 'Add some feature'`).
24
24
  4. Push to the branch (`git push origin my-new-feature`).
25
25
  5. Create new Pull Request.
26
+
27
+ ### Developer Certificate of Origin
28
+
29
+ This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
30
+
31
+ ### Contributor Covenant
32
+
33
+ This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
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.16.2
4
+ version: 0.17.0
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-06-18 00:00:00.000000000 Z
41
+ date: 2023-06-26 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: async-http
@@ -141,7 +141,6 @@ files:
141
141
  - bake/modernize/license.rb
142
142
  - bake/modernize/readme.rb
143
143
  - bake/modernize/signing.rb
144
- - conduct.md
145
144
  - lib/bake/modernize.rb
146
145
  - lib/bake/modernize/license.rb
147
146
  - lib/bake/modernize/version.rb
@@ -151,7 +150,6 @@ files:
151
150
  - template/actions/.github/workflows/documentation.yaml
152
151
  - template/actions/.github/workflows/test-external.yaml
153
152
  - template/actions/.github/workflows/test.yaml
154
- - template/contributing/conduct.md
155
153
  - template/editorconfig/.editorconfig
156
154
  - template/git/.gitignore
157
155
  - template/readme/readme.md
metadata.gz.sig CHANGED
Binary file
data/conduct.md DELETED
@@ -1,133 +0,0 @@
1
-
2
- # Contributor Covenant Code of Conduct
3
-
4
- ## Our Pledge
5
-
6
- We as members, contributors, and leaders pledge to make participation in our
7
- community a harassment-free experience for everyone, regardless of age, body
8
- size, visible or invisible disability, ethnicity, sex characteristics, gender
9
- identity and expression, level of experience, education, socio-economic status,
10
- nationality, personal appearance, race, caste, color, religion, or sexual
11
- identity and orientation.
12
-
13
- We pledge to act and interact in ways that contribute to an open, welcoming,
14
- diverse, inclusive, and healthy community.
15
-
16
- ## Our Standards
17
-
18
- Examples of behavior that contributes to a positive environment for our
19
- community include:
20
-
21
- * Demonstrating empathy and kindness toward other people
22
- * Being respectful of differing opinions, viewpoints, and experiences
23
- * Giving and gracefully accepting constructive feedback
24
- * Accepting responsibility and apologizing to those affected by our mistakes,
25
- and learning from the experience
26
- * Focusing on what is best not just for us as individuals, but for the overall
27
- community
28
-
29
- Examples of unacceptable behavior include:
30
-
31
- * The use of sexualized language or imagery, and sexual attention or advances of
32
- any kind
33
- * Trolling, insulting or derogatory comments, and personal or political attacks
34
- * Public or private harassment
35
- * Publishing others' private information, such as a physical or email address,
36
- without their explicit permission
37
- * Other conduct which could reasonably be considered inappropriate in a
38
- professional setting
39
-
40
- ## Enforcement Responsibilities
41
-
42
- Community leaders are responsible for clarifying and enforcing our standards of
43
- acceptable behavior and will take appropriate and fair corrective action in
44
- response to any behavior that they deem inappropriate, threatening, offensive,
45
- or harmful.
46
-
47
- Community leaders have the right and responsibility to remove, edit, or reject
48
- comments, commits, code, wiki edits, issues, and other contributions that are
49
- not aligned to this Code of Conduct, and will communicate reasons for moderation
50
- decisions when appropriate.
51
-
52
- ## Scope
53
-
54
- This Code of Conduct applies within all community spaces, and also applies when
55
- an individual is officially representing the community in public spaces.
56
- Examples of representing our community include using an official e-mail address,
57
- posting via an official social media account, or acting as an appointed
58
- representative at an online or offline event.
59
-
60
- ## Enforcement
61
-
62
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
- reported to the community leaders responsible for enforcement at
64
- [INSERT CONTACT METHOD].
65
- All complaints will be reviewed and investigated promptly and fairly.
66
-
67
- All community leaders are obligated to respect the privacy and security of the
68
- reporter of any incident.
69
-
70
- ## Enforcement Guidelines
71
-
72
- Community leaders will follow these Community Impact Guidelines in determining
73
- the consequences for any action they deem in violation of this Code of Conduct:
74
-
75
- ### 1. Correction
76
-
77
- **Community Impact**: Use of inappropriate language or other behavior deemed
78
- unprofessional or unwelcome in the community.
79
-
80
- **Consequence**: A private, written warning from community leaders, providing
81
- clarity around the nature of the violation and an explanation of why the
82
- behavior was inappropriate. A public apology may be requested.
83
-
84
- ### 2. Warning
85
-
86
- **Community Impact**: A violation through a single incident or series of
87
- actions.
88
-
89
- **Consequence**: A warning with consequences for continued behavior. No
90
- interaction with the people involved, including unsolicited interaction with
91
- those enforcing the Code of Conduct, for a specified period of time. This
92
- includes avoiding interactions in community spaces as well as external channels
93
- like social media. Violating these terms may lead to a temporary or permanent
94
- ban.
95
-
96
- ### 3. Temporary Ban
97
-
98
- **Community Impact**: A serious violation of community standards, including
99
- sustained inappropriate behavior.
100
-
101
- **Consequence**: A temporary ban from any sort of interaction or public
102
- communication with the community for a specified period of time. No public or
103
- private interaction with the people involved, including unsolicited interaction
104
- with those enforcing the Code of Conduct, is allowed during this period.
105
- Violating these terms may lead to a permanent ban.
106
-
107
- ### 4. Permanent Ban
108
-
109
- **Community Impact**: Demonstrating a pattern of violation of community
110
- standards, including sustained inappropriate behavior, harassment of an
111
- individual, or aggression toward or disparagement of classes of individuals.
112
-
113
- **Consequence**: A permanent ban from any sort of public interaction within the
114
- community.
115
-
116
- ## Attribution
117
-
118
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
- version 2.1, available at
120
- [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
-
122
- Community Impact Guidelines were inspired by
123
- [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
-
125
- For answers to common questions about this code of conduct, see the FAQ at
126
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127
- [https://www.contributor-covenant.org/translations][translations].
128
-
129
- [homepage]: https://www.contributor-covenant.org
130
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
- [Mozilla CoC]: https://github.com/mozilla/diversity
132
- [FAQ]: https://www.contributor-covenant.org/faq
133
- [translations]: https://www.contributor-covenant.org/translations
@@ -1,133 +0,0 @@
1
-
2
- # Contributor Covenant Code of Conduct
3
-
4
- ## Our Pledge
5
-
6
- We as members, contributors, and leaders pledge to make participation in our
7
- community a harassment-free experience for everyone, regardless of age, body
8
- size, visible or invisible disability, ethnicity, sex characteristics, gender
9
- identity and expression, level of experience, education, socio-economic status,
10
- nationality, personal appearance, race, caste, color, religion, or sexual
11
- identity and orientation.
12
-
13
- We pledge to act and interact in ways that contribute to an open, welcoming,
14
- diverse, inclusive, and healthy community.
15
-
16
- ## Our Standards
17
-
18
- Examples of behavior that contributes to a positive environment for our
19
- community include:
20
-
21
- * Demonstrating empathy and kindness toward other people
22
- * Being respectful of differing opinions, viewpoints, and experiences
23
- * Giving and gracefully accepting constructive feedback
24
- * Accepting responsibility and apologizing to those affected by our mistakes,
25
- and learning from the experience
26
- * Focusing on what is best not just for us as individuals, but for the overall
27
- community
28
-
29
- Examples of unacceptable behavior include:
30
-
31
- * The use of sexualized language or imagery, and sexual attention or advances of
32
- any kind
33
- * Trolling, insulting or derogatory comments, and personal or political attacks
34
- * Public or private harassment
35
- * Publishing others' private information, such as a physical or email address,
36
- without their explicit permission
37
- * Other conduct which could reasonably be considered inappropriate in a
38
- professional setting
39
-
40
- ## Enforcement Responsibilities
41
-
42
- Community leaders are responsible for clarifying and enforcing our standards of
43
- acceptable behavior and will take appropriate and fair corrective action in
44
- response to any behavior that they deem inappropriate, threatening, offensive,
45
- or harmful.
46
-
47
- Community leaders have the right and responsibility to remove, edit, or reject
48
- comments, commits, code, wiki edits, issues, and other contributions that are
49
- not aligned to this Code of Conduct, and will communicate reasons for moderation
50
- decisions when appropriate.
51
-
52
- ## Scope
53
-
54
- This Code of Conduct applies within all community spaces, and also applies when
55
- an individual is officially representing the community in public spaces.
56
- Examples of representing our community include using an official e-mail address,
57
- posting via an official social media account, or acting as an appointed
58
- representative at an online or offline event.
59
-
60
- ## Enforcement
61
-
62
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
- reported to the community leaders responsible for enforcement at
64
- [INSERT CONTACT METHOD].
65
- All complaints will be reviewed and investigated promptly and fairly.
66
-
67
- All community leaders are obligated to respect the privacy and security of the
68
- reporter of any incident.
69
-
70
- ## Enforcement Guidelines
71
-
72
- Community leaders will follow these Community Impact Guidelines in determining
73
- the consequences for any action they deem in violation of this Code of Conduct:
74
-
75
- ### 1. Correction
76
-
77
- **Community Impact**: Use of inappropriate language or other behavior deemed
78
- unprofessional or unwelcome in the community.
79
-
80
- **Consequence**: A private, written warning from community leaders, providing
81
- clarity around the nature of the violation and an explanation of why the
82
- behavior was inappropriate. A public apology may be requested.
83
-
84
- ### 2. Warning
85
-
86
- **Community Impact**: A violation through a single incident or series of
87
- actions.
88
-
89
- **Consequence**: A warning with consequences for continued behavior. No
90
- interaction with the people involved, including unsolicited interaction with
91
- those enforcing the Code of Conduct, for a specified period of time. This
92
- includes avoiding interactions in community spaces as well as external channels
93
- like social media. Violating these terms may lead to a temporary or permanent
94
- ban.
95
-
96
- ### 3. Temporary Ban
97
-
98
- **Community Impact**: A serious violation of community standards, including
99
- sustained inappropriate behavior.
100
-
101
- **Consequence**: A temporary ban from any sort of interaction or public
102
- communication with the community for a specified period of time. No public or
103
- private interaction with the people involved, including unsolicited interaction
104
- with those enforcing the Code of Conduct, is allowed during this period.
105
- Violating these terms may lead to a permanent ban.
106
-
107
- ### 4. Permanent Ban
108
-
109
- **Community Impact**: Demonstrating a pattern of violation of community
110
- standards, including sustained inappropriate behavior, harassment of an
111
- individual, or aggression toward or disparagement of classes of individuals.
112
-
113
- **Consequence**: A permanent ban from any sort of public interaction within the
114
- community.
115
-
116
- ## Attribution
117
-
118
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
- version 2.1, available at
120
- [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
-
122
- Community Impact Guidelines were inspired by
123
- [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
-
125
- For answers to common questions about this code of conduct, see the FAQ at
126
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127
- [https://www.contributor-covenant.org/translations][translations].
128
-
129
- [homepage]: https://www.contributor-covenant.org
130
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
- [Mozilla CoC]: https://github.com/mozilla/diversity
132
- [FAQ]: https://www.contributor-covenant.org/faq
133
- [translations]: https://www.contributor-covenant.org/translations