From c1ca77281d60e5b81dd4ba0df36f7ea6abf3f92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 19 Jun 2019 17:01:36 +0200 Subject: [bundler/bundler] Add all platforms to lockfile by default https://github.com/bundler/bundler/commit/3dc509e645 --- spec/bundler/install/gemfile/platform_spec.rb | 26 ++++++++++++++++++++++---- spec/bundler/runtime/require_spec.rb | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'spec') diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb index c096531398..4cbf238416 100644 --- a/spec/bundler/install/gemfile/platform_spec.rb +++ b/spec/bundler/install/gemfile/platform_spec.rb @@ -372,7 +372,7 @@ RSpec.describe "bundle install with platform conditionals" do expect(out).not_to match(/Could not find gem 'some_gem/) end - it "prints a helpful warning when a dependency is unused on any platform" do + it "resolves all platforms by default and without warning messages" do simulate_platform "ruby" simulate_ruby_engine "ruby" @@ -384,9 +384,27 @@ RSpec.describe "bundle install with platform conditionals" do bundle! "install" - expect(err).to include <<-O.strip -The dependency #{Gem::Dependency.new("rack", ">= 0")} will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. - O + expect(err).to be_empty + + lockfile_should_be <<-L + GEM + remote: #{file_uri_for(gem_repo1)}/ + specs: + rack (1.0.0) + + PLATFORMS + java + ruby + x64-mingw32 + x86-mingw32 + x86-mswin32 + + DEPENDENCIES + rack + + BUNDLED WITH + #{Bundler::VERSION} + L end context "when disable_platform_warnings is true" do diff --git a/spec/bundler/runtime/require_spec.rb b/spec/bundler/runtime/require_spec.rb index 958d7cf26a..016fc14dfe 100644 --- a/spec/bundler/runtime/require_spec.rb +++ b/spec/bundler/runtime/require_spec.rb @@ -425,7 +425,7 @@ RSpec.describe "Bundler.require with platform specific dependencies" do source "#{file_uri_for(gem_repo1)}" platforms :#{not_local_tag} do - gem "fail", :require => "omgomg" + gem "platform_specific", :require => "omgomg" end gem "rack", "1.0.0" -- cgit v1.2.3