From 14af0e7417fe1fef3c521b69e0875d3ed5fed971 Mon Sep 17 00:00:00 2001 From: Bundlerbot Date: Thu, 19 Dec 2019 16:04:53 +0000 Subject: Merge #7506 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7506: Remove unnecessary CI steps r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that merging #7505 failed. ### What was your diagnosis of the problem? My diagnosis was that some `apt` operation installing `graphviz` failed, but installing `graphviz` was unnecessary in the specific job that failed. ### What is your fix for the problem, implemented in this PR? My fix is to only modifying the OS when strictly necessary. Also fixed another test issue with the recently added test for integration with the `rubygems-bundler` gem by `rvm`. Co-authored-by: David Rodríguez (cherry picked from commit 0bc7f5c71e31f6dbb1207324165ee2b95f628bd3) --- .travis.yml | 11 ++++++++++- Rakefile | 20 +------------------- task/release.rake | 2 +- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index e7828fd4af..3f0ed68fdd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,17 @@ script: bin/rake spec:travis before_script: - travis_retry gem install rake:"~> 12.0" - travis_retry bin/rake override_version - - travis_retry bin/rake spec:travis:deps + - travis_retry bin/rake spec:deps - bin/rake man:check + - if [ "$BUNDLER_SPEC_SUB_VERSION" = "" ]; + then + sudo apt-get install graphviz -y; + fi + - if [ "$TRAVIS_RUBY_VERSION" = "2.3.8" ]; + then + sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd; + sudo sed -i '/secure_path/d' /etc/sudoers; + fi branches: only: diff --git a/Rakefile b/Rakefile index 4fd9a5179a..07f74edb71 100644 --- a/Rakefile +++ b/Rakefile @@ -36,24 +36,6 @@ namespace :spec do Spec::Rubygems.dev_setup end - namespace :travis do - task :deps do - # Give the travis user a name so that git won't fatally error - system "sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd" - # Strip secure_path so that RVM paths transmit through sudo -E - system "sudo sed -i '/secure_path/d' /etc/sudoers" - # Refresh packages index that the ones we need can be installed - sh "sudo apt-get update" - # Install groff so ronn can generate man/help pages - sh "sudo apt-get install groff-base=1.22.3-10 -y" - # Install graphviz so that the viz specs can run - sh "sudo apt-get install graphviz -y" - - # Install the other gem deps, etc - Rake::Task["spec:deps"].invoke - end - end - task :clean do rm_rf "tmp" end @@ -127,7 +109,7 @@ task :check_rvm_integration do # The rubygems-bundler gem is installed by RVM by default and it could easily # break when we change bundler. Make sure that binstubs still run with it # installed. - sh("bin/rake install && gem install rubygems-bundler && rake -T") + sh("gem install rubygems-bundler && RUBYOPT=-Ilib rake -T") end namespace :man do diff --git a/task/release.rake b/task/release.rake index cd66ff755d..e7218d2996 100644 --- a/task/release.rake +++ b/task/release.rake @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "bundler/gem_tasks" +require_relative "../lib/bundler/gem_tasks" task :build => ["build_metadata"] do Rake::Task["build_metadata:clean"].tap(&:reenable).real_invoke end -- cgit v1.2.1 From d02da0d81b4c75517e41a0baa8742ffed9d77288 Mon Sep 17 00:00:00 2001 From: Bundlerbot Date: Thu, 19 Dec 2019 17:07:48 +0000 Subject: Merge #7505 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7505: Make sure to `require "rubygems"` explicitly r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was some setups have `--disable=gem` in `RUBYOPT`, and sometimes use `bundler` without modifying that env. ### What was your diagnosis of the problem? My diagnosis was that we shouldn't break those setups just to save a `require`. ### What is your fix for the problem, implemented in this PR? My fix is to add a `require "rubygems"` on top of the file that needs it. Fixes #7487. Co-authored-by: David Rodríguez (cherry picked from commit eada59b3d37d6f2f1a05b2d8052a499dfb8fd222) --- lib/bundler/rubygems_integration.rb | 2 ++ spec/runtime/setup_spec.rb | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 88fcd4d9e0..18da5915a5 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "rubygems" + module Bundler class RubygemsIntegration if defined?(Gem::Ext::Builder::CHDIR_MONITOR) diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index befc5f9d09..39240b7404 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -1344,5 +1344,11 @@ end expect(last_command.stdboth).not_to include "FAIL" expect(err).to include "private method `require'" end + + it "takes care of requiring rubygems" do + sys_exec("#{Gem.ruby} -I#{lib_dir} -e \"puts require('bundler/setup')\"", "RUBYOPT" => "--disable=gems") + + expect(last_command.stdboth).to eq("true") + end end end -- cgit v1.2.1 From e3a47f1ff5d3b83ac188c9acd6a7bbf612205a8e Mon Sep 17 00:00:00 2001 From: Bundlerbot Date: Thu, 19 Dec 2019 21:42:31 +0000 Subject: Merge #7509 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7509: Add `travis_retry` to apt-get operation r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was another failed build due to [apt-get install failing](https://travis-ci.org/bundler/bundler/jobs/627348743). ### What was your diagnosis of the problem? My diagnosis was TravisCI networking is unstable at the moment. ### What is your fix for the problem, implemented in this PR? Not a permanent fix, since that doesn't depend on us, but using `travis_retry` should increase reliability. Co-authored-by: David Rodríguez (cherry picked from commit 6ab5f479ae7e53e0833a342fb4129ae3952b049e) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f0ed68fdd..14091cadea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_script: - bin/rake man:check - if [ "$BUNDLER_SPEC_SUB_VERSION" = "" ]; then - sudo apt-get install graphviz -y; + travis_retry sudo apt-get install graphviz -y; fi - if [ "$TRAVIS_RUBY_VERSION" = "2.3.8" ]; then -- cgit v1.2.1 From ed419f82749f8e5e3d804d6d6c872654b0799d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 19 Dec 2019 18:50:46 +0100 Subject: Version 2.1.2 --- lib/bundler/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb index 06d6a0f255..b63e39b8d2 100644 --- a/lib/bundler/version.rb +++ b/lib/bundler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false module Bundler - VERSION = "2.1.1".freeze + VERSION = "2.1.2".freeze def self.bundler_major_version @bundler_major_version ||= VERSION.split(".").first.to_i -- cgit v1.2.1 From 010e79b72d7d38a869cc3f4a7f30216f2486ac17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 19 Dec 2019 18:52:23 +0100 Subject: Changelog for 2.1.2 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec13c08754..612b0e36bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.1.2 (December 20, 2019) + +Bugfixes: + + - Restore an explicit `require "rubygems"` on top `rubygems_integration.rb` to avoid some missing constant errors under some convoluted setups [#7505](https://github.com/bundler/bundler/pull/7505) + ## 2.1.1 (December 17, 2019) Bugfixes: -- cgit v1.2.1