Skip to content

Commit 845da04

Browse files
committed
Add project metadata to the gemspec
As per https://guides.rubygems.org/specification-reference/#metadata, add metadata to the gemspec file. This'll allow people to more easily access the source code, raise issues and read the changelog. These `bug_tracker_uri`, `changelog_uri`, `documentation_uri`, and `source_code_uri` links will appear on the rubygems page at https://rubygems.org/gems/rails-html-sanitizer and be available via the rubygems API after the next release.
1 parent 43a87f5 commit 845da04

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

rails-html-sanitizer.gemspec

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ Gem::Specification.new do |spec|
1313
spec.homepage = "https://github.com/rails/rails-html-sanitizer"
1414
spec.license = "MIT"
1515

16+
spec.metadata = {
17+
"bug_tracker_uri" => "https://github.com/rails/rails-html-sanitizer/issues",
18+
"changelog_uri" => "https://github.com/rails/rails-html-sanitizer/blob/v#{spec.version}/CHANGELOG.md",
19+
"documentation_uri" => "https://www.rubydoc.info/gems/rails-html-sanitizer/#{spec.version}",
20+
"source_code_uri" => "https://github.com/rails/rails-html-sanitizer/tree/v#{spec.version}",
21+
}
22+
1623
spec.files = Dir["lib/**/*", "README.md", "MIT-LICENSE", "CHANGELOG.md"]
1724
spec.test_files = Dir["test/**/*"]
1825
spec.require_paths = ["lib"]

0 commit comments

Comments
 (0)