Skip to content

Commit

Permalink
Merge pull request #3684 from DataDog/tonycthsu/update-gemspec
Browse files Browse the repository at this point in the history
Update gemspec with `source_code_uri`
  • Loading branch information
TonyCTHsu authored Jun 5, 2024
2 parents b9f398f + df787dd commit ff9f137
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ddtrace.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Gem::Specification.new do |spec|

if spec.respond_to?(:metadata)
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
spec.metadata['changelog_uri'] = 'https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md'
spec.metadata['changelog_uri'] = "https://github.com/DataDog/dd-trace-rb/blob/v#{spec.version}/CHANGELOG.md"
spec.metadata['source_code_uri'] = "https://github.com/DataDog/dd-trace-rb/tree/v#{spec.version}"
else
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
end
Expand Down
12 changes: 12 additions & 0 deletions spec/ddtrace/release_gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,17 @@
expect(gemspec.licenses).to contain_exactly('BSD-3-Clause', 'Apache-2.0')
end
end

describe '#metadata' do
it do
{
'allowed_push_host' => 'https://rubygems.org',
'changelog_uri' => "https://github.com/DataDog/dd-trace-rb/blob/v#{gemspec.version}/CHANGELOG.md",
'source_code_uri' => "https://github.com/DataDog/dd-trace-rb/tree/v#{gemspec.version}"
}.each do |key, value|
expect(gemspec.metadata[key]).to eq(value)
end
end
end
end
end

0 comments on commit ff9f137

Please sign in to comment.