Skip to content

Commit

Permalink
Merge pull request #3697 from DataDog/tonycthsu/fix-allow-push-host
Browse files Browse the repository at this point in the history
Update spec for allowed_push_host for different destination
  • Loading branch information
TonyCTHsu authored Jun 10, 2024
2 parents 0c68089 + a325b06 commit 936a1cd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion spec/ddtrace/release_gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,24 @@
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

# `allowed_push_host` is overwritten by automated scripts
# in order to publish to another destination repository.
context 'allowed_push_host' do
it { expect(gemspec.metadata).to have_key('allowed_push_host') }

it do
expect(gemspec.metadata['allowed_push_host'])
.to eq('https://rubygems.org')
.or eq('https://rubygems.pkg.github.com/DataDog')
end
end
end
end
end

0 comments on commit 936a1cd

Please sign in to comment.