Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gemspec with source_code_uri #3684

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading