diff --git a/lib/bundler.gemspec b/lib/bundler.gemspec index d4bbc6be77..96b9b7861b 100644 --- a/lib/bundler.gemspec +++ b/lib/bundler.gemspec @@ -49,7 +49,16 @@ Gem::Specification.new do |s| s.add_development_dependency "ronn", "~> 0.7.3" s.add_development_dependency "rspec", "~> 3.6" + # s.files = `git ls-files -z`.split("\x0").select {|f| f.match(%r{^(lib|exe)/}) } + # we don't check in man pages, but we need to ship them because + # we use them to generate the long-form help for each command. + # s.files += Dir.glob("man/**/*") + # Include the CHANGELOG.md, LICENSE.md, README.md manually + # s.files += %w[CHANGELOG.md LICENSE.md README.md] + # include the gemspec itself because warbler breaks w/o it s.files += %w[bundler.gemspec] + # s.bindir = "exe" + # s.executables = %w[bundle bundler] s.require_paths = ["lib"] end diff --git a/spec/bundler/bundler/ssl_certs/certificate_manager_spec.rb b/spec/bundler/bundler/ssl_certs/certificate_manager_spec.rb index 4250bfc497..56606a830f 100644 --- a/spec/bundler/bundler/ssl_certs/certificate_manager_spec.rb +++ b/spec/bundler/bundler/ssl_certs/certificate_manager_spec.rb @@ -12,7 +12,7 @@ RSpec.describe Bundler::SSLCerts::CertificateManager do # Pretend bundler root is rubygems root before do # Backing up rubygems ceriticates - FileUtils.mv(rubygems_certs_dir, rubygems_certs_dir + ".back") if ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"] + FileUtils.mv(rubygems_certs_dir, rubygems_certs_dir + ".back") if ruby_core? FileUtils.mkdir_p(rubygems_certs_dir) FileUtils.touch(stub_cert) @@ -22,7 +22,7 @@ RSpec.describe Bundler::SSLCerts::CertificateManager do FileUtils.rm_rf(rubygems_certs_dir) # Restore rubygems certificates - FileUtils.mv(rubygems_certs_dir + ".back", rubygems_certs_dir) if ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"] + FileUtils.mv(rubygems_certs_dir + ".back", rubygems_certs_dir) if ruby_core? end describe "#update_from" do diff --git a/spec/bundler/other/bundle_ruby_spec.rb b/spec/bundler/other/bundle_ruby_spec.rb index 88933b039e..fbca31d0a0 100644 --- a/spec/bundler/other/bundle_ruby_spec.rb +++ b/spec/bundler/other/bundle_ruby_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle_ruby", :ruby_repo, :bundler => "< 3" do +RSpec.describe "bundle_ruby", :bundler => "< 3" do context "without patchlevel" do it "returns the ruby version" do gemfile <<-G diff --git a/spec/bundler/spec_helper.rb b/spec/bundler/spec_helper.rb index d24bd4505b..ff009e773f 100644 --- a/spec/bundler/spec_helper.rb +++ b/spec/bundler/spec_helper.rb @@ -28,7 +28,6 @@ require "bundler/vendored_fileutils" require "uri" require "digest" - # Delete the default copy of Bundler that RVM installs for us when running in CI require "fileutils" if ENV.select {|k, _v| k =~ /TRAVIS/ }.any? && Gem::Version.new(Gem::VERSION) > Gem::Version.new("2.0") @@ -123,11 +122,13 @@ RSpec.configure do |config| c.syntax = :expect end - config.before :suite do + config.around :each do |example| if ENV["BUNDLE_RUBY"] - @orig_ruby = Gem.ruby + orig_ruby = Gem.ruby Gem.ruby = ENV["BUNDLE_RUBY"] end + example.run + Gem.ruby = orig_ruby if ENV["BUNDLE_RUBY"] end config.before :all do @@ -154,8 +155,4 @@ RSpec.configure do |config| Dir.chdir(original_wd) ENV.replace(original_env) end - - config.after :suite do - Gem.ruby = @orig_ruby if ENV["BUNDLE_RUBY"] - end end