diff options
65 files changed, 190 insertions, 149 deletions
diff --git a/.travis.yml b/.travis.yml index 14091cadea..a428231133 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ before_script: - travis_retry gem install rake:"~> 12.0" - travis_retry bin/rake override_version - travis_retry bin/rake spec:deps - - bin/rake man:check - if [ "$BUNDLER_SPEC_SUB_VERSION" = "" ]; then travis_retry sudo apt-get install graphviz -y; @@ -55,10 +54,7 @@ env: jobs: include: - rvm: 2.6.5 - script: bin/rake rubocop - stage: linting - - rvm: 2.6.5 - script: bin/rake check_rvm_integration + script: bin/rake rubocop check_rvm_integration man:check stage: linting # Ruby 2.3 also tested in 2.x mode - rvm: 2.3.8 diff --git a/CHANGELOG.md b/CHANGELOG.md index 612b0e36bb..7d66fbc58a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 2.1.3 (January 2, 2020) + +Bugfixes: + + - Fix `rake build` when path has spaces on it [#7514](https://github.com/bundler/bundler/pull/7514) + - Fix `rake release` git push tasks when the running shell has `git` as an alias of another command (like `hub`) [#7510](https://github.com/bundler/bundler/pull/7510) + - Fix some circular require warnings [#7520](https://github.com/bundler/bundler/pull/7520) + - Fix `bundle config set deployment true` recommended alternative to `bundle config --deployment` to behave in the same way as the `--deployment` flag [#7519](https://github.com/bundler/bundler/pull/7519) + ## 2.1.2 (December 20, 2019) Bugfixes: diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index d823fb632f..ecd474971d 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -38,7 +38,8 @@ module Bundler if Bundler.feature_flag.deployment_means_frozen? Bundler.settings.set_command_option :deployment, true else - Bundler.settings.set_command_option :frozen, true + Bundler.settings.set_command_option :deployment, true if options[:deployment] + Bundler.settings.set_command_option :frozen, true if options[:frozen] end end @@ -169,7 +170,7 @@ module Bundler def normalize_settings Bundler.settings.set_command_option :path, nil if options[:system] Bundler.settings.temporary(:path_relative_to_cwd => false) do - Bundler.settings.set_command_option :path, "vendor/bundle" if options[:deployment] + Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil? end Bundler.settings.set_command_option_if_given :path, options[:path] Bundler.settings.temporary(:path_relative_to_cwd => false) do diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 7d4e382be8..204dd24052 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -73,7 +73,7 @@ module Bundler def build_gem file_name = nil - sh("#{gem_command} build -V #{spec_path}".shellsplit) do + sh("#{gem_command} build -V #{spec_path.shellescape}".shellsplit) do file_name = File.basename(built_gem_path) SharedHelpers.filesystem_access(File.join(base, "pkg")) {|p| FileUtils.mkdir_p(p) } FileUtils.mv(built_gem_path, "pkg") @@ -130,9 +130,8 @@ module Bundler def perform_git_push(options = "") cmd = "git push #{options}" - out, status = sh_with_status(cmd) + out, status = sh_with_status(cmd.shellsplit) return if status.success? - cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin) raise "Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n" end diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 18da5915a5..d97621cd92 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "rubygems" +require "rubygems" unless defined?(Gem) module Bundler class RubygemsIntegration diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb index b63e39b8d2..65914b5831 100644 --- a/lib/bundler/version.rb +++ b/lib/bundler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false module Bundler - VERSION = "2.1.2".freeze + VERSION = "2.1.3".freeze def self.bundler_major_version @bundler_major_version ||= VERSION.split(".").first.to_i diff --git a/man/bundle-add.1 b/man/bundle-add.1 index 24bfe50f4f..8b75859104 100644 --- a/man/bundle-add.1 +++ b/man/bundle-add.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-ADD" "1" "December 2019" "" "" +.TH "BUNDLE\-ADD" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install diff --git a/man/bundle-add.1.txt b/man/bundle-add.1.txt index aff9977fb1..dcd76df4ae 100644 --- a/man/bundle-add.1.txt +++ b/man/bundle-add.1.txt @@ -55,4 +55,4 @@ OPTIONS - December 2019 BUNDLE-ADD(1) + January 2020 BUNDLE-ADD(1) diff --git a/man/bundle-binstubs.1 b/man/bundle-binstubs.1 index 4e69bfb715..4f9e5c0e31 100644 --- a/man/bundle-binstubs.1 +++ b/man/bundle-binstubs.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-BINSTUBS" "1" "December 2019" "" "" +.TH "BUNDLE\-BINSTUBS" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems diff --git a/man/bundle-binstubs.1.txt b/man/bundle-binstubs.1.txt index 564989bd8a..cbd2b12da0 100644 --- a/man/bundle-binstubs.1.txt +++ b/man/bundle-binstubs.1.txt @@ -45,4 +45,4 @@ BUNDLE INSTALL --BINSTUBS - December 2019 BUNDLE-BINSTUBS(1) + January 2020 BUNDLE-BINSTUBS(1) diff --git a/man/bundle-cache.1 b/man/bundle-cache.1 index 23bc757d03..cb376777ff 100644 --- a/man/bundle-cache.1 +++ b/man/bundle-cache.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CACHE" "1" "December 2019" "" "" +.TH "BUNDLE\-CACHE" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application diff --git a/man/bundle-cache.1.txt b/man/bundle-cache.1.txt index 4dcc7c9cc9..c0b8b5bf07 100644 --- a/man/bundle-cache.1.txt +++ b/man/bundle-cache.1.txt @@ -75,4 +75,4 @@ REMOTE FETCHING - December 2019 BUNDLE-CACHE(1) + January 2020 BUNDLE-CACHE(1) diff --git a/man/bundle-check.1 b/man/bundle-check.1 index ac80f697f5..aba5b66348 100644 --- a/man/bundle-check.1 +++ b/man/bundle-check.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CHECK" "1" "December 2019" "" "" +.TH "BUNDLE\-CHECK" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems diff --git a/man/bundle-check.1.txt b/man/bundle-check.1.txt index 05d1c7dc5c..cca5fae9e1 100644 --- a/man/bundle-check.1.txt +++ b/man/bundle-check.1.txt @@ -30,4 +30,4 @@ OPTIONS - December 2019 BUNDLE-CHECK(1) + January 2020 BUNDLE-CHECK(1) diff --git a/man/bundle-clean.1 b/man/bundle-clean.1 index 61fcf9d396..cc5c8e86d7 100644 --- a/man/bundle-clean.1 +++ b/man/bundle-clean.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CLEAN" "1" "December 2019" "" "" +.TH "BUNDLE\-CLEAN" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory diff --git a/man/bundle-clean.1.txt b/man/bundle-clean.1.txt index 9438f8adc9..300d0c0b51 100644 --- a/man/bundle-clean.1.txt +++ b/man/bundle-clean.1.txt @@ -23,4 +23,4 @@ OPTIONS - December 2019 BUNDLE-CLEAN(1) + January 2020 BUNDLE-CLEAN(1) diff --git a/man/bundle-config.1 b/man/bundle-config.1 index 56ef24791d..c3464fb2ec 100644 --- a/man/bundle-config.1 +++ b/man/bundle-config.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CONFIG" "1" "December 2019" "" "" +.TH "BUNDLE\-CONFIG" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-config\fR \- Set bundler configuration options diff --git a/man/bundle-config.1.txt b/man/bundle-config.1.txt index bc3fe39069..f5fc0ce12a 100644 --- a/man/bundle-config.1.txt +++ b/man/bundle-config.1.txt @@ -525,4 +525,4 @@ CONFIGURE BUNDLER DIRECTORIES - December 2019 BUNDLE-CONFIG(1) + January 2020 BUNDLE-CONFIG(1) diff --git a/man/bundle-doctor.1 b/man/bundle-doctor.1 index d3e3e73bbe..344c40066b 100644 --- a/man/bundle-doctor.1 +++ b/man/bundle-doctor.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-DOCTOR" "1" "December 2019" "" "" +.TH "BUNDLE\-DOCTOR" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-doctor\fR \- Checks the bundle for common problems diff --git a/man/bundle-doctor.1.txt b/man/bundle-doctor.1.txt index 6b2fdcbdf4..595ba99633 100644 --- a/man/bundle-doctor.1.txt +++ b/man/bundle-doctor.1.txt @@ -41,4 +41,4 @@ OPTIONS - December 2019 BUNDLE-DOCTOR(1) + January 2020 BUNDLE-DOCTOR(1) diff --git a/man/bundle-exec.1 b/man/bundle-exec.1 index fa0728a5de..555819a5b4 100644 --- a/man/bundle-exec.1 +++ b/man/bundle-exec.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-EXEC" "1" "December 2019" "" "" +.TH "BUNDLE\-EXEC" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-exec\fR \- Execute a command in the context of the bundle diff --git a/man/bundle-exec.1.txt b/man/bundle-exec.1.txt index efcb130b48..ebdc2fda71 100644 --- a/man/bundle-exec.1.txt +++ b/man/bundle-exec.1.txt @@ -175,4 +175,4 @@ RUBYGEMS PLUGINS - December 2019 BUNDLE-EXEC(1) + January 2020 BUNDLE-EXEC(1) diff --git a/man/bundle-gem.1 b/man/bundle-gem.1 index 9971e3528c..baed185e70 100644 --- a/man/bundle-gem.1 +++ b/man/bundle-gem.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-GEM" "1" "December 2019" "" "" +.TH "BUNDLE\-GEM" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem diff --git a/man/bundle-gem.1.txt b/man/bundle-gem.1.txt index c95c409c65..554bb1a41b 100644 --- a/man/bundle-gem.1.txt +++ b/man/bundle-gem.1.txt @@ -88,4 +88,4 @@ SEE ALSO - December 2019 BUNDLE-GEM(1) + January 2020 BUNDLE-GEM(1) diff --git a/man/bundle-info.1 b/man/bundle-info.1 index 9dbef738fa..d7c73e9bb7 100644 --- a/man/bundle-info.1 +++ b/man/bundle-info.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-INFO" "1" "December 2019" "" "" +.TH "BUNDLE\-INFO" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-info\fR \- Show information for the given gem in your bundle diff --git a/man/bundle-info.1.txt b/man/bundle-info.1.txt index 102ec48f6e..67563aa191 100644 --- a/man/bundle-info.1.txt +++ b/man/bundle-info.1.txt @@ -18,4 +18,4 @@ OPTIONS - December 2019 BUNDLE-INFO(1) + January 2020 BUNDLE-INFO(1) diff --git a/man/bundle-init.1 b/man/bundle-init.1 index 8fe0d02406..803d4b9be8 100644 --- a/man/bundle-init.1 +++ b/man/bundle-init.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-INIT" "1" "December 2019" "" "" +.TH "BUNDLE\-INIT" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-init\fR \- Generates a Gemfile into the current working directory diff --git a/man/bundle-init.1.txt b/man/bundle-init.1.txt index 187ed4b3c0..2565edbece 100644 --- a/man/bundle-init.1.txt +++ b/man/bundle-init.1.txt @@ -31,4 +31,4 @@ SEE ALSO - December 2019 BUNDLE-INIT(1) + January 2020 BUNDLE-INIT(1) diff --git a/man/bundle-inject.1 b/man/bundle-inject.1 index afc328771e..3370a91573 100644 --- a/man/bundle-inject.1 +++ b/man/bundle-inject.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-INJECT" "1" "December 2019" "" "" +.TH "BUNDLE\-INJECT" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile diff --git a/man/bundle-inject.1.txt b/man/bundle-inject.1.txt index a73927cef0..4707b99e5f 100644 --- a/man/bundle-inject.1.txt +++ b/man/bundle-inject.1.txt @@ -29,4 +29,4 @@ DESCRIPTION - December 2019 BUNDLE-INJECT(1) + January 2020 BUNDLE-INJECT(1) diff --git a/man/bundle-install.1 b/man/bundle-install.1 index 200acfca24..4a289f5c2e 100644 --- a/man/bundle-install.1 +++ b/man/bundle-install.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-INSTALL" "1" "December 2019" "" "" +.TH "BUNDLE\-INSTALL" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile diff --git a/man/bundle-install.1.txt b/man/bundle-install.1.txt index 08a0869d6f..b1a9ad1eb3 100644 --- a/man/bundle-install.1.txt +++ b/man/bundle-install.1.txt @@ -398,4 +398,4 @@ SEE ALSO - December 2019 BUNDLE-INSTALL(1) + January 2020 BUNDLE-INSTALL(1) diff --git a/man/bundle-list.1 b/man/bundle-list.1 index 53427b4504..72bc391ac2 100644 --- a/man/bundle-list.1 +++ b/man/bundle-list.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-LIST" "1" "December 2019" "" "" +.TH "BUNDLE\-LIST" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-list\fR \- List all the gems in the bundle diff --git a/man/bundle-list.1.txt b/man/bundle-list.1.txt index f4eab62783..645e62e452 100644 --- a/man/bundle-list.1.txt +++ b/man/bundle-list.1.txt @@ -40,4 +40,4 @@ OPTIONS - December 2019 BUNDLE-LIST(1) + January 2020 BUNDLE-LIST(1) diff --git a/man/bundle-lock.1 b/man/bundle-lock.1 index b64a645eb8..89f6e35179 100644 --- a/man/bundle-lock.1 +++ b/man/bundle-lock.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-LOCK" "1" "December 2019" "" "" +.TH "BUNDLE\-LOCK" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing diff --git a/man/bundle-lock.1.txt b/man/bundle-lock.1.txt index a50ee25643..80dcada5b3 100644 --- a/man/bundle-lock.1.txt +++ b/man/bundle-lock.1.txt @@ -90,4 +90,4 @@ PATCH LEVEL OPTIONS - December 2019 BUNDLE-LOCK(1) + January 2020 BUNDLE-LOCK(1) diff --git a/man/bundle-open.1 b/man/bundle-open.1 index 6213aeca65..5a11eeeb64 100644 --- a/man/bundle-open.1 +++ b/man/bundle-open.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-OPEN" "1" "December 2019" "" "" +.TH "BUNDLE\-OPEN" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle diff --git a/man/bundle-open.1.txt b/man/bundle-open.1.txt index 9ecc89c10a..288bbce0e3 100644 --- a/man/bundle-open.1.txt +++ b/man/bundle-open.1.txt @@ -26,4 +26,4 @@ DESCRIPTION - December 2019 BUNDLE-OPEN(1) + January 2020 BUNDLE-OPEN(1) diff --git a/man/bundle-outdated.1 b/man/bundle-outdated.1 index 81543bb65b..408e568034 100644 --- a/man/bundle-outdated.1 +++ b/man/bundle-outdated.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-OUTDATED" "1" "December 2019" "" "" +.TH "BUNDLE\-OUTDATED" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-outdated\fR \- List installed gems with newer versions available diff --git a/man/bundle-outdated.1.txt b/man/bundle-outdated.1.txt index 905a1fd9fc..c938e0a4ab 100644 --- a/man/bundle-outdated.1.txt +++ b/man/bundle-outdated.1.txt @@ -128,4 +128,4 @@ FILTERING OUTPUT - December 2019 BUNDLE-OUTDATED(1) + January 2020 BUNDLE-OUTDATED(1) diff --git a/man/bundle-platform.1 b/man/bundle-platform.1 index f7f65045dc..c83aa3c5d4 100644 --- a/man/bundle-platform.1 +++ b/man/bundle-platform.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-PLATFORM" "1" "December 2019" "" "" +.TH "BUNDLE\-PLATFORM" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-platform\fR \- Displays platform compatibility information diff --git a/man/bundle-platform.1.txt b/man/bundle-platform.1.txt index d808bed64f..f9dc8ccc1f 100644 --- a/man/bundle-platform.1.txt +++ b/man/bundle-platform.1.txt @@ -54,4 +54,4 @@ OPTIONS - December 2019 BUNDLE-PLATFORM(1) + January 2020 BUNDLE-PLATFORM(1) diff --git a/man/bundle-pristine.1 b/man/bundle-pristine.1 index 5b3522dd1a..460e3d4e5a 100644 --- a/man/bundle-pristine.1 +++ b/man/bundle-pristine.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-PRISTINE" "1" "December 2019" "" "" +.TH "BUNDLE\-PRISTINE" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition diff --git a/man/bundle-pristine.1.txt b/man/bundle-pristine.1.txt index a22bd53927..8d474fe497 100644 --- a/man/bundle-pristine.1.txt +++ b/man/bundle-pristine.1.txt @@ -41,4 +41,4 @@ DESCRIPTION - December 2019 BUNDLE-PRISTINE(1) + January 2020 BUNDLE-PRISTINE(1) diff --git a/man/bundle-remove.1 b/man/bundle-remove.1 index 4a4ed7ac95..cb4ad8d384 100644 --- a/man/bundle-remove.1 +++ b/man/bundle-remove.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-REMOVE" "1" "December 2019" "" "" +.TH "BUNDLE\-REMOVE" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-remove\fR \- Removes gems from the Gemfile diff --git a/man/bundle-remove.1.txt b/man/bundle-remove.1.txt index 7c8945e2c0..7203422f39 100644 --- a/man/bundle-remove.1.txt +++ b/man/bundle-remove.1.txt @@ -31,4 +31,4 @@ OPTIONS - December 2019 BUNDLE-REMOVE(1) + January 2020 BUNDLE-REMOVE(1) diff --git a/man/bundle-show.1 b/man/bundle-show.1 index 575619370b..2922a33467 100644 --- a/man/bundle-show.1 +++ b/man/bundle-show.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-SHOW" "1" "December 2019" "" "" +.TH "BUNDLE\-SHOW" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem diff --git a/man/bundle-show.1.txt b/man/bundle-show.1.txt index fa80081427..58f1620168 100644 --- a/man/bundle-show.1.txt +++ b/man/bundle-show.1.txt @@ -24,4 +24,4 @@ OPTIONS - December 2019 BUNDLE-SHOW(1) + January 2020 BUNDLE-SHOW(1) diff --git a/man/bundle-update.1 b/man/bundle-update.1 index 6a3fd877e2..f315532bb9 100644 --- a/man/bundle-update.1 +++ b/man/bundle-update.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-UPDATE" "1" "December 2019" "" "" +.TH "BUNDLE\-UPDATE" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-update\fR \- Update your gems to the latest available versions diff --git a/man/bundle-update.1.txt b/man/bundle-update.1.txt index c54ade9713..b8208c75d3 100644 --- a/man/bundle-update.1.txt +++ b/man/bundle-update.1.txt @@ -387,4 +387,4 @@ RECOMMENDED WORKFLOW - December 2019 BUNDLE-UPDATE(1) + January 2020 BUNDLE-UPDATE(1) diff --git a/man/bundle-viz.1 b/man/bundle-viz.1 index f1852e4206..a2153da28d 100644 --- a/man/bundle-viz.1 +++ b/man/bundle-viz.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-VIZ" "1" "December 2019" "" "" +.TH "BUNDLE\-VIZ" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile diff --git a/man/bundle-viz.1.txt b/man/bundle-viz.1.txt index 7956cf18ed..c934b4cf5b 100644 --- a/man/bundle-viz.1.txt +++ b/man/bundle-viz.1.txt @@ -36,4 +36,4 @@ OPTIONS - December 2019 BUNDLE-VIZ(1) + January 2020 BUNDLE-VIZ(1) diff --git a/man/bundle.1 b/man/bundle.1 index 93a43c0c70..4a9a9bec4d 100644 --- a/man/bundle.1 +++ b/man/bundle.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE" "1" "December 2019" "" "" +.TH "BUNDLE" "1" "January 2020" "" "" . .SH "NAME" \fBbundle\fR \- Ruby Dependency Management diff --git a/man/bundle.1.txt b/man/bundle.1.txt index cd0fabadea..e7eb35aa14 100644 --- a/man/bundle.1.txt +++ b/man/bundle.1.txt @@ -113,4 +113,4 @@ OBSOLETE - December 2019 BUNDLE(1) + January 2020 BUNDLE(1) diff --git a/man/gemfile.5 b/man/gemfile.5 index 536af70a6e..a9d2cee7c7 100644 --- a/man/gemfile.5 +++ b/man/gemfile.5 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "GEMFILE" "5" "December 2019" "" "" +.TH "GEMFILE" "5" "January 2020" "" "" . .SH "NAME" \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs diff --git a/man/gemfile.5.txt b/man/gemfile.5.txt index b3da595b17..71d2513271 100644 --- a/man/gemfile.5.txt +++ b/man/gemfile.5.txt @@ -646,4 +646,4 @@ SOURCE PRIORITY - December 2019 GEMFILE(5) + January 2020 GEMFILE(5) diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb index 6e82d34b05..df911eaffd 100644 --- a/spec/commands/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb @@ -423,7 +423,7 @@ RSpec.describe "bundle outdated" do expect(err).to include("You are trying to check outdated gems in deployment mode.") expect(err).to include("Run `bundle outdated` elsewhere.") expect(err).to include("If this is a development machine, remove the ") - expect(err).to include("Gemfile freeze\nby running `bundle install --no-deployment`.") + expect(err).to include("Gemfile freeze\nby running `bundle config unset deployment`.") end end diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb index a0c7e33299..e4449312eb 100644 --- a/spec/commands/update_spec.rb +++ b/spec/commands/update_spec.rb @@ -286,7 +286,7 @@ RSpec.describe "bundle update" do expect(last_command).to be_failure expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m) - expect(err).to match(/freeze \nby running `bundle install --no-deployment`./m) + expect(err).to match(/freeze \nby running `bundle config unset deployment`./m) end it "should suggest different command when frozen is set globally", :bundler => "< 3" do diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb index 89da3fc801..f92a531bf5 100644 --- a/spec/install/deploy_spec.rb +++ b/spec/install/deploy_spec.rb @@ -34,7 +34,7 @@ RSpec.describe "install with --deployment or --frozen" do expect(exitstatus).to eq(15) if exitstatus end - it "works after you try to deploy without a lock" do + it "doesn't mess up a subsequent `bundle install` after you try to deploy without a lock" do bundle "install --deployment" bundle! :install expect(the_bundle).to include_gems "rack 1.0" @@ -42,7 +42,7 @@ RSpec.describe "install with --deployment or --frozen" do end it "still works if you are not in the app directory and specify --gemfile" do - bundle "install" + bundle! "install" Dir.chdir tmp do simulate_new_machine bundle! :install, @@ -60,12 +60,12 @@ RSpec.describe "install with --deployment or --frozen" do gem "foo", :git => "#{lib_path("foo-1.0")}" end G - bundle :install + bundle! :install bundle! :install, forgotten_command_line_options(:deployment => true, :without => "test") end it "works when you bundle exec bundle" do - bundle :install + bundle! :install bundle "install --deployment" bundle! "exec bundle check" end @@ -104,9 +104,90 @@ RSpec.describe "install with --deployment or --frozen" do expect(the_bundle).to include_gems "rack 1.0" end + context "when replacing a host with the same host with credentials" do + before do + bundle! "install", forgotten_command_line_options(:path => "vendor/bundle") + gemfile <<-G + source "http://user_name:password@localgemserver.test/" + gem "rack" + G + + lockfile <<-G + GEM + remote: http://localgemserver.test/ + specs: + rack (1.0.0) + + PLATFORMS + #{local} + + DEPENDENCIES + rack + G + + bundle! "config set --local deployment true" + end + + it "prevents the replace by default" do + bundle :install + + expect(err).to match(/The list of sources changed/) + end + + context "when allow_deployment_source_credential_changes is true" do + before { bundle! "config set allow_deployment_source_credential_changes true" } + + it "allows the replace" do + bundle! :install + + expect(out).to match(/Bundle complete!/) + end + end + + context "when allow_deployment_source_credential_changes is false" do + before { bundle! "config set allow_deployment_source_credential_changes false" } + + it "prevents the replace" do + bundle :install + + expect(err).to match(/The list of sources changed/) + end + end + + context "when BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES env var is true" do + before { ENV["BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES"] = "true" } + + it "allows the replace" do + bundle :install + + expect(out).to match(/Bundle complete!/) + end + end + + context "when BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES env var is false" do + before { ENV["BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES"] = "false" } + + it "prevents the replace" do + bundle :install + + expect(err).to match(/The list of sources changed/) + end + end + end + describe "with an existing lockfile" do before do - bundle "install" + bundle! "install" + end + + it "installs gems by default to vendor/bundle", :bundler => "< 3" do + bundle! "install --deployment" + expect(out).to include("vendor/bundle") + end + + it "installs gems to custom path if specified", :bundler => "< 3" do + bundle! "install --path vendor/bundle2 --deployment" + expect(out).to include("vendor/bundle2") end it "works with the --deployment flag if you didn't change anything", :bundler => "< 3" do @@ -197,6 +278,19 @@ RSpec.describe "install with --deployment or --frozen" do expect(err).not_to include("You have changed in the Gemfile") end + it "installs gems by default to vendor/bundle when `--deployment` is set via an environment variable", :bundler => "< 3" do + ENV["BUNDLE_DEPLOYMENT"] = "true" + bundle "install" + expect(out).to include("vendor/bundle") + end + + it "installs gems to custom path when deployment mode is set via an environment variable ", :bundler => "< 3" do + ENV["BUNDLE_DEPLOYMENT"] = "true" + ENV["BUNDLE_PATH"] = "vendor/bundle2" + bundle "install" + expect(out).to include("vendor/bundle2") + end + it "can have --frozen set to false via an environment variable" do gemfile <<-G source "#{file_uri_for(gem_repo1)}" @@ -280,80 +374,6 @@ RSpec.describe "install with --deployment or --frozen" do expect(err).not_to include("You have deleted from the Gemfile") end - context "when replacing a host with the same host with credentials" do - let(:success_message) do - "Bundle complete!" - end - - before do - install_gemfile <<-G - source "http://user_name:password@localgemserver.test/" - gem "rack" - G - - lockfile <<-G - GEM - remote: http://localgemserver.test/ - specs: - rack (1.0.0) - - PLATFORMS - #{local} - - DEPENDENCIES - rack - G - - bundle! "config set --local deployment true" - end - - it "prevents the replace by default" do - bundle :install - - expect(err).to match(/The list of sources changed/) - end - - context "when allow_deployment_source_credential_changes is true" do - before { bundle! "config set allow_deployment_source_credential_changes true" } - - it "allows the replace" do - bundle :install - - expect(out).to match(/#{success_message}/) - end - end - - context "when allow_deployment_source_credential_changes is false" do - before { bundle! "config set allow_deployment_source_credential_changes false" } - - it "prevents the replace" do - bundle :install - - expect(err).to match(/The list of sources changed/) - end - end - - context "when BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES env var is true" do - before { ENV["BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES"] = "true" } - - it "allows the replace" do - bundle :install - - expect(out).to match(/#{success_message}/) - end - end - - context "when BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES env var is false" do - before { ENV["BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES"] = "false" } - - it "prevents the replace" do - bundle :install - - expect(err).to match(/The list of sources changed/) - end - end - end - it "remembers that the bundle is frozen at runtime" do bundle! :lock diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb index 4b92de76bb..74270a2316 100644 --- a/spec/runtime/gem_tasks_spec.rb +++ b/spec/runtime/gem_tasks_spec.rb @@ -57,6 +57,20 @@ RSpec.describe "require 'bundler/gem_tasks'" do expect(err).to be_empty end + context "rake build when path has spaces" do + before do + spaced_bundled_app = tmp.join("bundled app") + FileUtils.mv bundled_app, spaced_bundled_app + Dir.chdir(spaced_bundled_app) + end + + it "still runs successfully" do + bundle! "exec rake build" + + expect(err).to be_empty + end + end + it "adds 'pkg' to rake/clean's CLOBBER" do with_gem_path_as(Spec::Path.base_system_gems.to_s) do sys_exec! %(#{rake} -e 'load "Rakefile"; puts CLOBBER.inspect') diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb index 7bca681e70..7f4cafc239 100644 --- a/spec/support/artifice/endpoint.rb +++ b/spec/support/artifice/endpoint.rb @@ -4,7 +4,7 @@ require_relative "../path" require Spec::Path.lib_dir.join("bundler/deprecate") include Spec::Path -$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra}-*/lib")].map(&:to_s)) +$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra,ruby2_keywords}-*/lib")].map(&:to_s)) require "artifice" require "sinatra/base" diff --git a/spec/support/artifice/endpoint_500.rb b/spec/support/artifice/endpoint_500.rb index f98e7e3bc2..7c1c4365bb 100644 --- a/spec/support/artifice/endpoint_500.rb +++ b/spec/support/artifice/endpoint_500.rb @@ -3,7 +3,7 @@ require_relative "../path" include Spec::Path -$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra}-*/lib")].map(&:to_s)) +$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra,ruby2_keywords}-*/lib")].map(&:to_s)) require "artifice" require "sinatra/base" diff --git a/spec/support/artifice/windows.rb b/spec/support/artifice/windows.rb index 21170c81d9..c31c6fff79 100644 --- a/spec/support/artifice/windows.rb +++ b/spec/support/artifice/windows.rb @@ -3,7 +3,7 @@ require_relative "../path" include Spec::Path -$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra}-*/lib")].map(&:to_s)) +$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra,ruby2_keywords}-*/lib")].map(&:to_s)) require "artifice" require "sinatra/base" diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 7d1bd65185..e9c9e766cf 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -210,8 +210,10 @@ module Spec yield stdin, stdout, wait_thr if block_given? stdin.close - command_execution.stdout = Thread.new { stdout.read }.value.strip - command_execution.stderr = Thread.new { stderr.read }.value.strip + stdout_read_thread = Thread.new { stdout.read } + stderr_read_thread = Thread.new { stderr.read } + command_execution.stdout = stdout_read_thread.value.strip + command_execution.stderr = stderr_read_thread.value.strip command_execution.exitstatus = wait_thr && wait_thr.value.exitstatus end diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb index b76f493d01..dc6e0bd1e9 100644 --- a/spec/support/indexes.rb +++ b/spec/support/indexes.rb @@ -45,7 +45,7 @@ module Spec def should_conflict_on(names) got = resolve - flunk "The resolve succeeded with: #{got.map(&:full_name).sort.inspect}" + raise "The resolve succeeded with: #{got.map(&:full_name).sort.inspect}" rescue Bundler::VersionConflict => e expect(Array(names).sort).to eq(e.conflicts.sort) end |