Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b61a391
bump all bundler 2 features (except stderr) to bundler 3
Oct 29, 2018
6e270f8
run rubocop with --auto-gen-config
Oct 29, 2018
9ecc86f
Merge #6763
Oct 29, 2018
fbc4ea3
resolve rubocop error
Oct 29, 2018
7ecd3b4
remove 1.X mode, add 3.X mode and update versions of ruby
Oct 30, 2018
56a4bb8
move all bundler 2, < 2 spec scopes to bundler 3, < 3
Oct 30, 2018
11b34e0
adjust major_deprecation version for relevent features
Nov 4, 2018
856da39
puts major upgrade warning under a feature flag
Nov 4, 2018
ed413c6
bump features/flags in spec helpers to bundler 3
Nov 4, 2018
3668728
fix breaking specs
Nov 4, 2018
1ed3341
Version 2.0.0.pre.1 with changelog
Nov 4, 2018
ca48374
Merge #6740
bundlerbot Oct 16, 2018
110f841
Merge #6741
bundlerbot Oct 16, 2018
2dd5d81
Merge #6742
bundlerbot Oct 17, 2018
02cd169
Merge #6743
bundlerbot Nov 16, 2018
a7207e1
Merge #6786
bundlerbot Nov 16, 2018
fd2ae03
set warning message flag to show in bundler 3
Nov 16, 2018
7e2ac28
Merge pull request #6752 from bundler/indirect/backport-6737
indirect Oct 21, 2018
d9844e8
Merge #6798
bundlerbot Nov 26, 2018
e7b7c8c
remove :github source declaration from new gem template
Nov 27, 2018
ec83222
fix failing major deprecation error spec
Nov 27, 2018
d784c10
Version 2.0.0.pre.2 with Changelog
Nov 27, 2018
f8e3676
bump bundler_2_mode in inject spec
Dec 4, 2018
1871506
Merge #6818
bundlerbot Dec 1, 2018
ba47a76
fix breaking edge case spec
Dec 4, 2018
04e1658
Version 2.0.0 with changelog
Dec 4, 2018
7f878bf
Revert "Version 2.0.0 with changelog"
Dec 28, 2018
58b3d90
Merge #6853
bundlerbot Dec 26, 2018
55772e1
Merge #6849
bundlerbot Dec 27, 2018
d29eceb
update gemspec to require RubyGems 3.0.0
Dec 28, 2018
13ca000
update tested versions of RubyGems in travis
Dec 28, 2018
00caa91
Version 2.0.0.pre.3 wih changelog
Dec 28, 2018
a0ee4cd
add RubyGems v3.0.1 to rg clone task
Dec 28, 2018
53e4ffa
Merge #6856
bundlerbot Dec 30, 2018
526bb66
update CHANGELOG with new changes and release
Dec 30, 2018
d715ae9
Bundler 2.0 with changelog
Jan 3, 2019
81d3ecf
Lower required RubyGems to 2.5 or greater
indirect Jan 3, 2019
31678a3
update tested rubygems in travis
Jan 3, 2019
dc06fab
Merge #6867
Jan 4, 2019
d7ad219
Version 2.0.1 with changelog
Jan 4, 2019
84a5dea
Merge branch '2-0-stable'
Jan 4, 2019
8d0ef4a
We always print to stderr now
deivid-rodriguez Jan 4, 2019
c8e7a7d
Remove now unnecessary ruby guards in specs
deivid-rodriguez Jan 4, 2019
341b10d
Bundler 3 development has started
deivid-rodriguez Jan 4, 2019
b759676
Remove 1.x mode from TravisCI
deivid-rodriguez Jan 4, 2019
33436ec
Fix `with_clean_env` deprecation target
deivid-rodriguez Jan 4, 2019
dac3598
Update config specs to not use the deprecated way
deivid-rodriguez Jan 4, 2019
fa24412
Remove more unnecessary ruby guards from specs
deivid-rodriguez Jan 4, 2019
ee89772
Don't remove `viz` command in bundler 3
deivid-rodriguez Jan 4, 2019
303129f
Remove 3.x mode from test matrix
deivid-rodriguez Jan 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inherit_from:
- .rubocop_todo.yml

AllCops:
TargetRubyVersion: 1.9
TargetRubyVersion: 2.3
Exclude:
- tmp/**/*
- lib/bundler/vendor/**/*
Expand Down
78 changes: 60 additions & 18 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-09-17 16:46:43 +0900 using RuboCop version 0.50.0.
# on 2019-01-04 16:12:29 +1100 using RuboCop version 0.50.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -13,7 +13,7 @@
Layout/IndentArray:
EnforcedStyle: consistent

# Offense count: 40
# Offense count: 46
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
Expand All @@ -29,7 +29,7 @@ Layout/MultilineMethodCallIndentation:
- 'lib/bundler/cli/common.rb'
- 'spec/bundler/plugin/source_list_spec.rb'

# Offense count: 31
# Offense count: 30
Lint/AmbiguousBlockAssociation:
Exclude:
- 'lib/bundler/definition.rb'
Expand All @@ -51,7 +51,7 @@ Lint/EmptyWhen:
- 'lib/bundler/friendly_errors.rb'
- 'spec/support/builders.rb'

# Offense count: 3
# Offense count: 4
Lint/HandleExceptions:
Exclude:
- 'lib/bundler/psyched_yaml.rb'
Expand Down Expand Up @@ -86,9 +86,17 @@ Lint/RescueException:
- 'lib/bundler/rubygems_integration.rb'
- 'lib/bundler/worker.rb'

# Offense count: 29
# Offense count: 13
Lint/RescueWithoutErrorClass:
Enabled: false
Exclude:
- 'Rakefile'
- 'lib/bundler/friendly_errors.rb'
- 'lib/bundler/resolver.rb'
- 'lib/bundler/retry.rb'
- 'lib/bundler/source/rubygems.rb'
- 'spec/support/artifice/compact_index.rb'
- 'spec/support/helpers.rb'
- 'spec/support/matchers.rb'

# Offense count: 2
Lint/ShadowedException:
Expand All @@ -102,13 +110,12 @@ Lint/UselessAccessModifier:
Exclude:
- 'lib/bundler/fetcher.rb'

# Offense count: 6
# Offense count: 1
Lint/UselessAssignment:
Exclude:
- 'lib/bundler/index.rb'
- 'lib/bundler/installer.rb'

# Offense count: 2564
# Offense count: 2856
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Expand All @@ -119,7 +126,7 @@ Naming/AccessorMethodName:
Exclude:
- 'lib/bundler/source/git.rb'

# Offense count: 31
# Offense count: 33
# Configuration parameters: Blacklist.
# Blacklist: END, (?-mix:EO[A-Z]{1})
Naming/HeredocDelimiterNaming:
Expand Down Expand Up @@ -160,7 +167,7 @@ Performance/HashEachMethods:
- 'spec/support/builders.rb'
- 'spec/support/helpers.rb'

# Offense count: 7
# Offense count: 8
# Cop supports --auto-correct.
Performance/RedundantBlockCall:
Exclude:
Expand All @@ -183,6 +190,10 @@ Performance/RedundantMerge:
Exclude:
- 'lib/bundler/cli/gem.rb'

# Offense count: 35
Performance/UnfreezeString:
Enabled: false

# Offense count: 4
Security/Eval:
Exclude:
Expand All @@ -204,7 +215,7 @@ Style/CaseEquality:
- 'lib/bundler/match_platform.rb'
- 'lib/bundler/rubygems_ext.rb'

# Offense count: 27
# Offense count: 28
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Expand All @@ -226,7 +237,7 @@ Style/ConditionalAssignment:
- 'lib/bundler/source/git.rb'
- 'lib/bundler/source/rubygems.rb'

# Offense count: 167
# Offense count: 169
Style/Documentation:
Enabled: false

Expand All @@ -243,7 +254,7 @@ Style/EmptyMethod:
- 'lib/bundler/ui/silent.rb'
- 'spec/support/artifice/fail.rb'

# Offense count: 5
# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
# SupportedStyles: when_needed, always, never
Expand All @@ -270,7 +281,7 @@ Style/GlobalVars:
- 'lib/bundler/cli.rb'
- 'spec/spec_helper.rb'

# Offense count: 12
# Offense count: 11
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
Expand All @@ -283,7 +294,6 @@ Style/GuardClause:
- 'lib/bundler/runtime.rb'
- 'lib/bundler/source/path/installer.rb'
- 'lib/bundler/source_list.rb'
- 'spec/commands/newgem_spec.rb'
- 'spec/support/sometimes.rb'

# Offense count: 9
Expand Down Expand Up @@ -327,14 +337,14 @@ Style/MultilineIfModifier:
- 'lib/bundler/runtime.rb'
- 'lib/bundler/source/rubygems.rb'

# Offense count: 5
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'lib/bundler/gem_helper.rb'
- 'lib/bundler/cli/common.rb'
- 'lib/bundler/mirror.rb'
- 'lib/bundler/source/path.rb'

Expand All @@ -360,6 +370,38 @@ Style/RaiseArgs:
- 'spec/bundler/rubygems_integration_spec.rb'
- 'spec/bundler/shared_helpers_spec.rb'

# Offense count: 24
# Cop supports --auto-correct.
Style/RedundantFreeze:
Exclude:
- 'bin/bundle1'
- 'bin/bundle2'
- 'lib/bundler.rb'
- 'lib/bundler/endpoint_specification.rb'
- 'lib/bundler/environment_preserver.rb'
- 'lib/bundler/index.rb'
- 'lib/bundler/injector.rb'
- 'lib/bundler/installer.rb'
- 'lib/bundler/lockfile_generator.rb'
- 'lib/bundler/lockfile_parser.rb'
- 'lib/bundler/plugin.rb'
- 'lib/bundler/resolver/spec_group.rb'
- 'lib/bundler/source/path.rb'
- 'spec/bundler/shared_helpers_spec.rb'

# Offense count: 40
# Cop supports --auto-correct.
# Configuration parameters: ConvertCodeThatCanStartToReturnNil.
Style/SafeNavigation:
Enabled: false

# Offense count: 57
# Cop supports --auto-correct.
# Configuration parameters: MinSize, SupportedStyles.
# SupportedStyles: percent, brackets
Style/SymbolArray:
EnforcedStyle: brackets

# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ jobs:
- rvm: ruby-head
env: RGV=master
stage: test
# 1.x mode (we want to keep stuff passing in 1.x mode for now)
- rvm: 2.6.0
env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
stage: test
- rvm: 1.8.7
env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
stage: test

allow_failures:
- rvm: ruby-head
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 2.0.1 (2019-01-04)

Changes:

- Relaxed RubyGems requirement to `>= 2.5.0` ([#6867](https://github.com/bundler/bundler/pull/6867))

## 2.0.0 (2019-01-03)

No new changes

## 2.0.0.pre.3 (2018-12-30)

Breaking Changes:

- Bundler 2 now requires RubyGems 3.0.0 at minimum

Changes:

- Ruby 2.6 compatibility fixes (@segiddins)
- Import changes from Bundler 1.17.3 release

Note: To upgrade your Gemfile to Bundler 2 you will need to run `bundle update --bundler`

## 1.17.3 (2018-12-27)

Bugfixes:
Expand All @@ -13,6 +36,28 @@ Documentation:

- Add compatibility for bundler merge with Ruby 2.6

## 2.0.0.pre.2 (2018-11-27)

Breaking Changes:

- `:github` source in the Gemfile now defaults to using HTTPS

Changes

- Add compatibility for Bundler merge into ruby-src

Note: To upgrade your Gemfile to Bundler 2 you will need to run `bundle update --bundler`

## 2.0.0.pre.1 (2018-11-09)

Breaking Changes:

- Dropped support for versions of Ruby < 2.3
- Dropped support for version of RubyGems < 2.5
- Moved error messages from STDOUT to STDERR

Note: To upgrade your Gemfile to Bundler 2 you will need to run `bundle update --bundler`

## 1.17.1 (2018-10-25)

- Convert `Pathname`s to `String`s before sorting them, fixing #6760 and #6758 ([#6761](https://github.com/bundler/bundler/pull/6761), @alexggordon)
Expand Down
2 changes: 1 addition & 1 deletion exe/bundle_ruby
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

require "bundler/shared_helpers"

Bundler::SharedHelpers.major_deprecation(2, "the bundle_ruby executable has been removed in favor of `bundle platform --ruby`")
Bundler::SharedHelpers.major_deprecation(3, "the bundle_ruby executable has been removed in favor of `bundle platform --ruby`")

Signal.trap("INT") { exit 1 }

Expand Down
6 changes: 3 additions & 3 deletions lib/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def load
end

def environment
SharedHelpers.major_deprecation 2, "Bundler.environment has been removed in favor of Bundler.load"
SharedHelpers.major_deprecation 3, "Bundler.environment has been removed in favor of Bundler.load"
load
end

Expand Down Expand Up @@ -283,7 +283,7 @@ def original_env
# @deprecated Use `unbundled_env` instead
def clean_env
Bundler::SharedHelpers.major_deprecation(
2,
3,
"`Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \
"If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`"
)
Expand Down Expand Up @@ -322,7 +322,7 @@ def with_original_env
# @deprecated Use `with_unbundled_env` instead
def with_clean_env
Bundler::SharedHelpers.major_deprecation(
2,
3,
"`Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \
"If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/capistrano.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require "bundler/shared_helpers"
Bundler::SharedHelpers.major_deprecation 2,
Bundler::SharedHelpers.major_deprecation 3,
"The Bundler task for Capistrano. Please use https://github.com/capistrano/bundler"

# Capistrano task for Bundler.
Expand Down
40 changes: 19 additions & 21 deletions lib/bundler/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def remove(*gems)
"Include gems that are part of the specified named group."
map "i" => "install"
def install
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
SharedHelpers.major_deprecation(3, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
require "bundler/cli/install"
Bundler.settings.temporary(:no_install => false) do
Install.new(options.dup).run
Expand Down Expand Up @@ -275,7 +275,7 @@ def install
method_option "all", :type => :boolean, :banner =>
"Update everything."
def update(*gems)
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
SharedHelpers.major_deprecation(3, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
require "bundler/cli/update"
Update.new(options, gems).run
end
Expand Down Expand Up @@ -303,7 +303,7 @@ def show(gem_name = nil)
old_argv = ARGV.join(" ")
new_argv = [new_command, *new_arguments.compact].join(" ")

Bundler::SharedHelpers.major_deprecation(2, "use `bundle #{new_argv}` instead of `bundle #{old_argv}`")
Bundler::SharedHelpers.major_deprecation(3, "use `bundle #{new_argv}` instead of `bundle #{old_argv}`")
end
require "bundler/cli/show"
Show.new(options, gem_name).run
Expand Down Expand Up @@ -522,23 +522,21 @@ def licenses
end
end

if Bundler.feature_flag.viz_command?
desc "viz [OPTIONS]", "Generates a visual dependency graph", :hide => true
long_desc <<-D
Viz generates a PNG file of the current Gemfile as a dependency graph.
Viz requires the ruby-graphviz gem (and its dependencies).
The associated gems must also be installed via 'bundle install'.
D
method_option :file, :type => :string, :default => "gem_graph", :aliases => "-f", :desc => "The name to use for the generated file. see format option"
method_option :format, :type => :string, :default => "png", :aliases => "-F", :desc => "This is output format option. Supported format is png, jpg, svg, dot ..."
method_option :requirements, :type => :boolean, :default => false, :aliases => "-R", :desc => "Set to show the version of each required dependency."
method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
def viz
SharedHelpers.major_deprecation 2, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/bundler/bundler-viz"
require "bundler/cli/viz"
Viz.new(options.dup).run
end
desc "viz [OPTIONS]", "Generates a visual dependency graph", :hide => true
long_desc <<-D
Viz generates a PNG file of the current Gemfile as a dependency graph.
Viz requires the ruby-graphviz gem (and its dependencies).
The associated gems must also be installed via 'bundle install'.
D
method_option :file, :type => :string, :default => "gem_graph", :aliases => "-f", :desc => "The name to use for the generated file. see format option"
method_option :format, :type => :string, :default => "png", :aliases => "-F", :desc => "This is output format option. Supported format is png, jpg, svg, dot ..."
method_option :requirements, :type => :boolean, :default => false, :aliases => "-R", :desc => "Set to show the version of each required dependency."
method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
def viz
SharedHelpers.major_deprecation 3, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/bundler/bundler-viz"
require "bundler/cli/viz"
Viz.new(options.dup).run
end

old_gem = instance_method(:gem)
Expand Down Expand Up @@ -606,7 +604,7 @@ def platform
method_option "group", :type => :string, :banner =>
"Install gem into a bundler group"
def inject(name, version)
SharedHelpers.major_deprecation 2, "The `inject` command has been replaced by the `add` command"
SharedHelpers.major_deprecation 3, "The `inject` command has been replaced by the `add` command"
require "bundler/cli/inject"
Inject.new(options.dup, name, version).run
end
Expand Down
Loading