Skip to content

Commit 92cdbeb

Browse files
authored
fix: ship the license text in the built gem (#258)
spec.files globbed for "LICENSE" while the file was named LICENSE.txt. Dir[] answers a pattern it cannot match with an empty list and no complaint, so every published version through 8.0.0 shipped README.md and lib/ with no license file at all, which Apache-2.0 requires be distributed with the work. Rename LICENSE.txt to LICENSE, matching the other test-kitchen plugins, and name the file list explicitly rather than globbing it. Also add the gem metadata RubyGems shows on the gem page and set rubygems_mfa_required. Signed-off-by: Tim Smith <tim@mondoo.com>
1 parent ced6d68 commit 92cdbeb

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

File renamed without changes.

‎kitchen-openstack.gemspec‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,23 @@ Gem::Specification.new do |spec|
1414
spec.homepage = "https://github.com/test-kitchen/kitchen-openstack"
1515
spec.license = "Apache-2.0"
1616

17-
spec.files = Dir["LICENSE", "README.md", "lib/**/*"]
17+
# Named explicitly rather than globbed: Dir[] drops a name it cannot match
18+
# without complaining, which is how every published gem up to 8.0.0 came to
19+
# ship no license file at all -- the glob asked for "LICENSE" while the file
20+
# was named LICENSE.txt. The file is now LICENSE, matching the rest of the
21+
# test-kitchen plugins.
22+
spec.files = %w{LICENSE README.md} + Dir["lib/**/*.rb"]
1823
spec.require_paths = ["lib"]
1924

25+
spec.metadata = {
26+
"bug_tracker_uri" => "#{spec.homepage}/issues",
27+
"changelog_uri" => "#{spec.homepage}/blob/main/CHANGELOG.md",
28+
"documentation_uri" => "https://kitchen.ci/docs/drivers/openstack/",
29+
"homepage_uri" => spec.homepage,
30+
"source_code_uri" => spec.homepage,
31+
"rubygems_mfa_required" => "true",
32+
}
33+
2034
spec.required_ruby_version = ">= 3.1"
2135

2236
spec.add_dependency "test-kitchen", ">= 3.0", "< 5"

0 commit comments

Comments
 (0)