Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Merge branch '2-0-stable'
Browse files Browse the repository at this point in the history
* 2-0-stable: (43 commits)
  remove path that i copied from my personal computer
  Auto merge of #6586 - bundler:segiddins/softer-major-deprecations, r=indirect
  Merge #6941
  Merge #6834
  Version 2.0.1 with changelog
  update tested rubygems in travis
  Lower required RubyGems to 2.5 or greater
  Bundler 2.0 with changelog
  update CHANGELOG with new changes and release
  Merge #6856
  add RubyGems v3.0.1 to rg clone task
  Version 2.0.0.pre.3 wih changelog
  update tested versions of RubyGems in travis
  update gemspec to require RubyGems 3.0.0
  Merge #6849
  Merge #6853
  Revert "Version 2.0.0 with changelog"
  Version 2.0.0 with changelog
  fix breaking edge case spec
  Merge #6818
  ...
  • Loading branch information
colby-swandale committed Feb 11, 2019
2 parents 07980f0 + 115df26 commit 77f4c15
Show file tree
Hide file tree
Showing 61 changed files with 364 additions and 267 deletions.
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
79 changes: 60 additions & 19 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-02-11 23:09:05 +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 @@ -183,6 +190,10 @@ Performance/RedundantMerge:
Exclude:
- 'lib/bundler/cli/gem.rb'

# Offense count: 34
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,24 +237,23 @@ Style/ConditionalAssignment:
- 'lib/bundler/source/git.rb'
- 'lib/bundler/source/rubygems.rb'

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

# Offense count: 17
# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: compact, expanded
Style/EmptyMethod:
Exclude:
- 'exe/bundle_ruby'
- 'lib/bundler/cli.rb'
- 'lib/bundler/plugin/api/source.rb'
- 'lib/bundler/rubygems_integration.rb'
- '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 +280,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 +293,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 +336,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 +369,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
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ 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.1
env: RGV=v2.7.8 BUNDLER_SPEC_SUB_VERSION=1.98
# 3.x mode
- rvm: 2.5.3
stage: test
env: RGV=v3.0.1 BUNDLER_SPEC_SUB_VERSION=3.0.0

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,48 @@
## 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`

## 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.3 (2018-12-27)

Bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def lock(file, preserve_unknown_sections = false)
# i.e., Windows with `git config core.autocrlf=true`
contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match("\r\n")

if @locked_bundler_version
if @locked_bundler_version && Bundler.feature_flag.lockfile_upgrade_warning?
locked_major = @locked_bundler_version.segments.first
current_major = Gem::Version.create(Bundler::VERSION).segments.first

Expand Down
61 changes: 32 additions & 29 deletions lib/bundler/feature_flag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,41 @@ def self.settings_method(name, key, &default)

(1..10).each {|v| define_method("bundler_#{v}_mode?") { major_version >= v } }

settings_flag(:allow_bundler_dependency_conflicts) { bundler_2_mode? }
settings_flag(:allow_offline_install) { bundler_2_mode? }
settings_flag(:auto_clean_without_path) { bundler_2_mode? }
settings_flag(:auto_config_jobs) { bundler_2_mode? }
settings_flag(:cache_all) { bundler_2_mode? }
settings_flag(:cache_command_is_package) { bundler_2_mode? }
settings_flag(:console_command) { !bundler_2_mode? }
settings_flag(:default_install_uses_path) { bundler_2_mode? }
settings_flag(:deployment_means_frozen) { bundler_2_mode? }
settings_flag(:disable_multisource) { bundler_2_mode? }
settings_flag(:allow_bundler_dependency_conflicts) { bundler_3_mode? }
settings_flag(:allow_offline_install) { bundler_3_mode? }
settings_flag(:auto_clean_without_path) { bundler_3_mode? }
settings_flag(:auto_config_jobs) { bundler_3_mode? }
settings_flag(:cache_all) { bundler_3_mode? }
settings_flag(:cache_command_is_package) { bundler_3_mode? }
settings_flag(:console_command) { !bundler_3_mode? }
settings_flag(:default_install_uses_path) { bundler_3_mode? }
settings_flag(:deployment_means_frozen) { bundler_3_mode? }
settings_flag(:disable_multisource) { bundler_3_mode? }
settings_flag(:error_on_stderr) { bundler_2_mode? }
settings_flag(:forget_cli_options) { bundler_2_mode? }
settings_flag(:global_path_appends_ruby_scope) { bundler_2_mode? }
settings_flag(:global_gem_cache) { bundler_2_mode? }
settings_flag(:init_gems_rb) { bundler_2_mode? }
settings_flag(:list_command) { bundler_2_mode? }
settings_flag(:lockfile_uses_separate_rubygems_sources) { bundler_2_mode? }
settings_flag(:only_update_to_newer_versions) { bundler_2_mode? }
settings_flag(:path_relative_to_cwd) { bundler_2_mode? }
settings_flag(:forget_cli_options) { bundler_3_mode? }
settings_flag(:global_path_appends_ruby_scope) { bundler_3_mode? }
settings_flag(:global_gem_cache) { bundler_3_mode? }
settings_flag(:init_gems_rb) { bundler_3_mode? }
settings_flag(:list_command) { bundler_3_mode? }
settings_flag(:lockfile_uses_separate_rubygems_sources) { bundler_3_mode? }
settings_flag(:lockfile_upgrade_warning) { bundler_3_mode? }
settings_flag(:only_update_to_newer_versions) { bundler_3_mode? }
settings_flag(:path_relative_to_cwd) { bundler_3_mode? }
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
settings_flag(:prefer_gems_rb) { bundler_2_mode? }
settings_flag(:print_only_version_number) { bundler_2_mode? }
settings_flag(:setup_makes_kernel_gem_public) { !bundler_2_mode? }
settings_flag(:skip_default_git_sources) { bundler_2_mode? }
settings_flag(:specific_platform) { bundler_2_mode? }
settings_flag(:suppress_install_using_messages) { bundler_2_mode? }
settings_flag(:unlock_source_unlocks_spec) { !bundler_2_mode? }
settings_flag(:update_requires_all_flag) { bundler_2_mode? }
settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_2_mode? }
settings_flag(:viz_command) { !bundler_2_mode? }
settings_flag(:prefer_gems_rb) { bundler_3_mode? }
settings_flag(:print_only_version_number) { bundler_3_mode? }
settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? }
settings_flag(:skip_default_git_sources) { bundler_3_mode? }
settings_flag(:specific_platform) { bundler_3_mode? }
settings_flag(:suppress_install_using_messages) { bundler_3_mode? }
settings_flag(:unlock_source_unlocks_spec) { !bundler_3_mode? }
settings_flag(:update_requires_all_flag) { bundler_3_mode? }
settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_3_mode? }
settings_flag(:viz_command) { !bundler_3_mode? }

settings_option(:default_cli_command) { bundler_2_mode? ? :cli_help : :install }
settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }

settings_method(:github_https?, "github.https") { bundler_2_mode? }

settings_method(:github_https?, "github.https") { bundler_2_mode? }

Expand Down
1 change: 1 addition & 0 deletions lib/bundler/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Settings
ignore_messages
init_gems_rb
list_command
lockfile_upgrade_warning
lockfile_uses_separate_rubygems_sources
major_deprecations
no_install
Expand Down
2 changes: 0 additions & 2 deletions lib/bundler/templates/newgem/Gemfile.tt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in <%= config[:name] %>.gemspec
gemspec
2 changes: 1 addition & 1 deletion lib/bundler/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Bundler
# We're doing this because we might write tests that deal
# with other versions of bundler and we are unsure how to
# handle this better.
VERSION = "2.0.0.dev" unless defined?(::Bundler::VERSION)
VERSION = "2.1.0.dev" unless defined?(::Bundler::VERSION)

def self.overwrite_loaded_gem_version
begin
Expand Down

0 comments on commit 77f4c15

Please sign in to comment.