diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-08-19 17:32:41 -0400 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-08-28 09:48:18 -0500 |
commit | 616394788ededa17409ec893d8befe9f683b54fb (patch) | |
tree | ff113dc4dbd71a29be9309d9827cc0480c3f5d8b | |
parent | cda5ef70e2b07d5d78168b34eeeb9dc86df78894 (diff) | |
download | bundler-616394788ededa17409ec893d8befe9f683b54fb.tar.gz |
Default to packaging all on 2.0
-rw-r--r-- | lib/bundler/cli.rb | 6 | ||||
-rw-r--r-- | spec/cache/git_spec.rb | 2 | ||||
-rw-r--r-- | spec/cache/path_spec.rb | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 12fe7adf01..954e19b530 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -348,7 +348,8 @@ module Bundler map %w[cache] => :package else desc "cache [OPTIONS]", "Cache all the gems to vendor/cache", :hide => true - method_option "all", :type => :boolean, :banner => "Include all sources (including path and git)." + method_option "all", :type => :boolean, :default => Bundler.feature_flag.cache_command_is_package? || nil, + :banner => "Include all sources (including path and git)." method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one" method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache." def cache @@ -358,7 +359,8 @@ module Bundler end desc "#{Bundler.feature_flag.cache_command_is_package? ? :cache : :package} [OPTIONS]", "Locks and then caches all of the gems into vendor/cache" - method_option "all", :type => :boolean, :banner => "Include all sources (including path and git)." + method_option "all", :type => :boolean, :default => Bundler.feature_flag.cache_command_is_package? || nil, + :banner => "Include all sources (including path and git)." method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one" method_option "cache-path", :type => :string, :banner => "Specify a different cache path than the default (vendor/cache)." diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index 562fc881c0..42210f0f3d 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -168,7 +168,7 @@ end expect(the_bundle).to include_gems "has_submodule 1.0" end - it "displays warning message when detecting git repo in Gemfile" do + it "displays warning message when detecting git repo in Gemfile", :bundler => "< 2" do build_git "foo" install_gemfile <<-G diff --git a/spec/cache/path_spec.rb b/spec/cache/path_spec.rb index 327d0abf60..8c6a843476 100644 --- a/spec/cache/path_spec.rb +++ b/spec/cache/path_spec.rb @@ -86,7 +86,7 @@ expect(bundled_app("vendor/cache/bar-1.0")).not_to exist end - it "raises a warning without --all" do + it "raises a warning without --all", :bundler => "< 2" do build_lib "foo" install_gemfile <<-G |