[rubygems/rubygems] Remove travis_removal_info
`travis_removal_info` is added by https://github.com/rubygems/rubygems/pull/6150. According to the comment, it's supposed to be removed at bundler v2.5.0 but it hasn't. https://github.com/rubygems/rubygems/commit/e18797d43f
This commit is contained in:
parent
e99951edfa
commit
933ede5d76
@ -32,7 +32,6 @@ module Bundler
|
|||||||
|
|
||||||
validate_ext_name if @extension
|
validate_ext_name if @extension
|
||||||
validate_rust_builder_rubygems_version if @extension == "rust"
|
validate_rust_builder_rubygems_version if @extension == "rust"
|
||||||
travis_removal_info
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
@ -448,19 +447,6 @@ module Bundler
|
|||||||
"1.3"
|
"1.3"
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: remove at next minor release
|
|
||||||
def travis_removal_info
|
|
||||||
if options[:ci] == "travis"
|
|
||||||
Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator."
|
|
||||||
exit 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if Bundler.settings["gem.ci"] == "travis"
|
|
||||||
Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator, but it is present in bundle config. Please configure another provider using `bundle config set gem.ci SERVICE` (where SERVICE is one of github/gitlab/circle) or unset configuration using `bundle config unset gem.ci`."
|
|
||||||
exit 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def validate_rust_builder_rubygems_version
|
def validate_rust_builder_rubygems_version
|
||||||
if Gem::Version.new(rust_builder_required_rubygems_version) > Gem.rubygems_version
|
if Gem::Version.new(rust_builder_required_rubygems_version) > Gem.rubygems_version
|
||||||
Bundler.ui.error "Your RubyGems version (#{Gem.rubygems_version}) is too old to build Rust extension. Please update your RubyGems using `gem update --system` or any other way and try again."
|
Bundler.ui.error "Your RubyGems version (#{Gem.rubygems_version}) is too old to build Rust extension. Please update your RubyGems using `gem update --system` or any other way and try again."
|
||||||
|
@ -932,24 +932,6 @@ RSpec.describe "bundle gem" do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "--ci set to travis" do
|
|
||||||
it "generates a GitHub Actions config file" do
|
|
||||||
bundle "gem #{gem_name} --ci=travis", raise_on_error: false
|
|
||||||
expect(err).to include("Support for Travis CI was removed from gem skeleton generator.")
|
|
||||||
|
|
||||||
expect(bundled_app("#{gem_name}/.travis.yml")).to_not exist
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context "--ci set to travis" do
|
|
||||||
it "generates a GitHub Actions config file" do
|
|
||||||
bundle "gem #{gem_name} --ci=travis", raise_on_error: false
|
|
||||||
expect(err).to include("Support for Travis CI was removed from gem skeleton generator.")
|
|
||||||
|
|
||||||
expect(bundled_app("#{gem_name}/.travis.yml")).to_not exist
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context "--ci set to github" do
|
context "--ci set to github" do
|
||||||
it "generates a GitHub Actions config file" do
|
it "generates a GitHub Actions config file" do
|
||||||
bundle "gem #{gem_name} --ci=github"
|
bundle "gem #{gem_name} --ci=github"
|
||||||
@ -1000,18 +982,6 @@ RSpec.describe "bundle gem" do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "gem.ci setting set to travis" do
|
|
||||||
it "errors with friendly message" do
|
|
||||||
bundle "config set gem.ci travis"
|
|
||||||
bundle "gem #{gem_name}", raise_on_error: false
|
|
||||||
|
|
||||||
expect(err).to include("Support for Travis CI was removed from gem skeleton generator,")
|
|
||||||
expect(err).to include("bundle config unset gem.ci")
|
|
||||||
|
|
||||||
expect(bundled_app("#{gem_name}/.travis.yml")).to_not exist
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context "gem.ci setting set to github" do
|
context "gem.ci setting set to github" do
|
||||||
it "generates a GitHub Actions config file" do
|
it "generates a GitHub Actions config file" do
|
||||||
bundle "config set gem.ci github"
|
bundle "config set gem.ci github"
|
||||||
|
@ -31,7 +31,6 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|||||||
bundler/lib/bundler/man/gemfile.5
|
bundler/lib/bundler/man/gemfile.5
|
||||||
bundler/lib/bundler/man/gemfile.5.ronn
|
bundler/lib/bundler/man/gemfile.5.ronn
|
||||||
bundler/lib/bundler/templates/.circleci/config.yml
|
bundler/lib/bundler/templates/.circleci/config.yml
|
||||||
bundler/lib/bundler/templates/.travis.yml
|
|
||||||
]
|
]
|
||||||
|
|
||||||
create_dummy_files(filelist)
|
create_dummy_files(filelist)
|
||||||
@ -178,7 +177,6 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|||||||
assert_path_exist File.join(dir, "bundler/b.rb")
|
assert_path_exist File.join(dir, "bundler/b.rb")
|
||||||
|
|
||||||
assert_path_exist File.join(dir, "bundler/templates/.circleci/config.yml")
|
assert_path_exist File.join(dir, "bundler/templates/.circleci/config.yml")
|
||||||
assert_path_exist File.join(dir, "bundler/templates/.travis.yml")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user