summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/welcome_message.md2
-rw-r--r--.rubocop_todo.yml194
-rw-r--r--.travis.yml98
-rw-r--r--CHANGELOG.md1136
-rw-r--r--CODE_OF_CONDUCT.md140
-rw-r--r--CONTRIBUTING.md17
-rw-r--r--README.md10
-rw-r--r--Rakefile21
-rwxr-xr-xbin/rubocop2
-rw-r--r--bundler.gemspec5
-rw-r--r--doc/POLICIES.md77
-rw-r--r--doc/README.md2
-rw-r--r--doc/TROUBLESHOOTING.md2
-rw-r--r--doc/contributing/HOW_YOU_CAN_HELP.md2
-rw-r--r--doc/contributing/README.md45
-rw-r--r--doc/development/PULL_REQUESTS.md4
-rw-r--r--doc/development/RELEASING.md9
-rw-r--r--doc/development/SETUP.md24
-rw-r--r--doc/documentation/WRITING.md6
-rw-r--r--doc/playbooks/RELEASING.md147
-rw-r--r--doc/playbooks/TEAM_CHANGES.md43
-rw-r--r--lib/bundler.rb32
-rw-r--r--lib/bundler/cli.rb75
-rw-r--r--lib/bundler/cli/add.rb20
-rw-r--r--lib/bundler/cli/binstubs.rb10
-rw-r--r--lib/bundler/cli/common.rb4
-rw-r--r--lib/bundler/cli/config.rb235
-rw-r--r--lib/bundler/cli/console.rb2
-rw-r--r--lib/bundler/cli/doctor.rb48
-rw-r--r--lib/bundler/cli/install.rb13
-rw-r--r--lib/bundler/cli/list.rb46
-rw-r--r--lib/bundler/cli/outdated.rb12
-rw-r--r--lib/bundler/cli/plugin.rb5
-rw-r--r--lib/bundler/cli/pristine.rb4
-rw-r--r--lib/bundler/cli/remove.rb18
-rw-r--r--lib/bundler/definition.rb62
-rw-r--r--lib/bundler/dependency.rb4
-rw-r--r--lib/bundler/dsl.rb24
-rw-r--r--lib/bundler/endpoint_specification.rb2
-rw-r--r--lib/bundler/env.rb2
-rw-r--r--lib/bundler/feature_flag.rb5
-rw-r--r--lib/bundler/fetcher.rb2
-rw-r--r--lib/bundler/gem_helper.rb71
-rw-r--r--lib/bundler/gem_version_promoter.rb8
-rw-r--r--lib/bundler/injector.rb179
-rw-r--r--lib/bundler/installer.rb35
-rw-r--r--lib/bundler/installer/gem_installer.rb2
-rw-r--r--lib/bundler/installer/parallel_installer.rb11
-rw-r--r--lib/bundler/mirror.rb4
-rw-r--r--lib/bundler/plugin.rb37
-rw-r--r--lib/bundler/plugin/events.rb61
-rw-r--r--lib/bundler/plugin/index.rb10
-rw-r--r--lib/bundler/resolver.rb71
-rw-r--r--lib/bundler/resolver/spec_group.rb8
-rw-r--r--lib/bundler/retry.rb2
-rw-r--r--lib/bundler/rubygems_ext.rb2
-rw-r--r--lib/bundler/runtime.rb12
-rw-r--r--lib/bundler/settings.rb27
-rw-r--r--lib/bundler/settings/validator.rb23
-rw-r--r--lib/bundler/shared_helpers.rb13
-rw-r--r--lib/bundler/source.rb18
-rw-r--r--lib/bundler/source/metadata.rb6
-rw-r--r--lib/bundler/source/rubygems.rb10
-rw-r--r--lib/bundler/spec_set.rb4
-rw-r--r--lib/bundler/templates/newgem/README.md.tt2
-rw-r--r--lib/bundler/templates/newgem/lib/newgem.rb.tt1
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt8
-rw-r--r--lib/bundler/templates/newgem/test/test_helper.rb.tt4
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb38
-rw-r--r--lib/bundler/vendor/thor/lib/thor/base.rb2
-rw-r--r--lib/bundler/vendor/thor/lib/thor/util.rb2
-rw-r--r--lib/bundler/version.rb2
-rw-r--r--lib/bundler/version_ranges.rb56
-rw-r--r--man/bundle-add.ronn15
-rw-r--r--man/bundle-config.ronn7
-rw-r--r--man/bundle-install.ronn20
-rw-r--r--man/bundle-list.ronn20
-rw-r--r--man/bundle-outdated.ronn4
-rw-r--r--man/bundle-remove.ronn23
-rw-r--r--man/bundle-update.ronn16
-rw-r--r--spec/bundler/bundler_spec.rb125
-rw-r--r--spec/bundler/gem_helper_spec.rb2
-rw-r--r--spec/bundler/plugin/events_spec.rb18
-rw-r--r--spec/bundler/plugin_spec.rb63
-rw-r--r--spec/bundler/vendored_persistent_spec.rb2
-rw-r--r--spec/bundler/version_ranges_spec.rb3
-rw-r--r--spec/commands/add_spec.rb112
-rw-r--r--spec/commands/binstubs_spec.rb52
-rw-r--r--spec/commands/clean_spec.rb35
-rw-r--r--spec/commands/config_spec.rb86
-rw-r--r--spec/commands/doctor_spec.rb119
-rw-r--r--spec/commands/exec_spec.rb15
-rw-r--r--spec/commands/inject_spec.rb2
-rw-r--r--spec/commands/install_spec.rb50
-rw-r--r--spec/commands/licenses_spec.rb9
-rw-r--r--spec/commands/list_spec.rb93
-rw-r--r--spec/commands/lock_spec.rb15
-rw-r--r--spec/commands/newgem_spec.rb6
-rw-r--r--spec/commands/outdated_spec.rb51
-rw-r--r--spec/commands/pristine_spec.rb30
-rw-r--r--spec/commands/remove_spec.rb571
-rw-r--r--spec/commands/show_spec.rb9
-rw-r--r--spec/commands/update_spec.rb13
-rw-r--r--spec/commands/viz_spec.rb2
-rw-r--r--spec/install/bundler_spec.rb1
-rw-r--r--spec/install/failure_spec.rb19
-rw-r--r--spec/install/gemfile/platform_spec.rb162
-rw-r--r--spec/install/gemfile/sources_spec.rb29
-rw-r--r--spec/install/gemfile_spec.rb2
-rw-r--r--spec/install/gems/resolving_spec.rb9
-rw-r--r--spec/install/gems/standalone_spec.rb46
-rw-r--r--spec/install/gems/sudo_spec.rb4
-rw-r--r--spec/install/gemspecs_spec.rb4
-rw-r--r--spec/install/path_spec.rb129
-rw-r--r--spec/plugins/hook_spec.rb114
-rw-r--r--spec/plugins/list_spec.rb70
-rw-r--r--spec/quality_es_spec.rb79
-rw-r--r--spec/quality_spec.rb21
-rw-r--r--spec/resolver/basic_spec.rb6
-rw-r--r--spec/runtime/setup_spec.rb8
-rw-r--r--spec/spec_helper.rb4
-rw-r--r--spec/support/artifice/compact_index.rb2
-rw-r--r--spec/support/builders.rb2
-rw-r--r--spec/support/indexes.rb4
-rw-r--r--spec/support/matchers.rb4
-rw-r--r--spec/update/gemfile_spec.rb66
-rw-r--r--task/build_metadata.rake4
-rw-r--r--task/release.rake22
128 files changed, 4332 insertions, 1407 deletions
diff --git a/.github/welcome_message.md b/.github/welcome_message.md
index faacb492e1..e3b0c98b97 100644
--- a/.github/welcome_message.md
+++ b/.github/welcome_message.md
@@ -4,4 +4,4 @@ We use Travis CI to test and make sure your change works functionally and uses a
If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #bundler channel on [Slack](http://slack.bundler.io/).
-For more information about contributing to the Bundler project feel free to review our [CONTRIBUTING](https://github.com/bundler/bundler/blob/master/CONTRIBUTING.md) guide
+For more information about contributing to the Bundler project feel free to review our [CONTRIBUTING](https://github.com/bundler/bundler/blob/master/doc/contributing/README.md) guide
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index f411b8e11d..e8c49c05c4 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,24 +1,11 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2017-05-30 06:35:02 +0900 using RuboCop version 0.49.1.
+# on 2017-09-17 16:46:43 +0900 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
# versions of RuboCop, may require this file to be generated again.
-# Offense count: 2
-# Cop supports --auto-correct.
-Layout/EmptyLinesAroundExceptionHandlingKeywords:
- Exclude:
- - 'Rakefile'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
-Layout/ExtraSpacing:
- Exclude:
- - 'lib/bundler/cli.rb'
-
# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, IndentationWidth.
@@ -26,7 +13,7 @@ Layout/ExtraSpacing:
Layout/IndentArray:
EnforcedStyle: consistent
-# Offense count: 35
+# Offense count: 40
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
@@ -42,23 +29,7 @@ Layout/MultilineMethodCallIndentation:
- 'lib/bundler/cli/common.rb'
- 'spec/bundler/plugin/source_list_spec.rb'
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: AllowForAlignment.
-Layout/SpaceAroundOperators:
- Exclude:
- - 'lib/bundler/retry.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
-# SupportedStyles: space, no_space
-# SupportedStylesForEmptyBraces: space, no_space
-Layout/SpaceInsideBlockBraces:
- Exclude:
- - 'lib/bundler/installer/parallel_installer.rb'
-
-# Offense count: 25
+# Offense count: 31
Lint/AmbiguousBlockAssociation:
Exclude:
- 'lib/bundler/definition.rb'
@@ -67,8 +38,8 @@ Lint/AmbiguousBlockAssociation:
- 'spec/commands/init_spec.rb'
- 'spec/commands/install_spec.rb'
- 'spec/install/gems/flex_spec.rb'
- - 'spec/lock/lockfile_spec.rb'
- 'spec/lock/lockfile_bundler_1_spec.rb'
+ - 'spec/lock/lockfile_spec.rb'
- 'spec/other/major_deprecation_spec.rb'
- 'spec/runtime/setup_spec.rb'
- 'spec/support/helpers.rb'
@@ -80,10 +51,9 @@ Lint/EmptyWhen:
- 'lib/bundler/friendly_errors.rb'
- 'spec/support/builders.rb'
-# Offense count: 4
+# Offense count: 3
Lint/HandleExceptions:
Exclude:
- - 'lib/bundler/installer.rb'
- 'lib/bundler/psyched_yaml.rb'
- 'lib/bundler/vendored_persistent.rb'
@@ -92,6 +62,15 @@ Lint/IneffectiveAccessModifier:
Exclude:
- 'lib/bundler/settings.rb'
+# Offense count: 6
+Lint/InterpolationCheck:
+ Exclude:
+ - 'lib/bundler/dsl.rb'
+ - 'lib/bundler/installer/standalone.rb'
+ - 'spec/commands/binstubs_spec.rb'
+ - 'spec/install/gems/standalone_spec.rb'
+ - 'spec/other/major_deprecation_spec.rb'
+
# Offense count: 3
Lint/NestedMethodDefinition:
Exclude:
@@ -107,6 +86,10 @@ Lint/RescueException:
- 'lib/bundler/rubygems_integration.rb'
- 'lib/bundler/worker.rb'
+# Offense count: 29
+Lint/RescueWithoutErrorClass:
+ Enabled: false
+
# Offense count: 2
Lint/ShadowedException:
Exclude:
@@ -125,18 +108,58 @@ Lint/UselessAssignment:
- 'lib/bundler/index.rb'
- 'lib/bundler/installer.rb'
-# Offense count: 2085
+# Offense count: 2564
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 207
+# Offense count: 1
+Naming/AccessorMethodName:
+ Exclude:
+ - 'lib/bundler/source/git.rb'
+
+# Offense count: 31
+# Configuration parameters: Blacklist.
+# Blacklist: END, (?-mix:EO[A-Z]{1})
+Naming/HeredocDelimiterNaming:
+ Enabled: false
+
+# Offense count: 9
+# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
+# NamePrefix: is_, has_, have_
+# NamePrefixBlacklist: is_, has_, have_
+# NameWhitelist: is_a?
+Naming/PredicateName:
+ Exclude:
+ - 'spec/**/*'
+ - 'lib/bundler/definition.rb'
+ - 'lib/bundler/installer/parallel_installer.rb'
+ - 'lib/bundler/settings.rb'
+ - 'lib/bundler/source/git.rb'
+ - 'lib/bundler/source/git/git_proxy.rb'
+ - 'lib/bundler/source/path.rb'
+
# Offense count: 2
Performance/Caller:
Exclude:
- 'lib/bundler/rubygems_integration.rb'
- 'spec/support/builders.rb'
+# Offense count: 9
+# Cop supports --auto-correct.
+# Configuration parameters: AutoCorrect.
+Performance/HashEachMethods:
+ Exclude:
+ - 'lib/bundler/definition.rb'
+ - 'lib/bundler/dependency.rb'
+ - 'lib/bundler/dsl.rb'
+ - 'lib/bundler/index.rb'
+ - 'lib/bundler/plugin.rb'
+ - 'spec/install/gems/standalone_spec.rb'
+ - 'spec/support/builders.rb'
+ - 'spec/support/helpers.rb'
+
# Offense count: 7
# Cop supports --auto-correct.
Performance/RedundantBlockCall:
@@ -175,18 +198,6 @@ Security/MarshalLoad:
- 'spec/support/artifice/compact_index.rb'
- 'spec/support/artifice/endpoint.rb'
-# Offense count: 2
-# Cop supports --auto-correct.
-Security/YAMLLoad:
- Exclude:
- - 'spec/bundler/yaml_serializer_spec.rb'
- - 'spec/commands/inject_spec.rb'
-
-# Offense count: 1
-Style/AccessorMethodName:
- Exclude:
- - 'lib/bundler/source/git.rb'
-
# Offense count: 3
Style/CaseEquality:
Exclude:
@@ -215,7 +226,7 @@ Style/ConditionalAssignment:
- 'lib/bundler/source/git.rb'
- 'lib/bundler/source/rubygems.rb'
-# Offense count: 160
+# Offense count: 167
Style/Documentation:
Enabled: false
@@ -232,6 +243,20 @@ Style/EmptyMethod:
- 'lib/bundler/ui/silent.rb'
- 'spec/support/artifice/fail.rb'
+# Offense count: 5
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
+# SupportedStyles: when_needed, always, never
+Style/Encoding:
+ Exclude:
+ - 'Rakefile'
+ - 'bundler.gemspec'
+ - 'lib/bundler/friendly_errors.rb'
+ - 'spec/bundler/bundler_spec.rb'
+ - 'spec/install/gemfile_spec.rb'
+ - 'spec/install/gemspecs_spec.rb'
+ - 'spec/quality_es_spec.rb'
+
# Offense count: 1
# Configuration parameters: SupportedStyles.
# SupportedStyles: annotated, template
@@ -245,12 +270,11 @@ Style/GlobalVars:
- 'lib/bundler/cli.rb'
- 'spec/spec_helper.rb'
-# Offense count: 16
+# Offense count: 12
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'lib/bundler/cli/cache.rb'
- - 'lib/bundler/cli/clean.rb'
- 'lib/bundler/cli/install.rb'
- 'lib/bundler/cli/outdated.rb'
- 'lib/bundler/cli/package.rb'
@@ -262,21 +286,6 @@ Style/GuardClause:
- 'spec/commands/newgem_spec.rb'
- 'spec/support/sometimes.rb'
-# Offense count: 1
-Style/IfInsideElse:
- Exclude:
- - 'lib/bundler/cli/install.rb'
-
-# Offense count: 1
-Style/IfUnlessModifier:
- Exclude:
- - 'lib/bundler/dsl.rb'
-
-# Offense count: 1
-Style/IfUnlessModifierOfIfUnless:
- Exclude:
- - 'spec/support/helpers.rb'
-
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: InverseMethods, InverseBlocks.
@@ -299,14 +308,6 @@ Style/MethodMissing:
- 'lib/bundler/remote_specification.rb'
- 'spec/support/builders.rb'
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-# SupportedStyles: separated, grouped
-Style/MixinGrouping:
- Exclude:
- - 'lib/bundler/spec_set.rb'
-
# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: module_function, extend_self
@@ -315,7 +316,7 @@ Style/ModuleFunction:
- 'lib/bundler/shared_helpers.rb'
- 'spec/support/path.rb'
-# Offense count: 11
+# Offense count: 10
# Cop supports --auto-correct.
Style/MultilineIfModifier:
Exclude:
@@ -326,15 +327,7 @@ Style/MultilineIfModifier:
- 'lib/bundler/runtime.rb'
- 'lib/bundler/source/rubygems.rb'
-# Offense count: 3
-# Cop supports --auto-correct.
-Style/NestedParenthesizedCalls:
- Exclude:
- - 'lib/bundler/resolver.rb'
- - 'spec/commands/lock_spec.rb'
- - 'spec/runtime/setup_spec.rb'
-
-# Offense count: 6
+# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
# SupportedStyles: predicate, comparison
@@ -343,22 +336,6 @@ Style/NumericPredicate:
- 'spec/**/*'
- 'lib/bundler/gem_helper.rb'
- 'lib/bundler/mirror.rb'
- - 'lib/bundler/source/git/git_proxy.rb'
- - 'lib/bundler/source/path.rb'
-
-# Offense count: 9
-# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
-# NamePrefix: is_, has_, have_
-# NamePrefixBlacklist: is_, has_, have_
-# NameWhitelist: is_a?
-Style/PredicateName:
- Exclude:
- - 'spec/**/*'
- - 'lib/bundler/definition.rb'
- - 'lib/bundler/installer/parallel_installer.rb'
- - 'lib/bundler/settings.rb'
- - 'lib/bundler/source/git.rb'
- - 'lib/bundler/source/git/git_proxy.rb'
- 'lib/bundler/source/path.rb'
# Offense count: 24
@@ -383,21 +360,6 @@ Style/RaiseArgs:
- 'spec/bundler/rubygems_integration_spec.rb'
- 'spec/bundler/shared_helpers_spec.rb'
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/RedundantParentheses:
- Exclude:
- - 'lib/bundler/cli/console.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment.
-# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
-Style/TernaryParentheses:
- Exclude:
- - 'lib/bundler/cli/common.rb'
- - 'lib/bundler/gem_version_promoter.rb'
-
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
@@ -412,7 +374,7 @@ Style/TrailingCommaInLiteral:
- 'lib/bundler/similarity_detector.rb'
- 'spec/support/artifice/endpoint.rb'
-# Offense count: 7
+# Offense count: 14
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Exclude:
diff --git a/.travis.yml b/.travis.yml
index 322ec069c5..95b959aea1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,11 @@
language: ruby
script: rake spec:travis
before_script:
+ - travis_retry rake -E 'module ::Bundler; VERSION = "0.0.0"; end' override_version
- travis_retry rake spec:travis:deps
- - travis_retry rake override_version
- travis_retry rake man:build
- travis_retry rake spec:rubygems:clone_rubygems_$RGV
-# temporary workaround for https://github.com/travis-ci/travis-ci/issues/8892
-group: deprecated-2017Q4
-
branches:
only:
- master
@@ -31,11 +28,7 @@ addons:
rvm:
- 2.5.1
- 2.4.3
- - 2.3.6
- - 2.2.7
- - 2.1.10
- - 2.0.0
- - 1.9.3
+ - 2.3.7
# Rubygems versions MUST be available as rake tasks
# see Rakefile:125 for the list of possible RGV values
@@ -43,88 +36,27 @@ env:
# We need to know if changes to rubygems will break bundler on release
- RGV=master
# Test the latest rubygems release with all of our supported rubies
- - RGV=v2.7.4
+ - RGV=v2.7.7
matrix:
include:
- - rvm: 2.4.1
- env: RGV=v2.6.8 BUNDLER_SPEC_SUB_VERSION=2.0.0
- # Ruby 2.4, Rubygems 2.6.8 and up
- # Ruby 2.3, Rubygems 2.5.1 and up
- - rvm: 2.2.6
+ # Ruby 2.4, Rubygems 2.6 and up
+ - rvm: 2.4.2
+ env: RGV=v2.6.14
+ # Ruby 2.3, Rubygems 2.5 and up
+ - rvm: 2.3.7
env: RGV=v2.5.2
- # Ruby 2.2, Rubygems 2.4.5 and up
- - rvm: 2.2.6
- env: RGV=v2.4.8
- # Ruby 2.1, Rubygems 2.2.2 and up
- - rvm: 2.1.10
- env: RGV=v2.2.5
- # Ruby 2.0.0, Rubygems 2.0.0 and up
- - rvm: 2.0.0
- env: RGV=v2.2.5
- - rvm: 2.0.0
- env: RGV=v2.1.11
- - rvm: 2.0.0
- env: RGV=v2.0.14
- # Ruby 1.9.3, Rubygems 1.5.3 and up
- - rvm: 1.9.3
- env: RGV=v2.2.5
- - rvm: 1.9.3
- env: RGV=v2.1.11
- - rvm: 1.9.3
- env: RGV=v2.0.14
- - rvm: 1.9.3
- env: RGV=v1.8.29
- - rvm: 1.9.3
- env: RGV=v1.7.2
- - rvm: 1.9.3
- env: RGV=v1.6.2
- - rvm: 1.9.3
- env: RGV=v1.5.3
-
- - rvm: 1.8.7
- env: RGV=v2.6.8
- # Ruby 1.8.7, Rubygems 1.3.6 and up
- - rvm: 1.8.7
- env: RGV=v2.2.5
- # ALLOWED FAILURES
- # since the great Travis image outage, frequent random segfaults :'(
- - rvm: 1.8.7
- env: RGV=v2.0.14
- - rvm: 1.8.7
- env: RGV=v1.8.29
- - rvm: 1.8.7
- env: RGV=v1.7.2
- - rvm: 1.8.7
- env: RGV=v1.6.2
- - rvm: 1.8.7
- env: RGV=v1.5.3
- - rvm: 1.8.7
- env: RGV=v1.4.2
- - rvm: 1.8.7
- env: RGV=v1.3.7
- - rvm: 1.8.7
- env: RGV=v1.3.6
+ - rvm: 2.3.7
+ env: RGV=v2.6.14
# Ruby-head (we want to know how we're doing, but not fail the build)
- rvm: ruby-head
env: RGV=master
+ # 1.x mode (we want to keep stuff passing in 1.x mode for now)
+ - rvm: 2.5.1
+ env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
+ - rvm: 1.8.7
+ env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
allow_failures:
- - rvm: 1.8.7
- env: RGV=v2.0.14
- - rvm: 1.8.7
- env: RGV=v1.8.29
- - rvm: 1.8.7
- env: RGV=v1.7.2
- - rvm: 1.8.7
- env: RGV=v1.6.2
- - rvm: 1.8.7
- env: RGV=v1.5.3
- - rvm: 1.8.7
- env: RGV=v1.4.2
- - rvm: 1.8.7
- env: RGV=v1.3.7
- - rvm: 1.8.7
- env: RGV=v1.3.6
- rvm: ruby-head
env: RGV=master
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a98c87a8a..fe051607ad 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,7 +14,7 @@ Bugfixes:
- Check that Bundler::Deprecate is not an autoload constant ([#6163](https://github.com/bundler/bundler/issues/6163), @eregon)
- Prefer non-pre-release versions when performing a `bundle update --patch` ([#6684](https://github.com/bundler/bundler/issues/6684), @segiddins)
-## 1.16.4 (2017-08-17)
+## 1.16.4 (2018-08-17)
Changes:
@@ -114,7 +114,7 @@ Bugfixes:
- avoid an error when running `bundle update --group` ([#6156](https://github.com/bundler/bundler/issues/6156), @mattbrictson)
- ensure the resolver prefers non-pre-release gems when possible ([#6181](https://github.com/bundler/bundler/issues/6181), @greysteil)
- include bundler's gemspec in the built gem ([#6165](https://github.com/bundler/bundler/issues/6165), @dr-itz)
- - ensure locally installed specs are not overriden by those in remote sources during dependency resolution ([#6072](https://github.com/bundler/bundler/issues/6072), @indirect)
+ - ensure locally installed specs are not overridden by those in remote sources during dependency resolution ([#6072](https://github.com/bundler/bundler/issues/6072), @indirect)
- ensure custom gemfiles are respected in generated binstubs (@pftg)
- fail gracefully when loading a bundler-generated binstub when `bin/bundle` was not generated by bundler ([#6149](https://github.com/bundler/bundler/issues/6149), @hsbt)
- allow `bundle init` to be run even when a parent directory contains a gemfile ([#6205](https://github.com/bundler/bundler/issues/6205), @colby-swandale)
@@ -141,10 +141,10 @@ Features:
Bugfixes:
- - fix a bug where installing on FreeBSD would accidentally raise an error (#6013, @olleolleolle)
+ - fix a bug where installing on FreeBSD would accidentally raise an error ([#6013](https://github.com/bundler/bundler/issues/6013), @olleolleolle)
- fix a regression in 1.16 where pre-release gems could accidentally be resolved even when the gemfile contained no pre-release requirements (@greysteil)
- bundler will avoid making unnecessary network requests to fetch dependency data, fixing a regression introduced in 1.16 (@segiddins)
- - the outdated bundler version message is disabled by default until the message has been fine-tuned (#6004, @segiddins)
+ - the outdated bundler version message is disabled by default until the message has been fine-tuned ([#6004](https://github.com/bundler/bundler/issues/6004), @segiddins)
## 1.16.0.pre.2 (2017-09-06)
@@ -158,51 +158,51 @@ Bugfixes:
Features:
- - allow using non-branch symbolic refs in a git source (#4845, @segiddins)
- - allow absolute paths in the `cache path` setting (#5627, @mal)
+ - allow using non-branch symbolic refs in a git source ([#4845](https://github.com/bundler/bundler/issues/4845), @segiddins)
+ - allow absolute paths in the `cache path` setting ([#5627](https://github.com/bundler/bundler/issues/5627), @mal)
- gems created via `bundle gem` with rspec have `--require spec_helper` in their `.rspec` file (@koic)
- - `bundle env` includes `Gem.ruby` and the `bundle` binstub shebang when they don't match (#5616, @segiddins)
+ - `bundle env` includes `Gem.ruby` and the `bundle` binstub shebang when they don't match ([#5616](https://github.com/bundler/bundler/issues/5616), @segiddins)
- allow passing gem names to `bundle pristine` (@segiddins)
- - `bundle version` and `bundle env` include the commit and build date for the bundler gem (#5049, @segiddins)
- - add the `--shebang` option to `bundle binstubs` (#4070, @segiddins, @Zorbash)
- - gemfiles are `eval`ed one fewer time when running `bundle install` (#4952, #3096, #4417, @segiddins)
+ - `bundle version` and `bundle env` include the commit and build date for the bundler gem ([#5049](https://github.com/bundler/bundler/issues/5049), @segiddins)
+ - add the `--shebang` option to `bundle binstubs` ([#4070](https://github.com/bundler/bundler/issues/4070), @segiddins, @Zorbash)
+ - gemfiles are `eval`ed one fewer time when running `bundle install` ([#4952](https://github.com/bundler/bundler/issues/4952), [#3096](https://github.com/bundler/bundler/issues/3096), [#4417](https://github.com/bundler/bundler/issues/4417), @segiddins)
- the `fileutils` gem is now vendored so different versions of the gem can be activated (@segiddins)
- - speed up no-op installations (#5842, @segiddins)
+ - speed up no-op installations ([#5842](https://github.com/bundler/bundler/issues/5842), @segiddins)
- default to keeping the lockfile in the default gem template (@deivid-rodriguez)
- - add a special bundler binstub that ensures the correct version of bundler is activated (#5876, @segiddins)
+ - add a special bundler binstub that ensures the correct version of bundler is activated ([#5876](https://github.com/bundler/bundler/issues/5876), @segiddins)
- speed up dependency resolution and ensure that all resolvable gemfiles can be installed (@segiddins, @greysteil)
- - add a `bundle list` command that prints the gems in use (#4754, @colby-swandale)
+ - add a `bundle list` command that prints the gems in use ([#4754](https://github.com/bundler/bundler/issues/4754), @colby-swandale)
- allow adding credentials to a gem source during deployment when `allow_deployment_source_credential_changes` is set (@adrian-gomez)
- making an outdated (and insecure) TLS connection to rubygems.org will print a warning (@segiddins)
Bugfixes:
- - allow configuring a mirror fallback timeout without a trailing slash (#4830, @segiddins)
+ - allow configuring a mirror fallback timeout without a trailing slash ([#4830](https://github.com/bundler/bundler/issues/4830), @segiddins)
- fix handling of mirrors for file: urls that contain upper-case characters (@segiddins)
- list the correct gem host for `rake release` when `allowed_push_host` has been set (@mdeering)
- - ensure `Bundler.original_env` preserves all env keys that bundler sets (#5700, @segiddins)
+ - ensure `Bundler.original_env` preserves all env keys that bundler sets ([#5700](https://github.com/bundler/bundler/issues/5700), @segiddins)
- ensure `bundle pristine` removes files added to a git gem (@segiddins)
- - load plugin files from path gems before gem installation (#5429, @segiddins)
- - ensure gems containing manpages are properly set up (#5730, @segiddins)
+ - load plugin files from path gems before gem installation ([#5429](https://github.com/bundler/bundler/issues/5429), @segiddins)
+ - ensure gems containing manpages are properly set up ([#5730](https://github.com/bundler/bundler/issues/5730), @segiddins)
- avoid fetching remote specs when all effected gems are in groups that are not being installed (@segiddins)
- - allow `BUNDLE_GEMFILE` to be a relative path (#5712, @gxespino)
- - show a more helpful error message when a gem fails to install due to a corrupted lockfile (#5846, @segiddins)
- - add a process lock to allow multiple concurrent `bundle install`s (#5851, @stefansedich)
+ - allow `BUNDLE_GEMFILE` to be a relative path ([#5712](https://github.com/bundler/bundler/issues/5712), @gxespino)
+ - show a more helpful error message when a gem fails to install due to a corrupted lockfile ([#5846](https://github.com/bundler/bundler/issues/5846), @segiddins)
+ - add a process lock to allow multiple concurrent `bundle install`s ([#5851](https://github.com/bundler/bundler/issues/5851), @stefansedich)
- ensure that specifications always return an array for `#extensions` (@greysteil)
- print a helpful error message when using a gem in the Gemfile with an empty name (@colby-swandale)
- ensure that all gemfiles are included in `bundle env` (@segiddins)
- use ssl client cert and ca cert settings from gem configuration as fallbacks (@stan3)
- - avoid global namespace pollution when loading gems (#5958, @shyouhei)
+ - avoid global namespace pollution when loading gems ([#5958](https://github.com/bundler/bundler/issues/5958), @shyouhei)
- avoid running a complete re-resolve on `bundle update --bundler` (@segiddins)
- allow `bundle binstubs --standalone` to work without `path` being set (@colby-swandale)
- - fix support for bundle paths that include jars or wars on jruby (#5975, @torcido)
+ - fix support for bundle paths that include jars or wars on jruby ([#5975](https://github.com/bundler/bundler/issues/5975), @torcido)
## 1.15.4 (2017-08-19)
Bugfixes:
- handle file conflicts gracefully in `bundle gem` (@rafaelfranca, @segiddins)
- - bundler will fail gracefully when the bundle path contains the system path separator (#5485, ajwann)
+ - bundler will fail gracefully when the bundle path contains the system path separator ([#5485](https://github.com/bundler/bundler/issues/5485), ajwann)
- failed gem downloads will be retried consistently across different RubyGems versions (@shayonj)
- `bundle pristine` will respect build options while re-building native extensions (@NickLaMuro)
@@ -210,7 +210,7 @@ Bugfixes:
Bugfixes:
- - ensure that empty strings passed to `bundle config` are serialized & parsed properly (#5881, @segiddins)
+ - ensure that empty strings passed to `bundle config` are serialized & parsed properly ([#5881](https://github.com/bundler/bundler/issues/5881), @segiddins)
- avoid printing an outdated version warning when running a parseable command (@segiddins)
## 1.15.2 (2017-07-17)
@@ -221,24 +221,24 @@ Features:
Bugfixes:
- - inline gemfiles work when `BUNDLE_BIN` is set (#5847, @segiddins)
- - avoid using the old dependency API when there are no changes to the compact index files (#5373, @greysteil)
- - fail gracefully when the full index serves gemspecs with invalid dependencies (#5797, @segiddins)
+ - inline gemfiles work when `BUNDLE_BIN` is set ([#5847](https://github.com/bundler/bundler/issues/5847), @segiddins)
+ - avoid using the old dependency API when there are no changes to the compact index files ([#5373](https://github.com/bundler/bundler/issues/5373), @greysteil)
+ - fail gracefully when the full index serves gemspecs with invalid dependencies ([#5797](https://github.com/bundler/bundler/issues/5797), @segiddins)
- support installing gemfiles that use `eval_gemfile`, `:path` gems with relative paths, and `--deployment` simultaneously (@NickLaMuro)
- `bundle config` will print settings as the type they are interpreted as (@segiddins)
- - respect the `no_proxy` environment variable when making network requests (#5781, @jakauppila)
+ - respect the `no_proxy` environment variable when making network requests ([#5781](https://github.com/bundler/bundler/issues/5781), @jakauppila)
- commands invoked with `--verbose` will not have default flags printed (@segiddins)
- - allow `bundle viz` to work when another gem has a requirable `grapviz` file (#5707, @segiddins)
- - ensure bundler puts activated gems on the `$LOAD_PATH` in a consistent order (#5696, @segiddins)
+ - allow `bundle viz` to work when another gem has a requirable `grapviz` file ([#5707](https://github.com/bundler/bundler/issues/5707), @segiddins)
+ - ensure bundler puts activated gems on the `$LOAD_PATH` in a consistent order ([#5696](https://github.com/bundler/bundler/issues/5696), @segiddins)
## 1.15.1 (2017-06-02)
Bugfixes:
- - `bundle lock --update GEM` will fail gracefully when the gem is not in the lockfile (#5693, @segiddins)
+ - `bundle lock --update GEM` will fail gracefully when the gem is not in the lockfile ([#5693](https://github.com/bundler/bundler/issues/5693), @segiddins)
- `bundle init --gemspec` will fail gracefully when the gemspec is invalid (@colby-swandale)
- - `bundle install --force` works when the gemfile contains git gems (#5678, @segiddins)
- - `bundle env` will print well-formed markdown when there are no settings (#5677, @segiddins)
+ - `bundle install --force` works when the gemfile contains git gems ([#5678](https://github.com/bundler/bundler/issues/5678), @segiddins)
+ - `bundle env` will print well-formed markdown when there are no settings ([#5677](https://github.com/bundler/bundler/issues/5677), @segiddins)
## 1.15.0 (2017-05-19)
@@ -249,7 +249,7 @@ This space intentionally left blank.
Bugfixes:
- avoid conflicts when `Gem.finish_resolve` is called after the bundle has been set up (@segiddins)
- - ensure that `Gem::Specification.find_by_name` always returns an object that can have `#to_spec` called on it (#5592, @jules2689)
+ - ensure that `Gem::Specification.find_by_name` always returns an object that can have `#to_spec` called on it ([#5592](https://github.com/bundler/bundler/issues/5592), @jules2689)
## 1.15.0.pre.3 (2017-04-30)
@@ -259,32 +259,32 @@ Bugfixes:
- ensure that `open-uri` is not loaded after `bundle exec` (@segiddins)
- print a helpful error message when an activated default gem conflicts with
a gem in the gemfile (@segiddins)
- - only shorten `ref` option for git gems when it is a SHA (#5620, @segiddins)
+ - only shorten `ref` option for git gems when it is a SHA ([#5620](https://github.com/bundler/bundler/issues/5620), @segiddins)
## 1.15.0.pre.2 (2017-04-23)
Bugfixes:
- - ensure pre-existing fit caches are updated from remote sources (#5423, @alextaylor000)
- - avoid duplicating specs in the lockfile after updating with the gem uninstalled (#5599, @segiddins)
- - ensure git gems have their extensions available at runtime (#5594, @jules2689, @segiddins)
+ - ensure pre-existing fit caches are updated from remote sources ([#5423](https://github.com/bundler/bundler/issues/5423), @alextaylor000)
+ - avoid duplicating specs in the lockfile after updating with the gem uninstalled ([#5599](https://github.com/bundler/bundler/issues/5599), @segiddins)
+ - ensure git gems have their extensions available at runtime ([#5594](https://github.com/bundler/bundler/issues/5594), @jules2689, @segiddins)
## 1.15.0.pre.1 (2017-04-16)
Features:
- - print a notification when a newer version of bundler is available (#4683, @segiddins)
- - add man pages for all bundler commands (#4988, @feministy)
+ - print a notification when a newer version of bundler is available ([#4683](https://github.com/bundler/bundler/issues/4683), @segiddins)
+ - add man pages for all bundler commands ([#4988](https://github.com/bundler/bundler/issues/4988), @feministy)
- add the `bundle info` command (@fredrb, @colby-swandale)
- all files created with `bundle gem` comply with the bundler style guide (@zachahn)
- - if installing a gem fails, print out the reason the gem needed to be installed (#5078, @segiddins)
+ - if installing a gem fails, print out the reason the gem needed to be installed ([#5078](https://github.com/bundler/bundler/issues/5078), @segiddins)
- allow setting `gem.push_key` to set the key used when running `rake release` (@DTrierweiler)
- - print gem versions that are regressing during `bundle update` in yellow (#5506, @brchristian)
+ - print gem versions that are regressing during `bundle update` in yellow ([#5506](https://github.com/bundler/bundler/issues/5506), @brchristian)
- avoid printing extraneous dependencies when the resolver encounters a conflict (@segiddins)
- - add the `bundle issue` command that prints instructions for reporting issues (#4871, @jonathanpike)
- - add `--source` and `--group` options to the `bundle inject` command (#5452, @Shekharrajak)
+ - add the `bundle issue` command that prints instructions for reporting issues ([#4871](https://github.com/bundler/bundler/issues/4871), @jonathanpike)
+ - add `--source` and `--group` options to the `bundle inject` command ([#5452](https://github.com/bundler/bundler/issues/5452), @Shekharrajak)
- add the `bundle add` command to add a gem to the gemfile (@denniss)
- - add the `bundle pristine` command to re-install gems from cached `.gem` files (#4509, @denniss)
+ - add the `bundle pristine` command to re-install gems from cached `.gem` files ([#4509](https://github.com/bundler/bundler/issues/4509), @denniss)
- add a `--parseable` option for `bundle config` (@JuanitoFatas, @colby-swandale)
Performance:
@@ -298,95 +298,95 @@ Performance:
Bugfixes:
- - fix cases where `bundle update` would print a resolver conflict instead of updating the selected gems (#5031, #5095, @segiddins)
+ - fix cases where `bundle update` would print a resolver conflict instead of updating the selected gems ([#5031](https://github.com/bundler/bundler/issues/5031), [#5095](https://github.com/bundler/bundler/issues/5095), @segiddins)
- print out a stack trace after an interrupt when running in debug mode (@segiddins)
- print out when bundler starts fetching a gem from a remote server (@segiddins)
- - fix `bundle gem` failing when `git` is unavailable (#5458, @Shekharrajak, @colby-swandale)
- - suggest the appropriate command to unfreeze a bundle (#5009, @denniss)
- - ensure nested calls to `bundle exec` resolve default gems correctly (#5500, @segiddins)
+ - fix `bundle gem` failing when `git` is unavailable ([#5458](https://github.com/bundler/bundler/issues/5458), @Shekharrajak, @colby-swandale)
+ - suggest the appropriate command to unfreeze a bundle ([#5009](https://github.com/bundler/bundler/issues/5009), @denniss)
+ - ensure nested calls to `bundle exec` resolve default gems correctly ([#5500](https://github.com/bundler/bundler/issues/5500), @segiddins)
- ensure that a plugin failing to install doesn't uninstall other plugins (@kerrizor, @roseaboveit)
- - ensure `socket` is required before being referenced (#5533, @rafaelfranca)
- - allow running `bundle outdated` when gems aren't installed locally (#5553, @segiddins)
- - print a helpful error when `bundle exec`ing to a gem that isn't included in the bundle (#5487, @segiddins)
- - print an error message when a non-git gem is given a `branch` option (#5530, @colby-swandale)
+ - ensure `socket` is required before being referenced ([#5533](https://github.com/bundler/bundler/issues/5533), @rafaelfranca)
+ - allow running `bundle outdated` when gems aren't installed locally ([#5553](https://github.com/bundler/bundler/issues/5553), @segiddins)
+ - print a helpful error when `bundle exec`ing to a gem that isn't included in the bundle ([#5487](https://github.com/bundler/bundler/issues/5487), @segiddins)
+ - print an error message when a non-git gem is given a `branch` option ([#5530](https://github.com/bundler/bundler/issues/5530), @colby-swandale)
- allow interrupts to exit the process after gems have been installed (@segiddins)
- - print the underlying error when downloading gem metadata fails (#5579, @segiddins)
- - avoid deadlocking when installing with a lockfile that is missing dependencies (#5378, #5480, #5519, #5526, #5529, #5549, #5572, @segiddins)
+ - print the underlying error when downloading gem metadata fails ([#5579](https://github.com/bundler/bundler/issues/5579), @segiddins)
+ - avoid deadlocking when installing with a lockfile that is missing dependencies ([#5378](https://github.com/bundler/bundler/issues/5378), [#5480](https://github.com/bundler/bundler/issues/5480), [#5519](https://github.com/bundler/bundler/issues/5519), [#5526](https://github.com/bundler/bundler/issues/5526), [#5529](https://github.com/bundler/bundler/issues/5529), [#5549](https://github.com/bundler/bundler/issues/5549), [#5572](https://github.com/bundler/bundler/issues/5572), @segiddins)
## 1.14.6 (2017-03-03)
Bugfixes:
- - avoid undefined constant `Bundler::Plugin::API::Source` exception (#5409, @segiddins)
+ - avoid undefined constant `Bundler::Plugin::API::Source` exception ([#5409](https://github.com/bundler/bundler/issues/5409), @segiddins)
- avoid incorrect warnings about needing to enable `specific_platform` (@segiddins)
- - fail gracefully when the compact index does not send an ETag (#5463, @olleolleolle)
- - ensure `bundle outdated --local` shows all outdated gems (#5430, @denniss)
- - fix a case where ruby version requirements could lead to incorrect resolver conflicts (#5425, @segiddins)
+ - fail gracefully when the compact index does not send an ETag ([#5463](https://github.com/bundler/bundler/issues/5463), @olleolleolle)
+ - ensure `bundle outdated --local` shows all outdated gems ([#5430](https://github.com/bundler/bundler/issues/5430), @denniss)
+ - fix a case where ruby version requirements could lead to incorrect resolver conflicts ([#5425](https://github.com/bundler/bundler/issues/5425), @segiddins)
## 1.14.5 (2017-02-22)
Bugfixes:
- avoid loading all unused gemspecs during `bundle exec` on RubyGems 2.3+ (@segiddins)
- - improve resolver performance when dependencies have zero or one total possibilities ignoring requirements (#5444, #5457, @segiddins)
- - enable compact index when OpenSSL FIPS mode is enabled but not active (#5433, @wjordan)
- - use github username instead of git name for the github url in `bundle gem` (#5438, @danielpclark)
+ - improve resolver performance when dependencies have zero or one total possibilities ignoring requirements ([#5444](https://github.com/bundler/bundler/issues/5444), [#5457](https://github.com/bundler/bundler/issues/5457), @segiddins)
+ - enable compact index when OpenSSL FIPS mode is enabled but not active ([#5433](https://github.com/bundler/bundler/issues/5433), @wjordan)
+ - use github username instead of git name for the github url in `bundle gem` ([#5438](https://github.com/bundler/bundler/issues/5438), @danielpclark)
- avoid a TypeError on RubyGems 2.6.8 when no build settings are set for native extensions (@okkez)
- fail gracefully when the dependency api is missing runtime dependencies for a gem (@segiddins)
- - handle when a platform-specific gem has more dependencies than the ruby platform version (#5339, #5426, @segiddins)
- - allow running bundler on a machine with no home directory where the temporary directory is not writable (#5371, @segiddins)
- - avoid gem version conflicts on openssl using Ruby 2.5 (#5235, @rhenium)
- - fail when installing in frozen mode and the dependencies for `gemspec` gems have changed without the lockfile being updated (#5264, @segiddins)
+ - handle when a platform-specific gem has more dependencies than the ruby platform version ([#5339](https://github.com/bundler/bundler/issues/5339), [#5426](https://github.com/bundler/bundler/issues/5426), @segiddins)
+ - allow running bundler on a machine with no home directory where the temporary directory is not writable ([#5371](https://github.com/bundler/bundler/issues/5371), @segiddins)
+ - avoid gem version conflicts on openssl using Ruby 2.5 ([#5235](https://github.com/bundler/bundler/issues/5235), @rhenium)
+ - fail when installing in frozen mode and the dependencies for `gemspec` gems have changed without the lockfile being updated ([#5264](https://github.com/bundler/bundler/issues/5264), @segiddins)
## 1.14.4 (2017-02-12)
Bugfixes:
- - fail gracefully when attempting to overwrite an existing directory with `bundle gem` (#5358, @nodo)
- - fix a resolver bug that would cause bundler to report conflicts that it could resolve (#5359, #5362, @segiddins)
- - set native extension build arguments for git gems (#5401, @segiddins)
+ - fail gracefully when attempting to overwrite an existing directory with `bundle gem` ([#5358](https://github.com/bundler/bundler/issues/5358), @nodo)
+ - fix a resolver bug that would cause bundler to report conflicts that it could resolve ([#5359](https://github.com/bundler/bundler/issues/5359), [#5362](https://github.com/bundler/bundler/issues/5362), @segiddins)
+ - set native extension build arguments for git gems ([#5401](https://github.com/bundler/bundler/issues/5401), @segiddins)
- fix the suggested `bundle lock` command printed when a dependency is unused on any platform (@5t111111)
- - ensure the version passed to `ruby` in the Gemfile is valid during Gemfile parsing (#5380, @segiddins)
- - show `bundle inject` usage when too many arguments are passed (#5384, @Shekharrajak)
- - stop `bundle show --outdated` from implicitly running `bundle update` (#5375, @colby-swandale)
+ - ensure the version passed to `ruby` in the Gemfile is valid during Gemfile parsing ([#5380](https://github.com/bundler/bundler/issues/5380), @segiddins)
+ - show `bundle inject` usage when too many arguments are passed ([#5384](https://github.com/bundler/bundler/issues/5384), @Shekharrajak)
+ - stop `bundle show --outdated` from implicitly running `bundle update` ([#5375](https://github.com/bundler/bundler/issues/5375), @colby-swandale)
- allow the temporary home directory fallback to work for multiple users (@svoop)
## 1.14.3 (2017-01-24)
Bugfixes:
- - fix the resolver attempting to activate ruby-platform gems when the bundle is only for other platforms (#5349, #5356, @segiddins)
- - avoid re-resolving a locked gemfile that uses `gemspec` and includes development dependencies (#5349, @segiddins)
+ - fix the resolver attempting to activate ruby-platform gems when the bundle is only for other platforms ([#5349](https://github.com/bundler/bundler/issues/5349), [#5356](https://github.com/bundler/bundler/issues/5356), @segiddins)
+ - avoid re-resolving a locked gemfile that uses `gemspec` and includes development dependencies ([#5349](https://github.com/bundler/bundler/issues/5349), @segiddins)
## 1.14.2 (2017-01-22)
Bugfixes:
- - fix using `force_ruby_platform` on windows (#5344, @segiddins)
- - fix an incorrect version conflict error when using `gemspec` on multiple platforms (#5340, @segiddins)
+ - fix using `force_ruby_platform` on windows ([#5344](https://github.com/bundler/bundler/issues/5344), @segiddins)
+ - fix an incorrect version conflict error when using `gemspec` on multiple platforms ([#5340](https://github.com/bundler/bundler/issues/5340), @segiddins)
## 1.14.1 (2017-01-21)
Bugfixes:
- - work around a ruby 2.2.2 bug that caused a stack consistency error during installation (#5342, @segiddins)
+ - work around a ruby 2.2.2 bug that caused a stack consistency error during installation ([#5342](https://github.com/bundler/bundler/issues/5342), @segiddins)
## 1.14.0 (2017-01-20)
Bugfixes:
- ensure `Settings::Mirror` is autoloaded under the `Settings` namespace
- (#5238, @segiddins)
- - fix `bundler/inline` when `BUNDLE_GEMFILE=""` (#5079, @segiddins)
+ ([#5238](https://github.com/bundler/bundler/issues/5238), @segiddins)
+ - fix `bundler/inline` when `BUNDLE_GEMFILE=""` ([#5079](https://github.com/bundler/bundler/issues/5079), @segiddins)
## 1.14.0.pre.2 (2017-01-11)
Bugfixes:
- - allow not selecting a gem when running `bundle open` (#5301, @segiddins)
- - support installing gems from git branches that contain shell metacharacters (#5295, @segiddins)
- - fix a resolver error that could leave dependencies unresolved (#5294, @segiddins)
- - fix a stack overflow error when invoking commands (#5296, @segiddins)
+ - allow not selecting a gem when running `bundle open` ([#5301](https://github.com/bundler/bundler/issues/5301), @segiddins)
+ - support installing gems from git branches that contain shell metacharacters ([#5295](https://github.com/bundler/bundler/issues/5295), @segiddins)
+ - fix a resolver error that could leave dependencies unresolved ([#5294](https://github.com/bundler/bundler/issues/5294), @segiddins)
+ - fix a stack overflow error when invoking commands ([#5296](https://github.com/bundler/bundler/issues/5296), @segiddins)
## 1.14.0.pre.1 (2016-12-29)
@@ -394,17 +394,17 @@ Features:
- `bundle doctor` first runs `bundle check` (@segiddins)
- the bundler trampoline is automatically enabled when the target version is greater than bundler 2 (@segiddins)
- - gem checksums returned by rubygems.org are validated when installing gems (#4464, @segiddins)
+ - gem checksums returned by rubygems.org are validated when installing gems ([#4464](https://github.com/bundler/bundler/issues/4464), @segiddins)
- use the git username as a github username when running `bundle gem` (@JuanitoFatas)
- show more context when the resolver conflicts on required ruby and rubygems versions (@segiddins)
- - improve platform support by allowing bundler to pick the best platform match during dependency resolution, enabled with the `specific_platform` setting (#4295, #4896, @segiddins)
- - always prompt the user for a password when using `sudo` (#3006, @segiddins)
- - support running without a home directory (#4778, @segiddins)
+ - improve platform support by allowing bundler to pick the best platform match during dependency resolution, enabled with the `specific_platform` setting ([#4295](https://github.com/bundler/bundler/issues/4295), [#4896](https://github.com/bundler/bundler/issues/4896), @segiddins)
+ - always prompt the user for a password when using `sudo` ([#3006](https://github.com/bundler/bundler/issues/3006), @segiddins)
+ - support running without a home directory ([#4778](https://github.com/bundler/bundler/issues/4778), @segiddins)
- print a warning when the gemfile uses a platform conditional that will exclude the gem from all lockfile platforms (@segiddins)
- - add the `force_ruby_platform` setting to force bundler to install ruby-platform gems, even on other platforms (#4813, @segiddins)
- - add conservative update options to `bundle lock` (#4912, @chrismo)
+ - add the `force_ruby_platform` setting to force bundler to install ruby-platform gems, even on other platforms ([#4813](https://github.com/bundler/bundler/issues/4813), @segiddins)
+ - add conservative update options to `bundle lock` ([#4912](https://github.com/bundler/bundler/issues/4912), @chrismo)
- improve `bundle outdated` output to group gems by group (@ryanfox1985)
- - add conservative update options to `bundle update` (#5065, #5076, @chrismo)
+ - add conservative update options to `bundle update` ([#5065](https://github.com/bundler/bundler/issues/5065), [#5076](https://github.com/bundler/bundler/issues/5076), @chrismo)
- print the output of `bundle env` as github-flavored markdown, making it easier to preserve formatting when copy-pasting into a new issue (@segiddins)
- configure the persistence file when using `bundle gem` with `rspec` (@segiddins)
- add support for the `ruby_25` gemfile filter (@amatsuda)
@@ -417,31 +417,31 @@ Performance:
Bugfixes:
- - config files with CRLF line endings can be read (#4435, @segiddins)
- - `bundle lock` activates gems for the current platform even if they were activated under a different platform for a separate dependency (#4896, @segiddins)
+ - config files with CRLF line endings can be read ([#4435](https://github.com/bundler/bundler/issues/4435), @segiddins)
+ - `bundle lock` activates gems for the current platform even if they were activated under a different platform for a separate dependency ([#4896](https://github.com/bundler/bundler/issues/4896), @segiddins)
- running `bundle env` in a directory without a gemfile no longer crashes (@segiddins)
- - fail gracefully when attempting to use a source with an unknown URI scheme (#4953, @segiddins)
- - store paths in the lockfile relative to the root gemfile directory when using `eval_gemfile` (#4966, @segiddins)
- - `bundle lock` will not update without the `--update` flag (#4957, @segiddins)
+ - fail gracefully when attempting to use a source with an unknown URI scheme ([#4953](https://github.com/bundler/bundler/issues/4953), @segiddins)
+ - store paths in the lockfile relative to the root gemfile directory when using `eval_gemfile` ([#4966](https://github.com/bundler/bundler/issues/4966), @segiddins)
+ - `bundle lock` will not update without the `--update` flag ([#4957](https://github.com/bundler/bundler/issues/4957), @segiddins)
- the `console` binstub generated by `bundle gem` will load `.irbrc` files (@mattbrictson)
- print friendly filesystem access errors in the new index (@segiddins)
- - print a helpful error when running out of memory on jruby (#4673, @segiddins)
- - load all rubygems plugins when installing gems (#2824, @segiddins)
- - `bundle clean --dry-run` prints the list of gems without the `--force` option when no path is set (#5027, @hmistry)
- - local installs no longer print "this gem may have been yanked" (#5022, @hmistry)
+ - print a helpful error when running out of memory on jruby ([#4673](https://github.com/bundler/bundler/issues/4673), @segiddins)
+ - load all rubygems plugins when installing gems ([#2824](https://github.com/bundler/bundler/issues/2824), @segiddins)
+ - `bundle clean --dry-run` prints the list of gems without the `--force` option when no path is set ([#5027](https://github.com/bundler/bundler/issues/5027), @hmistry)
+ - local installs no longer print "this gem may have been yanked" ([#5022](https://github.com/bundler/bundler/issues/5022), @hmistry)
- avoid leaking `which` output when running `bundle doctor` (@colby-swandale)
- - print a warning when attempting to `bundle exec` an empty program (#5084, @bronzdoc)
- - ensure `bundle outdated` lists all outdated gems (#4979, @chrismo)
- - fail gracefully when attempting to `bundle gem` with an invalid constant name (#5185, @segiddins)
- - allow `bundler/inline` to work in a directory that contains a gemfile (#5117, @colby-swandale)
- - ensure that the new index is thread-safe, allowing installation on rbx (#5142, @segiddins)
+ - print a warning when attempting to `bundle exec` an empty program ([#5084](https://github.com/bundler/bundler/issues/5084), @bronzdoc)
+ - ensure `bundle outdated` lists all outdated gems ([#4979](https://github.com/bundler/bundler/issues/4979), @chrismo)
+ - fail gracefully when attempting to `bundle gem` with an invalid constant name ([#5185](https://github.com/bundler/bundler/issues/5185), @segiddins)
+ - allow `bundler/inline` to work in a directory that contains a gemfile ([#5117](https://github.com/bundler/bundler/issues/5117), @colby-swandale)
+ - ensure that the new index is thread-safe, allowing installation on rbx ([#5142](https://github.com/bundler/bundler/issues/5142), @segiddins)
- remove deprecated `rspec` syntax in `bundle gem` output (@gearnode)
- - fail gracefully when any system error is encountered when touching the filesystem (#5134, @segiddins)
- - fix compatibility with a machine running with FIPS mode enabled (#4989, @segiddins)
- - fix `bundle lock --add-platform ruby` (#5230, @segiddins)
+ - fail gracefully when any system error is encountered when touching the filesystem ([#5134](https://github.com/bundler/bundler/issues/5134), @segiddins)
+ - fix compatibility with a machine running with FIPS mode enabled ([#4989](https://github.com/bundler/bundler/issues/4989), @segiddins)
+ - fix `bundle lock --add-platform ruby` ([#5230](https://github.com/bundler/bundler/issues/5230), @segiddins)
- print gem post-install messages when running `bundle update` (@smathy)
- ensure errors due to a retries are all separated by a newline (@segiddins)
- - print out the bundle path in gem not found errors (#4854, @diegosteiner)
+ - print out the bundle path in gem not found errors ([#4854](https://github.com/bundler/bundler/issues/4854), @diegosteiner)
- fail gracefully when creating threads fails (@segiddins)
- avoid downloading metadata for gems that are only development dependencies (@Paxa)
@@ -449,28 +449,28 @@ Bugfixes:
Features:
- - add support for the `ruby_24` gemfile filter (#5281, @amatsuda)
+ - add support for the `ruby_24` gemfile filter ([#5281](https://github.com/bundler/bundler/issues/5281), @amatsuda)
## 1.13.6 (2016-10-22)
Bugfixes:
- - make the `gem` method public again, fixing a regression in 1.13.4 (#5102, @segiddins)
+ - make the `gem` method public again, fixing a regression in 1.13.4 ([#5102](https://github.com/bundler/bundler/issues/5102), @segiddins)
## 1.13.5 (2016-10-15)
Bugfixes:
- - Ensure a locked pre-release spec can always be re-resolved (#5089, @segiddins)
+ - Ensure a locked pre-release spec can always be re-resolved ([#5089](https://github.com/bundler/bundler/issues/5089), @segiddins)
## 1.13.4 (2016-10-11)
Bugfixes:
- - stop printing warning when compact index versions file is rewritten (#5064, @indirect)
- - fix `parent directory is world writable but not sticky` error on install (#5043, @indirect)
- - fix for `uninitialized constant Bundler::Plugin::API::Source` error (#5010, @hsbt, @aycabta)
- - make `update` options for major, minor, and patch updates consistent (#4934, @chrismo)
+ - stop printing warning when compact index versions file is rewritten ([#5064](https://github.com/bundler/bundler/issues/5064), @indirect)
+ - fix `parent directory is world writable but not sticky` error on install ([#5043](https://github.com/bundler/bundler/issues/5043), @indirect)
+ - fix for `uninitialized constant Bundler::Plugin::API::Source` error ([#5010](https://github.com/bundler/bundler/issues/5010), @hsbt, @aycabta)
+ - make `update` options for major, minor, and patch updates consistent ([#4934](https://github.com/bundler/bundler/issues/4934), @chrismo)
## 1.13.3 (2016-10-10)
@@ -483,12 +483,12 @@ Bugfixes:
Bugfixes:
- allow `Settings` to be initialized without a root directory (@m1k3)
- - allow specifying ruby engines in the gemfile as a symbol (#4919, @JuanitoFatas)
+ - allow specifying ruby engines in the gemfile as a symbol ([#4919](https://github.com/bundler/bundler/issues/4919), @JuanitoFatas)
- avoid an exception when using `bundler/deployment` with Vlad (@srbaker)
- - ensure redefined methods have the same visibility as the one they're replacing, fixing `Kernel.require` failing on JRuby (#4975, @segiddins)
- - ensure that Bundler won't complain about a corrupt lockfile when no lockfile exists when using `gemspec` in the Gemfile (#5006, @segiddins)
+ - ensure redefined methods have the same visibility as the one they're replacing, fixing `Kernel.require` failing on JRuby ([#4975](https://github.com/bundler/bundler/issues/4975), @segiddins)
+ - ensure that Bundler won't complain about a corrupt lockfile when no lockfile exists when using `gemspec` in the Gemfile ([#5006](https://github.com/bundler/bundler/issues/5006), @segiddins)
- fail gracefully when parsing the metadata for a gemspec from the compact index fails (@segiddins)
- - fix system gems not being copied to --path on bundle install (e.g. --deployment) (#4974, @chrismo)
+ - fix system gems not being copied to --path on bundle install (e.g. --deployment) ([#4974](https://github.com/bundler/bundler/issues/4974), @chrismo)
Performance:
@@ -498,8 +498,8 @@ Performance:
Bugfixes:
- - ensure that `Gem::Source` is available, fixing several exceptions (#4944, @dekellum)
- - ensure that dependency resolution works when multiple gems have the same dependency (#4961, @segiddins)
+ - ensure that `Gem::Source` is available, fixing several exceptions ([#4944](https://github.com/bundler/bundler/issues/4944), @dekellum)
+ - ensure that dependency resolution works when multiple gems have the same dependency ([#4961](https://github.com/bundler/bundler/issues/4961), @segiddins)
## 1.13.0 (2016-09-05)
@@ -510,32 +510,32 @@ This space deliberately left blank.
Features:
- add setting `exec_disable_load` to force `exec` to spawn a new Ruby process (@segiddins)
- - add `doctor` command to help with issues like unlinked compiled gems (#4765, @mistydemeo)
- - rework the `update` command, providing fine-grained control via flags (#4676, @chrismo)
- - add URI to http response output in debug mode (#4808, @NickLaMuro)
- - add manpage for `binstubs` command (#4847, @Zorbash)
+ - add `doctor` command to help with issues like unlinked compiled gems ([#4765](https://github.com/bundler/bundler/issues/4765), @mistydemeo)
+ - rework the `update` command, providing fine-grained control via flags ([#4676](https://github.com/bundler/bundler/issues/4676), @chrismo)
+ - add URI to http response output in debug mode ([#4808](https://github.com/bundler/bundler/issues/4808), @NickLaMuro)
+ - add manpage for `binstubs` command ([#4847](https://github.com/bundler/bundler/issues/4847), @Zorbash)
- support `mirror` settings for sources by hostname, not only full URL (@opiethehokie)
- - print gem installation errors after other install output (#4834, @segiddins)
- - add `lock --remove-platform` flag to remove platforms from the lock (#4877, @segiddins)
+ - print gem installation errors after other install output ([#4834](https://github.com/bundler/bundler/issues/4834), @segiddins)
+ - add `lock --remove-platform` flag to remove platforms from the lock ([#4877](https://github.com/bundler/bundler/issues/4877), @segiddins)
- add `only_update_to_newer_versions` setting to prevent downgrades during `update` (@segiddins)
- expanded experimental plugin support to include hooks and sources (@asutoshpalai)
Bugfixes:
- - retry gem downloads (#4846, @jkeiser)
- - improve the CompactIndex to handle capitalized legacy gems (#4867, @segiddins)
+ - retry gem downloads ([#4846](https://github.com/bundler/bundler/issues/4846), @jkeiser)
+ - improve the CompactIndex to handle capitalized legacy gems ([#4867](https://github.com/bundler/bundler/issues/4867), @segiddins)
- re-use persistent HTTP connections for CompactIndex (@NickLaMuro)
- respect `required_ruby_version` when Gemfile contains `ruby` version (@indirect)
- - allow `rake release` to sign git tags (#4743, @eagletmt)
+ - allow `rake release` to sign git tags ([#4743](https://github.com/bundler/bundler/issues/4743), @eagletmt)
- set process titles when using `#load` during `exec` (@yob)
- recognize JRuby shebangs for using `#load` during `exec` (@ojab)
- - handle world-writable home directories (#4726, @allenzhao)
- - support multi-platform gems via the `gemspec` Gemfile method (#4798, @segiddins)
+ - handle world-writable home directories ([#4726](https://github.com/bundler/bundler/issues/4726), @allenzhao)
+ - support multi-platform gems via the `gemspec` Gemfile method ([#4798](https://github.com/bundler/bundler/issues/4798), @segiddins)
- print dots correctly for CompactIndex fetcher (@NickLaMuro)
- set an `open_timeout` when requesting gem data via HTTP (@NickLaMuro)
- rename the BUNDLE\_ORIG\_ENV variable so it no longer shows up in `config` (@indirect)
- - show help only when `-h` or `--help` is passed to Bundler, not to `exec` (#4801, @segiddins)
- - handle symlinks to binstubs created by `--standalone` (#4782, @terinjokes)
+ - show help only when `-h` or `--help` is passed to Bundler, not to `exec` ([#4801](https://github.com/bundler/bundler/issues/4801), @segiddins)
+ - handle symlinks to binstubs created by `--standalone` ([#4782](https://github.com/bundler/bundler/issues/4782), @terinjokes)
## 1.13.0.rc.1 (2016-06-27)
@@ -546,9 +546,9 @@ Features:
Bugfixes:
- - fix support for running RubyGems 1.x on Ruby 2.3 (#4698, @segiddins)
- - fix bundle exec'ing to a ruby file when gems are installed into a path (#4592, @chrismo)
- - when multiple specs in a bundle have the same executable, prefer activating the one from the requested gem (#4705, @segiddins)
+ - fix support for running RubyGems 1.x on Ruby 2.3 ([#4698](https://github.com/bundler/bundler/issues/4698), @segiddins)
+ - fix bundle exec'ing to a ruby file when gems are installed into a path ([#4592](https://github.com/bundler/bundler/issues/4592), @chrismo)
+ - when multiple specs in a bundle have the same executable, prefer activating the one from the requested gem ([#4705](https://github.com/bundler/bundler/issues/4705), @segiddins)
- stop changing the load path to require the vendored postit when trampolining (@segiddins)
- ensure relative paths are properly printed after completing an installation (@jenseng)
- fix re-resolving when there are multiple unchanged path sources (@segiddins)
@@ -558,9 +558,9 @@ Bugfixes:
Performance:
- - speed up gemfile resolution during `bundle install` by between 4x-100x (#4376, @segiddins)
+ - speed up gemfile resolution during `bundle install` by between 4x-100x ([#4376](https://github.com/bundler/bundler/issues/4376), @segiddins)
- generally reduce object allocations when using bundler (@segiddins)
- - speed up bin generation for path gems with many files (#2846, @segiddins)
+ - speed up bin generation for path gems with many files ([#2846](https://github.com/bundler/bundler/issues/2846), @segiddins)
- fix detecting path spec changes to avoid re-resolving unnecessarily (@jrafanie)
Features:
@@ -568,14 +568,14 @@ Features:
- automatically trampoline to the bundler version locked in the lockfile, only updating to the running version on `bundle update --bundler` (@segiddins)
- laying the groundwork for plugin support, which is currently unsuppported, undocumented, disabled by default, and liable to change without notice (@asutoshpalai)
- allow `bundle viz --without` to accept multiple `:`-delimited groups (@mobilutz)
- - support for RubyGems 2.6.4 (#4368, @segiddins, @RochesterinNYC)
- - colorize updated gem versions (#4334, @bronzdoc)
- - add the `--standalone` flag to `bundle binstubs` (#4594, @b-ggs)
+ - support for RubyGems 2.6.4 ([#4368](https://github.com/bundler/bundler/issues/4368), @segiddins, @RochesterinNYC)
+ - colorize updated gem versions ([#4334](https://github.com/bundler/bundler/issues/4334), @bronzdoc)
+ - add the `--standalone` flag to `bundle binstubs` ([#4594](https://github.com/bundler/bundler/issues/4594), @b-ggs)
- update the `bundle gem` CoC to contributor covenant v1.4 (@cllns)
- use a custom YAML serializer to make config file consistent (@segiddins)
- - filter credentials from error messages (bundler/bundler-features#111, @RochesterinNYC, @sandlerr)
- - support relative paths used inside a nested invocation of `eval_gemfile` (#4584, @RochesterinNYC)
- - fail gracefully when attempting to install a yanked gem (#4344, @allenzhao)
+ - filter credentials from error messages (bundler/bundler-features[#111](https://github.com/bundler/bundler/issues/111), @RochesterinNYC, @sandlerr)
+ - support relative paths used inside a nested invocation of `eval_gemfile` ([#4584](https://github.com/bundler/bundler/issues/4584), @RochesterinNYC)
+ - fail gracefully when attempting to install a yanked gem ([#4344](https://github.com/bundler/bundler/issues/4344), @allenzhao)
- automatically install an inline gemfile when gems are missing locally (@segiddins)
- allow conflicts for gems resolved via `gemspec` (@segiddins)
- add `--add-platform` option to `bundle lock` (@segiddins)
@@ -583,18 +583,18 @@ Features:
Bugfixes:
- - implicitly unlock the resolved ruby version when the declared requirements in the gemfile are incompatible with the locked version (#4595, #4627, @segiddins)
- - add support for quoted paths in `$PATH` (#4323, @segiddins)
- - check out missing git repos that are not being installed (#3981, @asutoshpalai)
+ - implicitly unlock the resolved ruby version when the declared requirements in the gemfile are incompatible with the locked version ([#4595](https://github.com/bundler/bundler/issues/4595), [#4627](https://github.com/bundler/bundler/issues/4627), @segiddins)
+ - add support for quoted paths in `$PATH` ([#4323](https://github.com/bundler/bundler/issues/4323), @segiddins)
+ - check out missing git repos that are not being installed ([#3981](https://github.com/bundler/bundler/issues/3981), @asutoshpalai)
- write `bundler/setup.rb` to a consistent path (@glennpratt)
- open editor in `bundle open` with a clean environment (@sj26)
- - resolve infinitely recursive copy when running `bundle package --all` with a `gemspec` in the gemfile (#4392, #4430, @RochesterinNYC)
- - fail gracefully when encountering an `Errno::ENOTSUP` (#4394, @segiddins)
- - fail gracefully when encountering an `Errno::EHOSTUNREACH` (#4642, @allenzhao)
- - fix loading config files with very long values (#4370, @segiddins)
- - only show potential updates for gemfile platforms in `bundle outdated` (#4450, @RochesterinNYC)
- - allow running `bundle install --deployment` after `bundle package --all` with path gems (#2175, @allenzhao)
- - add support for patchlevels in ruby versions in the gemfile and gemspecs (#4593, @chalkos)
+ - resolve infinitely recursive copy when running `bundle package --all` with a `gemspec` in the gemfile ([#4392](https://github.com/bundler/bundler/issues/4392), [#4430](https://github.com/bundler/bundler/issues/4430), @RochesterinNYC)
+ - fail gracefully when encountering an `Errno::ENOTSUP` ([#4394](https://github.com/bundler/bundler/issues/4394), @segiddins)
+ - fail gracefully when encountering an `Errno::EHOSTUNREACH` ([#4642](https://github.com/bundler/bundler/issues/4642), @allenzhao)
+ - fix loading config files with very long values ([#4370](https://github.com/bundler/bundler/issues/4370), @segiddins)
+ - only show potential updates for gemfile platforms in `bundle outdated` ([#4450](https://github.com/bundler/bundler/issues/4450), @RochesterinNYC)
+ - allow running `bundle install --deployment` after `bundle package --all` with path gems ([#2175](https://github.com/bundler/bundler/issues/2175), @allenzhao)
+ - add support for patchlevels in ruby versions in the gemfile and gemspecs ([#4593](https://github.com/bundler/bundler/issues/4593), @chalkos)
## 1.12.6 (2016-10-10)
@@ -604,17 +604,17 @@ Bugfixes:
## 1.12.5 (2016-05-25)
Bugfixes:
- - only take over `--help` on `bundle exec` when the first two arguments are `exec` and `--help` (#4596, @segiddins)
+ - only take over `--help` on `bundle exec` when the first two arguments are `exec` and `--help` ([#4596](https://github.com/bundler/bundler/issues/4596), @segiddins)
- don't require `require: true` dependencies that are excluded via `env` or `install_if` (@BrianHawley)
- - reduce the number of threads used simultaneously by bundler (#4367, @will-in-wi)
+ - reduce the number of threads used simultaneously by bundler ([#4367](https://github.com/bundler/bundler/issues/4367), @will-in-wi)
## 1.12.4 (2016-05-16)
Bugfixes:
- - ensure concurrent use of the new index can't corrupt the cache (#4519, @domcleal)
- - allow missing rubygems credentials when pushing a gem with a custom host (#4437, @Cohen-Carlisle)
- - fix installing built-in specs with `--standalone` (#4557, @segiddins)
- - fix `bundle show` when a gem has a prerelease version that includes a `-` (#4385, @segiddins)
+ - ensure concurrent use of the new index can't corrupt the cache ([#4519](https://github.com/bundler/bundler/issues/4519), @domcleal)
+ - allow missing rubygems credentials when pushing a gem with a custom host ([#4437](https://github.com/bundler/bundler/issues/4437), @Cohen-Carlisle)
+ - fix installing built-in specs with `--standalone` ([#4557](https://github.com/bundler/bundler/issues/4557), @segiddins)
+ - fix `bundle show` when a gem has a prerelease version that includes a `-` ([#4385](https://github.com/bundler/bundler/issues/4385), @segiddins)
## 1.12.3 (2016-05-06)
@@ -625,16 +625,16 @@ Bugfixes:
## 1.12.2 (2016-05-04)
Bugfixes:
- - fix modifying a frozen string when the resolver conflicts on dependencies with requirements (#4520, @grzuy)
- - fix `bundle exec foo --help` not showing the invoked command's help (#4480, @b-ggs)
+ - fix modifying a frozen string when the resolver conflicts on dependencies with requirements ([#4520](https://github.com/bundler/bundler/issues/4520), @grzuy)
+ - fix `bundle exec foo --help` not showing the invoked command's help ([#4480](https://github.com/bundler/bundler/issues/4480), @b-ggs)
## 1.12.1 (2016-04-30)
Bugfixes:
- automatically fallback when the new index has a checksum mismatch instead of erroring (@segiddins)
- - fix computation of new index file local checksums on Windows (#4472, @mwrock)
- - properly handle certain resolver backtracking cases without erroring (@segiddins, #4484)
- - ensure the `$LOAD_PATH` contains specs' load paths in the correct order (@segiddins, #4482)
+ - fix computation of new index file local checksums on Windows ([#4472](https://github.com/bundler/bundler/issues/4472), @mwrock)
+ - properly handle certain resolver backtracking cases without erroring (@segiddins, [#4484](https://github.com/bundler/bundler/issues/4484))
+ - ensure the `$LOAD_PATH` contains specs' load paths in the correct order (@segiddins, [#4482](https://github.com/bundler/bundler/issues/4482))
## 1.12.0 (2016-04-28)
@@ -644,7 +644,7 @@ This space intentionally left blank.
Bugfixes:
- - don't fail when `bundle outdated` is run with flags and the lockfile contains non-semver versions (#4438, @RochesterinNYC)
+ - don't fail when `bundle outdated` is run with flags and the lockfile contains non-semver versions ([#4438](https://github.com/bundler/bundler/issues/4438), @RochesterinNYC)
## 1.12.0.rc.3 (2016-04-19)
@@ -656,11 +656,11 @@ Bugfixes:
Features:
- - `bundle outdated` handles all combinations of `--major`, `--minor`, and `--patch` (#4396, @RochesterinNYC)
+ - `bundle outdated` handles all combinations of `--major`, `--minor`, and `--patch` ([#4396](https://github.com/bundler/bundler/issues/4396), @RochesterinNYC)
Bugfixes:
- - prevent endless recursive copy for `bundle package --all` (#4392, @RochesterinNYC)
+ - prevent endless recursive copy for `bundle package --all` ([#4392](https://github.com/bundler/bundler/issues/4392), @RochesterinNYC)
- allow executables that are `load`ed to exit non-0 via an `at_exit` hook when invoked by `bundle exec` (@segiddins)
- nested invocations of `bundle exec` properly preserve the `$PATH` and `$GEM_PATH` environment variables (@segiddins)
@@ -668,13 +668,13 @@ Bugfixes:
Performance:
- - Download gem metadata from globally distributed CDN endpoints (#4358, @segiddins)
+ - Download gem metadata from globally distributed CDN endpoints ([#4358](https://github.com/bundler/bundler/issues/4358), @segiddins)
Bugfixes:
- - handle Ruby pre-releases built from source (#4324, @RochesterinNYC)
- - support binstubs from RubyGems 2.6 (#4341, @segiddins)
- - handle quotes present in in PATH (#4326, @segiddins)
+ - handle Ruby pre-releases built from source ([#4324](https://github.com/bundler/bundler/issues/4324), @RochesterinNYC)
+ - support binstubs from RubyGems 2.6 ([#4341](https://github.com/bundler/bundler/issues/4341), @segiddins)
+ - handle quotes present in in PATH ([#4326](https://github.com/bundler/bundler/issues/4326), @segiddins)
## 1.12.0.pre.2 (2016-02-26)
@@ -685,80 +685,80 @@ Performance:
Features:
- add a `--patch` flag for `bundle outdated` (@RochesterinNYC)
- - add `Bundler.clean_env` and `Bundler.original_env` (#4232, @njam)
- - add `--frozen` support to `bundle package` (#3356, @RochesterinNYC)
+ - add `Bundler.clean_env` and `Bundler.original_env` ([#4232](https://github.com/bundler/bundler/issues/4232), @njam)
+ - add `--frozen` support to `bundle package` ([#3356](https://github.com/bundler/bundler/issues/3356), @RochesterinNYC)
Bugfixes:
- place bundler loaded gems after `-I` and `RUBYLIB` (@Elffers)
- - give a better error message when filesystem access raises an `EPROTO` error (#3581, #3932, #4163, @RochesterinNYC)
+ - give a better error message when filesystem access raises an `EPROTO` error ([#3581](https://github.com/bundler/bundler/issues/3581), [#3932](https://github.com/bundler/bundler/issues/3932), [#4163](https://github.com/bundler/bundler/issues/4163), @RochesterinNYC)
- give a better error message when both `--deployment` and `--system` are used together (@RochesterinNYC)
- - fix `$PATH` being preserved for use in `Bundler.with_clean_env` (#4251, @segiddins, @njam)
- - give a better error message when running `bundle outdated` in frozen mode (#4287, @RochesterinNYC)
- - handle when `http_proxy` is set to `:no_proxy` in the rubygems configuration (#4294, @segiddins)
- - give a better error message when authentication details aren't properly escaped (#4288, @RochesterinNYC)
+ - fix `$PATH` being preserved for use in `Bundler.with_clean_env` ([#4251](https://github.com/bundler/bundler/issues/4251), @segiddins, @njam)
+ - give a better error message when running `bundle outdated` in frozen mode ([#4287](https://github.com/bundler/bundler/issues/4287), @RochesterinNYC)
+ - handle when `http_proxy` is set to `:no_proxy` in the rubygems configuration ([#4294](https://github.com/bundler/bundler/issues/4294), @segiddins)
+ - give a better error message when authentication details aren't properly escaped ([#4288](https://github.com/bundler/bundler/issues/4288), @RochesterinNYC)
- fix `bundle outdated --minor` to only report updates that match the current minor version (@RochesterinNYC)
- - fix extra dependencies being resolved unnecessarily (#4276, @segiddins)
- - give a better error message when missing specs due to platform mis-matches (#4259, @RochesterinNYC)
- - skip rebuilding extensions for git gems if they are already built (#4082, @csfrancis, @indirect, @segiddins)
- - fix `bundle install` not installing when the `no_install` setting is set (#3966, @chulkilee, @segiddins)
+ - fix extra dependencies being resolved unnecessarily ([#4276](https://github.com/bundler/bundler/issues/4276), @segiddins)
+ - give a better error message when missing specs due to platform mis-matches ([#4259](https://github.com/bundler/bundler/issues/4259), @RochesterinNYC)
+ - skip rebuilding extensions for git gems if they are already built ([#4082](https://github.com/bundler/bundler/issues/4082), @csfrancis, @indirect, @segiddins)
+ - fix `bundle install` not installing when the `no_install` setting is set ([#3966](https://github.com/bundler/bundler/issues/3966), @chulkilee, @segiddins)
## 1.12.0.pre.1 (2016-02-09)
Performance:
- speed up `bundle install` and `bundle update` by using the new compact gem index (@segiddins, @fotanus, @indirect)
- - speed up `bundle exec` by avoiding loading the gemfile twice (#2951, #2952, @segiddins)
+ - speed up `bundle exec` by avoiding loading the gemfile twice ([#2951](https://github.com/bundler/bundler/issues/2951), [#2952](https://github.com/bundler/bundler/issues/2952), @segiddins)
Features:
- add support for using version operators to specify ruby versions in the Gemfile (@jtarchie)
- redirect `--help` flag for plugins to that plugin's man page (@RochesterinNYC)
- - support probing a mirror with a fallback timeout (#4128, @pcarranza)
+ - support probing a mirror with a fallback timeout ([#4128](https://github.com/bundler/bundler/issues/4128), @pcarranza)
- add `--full-index` option to `bundle lock` (@segiddins)
- support running with frozen string literals (@deepj, @segiddins)
- - add `--major` and `--minor` options to `bundle outdated` (#3805, @cirdes)
+ - add `--major` and `--minor` options to `bundle outdated` ([#3805](https://github.com/bundler/bundler/issues/3805), @cirdes)
- allow passing a custom `ui` to `bundler/inline` (@lamont-granquist)
- - add support for ruby 2.4 (#4266, @segiddins)
+ - add support for ruby 2.4 ([#4266](https://github.com/bundler/bundler/issues/4266), @segiddins)
- add `bundle outdated --parseable` for machine-readable output (@RochesterinNYC)
Bugfixes:
- - fix `bundle package --all` recursing endlessly (#4158, @RochesterinNYC)
- - fail fast on more errors when fetching remote resources (#4154, @RochesterinNYC)
- - give a better error message when a given git commit can't be found (#4140, @doy)
- - give a better error message when `bundle clean` doesn't have sufficient permissions (#4170, @RochesterinNYC)
+ - fix `bundle package --all` recursing endlessly ([#4158](https://github.com/bundler/bundler/issues/4158), @RochesterinNYC)
+ - fail fast on more errors when fetching remote resources ([#4154](https://github.com/bundler/bundler/issues/4154), @RochesterinNYC)
+ - give a better error message when a given git commit can't be found ([#4140](https://github.com/bundler/bundler/issues/4140), @doy)
+ - give a better error message when `bundle clean` doesn't have sufficient permissions ([#4170](https://github.com/bundler/bundler/issues/4170), @RochesterinNYC)
- give a better error message when reading a bundler config file fails (@segiddins)
- - restrict platforms when referencing a `gemspec` in the `Gemfile` to those defined in the gemspec (#4102, #4150, @smellsblue)
+ - restrict platforms when referencing a `gemspec` in the `Gemfile` to those defined in the gemspec ([#4102](https://github.com/bundler/bundler/issues/4102), [#4150](https://github.com/bundler/bundler/issues/4150), @smellsblue)
- fix `bundle gem` with minitest to use the correct rake task (@kotoshenya)
- - give a better error message when ssl isn't available (#4054, @RochesterinNYC)
- - print the original `require` error when `Bundler.require` fails (#4182, @RochesterinNYC)
- - give a better error message when certain resources are temporarily unavailable (#4183, @RochesterinNYC)
+ - give a better error message when ssl isn't available ([#4054](https://github.com/bundler/bundler/issues/4054), @RochesterinNYC)
+ - print the original `require` error when `Bundler.require` fails ([#4182](https://github.com/bundler/bundler/issues/4182), @RochesterinNYC)
+ - give a better error message when certain resources are temporarily unavailable ([#4183](https://github.com/bundler/bundler/issues/4183), @RochesterinNYC)
- fix returning case-sensitive gem mirror URIs on ruby 2.3 (@segiddins)
- - ignore colorized output from `git` when determining the current branch (#4056, @agis-)
+ - ignore colorized output from `git` when determining the current branch ([#4056](https://github.com/bundler/bundler/issues/4056), @agis-)
- fix storing the shared gems config option as a boolean (@vassilevsky)
- add support for running `bundle gem --exe` instead of using the `--bin` option (@christhekeele)
- - fix `exec`-ing with 0 args in a directory with spaces (#4230, @segiddins)
- - avoid installing extraneous gems when resolving to an older version of a spec (#4101, #4198, @segiddins)
- - ensure paths resolved when parsing a gemfile are relative to that file (#3349, @dtognazzini)
- - give a better error message when encountering an invalid gemspec (#4248, #4275, @RochesterinNYC)
- - preserve the original `PATH` in `Bundler.with_clean_env` (#4251, @segiddins)
- - ensure standalone file paths are relative to the project root (#4144, @glennpratt)
+ - fix `exec`-ing with 0 args in a directory with spaces ([#4230](https://github.com/bundler/bundler/issues/4230), @segiddins)
+ - avoid installing extraneous gems when resolving to an older version of a spec ([#4101](https://github.com/bundler/bundler/issues/4101), [#4198](https://github.com/bundler/bundler/issues/4198), @segiddins)
+ - ensure paths resolved when parsing a gemfile are relative to that file ([#3349](https://github.com/bundler/bundler/issues/3349), @dtognazzini)
+ - give a better error message when encountering an invalid gemspec ([#4248](https://github.com/bundler/bundler/issues/4248), [#4275](https://github.com/bundler/bundler/issues/4275), @RochesterinNYC)
+ - preserve the original `PATH` in `Bundler.with_clean_env` ([#4251](https://github.com/bundler/bundler/issues/4251), @segiddins)
+ - ensure standalone file paths are relative to the project root ([#4144](https://github.com/bundler/bundler/issues/4144), @glennpratt)
## 1.11.2 (2015-12-15)
Bugfixes:
- - _really_ stop calling `required_ruby_version` on nil @specifications (#4147, @indirect)
+ - _really_ stop calling `required_ruby_version` on nil @specifications ([#4147](https://github.com/bundler/bundler/issues/4147), @indirect)
## 1.11.1 (2015-12-15)
Bugfixes:
- - lazy-load Psych, again (#4149, @indirect)
- - allow gemspec gems on other platforms (#4150, @indirect)
- - fix --no-coc and --no-mit flags on `gem` (#4148, @RochesterinNYC)
- - stop calling `required_ruby_version` on nil @specifications (#4147, @indirect)
+ - lazy-load Psych, again ([#4149](https://github.com/bundler/bundler/issues/4149), @indirect)
+ - allow gemspec gems on other platforms ([#4150](https://github.com/bundler/bundler/issues/4150), @indirect)
+ - fix --no-coc and --no-mit flags on `gem` ([#4148](https://github.com/bundler/bundler/issues/4148), @RochesterinNYC)
+ - stop calling `required_ruby_version` on nil @specifications ([#4147](https://github.com/bundler/bundler/issues/4147), @indirect)
## 1.11.0 (2015-12-12)
@@ -768,16 +768,16 @@ Bugfixes:
Bugfixes:
- - fail gracefully when trying to execute a non-executable file (#4081, @fotanus)
+ - fail gracefully when trying to execute a non-executable file ([#4081](https://github.com/bundler/bundler/issues/4081), @fotanus)
- fix a crash when pushing a gem via `rake release` (@segiddins)
## 1.11.0.pre.1 (2015-11-29)
Features:
- - actual Gemfile and lockfile filenames are used in messages (#3672, @segiddins)
+ - actual Gemfile and lockfile filenames are used in messages ([#3672](https://github.com/bundler/bundler/issues/3672), @segiddins)
- the git remote for `rake release` is now customizable (@skateman)
- - file access permissions errors are now much more friendly (#3703, #3735, #3858, #3988, #4009 @repinel, @Elffers, @segiddins, @agis-)
+ - file access permissions errors are now much more friendly ([#3703](https://github.com/bundler/bundler/issues/3703), [#3735](https://github.com/bundler/bundler/issues/3735), [#3858](https://github.com/bundler/bundler/issues/3858), [#3988](https://github.com/bundler/bundler/issues/3988), [#4009](https://github.com/bundler/bundler/issues/4009) @repinel, @Elffers, @segiddins, @agis-)
- add support for showing help for plugin commands (@tf)
- send `X-Gemfile-Source` header to source mirrors (@agis-)
- show what version upstream dependencies were resolved to in conflict messages (@segiddins)
@@ -789,12 +789,12 @@ Features:
- update the `bundle gem` code of conduct template to Contributor Covenant v1.3.0 (@CoralineAda)
- add support for specifying gems to update when running `bundle lock` via `--update gem1 gem2` (@JuanitoFatas)
- added support for MRI 2.3 (@amatsuda)
- - show a helpful message when requiring a file in `bundler require` fails (#3960, @agis-)
- - include git revision hash when printing a git source (#3433, @agis-)
+ - show a helpful message when requiring a file in `bundler require` fails ([#3960](https://github.com/bundler/bundler/issues/3960), @agis-)
+ - include git revision hash when printing a git source ([#3433](https://github.com/bundler/bundler/issues/3433), @agis-)
- improve hint when a resolution conflict occurs (@seanlinsley)
- - show a friendly error when a git ref is not found (#3879, @agis-)
- - improve error message when sources are not absolute URIs (#3925, @agis-)
- - add `pkg` to rake's clobber list (#3676, @jasonkarns)
+ - show a friendly error when a git ref is not found ([#3879](https://github.com/bundler/bundler/issues/3879), @agis-)
+ - improve error message when sources are not absolute URIs ([#3925](https://github.com/bundler/bundler/issues/3925), @agis-)
+ - add `pkg` to rake's clobber list ([#3676](https://github.com/bundler/bundler/issues/3676), @jasonkarns)
- retry fetching specs when fetching version metadata fails (@jingweno)
Bugfixes:
@@ -802,36 +802,36 @@ Bugfixes:
- avoid showing bundler version warning messages twice (@fotanus)
- fix running `bundle check` with `--path` when the gems are only installed globally (@akihiro17)
- fix `bin/setup` from `bundle gem` assuming `bash` is in `/bin`
- - fail more gracefully when an HTTP remote is unreachable (#3765, @steverob)
+ - fail more gracefully when an HTTP remote is unreachable ([#3765](https://github.com/bundler/bundler/issues/3765), @steverob)
- fix a warning running `bundle exec` on jruby 9.0.0.0 (@deivid-rodriguez, @mastfish)
- fix the `bundle gem` readme when no tests are generated (@roseweixel)
- - the dependencies on test gems in `bundle gem` are now locked to major versions (#3811, @indirect)
- - fix the paths for native extensions generated by `--standalone` (#3813, @AlexanderPavlenko)
+ - the dependencies on test gems in `bundle gem` are now locked to major versions ([#3811](https://github.com/bundler/bundler/issues/3811), @indirect)
+ - fix the paths for native extensions generated by `--standalone` ([#3813](https://github.com/bundler/bundler/issues/3813), @AlexanderPavlenko)
- fix trying to cache a gem that has no source (@EduardoBautista)
- - fix `--source` option to `bundle update` causing incorrect gem unlocking (#3759, #3761, @neoeno)
- - fix handling an empty `BUNDLE_GEMFILE` environment variables (#3678, @agis-)
+ - fix `--source` option to `bundle update` causing incorrect gem unlocking ([#3759](https://github.com/bundler/bundler/issues/3759), [#3761](https://github.com/bundler/bundler/issues/3761), @neoeno)
+ - fix handling an empty `BUNDLE_GEMFILE` environment variables ([#3678](https://github.com/bundler/bundler/issues/3678), @agis-)
- avoid cleaning up gem extension directory in `bundle clean` (@Sirupsen)
- fix the `ssl_verify_mode` setting not being treated as a number (@goughy000)
- - fix not retrying on zlib errors (#4047, @andremedeiros)
+ - fix not retrying on zlib errors ([#4047](https://github.com/bundler/bundler/issues/4047), @andremedeiros)
- fix a warning being shown for using `URI.encode` (@EduardoBautista)
- - fix handling of fatal HTTP errors (#3830, @indirect)
- - ensure all `sudo` access is done in a thread-safe manner (#3910, @agis-)
+ - fix handling of fatal HTTP errors ([#3830](https://github.com/bundler/bundler/issues/3830), @indirect)
+ - ensure all `sudo` access is done in a thread-safe manner ([#3910](https://github.com/bundler/bundler/issues/3910), @agis-)
- fix caching gems with a path with the same prefix as the bundled application (@indirect)
- - fix showing gemspec validation errors on `bundle exec` (#3895, @agis-)
- - distinguish Gemfile syntax and evaluation errors (#3783, @agis-)
- - fix nested Gemfile sources not restoring the previous source (#3974, @agis-)
- - fix the `RUBYLIB` environment variable not being cleaned (#3982, @agis-)
- - fix handling a dependency missing from `Gemfile.lock` so parallel installation does not deadlock (#4012, @lukaso)
+ - fix showing gemspec validation errors on `bundle exec` ([#3895](https://github.com/bundler/bundler/issues/3895), @agis-)
+ - distinguish Gemfile syntax and evaluation errors ([#3783](https://github.com/bundler/bundler/issues/3783), @agis-)
+ - fix nested Gemfile sources not restoring the previous source ([#3974](https://github.com/bundler/bundler/issues/3974), @agis-)
+ - fix the `RUBYLIB` environment variable not being cleaned ([#3982](https://github.com/bundler/bundler/issues/3982), @agis-)
+ - fix handling a dependency missing from `Gemfile.lock` so parallel installation does not deadlock ([#4012](https://github.com/bundler/bundler/issues/4012), @lukaso)
- also print gemspecs in `bundle env` output (@agis-)
- - fix handling when a `path` source does not have a gemspec but a lockfile says there is (#4004, @segiddins)
- - show a warning when the `RUBYGEMS_GEMDEPS` environment variable is set (#3656, @agis-)
- - fix handling invalid RubyGems configuration files (#4042, @agis-)
+ - fix handling when a `path` source does not have a gemspec but a lockfile says there is ([#4004](https://github.com/bundler/bundler/issues/4004), @segiddins)
+ - show a warning when the `RUBYGEMS_GEMDEPS` environment variable is set ([#3656](https://github.com/bundler/bundler/issues/3656), @agis-)
+ - fix handling invalid RubyGems configuration files ([#4042](https://github.com/bundler/bundler/issues/4042), @agis-)
- fix `bundle console` falling back to `irb` when the preferred console is unavailable (@felixbuenemann)
- - restrict platforms when referencing a `gemspec` in the `Gemfile` to those defined in the gemspec (#4102, @smellsblue)
+ - restrict platforms when referencing a `gemspec` in the `Gemfile` to those defined in the gemspec ([#4102](https://github.com/bundler/bundler/issues/4102), @smellsblue)
Performance:
- - speed up dependency resolution in pathological cases by 25x (#3803, @segiddins)
+ - speed up dependency resolution in pathological cases by 25x ([#3803](https://github.com/bundler/bundler/issues/3803), @segiddins)
- drop string allocations when searching for gems (@jrafanie)
## 1.10.6 (2015-07-22)
@@ -842,8 +842,8 @@ Workarounds:
Bugfixes:
- - fix installing dependencies in the correct order (#3799, @pducks32)
- - fix sorting of mixed DependencyLists (#3762, @tony-spataro-rs)
+ - fix installing dependencies in the correct order ([#3799](https://github.com/bundler/bundler/issues/3799), @pducks32)
+ - fix sorting of mixed DependencyLists ([#3762](https://github.com/bundler/bundler/issues/3762), @tony-spataro-rs)
- fix `install_if` conditionals when using the block form (@danieltdt)
## 1.10.5 (2015-06-24)
@@ -854,9 +854,9 @@ Workarounds:
Bugfixes:
- - fix sorting of mixed DependencyLists with RubyGems >= 2.23 (#3762, @tony-spataro-rs)
+ - fix sorting of mixed DependencyLists with RubyGems >= 2.23 ([#3762](https://github.com/bundler/bundler/issues/3762), @tony-spataro-rs)
- speed up resolver for path and git gems (@segiddins)
- - fix `install --force` to not reinstall Bundler (#3743, @karlo57)
+ - fix `install --force` to not reinstall Bundler ([#3743](https://github.com/bundler/bundler/issues/3743), @karlo57)
## 1.10.4 (2015-06-16)
@@ -873,24 +873,24 @@ Bugfixes:
Bugfixes:
- - allow missing gemspec files when validating path and git gems (#3686, #3698, @segiddins)
- - fix regression in `rake install` (#3701, #3705, @segiddins)
- - fix regression when calling `gem` with `bundle exec` or `-rbundler/setup` (#3699, @segiddins)
- - fix `bundler/inline` requiring a newly-installed gem (#3693, @indirect, @segiddins)
+ - allow missing gemspec files when validating path and git gems ([#3686](https://github.com/bundler/bundler/issues/3686), [#3698](https://github.com/bundler/bundler/issues/3698), @segiddins)
+ - fix regression in `rake install` ([#3701](https://github.com/bundler/bundler/issues/3701), [#3705](https://github.com/bundler/bundler/issues/3705), @segiddins)
+ - fix regression when calling `gem` with `bundle exec` or `-rbundler/setup` ([#3699](https://github.com/bundler/bundler/issues/3699), @segiddins)
+ - fix `bundler/inline` requiring a newly-installed gem ([#3693](https://github.com/bundler/bundler/issues/3693), @indirect, @segiddins)
## 1.10.2 (2015-05-29)
Bugfixes:
- - fix regression in `bundle update GEM` performance introduced in 1.10.0 (#3687, @segiddins)
+ - fix regression in `bundle update GEM` performance introduced in 1.10.0 ([#3687](https://github.com/bundler/bundler/issues/3687), @segiddins)
## 1.10.1 (2015-05-28)
Bugfixes:
- silence ruby warning when running CLI commands (@segiddins)
- - validate gemspecs in non-packaging mode (#3681, @segiddins)
- - ensure the same chdir mutex as RubyGems is used (#3680, @segiddins)
+ - validate gemspecs in non-packaging mode ([#3681](https://github.com/bundler/bundler/issues/3681), @segiddins)
+ - ensure the same chdir mutex as RubyGems is used ([#3680](https://github.com/bundler/bundler/issues/3680), @segiddins)
## 1.10.0 (2015-05-28)
@@ -900,54 +900,54 @@ Bugfixes:
Features:
- - dramatically speed up resolving some slow Gemfiles (#3635, @segiddins)
- - track CI platforms running Bundler (#3646, @fotanus)
+ - dramatically speed up resolving some slow Gemfiles ([#3635](https://github.com/bundler/bundler/issues/3635), @segiddins)
+ - track CI platforms running Bundler ([#3646](https://github.com/bundler/bundler/issues/3646), @fotanus)
Bugfixes:
- - allow `viz` to work with prereleases (#3621, #3217, @aprescott)
- - validate gemspecs used in path and git gems (#3639, @segiddins, @indirect)
- - stop printing config warnings when config is unchanged (#3649, @fotanus, @indirect)
+ - allow `viz` to work with prereleases ([#3621](https://github.com/bundler/bundler/issues/3621), [#3217](https://github.com/bundler/bundler/issues/3217), @aprescott)
+ - validate gemspecs used in path and git gems ([#3639](https://github.com/bundler/bundler/issues/3639), @segiddins, @indirect)
+ - stop printing config warnings when config is unchanged ([#3649](https://github.com/bundler/bundler/issues/3649), @fotanus, @indirect)
- Without groups saved via `config` are no longer ignored when the `--without` flag is used
## 1.10.0.pre.2 (2015-05-07)
Bugfixes:
- - make BUNDLED WITH backwards compatible (#3623, @segiddins)
+ - make BUNDLED WITH backwards compatible ([#3623](https://github.com/bundler/bundler/issues/3623), @segiddins)
## 1.10.0.pre.1 (2015-05-05)
Bugfixes:
- - always clean up tmp dirs (#3277, @hone, @indirect, @segiddins)
+ - always clean up tmp dirs ([#3277](https://github.com/bundler/bundler/issues/3277), @hone, @indirect, @segiddins)
## 1.10.0.pre (2015-05-03)
Features:
- - support gem extensions built into any directory on RubyGems 2.2+ (#3582, @voxik)
- - add 'bundler/inline' which provides a `gemfile` method (#3440, @segiddins)
- - improved error reports for Gemfile errors (#3480, @segiddins)
- - `lock` command (#3437, @segiddins)
- - add `ignore_messages` config to suppress post-install text (#3510, @pducks32)
- - improve `gem` minitest template (#3513, #3515, @arthurnn)
- - add `install --force` to re-install installed gems (#3519, @segiddins)
+ - support gem extensions built into any directory on RubyGems 2.2+ ([#3582](https://github.com/bundler/bundler/issues/3582), @voxik)
+ - add 'bundler/inline' which provides a `gemfile` method ([#3440](https://github.com/bundler/bundler/issues/3440), @segiddins)
+ - improved error reports for Gemfile errors ([#3480](https://github.com/bundler/bundler/issues/3480), @segiddins)
+ - `lock` command ([#3437](https://github.com/bundler/bundler/issues/3437), @segiddins)
+ - add `ignore_messages` config to suppress post-install text ([#3510](https://github.com/bundler/bundler/issues/3510), @pducks32)
+ - improve `gem` minitest template ([#3513](https://github.com/bundler/bundler/issues/3513), [#3515](https://github.com/bundler/bundler/issues/3515), @arthurnn)
+ - add `install --force` to re-install installed gems ([#3519](https://github.com/bundler/bundler/issues/3519), @segiddins)
- show more `outdated` information, including groups (@smlance, @indirect)
- - add optional groups to the Gemfile (#3531, @jhass)
- - accept glob argument to `gemspec` in Gemfile (#3464, @pjump)
- - make timeouts and retries configurable via `config` (#3601, @pducks32)
- - add `install_if` Gemfile method for conditional installs (#3611, @segiddins)
+ - add optional groups to the Gemfile ([#3531](https://github.com/bundler/bundler/issues/3531), @jhass)
+ - accept glob argument to `gemspec` in Gemfile ([#3464](https://github.com/bundler/bundler/issues/3464), @pjump)
+ - make timeouts and retries configurable via `config` ([#3601](https://github.com/bundler/bundler/issues/3601), @pducks32)
+ - add `install_if` Gemfile method for conditional installs ([#3611](https://github.com/bundler/bundler/issues/3611), @segiddins)
Bugfixes:
- - standalone mode now uses builtin gems correctly (#3610, @segiddins)
- - fix `rake spec:deps` on MinGW Ruby 2.0+ (#3487, @marutosi)
- - remember all y/n answers when generating gems (#3579, @pducks32)
+ - standalone mode now uses builtin gems correctly ([#3610](https://github.com/bundler/bundler/issues/3610), @segiddins)
+ - fix `rake spec:deps` on MinGW Ruby 2.0+ ([#3487](https://github.com/bundler/bundler/issues/3487), @marutosi)
+ - remember all y/n answers when generating gems ([#3579](https://github.com/bundler/bundler/issues/3579), @pducks32)
Performance:
- - use RubyGems stub specifications when possible (#3580, @segiddins)
+ - use RubyGems stub specifications when possible ([#3580](https://github.com/bundler/bundler/issues/3580), @segiddins)
Deprecations:
@@ -963,65 +963,65 @@ Features:
Bugfixes:
- - read mirror and credential settings from older versions (#3557, @Strech)
+ - read mirror and credential settings from older versions ([#3557](https://github.com/bundler/bundler/issues/3557), @Strech)
## 1.9.8 (2015-05-12)
Bugfixes:
- - fix regression in sudo mode introduced by 1.9.7 (#3642, @segiddins)
+ - fix regression in sudo mode introduced by 1.9.7 ([#3642](https://github.com/bundler/bundler/issues/3642), @segiddins)
## 1.9.7 (2015-05-11)
Bugfixes:
- - always clean up tmp dirs (#3277, @hone, @indirect, @segiddins)
+ - always clean up tmp dirs ([#3277](https://github.com/bundler/bundler/issues/3277), @hone, @indirect, @segiddins)
## 1.9.6 (2015-05-02)
Bugfixes:
- use RubyGems spec stubs if available (@segiddins)
- - allow creating gems with names containing two dashes (#3483, @janlelis)
- - allow creating gems with names extending constants (#3603, @amatsuda)
+ - allow creating gems with names containing two dashes ([#3483](https://github.com/bundler/bundler/issues/3483), @janlelis)
+ - allow creating gems with names extending constants ([#3603](https://github.com/bundler/bundler/issues/3603), @amatsuda)
## 1.9.5 (2015-04-29)
Bugfixes:
- - respect Gemfile sources when installing a gem present in two sources (#3585, @tmoore)
+ - respect Gemfile sources when installing a gem present in two sources ([#3585](https://github.com/bundler/bundler/issues/3585), @tmoore)
## 1.9.4 (2015-04-13)
Bugfixes:
- - fix regression in installing x86 and universal gems (#3565, @jdmundrawala)
- - improve error when gems are missing (#3564, @sealocal)
+ - fix regression in installing x86 and universal gems ([#3565](https://github.com/bundler/bundler/issues/3565), @jdmundrawala)
+ - improve error when gems are missing ([#3564](https://github.com/bundler/bundler/issues/3564), @sealocal)
## 1.9.3 (2015-04-12)
Bugfixes:
- - handle removal of `specs` from rubygems/rubygems@620910 (#3558, @indirect)
- - install 'universal' gems on Windows (#3066, @jdmundrawala)
- - stop passing --local during `rake install` task (#3236, @indirect)
- - guard against all possible accidental public gem pushes (#3533, @indirect)
+ - handle removal of `specs` from rubygems/rubygems@620910 ([#3558](https://github.com/bundler/bundler/issues/3558), @indirect)
+ - install 'universal' gems on Windows ([#3066](https://github.com/bundler/bundler/issues/3066), @jdmundrawala)
+ - stop passing --local during `rake install` task ([#3236](https://github.com/bundler/bundler/issues/3236), @indirect)
+ - guard against all possible accidental public gem pushes ([#3533](https://github.com/bundler/bundler/issues/3533), @indirect)
## 1.9.2 (2015-03-30)
Bugfixes:
- - ensure gem executables are executable (#3517, #3511, @indirect)
- - fix warnings in Molinillo (#3516, @segiddins)
- - ensure duplicate dependencies do not propagate (#3522, @segiddins)
- - keep gems locked when updating another gem from the same source (#3520, @indirect)
- - resolve race that could build gems without saved arguments (#3404, @indirect)
+ - ensure gem executables are executable ([#3517](https://github.com/bundler/bundler/issues/3517), [#3511](https://github.com/bundler/bundler/issues/3511), @indirect)
+ - fix warnings in Molinillo ([#3516](https://github.com/bundler/bundler/issues/3516), @segiddins)
+ - ensure duplicate dependencies do not propagate ([#3522](https://github.com/bundler/bundler/issues/3522), @segiddins)
+ - keep gems locked when updating another gem from the same source ([#3520](https://github.com/bundler/bundler/issues/3520), @indirect)
+ - resolve race that could build gems without saved arguments ([#3404](https://github.com/bundler/bundler/issues/3404), @indirect)
## 1.9.1 (2015-03-21)
Bugfixes:
- - avoid exception in 'bundler/gem_tasks' (#3492, @segiddins)
+ - avoid exception in 'bundler/gem_tasks' ([#3492](https://github.com/bundler/bundler/issues/3492), @segiddins)
## 1.9.0 (2015-03-20)
@@ -1030,7 +1030,7 @@ Bugfixes:
Bugfixes:
- make Bundler.which stop finding directories (@nohoho)
- - handle Bundler prereleases correctly (#3470, @segiddins)
+ - handle Bundler prereleases correctly ([#3470](https://github.com/bundler/bundler/issues/3470), @segiddins)
- add before_install to .travis.yml template for new gems (@kodnin)
## 1.9.0.pre.1 (2015-03-11)
@@ -1043,8 +1043,8 @@ Bugfixes:
Features:
- - prefer gemspecs closest to the directory root (#3428, @segiddins)
- - debug log for API request limits (#3452, @neerfri)
+ - prefer gemspecs closest to the directory root ([#3428](https://github.com/bundler/bundler/issues/3428), @segiddins)
+ - debug log for API request limits ([#3452](https://github.com/bundler/bundler/issues/3452), @neerfri)
"Features":
@@ -1061,20 +1061,20 @@ Bugfixes:
Bugfixes:
- - Respect Gemfile sources when installing a gem present in two sources (#3585, @tmoore)
+ - Respect Gemfile sources when installing a gem present in two sources ([#3585](https://github.com/bundler/bundler/issues/3585), @tmoore)
## 1.8.7 (2015-04-07)
Bugfixes:
- - stop suppressing errors inside gems that get required (#3549, @indirect)
+ - stop suppressing errors inside gems that get required ([#3549](https://github.com/bundler/bundler/issues/3549), @indirect)
## 1.8.6 (2015-03-30)
Bugfixes:
- - keep gems locked when updating another gem from the same source (#3250, @indirect)
- - resolve race that could build gems without saved arguments (#3404, @indirect)
+ - keep gems locked when updating another gem from the same source ([#3250](https://github.com/bundler/bundler/issues/3250), @indirect)
+ - resolve race that could build gems without saved arguments ([#3404](https://github.com/bundler/bundler/issues/3404), @indirect)
## 1.8.5 (2015-03-11)
@@ -1087,44 +1087,44 @@ Bugfixes:
Bugfixes:
- - document --all-platforms option (#3449, @moeffju)
- - find gems from all sources on exec after install (#3450, @TimMoore)
+ - document --all-platforms option ([#3449](https://github.com/bundler/bundler/issues/3449), @moeffju)
+ - find gems from all sources on exec after install ([#3450](https://github.com/bundler/bundler/issues/3450), @TimMoore)
## 1.8.3 (2015-02-24)
Bugfixes:
- handle boolean values for gem settings (@EduardoBautista)
- - stop always looking for updated `path` gems (#3414, #3417, #3429, @TimMoore)
+ - stop always looking for updated `path` gems ([#3414](https://github.com/bundler/bundler/issues/3414), [#3417](https://github.com/bundler/bundler/issues/3417), [#3429](https://github.com/bundler/bundler/issues/3429), @TimMoore)
## 1.8.2 (2015-02-14)
Bugfixes:
- - allow config settings for gems with 'http' in the name again (#3398, @TimMoore)
+ - allow config settings for gems with 'http' in the name again ([#3398](https://github.com/bundler/bundler/issues/3398), @TimMoore)
## 1.8.1 (2015-02-13)
Bugfixes:
- - synchronize building git gem native extensions (#3385, @antifuchs & @indirect)
- - set gemspec bindir correctly (#3392, @TimMoore)
- - request lockfile deletion when it is malformed (#3396, @indirect)
- - explain problem when mirror config is missing (#3386, @indirect)
- - explain problem when caching causes permission error (#3390, @indirect)
- - normalize URLs in config keys (#3391, @indirect)
+ - synchronize building git gem native extensions ([#3385](https://github.com/bundler/bundler/issues/3385), @antifuchs & @indirect)
+ - set gemspec bindir correctly ([#3392](https://github.com/bundler/bundler/issues/3392), @TimMoore)
+ - request lockfile deletion when it is malformed ([#3396](https://github.com/bundler/bundler/issues/3396), @indirect)
+ - explain problem when mirror config is missing ([#3386](https://github.com/bundler/bundler/issues/3386), @indirect)
+ - explain problem when caching causes permission error ([#3390](https://github.com/bundler/bundler/issues/3390), @indirect)
+ - normalize URLs in config keys ([#3391](https://github.com/bundler/bundler/issues/3391), @indirect)
## 1.8.0 (2015-02-10)
Bugfixes:
- - gemfile `github` blocks now work (#3379, @indirect)
+ - gemfile `github` blocks now work ([#3379](https://github.com/bundler/bundler/issues/3379), @indirect)
Bugfixes from v1.7.13:
- - look up installed gems in remote sources (#3300, #3368, #3377, #3380, #3381, @indirect)
- - look up gems across all sources to satisfy dependencies (#3365, @keiths-osc)
- - request dependencies for no more than 100 gems at a time (#3367, @segiddins)
+ - look up installed gems in remote sources ([#3300](https://github.com/bundler/bundler/issues/3300), [#3368](https://github.com/bundler/bundler/issues/3368), [#3377](https://github.com/bundler/bundler/issues/3377), [#3380](https://github.com/bundler/bundler/issues/3380), [#3381](https://github.com/bundler/bundler/issues/3381), @indirect)
+ - look up gems across all sources to satisfy dependencies ([#3365](https://github.com/bundler/bundler/issues/3365), @keiths-osc)
+ - request dependencies for no more than 100 gems at a time ([#3367](https://github.com/bundler/bundler/issues/3367), @segiddins)
## 1.8.0.rc (2015-01-26)
@@ -1134,7 +1134,7 @@ Features:
Bugfixes:
- - don't add extra quotes around long, quoted config values (@aroben, #3338)
+ - don't add extra quotes around long, quoted config values (@aroben, [#3338](https://github.com/bundler/bundler/issues/3338))
Security:
@@ -1144,7 +1144,7 @@ Security:
Features:
- - add metadata allowed_push_host to new gem template (#3002, @juanitofatas)
+ - add metadata allowed_push_host to new gem template ([#3002](https://github.com/bundler/bundler/issues/3002), @juanitofatas)
- adds a `--no-install` flag to `bundle package` (@d-reinhold)
- add `bundle config auto_install true` to install automatically (@smashwilson)
- add `bundle viz --without` to exclude gem groups from resulting graph (@fnichol)
@@ -1179,66 +1179,66 @@ Documentation:
Bugfixes:
- - Respect Gemfile sources when installing a gem present in two sources (#3585, @tmoore)
+ - Respect Gemfile sources when installing a gem present in two sources ([#3585](https://github.com/bundler/bundler/issues/3585), @tmoore)
## 1.7.14 (2015-03-30)
Bugfixes:
- - Keep gems locked when updating another gem from the same source (#3250, @indirect)
- - Don't add extra quotes around long, quoted config values (@aroben, #3338)
+ - Keep gems locked when updating another gem from the same source ([#3250](https://github.com/bundler/bundler/issues/3250), @indirect)
+ - Don't add extra quotes around long, quoted config values (@aroben, [#3338](https://github.com/bundler/bundler/issues/3338))
## 1.7.13 (2015-02-07)
Bugfixes:
- - Look up installed gems in remote sources (#3300, #3368, #3377, #3380, #3381, @indirect)
- - Look up gems across all sources to satisfy dependencies (#3365, @keiths-osc)
- - Request dependencies for no more than 100 gems at a time (#3367, @segiddins)
+ - Look up installed gems in remote sources ([#3300](https://github.com/bundler/bundler/issues/3300), [#3368](https://github.com/bundler/bundler/issues/3368), [#3377](https://github.com/bundler/bundler/issues/3377), [#3380](https://github.com/bundler/bundler/issues/3380), [#3381](https://github.com/bundler/bundler/issues/3381), @indirect)
+ - Look up gems across all sources to satisfy dependencies ([#3365](https://github.com/bundler/bundler/issues/3365), @keiths-osc)
+ - Request dependencies for no more than 100 gems at a time ([#3367](https://github.com/bundler/bundler/issues/3367), @segiddins)
## 1.7.12 (2015-01-08)
Bugfixes:
- - Always send credentials for sources, fixing private Gemfury gems (#3342, @TimMoore)
+ - Always send credentials for sources, fixing private Gemfury gems ([#3342](https://github.com/bundler/bundler/issues/3342), @TimMoore)
## 1.7.11 (2015-01-04)
Bugfixes:
- - Recognize `:mri_22` and `:mingw_22`, rather than just `:ruby_22` (#3328, @myabc)
+ - Recognize `:mri_22` and `:mingw_22`, rather than just `:ruby_22` ([#3328](https://github.com/bundler/bundler/issues/3328), @myabc)
## 1.7.10 (2014-12-29)
Bugfixes:
- - Fix source blocks sometimes causing deployment mode to fail wrongly (#3298, @TimMoore)
+ - Fix source blocks sometimes causing deployment mode to fail wrongly ([#3298](https://github.com/bundler/bundler/issues/3298), @TimMoore)
Features(?):
- - Support `platform :mri_22` and related version bits (#3309, @thomasfedb)
+ - Support `platform :mri_22` and related version bits ([#3309](https://github.com/bundler/bundler/issues/3309), @thomasfedb)
## 1.7.9 (2014-12-09)
Bugfixes:
- - Fix an issue where bundler sometime spams one gem in Gemfile.lock (#3216, @Who828)
- - Ensure bundle update installs the newer version of the gem (#3089, @Who828)
- - Fix an regression which stopped Bundler from resolving some Gemfiles (#3059, #3248, @Who828)
+ - Fix an issue where bundler sometime spams one gem in Gemfile.lock ([#3216](https://github.com/bundler/bundler/issues/3216), @Who828)
+ - Ensure bundle update installs the newer version of the gem ([#3089](https://github.com/bundler/bundler/issues/3089), @Who828)
+ - Fix an regression which stopped Bundler from resolving some Gemfiles ([#3059](https://github.com/bundler/bundler/issues/3059), [#3248](https://github.com/bundler/bundler/issues/3248), @Who828)
## 1.7.8 (2014-12-06)
Bugfixes:
- - Hide credentials while warning about gems with ambiguous sources (#3256, @TimMoore)
+ - Hide credentials while warning about gems with ambiguous sources ([#3256](https://github.com/bundler/bundler/issues/3256), @TimMoore)
## 1.7.7 (2014-11-19)
Bugfixes:
- - Ensure server credentials stored in config or ENV will be used (#3180, @arronmabrey)
- - Fix race condition causing errors while installing git-based gems (#3174, @Who828)
- - Use single quotes in config so YAML won't add more quotes (#3261, @indirect)
+ - Ensure server credentials stored in config or ENV will be used ([#3180](https://github.com/bundler/bundler/issues/3180), @arronmabrey)
+ - Fix race condition causing errors while installing git-based gems ([#3174](https://github.com/bundler/bundler/issues/3174), @Who828)
+ - Use single quotes in config so YAML won't add more quotes ([#3261](https://github.com/bundler/bundler/issues/3261), @indirect)
## 1.7.6 (2014-11-11)
@@ -1250,17 +1250,17 @@ Bugfixes:
Bugfixes:
- - Fix --deployment with source blocks and non-alphabetical gems (#3224, @TimMoore)
+ - Fix --deployment with source blocks and non-alphabetical gems ([#3224](https://github.com/bundler/bundler/issues/3224), @TimMoore)
- Vendor CA chain to validate new rubygems.org HTTPS certificate (@indirect)
## 1.7.4 (2014-10-19)
Bugfixes:
- - Allow --deployment after `pack` while using source blocks (#3167, @TimMoore)
- - Use dependency API even when HTTP credentials are in ENV (#3191, @fvaleur)
- - Silence warnings (including root warning) in --quiet mode (#3186, @indirect)
- - Stop asking gem servers for gems already found locally (#2909, @dubek)
+ - Allow --deployment after `pack` while using source blocks ([#3167](https://github.com/bundler/bundler/issues/3167), @TimMoore)
+ - Use dependency API even when HTTP credentials are in ENV ([#3191](https://github.com/bundler/bundler/issues/3191), @fvaleur)
+ - Silence warnings (including root warning) in --quiet mode ([#3186](https://github.com/bundler/bundler/issues/3186), @indirect)
+ - Stop asking gem servers for gems already found locally ([#2909](https://github.com/bundler/bundler/issues/2909), @dubek)
## 1.7.3 (2014-09-14)
@@ -1318,15 +1318,15 @@ Bugfixes:
Bugfixes:
- - require openssl explicitly to fix rare HTTPS request failures (@indirect, #3107)
+ - require openssl explicitly to fix rare HTTPS request failures (@indirect, [#3107](https://github.com/bundler/bundler/issues/3107))
## 1.6.4 (2014-07-17)
Bugfixes:
- - fix undefined constant error when can't find gem during binstubs (#3095, @jetaggart)
- - work when installed git gems are not writable (#3092, @pmahoney)
- - don't store configured source credentials in Gemfile.lock (#3045, @lhz)
+ - fix undefined constant error when can't find gem during binstubs ([#3095](https://github.com/bundler/bundler/issues/3095), @jetaggart)
+ - work when installed git gems are not writable ([#3092](https://github.com/bundler/bundler/issues/3092), @pmahoney)
+ - don't store configured source credentials in Gemfile.lock ([#3045](https://github.com/bundler/bundler/issues/3045), @lhz)
- don't include config source credentials in the lockfile (Lars Haugseth)
- use threads for jobs on Rubinius (@YorickPeterse)
- skip dependencies from other platforms (@mvz)
@@ -1336,30 +1336,30 @@ Bugfixes:
Bugfixes:
- - fix regression when resolving many conflicts (#2994, @Who828)
- - use local gemspec for builtin gems during install --local (#3041, @Who828)
- - don't warn about sudo when installing on Windows (#2984, @indirect)
+ - fix regression when resolving many conflicts ([#2994](https://github.com/bundler/bundler/issues/2994), @Who828)
+ - use local gemspec for builtin gems during install --local ([#3041](https://github.com/bundler/bundler/issues/3041), @Who828)
+ - don't warn about sudo when installing on Windows ([#2984](https://github.com/bundler/bundler/issues/2984), @indirect)
- shell escape `bundle open` arguments (@indirect)
## 1.6.2 (2014-04-13)
Bugfixes:
- - fix an exception when using builtin gems (#2915, #2963, @gnufied)
- - cache gems that are built in to the running ruby (#2975, @indirect)
- - re-allow deploying cached git gems without git installed (#2968, @aughr)
+ - fix an exception when using builtin gems ([#2915](https://github.com/bundler/bundler/issues/2915), [#2963](https://github.com/bundler/bundler/issues/2963), @gnufied)
+ - cache gems that are built in to the running ruby ([#2975](https://github.com/bundler/bundler/issues/2975), @indirect)
+ - re-allow deploying cached git gems without git installed ([#2968](https://github.com/bundler/bundler/issues/2968), @aughr)
- keep standalone working even with builtin gems (@indirect)
- - don't update vendor/cache in deployment mode (#2921, @indirect)
+ - don't update vendor/cache in deployment mode ([#2921](https://github.com/bundler/bundler/issues/2921), @indirect)
Features:
- - warn informatively when `bundle install` is run as root (#2936, @1337807)
+ - warn informatively when `bundle install` is run as root ([#2936](https://github.com/bundler/bundler/issues/2936), @1337807)
## 1.6.1 (2014-04-02)
Bugfixes:
- - update C extensions when git gem versions change (#2948, @dylanahsmith)
+ - update C extensions when git gem versions change ([#2948](https://github.com/bundler/bundler/issues/2948), @dylanahsmith)
Features:
@@ -1370,15 +1370,15 @@ Features:
Bugfixes:
- many Gemfiles that caused incorrect errors now resolve correctly (@Who828)
- - redirects across hosts now work on rubies without OpenSSL (#2686, @grddev)
- - gemspecs now handle filenames with newlines (#2634, @jasonmp85)
+ - redirects across hosts now work on rubies without OpenSSL ([#2686](https://github.com/bundler/bundler/issues/2686), @grddev)
+ - gemspecs now handle filenames with newlines ([#2634](https://github.com/bundler/bundler/issues/2634), @jasonmp85)
- support escaped characters in usernames and passwords (@punkie)
- no more exception on `update GEM` without lock file (@simi)
- - allow long config values (#2823, @kgrz)
- - cache successfully even locked to gems shipped with Ruby (#2869, @aughr)
- - respect NO_PROXY even if a proxy is configured (#2878, @stlay)
- - only retry git commands that hit the network (#2899, @timmoore)
- - fix NameError regression when OpenSSL is not available (#2898, @timmoore)
+ - allow long config values ([#2823](https://github.com/bundler/bundler/issues/2823), @kgrz)
+ - cache successfully even locked to gems shipped with Ruby ([#2869](https://github.com/bundler/bundler/issues/2869), @aughr)
+ - respect NO_PROXY even if a proxy is configured ([#2878](https://github.com/bundler/bundler/issues/2878), @stlay)
+ - only retry git commands that hit the network ([#2899](https://github.com/bundler/bundler/issues/2899), @timmoore)
+ - fix NameError regression when OpenSSL is not available ([#2898](https://github.com/bundler/bundler/issues/2898), @timmoore)
- handle exception installing when build_info owned by root (@Who828)
- skip HTTP redirects from rubygems.org, huge speed boost (@Who828)
@@ -1389,13 +1389,13 @@ Features:
- HTTP auth may now be stored in `bundle config` (@smashwilson)
- some complex Gemfiles are resolved up to 10x faster (@Who828)
- add support for IRB alternatives such as Pry and Ripl (@joallard, @postmodern)
- - highlight installed or updated gems (#2722, #2741, @yaotti, @simi)
+ - highlight installed or updated gems ([#2722](https://github.com/bundler/bundler/issues/2722), [#2741](https://github.com/bundler/bundler/issues/2741), @yaotti, @simi)
- display the `post_install_message` for gems installed via :git (@phallstrom)
- `bundle outdated --strict` now only reports allowed updates (@davidblondeau)
- `bundle show --verbose` Add gem summary to the output (@lardcanoe)
- `bundle gem GEM --ext` now generates a skeleton for a C extension (@superdealloc)
- Avoid using threequals operator where possible (@as-cii)
- - Add `bundle update --group` to update specific group (#2731 @banyan)
+ - Add `bundle update --group` to update specific group ([#2731](https://github.com/bundler/bundler/issues/2731) @banyan)
Documentation:
@@ -1405,7 +1405,7 @@ Documentation:
Bugfixes:
- - find "missing" gems that are actually present (#2780, #2818, #2854)
+ - find "missing" gems that are actually present ([#2780](https://github.com/bundler/bundler/issues/2780), [#2818](https://github.com/bundler/bundler/issues/2818), [#2854](https://github.com/bundler/bundler/issues/2854))
- use n-1 cores when given n jobs for parallel install (@jdickey)
## 1.5.2 (2014-01-10)
@@ -1450,19 +1450,19 @@ Bugfixes:
Features:
- - bundle update also accepts --jobs (#2692, @mrkn)
- - add fork URL to README for new `bundle gem` (#2665, @zzak)
- - add `bundle outdated --strict` (#2685, @davidblondeau)
- - warn if same gem/version is added twice (#2679, @jendiamond)
- - don't redownload installed specs for `bundle install` (#2680, @cainlevy)
- - override gem sources with mirrors (#2650, @danielsdeleo, @mkristian)
+ - bundle update also accepts --jobs ([#2692](https://github.com/bundler/bundler/issues/2692), @mrkn)
+ - add fork URL to README for new `bundle gem` ([#2665](https://github.com/bundler/bundler/issues/2665), @zzak)
+ - add `bundle outdated --strict` ([#2685](https://github.com/bundler/bundler/issues/2685), @davidblondeau)
+ - warn if same gem/version is added twice ([#2679](https://github.com/bundler/bundler/issues/2679), @jendiamond)
+ - don't redownload installed specs for `bundle install` ([#2680](https://github.com/bundler/bundler/issues/2680), @cainlevy)
+ - override gem sources with mirrors ([#2650](https://github.com/bundler/bundler/issues/2650), @danielsdeleo, @mkristian)
Bugfixes:
- - fix sharing same SSL socket when forking workers for parallel install (#2632)
- - fix msg typo in GitNotAllowedError (#2654, @joyicecloud)
- - fix Bundler.which for directories (#2697, @rhysd)
- - properly require `Capistrano::Version` (#2690, @steveklabnik)
+ - fix sharing same SSL socket when forking workers for parallel install ([#2632](https://github.com/bundler/bundler/issues/2632))
+ - fix msg typo in GitNotAllowedError ([#2654](https://github.com/bundler/bundler/issues/2654), @joyicecloud)
+ - fix Bundler.which for directories ([#2697](https://github.com/bundler/bundler/issues/2697), @rhysd)
+ - properly require `Capistrano::Version` ([#2690](https://github.com/bundler/bundler/issues/2690), @steveklabnik)
- search for git.exe and git
- fix the bug that downloads every spec when API fetcher encouters an error
- only retry network requests
@@ -1471,10 +1471,10 @@ Bugfixes:
Features:
- - add support for the x64-mingw32 platform (#2356, #2590, @larskanis)
+ - add support for the x64-mingw32 platform ([#2356](https://github.com/bundler/bundler/issues/2356), [#2590](https://github.com/bundler/bundler/issues/2590), @larskanis)
- add :patchlevel option to ruby DSL
- - add `bundler` bin (#2598, @kirs)
- - friendly ambiguous error messages (#2581, #2550, @jlsuttles, @jendiamond, @joyicecloud)
+ - add `bundler` bin ([#2598](https://github.com/bundler/bundler/issues/2598), @kirs)
+ - friendly ambiguous error messages ([#2581](https://github.com/bundler/bundler/issues/2581), [#2550](https://github.com/bundler/bundler/issues/2550), @jlsuttles, @jendiamond, @joyicecloud)
- add `:jruby_18` and `:jruby_19` platform options (@mcfiredrill)
- add X.509 client certificates for auth without passwords (@snackbandit)
- add `exec --keep-file-descriptors` for Ruby 1.9-like behavior on 2.0 (@steved555)
@@ -1486,56 +1486,56 @@ Features:
Bugfixes:
- - allow passwordless Basic Auth (#2606, @rykov)
+ - allow passwordless Basic Auth ([#2606](https://github.com/bundler/bundler/issues/2606), @rykov)
- don't suggest `gem install foo` when `foo` is a git gem that fails (@kirs)
- - revert #2569, staying compatible with git: instead of https: for :github gems
+ - revert [#2569](https://github.com/bundler/bundler/issues/2569), staying compatible with git: instead of https: for :github gems
- handle exceptions while installing gems in parallel (@gnufied)
## 1.4.0.pre.1 (2013-08-04)
Features:
- - retry network requests while installing gems (#2561, @ascherger)
- - faster installs using gemspecs from the local system cache (#2497, @mipearson)
- - add `bundle install -jN` for N parallel gem installations (#2481, @eagletmt)
+ - retry network requests while installing gems ([#2561](https://github.com/bundler/bundler/issues/2561), @ascherger)
+ - faster installs using gemspecs from the local system cache ([#2497](https://github.com/bundler/bundler/issues/2497), @mipearson)
+ - add `bundle install -jN` for N parallel gem installations ([#2481](https://github.com/bundler/bundler/issues/2481), @eagletmt)
- add `ENV['DEBUG_RESOLVER_TREE']` outputs resolver tree (@dblock)
- - set $MANPATH so `bundle exec man name` works (#1624, @sunaku)
- - use `man` instead of `groff` (#2579, @ixti, @simi)
- - add Gemfile dependency info to bundle outdated output (#2487, @rahearn)
- - allow `require: true` as an alias for `require: <name>` (#2538, @ndbroadbent)
- - rescue and report Thor errors (#2478, @pjvds)
- - detect cyclic dependencies (#2564, @gnufied)
- - support multiple gems in `binstubs` (#2576, @lucasmazza)
- - use https instead of git for :github gems (#2569, @fuadsaud)
- - add quiet option to `bundle package` (#2573, @shtirlic)
- - use RUBYLIB instead of RUBYOPT for better Windows support (#2536, @equinux)
+ - set $MANPATH so `bundle exec man name` works ([#1624](https://github.com/bundler/bundler/issues/1624), @sunaku)
+ - use `man` instead of `groff` ([#2579](https://github.com/bundler/bundler/issues/2579), @ixti, @simi)
+ - add Gemfile dependency info to bundle outdated output ([#2487](https://github.com/bundler/bundler/issues/2487), @rahearn)
+ - allow `require: true` as an alias for `require: <name>` ([#2538](https://github.com/bundler/bundler/issues/2538), @ndbroadbent)
+ - rescue and report Thor errors ([#2478](https://github.com/bundler/bundler/issues/2478), @pjvds)
+ - detect cyclic dependencies ([#2564](https://github.com/bundler/bundler/issues/2564), @gnufied)
+ - support multiple gems in `binstubs` ([#2576](https://github.com/bundler/bundler/issues/2576), @lucasmazza)
+ - use https instead of git for :github gems ([#2569](https://github.com/bundler/bundler/issues/2569), @fuadsaud)
+ - add quiet option to `bundle package` ([#2573](https://github.com/bundler/bundler/issues/2573), @shtirlic)
+ - use RUBYLIB instead of RUBYOPT for better Windows support ([#2536](https://github.com/bundler/bundler/issues/2536), @equinux)
Bugfixes:
- - reduce stack size while resolving to fix JRuby overflow (#2510, @headius)
- - display GitErrors while loading specs in --verbose mode (#2461)
- - allow the same options hash to be passed to multiple gems (#2447)
- - handle missing binaries without an exception (#2019, @luismreis)
+ - reduce stack size while resolving to fix JRuby overflow ([#2510](https://github.com/bundler/bundler/issues/2510), @headius)
+ - display GitErrors while loading specs in --verbose mode ([#2461](https://github.com/bundler/bundler/issues/2461))
+ - allow the same options hash to be passed to multiple gems ([#2447](https://github.com/bundler/bundler/issues/2447))
+ - handle missing binaries without an exception ([#2019](https://github.com/bundler/bundler/issues/2019), @luismreis)
## 1.3.6 (8 January 2014)
Bugfixes:
- make gemspec path option preserve relative paths in lock file (@bwillis)
- - use umask when creating binstubs (#1618, @v-yarotsky)
- - warn if graphviz is not installed (#2435, @Agis-)
+ - use umask when creating binstubs ([#1618](https://github.com/bundler/bundler/issues/1618), @v-yarotsky)
+ - warn if graphviz is not installed ([#2435](https://github.com/bundler/bundler/issues/2435), @Agis-)
- show git errors while loading gemspecs
- - don't mutate gem method options hash (#2447)
- - print Thor errors (#2478, @pjvds)
+ - don't mutate gem method options hash ([#2447](https://github.com/bundler/bundler/issues/2447))
+ - print Thor errors ([#2478](https://github.com/bundler/bundler/issues/2478), @pjvds)
- print Rubygems system exit errors (James Cook)
- more Pathnames into Strings for MacRuby (@kml)
- preserve original gemspec path (@bwillis)
- - remove warning about deps with :git (#1651, @ixti)
- - split git files on null (#2634, @jasonmp85)
- - handle cross-host redirects without SSL (#2686, @grddev)
+ - remove warning about deps with :git ([#1651](https://github.com/bundler/bundler/issues/1651), @ixti)
+ - split git files on null ([#2634](https://github.com/bundler/bundler/issues/2634), @jasonmp85)
+ - handle cross-host redirects without SSL ([#2686](https://github.com/bundler/bundler/issues/2686), @grddev)
- handle Rubygems 2 security exception (@zzak)
- reinstall gems if they are missing with spec present
- - set binstub permissions using umask (#1618, @v-yarotsky)
+ - set binstub permissions using umask ([#1618](https://github.com/bundler/bundler/issues/1618), @v-yarotsky)
## 1.3.5 (3 April 2013)
@@ -1611,28 +1611,28 @@ Security:
- validate SSL certificate chain during HTTPS network requests
- don't send HTTP Basic Auth creds when redirected to other hosts (@perplexes)
- - add `--trust-policy` to `install`, like `gem install -P` (@CosmicCat, #2293)
+ - add `--trust-policy` to `install`, like `gem install -P` (@CosmicCat, [#2293](https://github.com/bundler/bundler/issues/2293))
Features:
- - optimize resolver when too new of a gem is already activated (@rykov, #2248)
+ - optimize resolver when too new of a gem is already activated (@rykov, [#2248](https://github.com/bundler/bundler/issues/2248))
- update Net::HTTP::Persistent for SSL cert validation and no_proxy ENV
- explain SSL cert validation failures
- generate gemspecs when installing git repos, removing shellouts
- add pager selection (@csgui)
- - add `licenses` command (@bryanwoods, #1898)
- - sort output from `outdated` (@richardkmichael, #1896)
- - add a .travis.yml to `gem -t` (@ndbroadbent, #2143)
+ - add `licenses` command (@bryanwoods, [#1898](https://github.com/bundler/bundler/issues/1898))
+ - sort output from `outdated` (@richardkmichael, [#1896](https://github.com/bundler/bundler/issues/1896))
+ - add a .travis.yml to `gem -t` (@ndbroadbent, [#2143](https://github.com/bundler/bundler/issues/2143))
- inform users when the resolver starts
- disable reverse DNS to speed up API requests (@raggi)
Bugfixes:
- - raise errors while requiring dashed gems (#1807)
- - quote the Bundler path on Windows (@jgeiger, #1862, #1856)
- - load gemspecs containing unicode (@gaffneyc, #2301)
+ - raise errors while requiring dashed gems ([#1807](https://github.com/bundler/bundler/issues/1807))
+ - quote the Bundler path on Windows (@jgeiger, [#1862](https://github.com/bundler/bundler/issues/1862), [#1856](https://github.com/bundler/bundler/issues/1856))
+ - load gemspecs containing unicode (@gaffneyc, [#2301](https://github.com/bundler/bundler/issues/2301))
- support any ruby version in --standalone
- - resolve some ruby -w warnings (@chastell, #2193)
+ - resolve some ruby -w warnings (@chastell, [#2193](https://github.com/bundler/bundler/issues/2193))
- don't scare users with an error message during API fallback
- `install --binstubs` is back to overwriting. thanks, SemVer.
@@ -1640,7 +1640,7 @@ Bugfixes:
Bugfixes:
- - stubs for gems with dev deps no longer cause exceptions (#2272)
+ - stubs for gems with dev deps no longer cause exceptions ([#2272](https://github.com/bundler/bundler/issues/2272))
- don't suggest binstubs to --binstubs users
## 1.3.0.pre.6 (22 January 2013)
@@ -1664,7 +1664,7 @@ Bugfixes:
Features:
- make `--standalone` require lines ruby engine/version agnostic
- - add `--dry-run` to `bundle clean` (@wfarr, #2237)
+ - add `--dry-run` to `bundle clean` (@wfarr, [#2237](https://github.com/bundler/bundler/issues/2237))
Bugfixes:
@@ -1697,7 +1697,7 @@ Bugfixes:
- :git gems with extensions now work with Rubygems >= 2.0 (@jeremy)
- revert SemVer breaking change to :github
- - `outdated` exits non-zero if outdated gems found (@rohit, #2021)
+ - `outdated` exits non-zero if outdated gems found (@rohit, [#2021](https://github.com/bundler/bundler/issues/2021))
- https Gist URLs for compatibility with Gist 2.0 (@NARKOZ)
- namespaced gems no longer generate a superfluous directory (@banyan)
@@ -1705,15 +1705,15 @@ Bugfixes:
Features:
- - `config` expands local overrides like `local.rack .` (@gkop, #2205)
- - `gem` generates files correctly for names like `jquery-rails` (@banyan, #2201)
+ - `config` expands local overrides like `local.rack .` (@gkop, [#2205](https://github.com/bundler/bundler/issues/2205))
+ - `gem` generates files correctly for names like `jquery-rails` (@banyan, [#2201](https://github.com/bundler/bundler/issues/2201))
- use gems from gists with the :gist option in the Gemfile (@jgaskins)
Bugfixes:
- Gemfile sources other than rubygems.org work even when .gemrc contains sources
- - caching git gems now caches specs, fixing e.g. git ls-files (@bison, #2039)
- - `show GEM` now warns if the directory has been deleted (@rohit, #2070)
+ - caching git gems now caches specs, fixing e.g. git ls-files (@bison, [#2039](https://github.com/bundler/bundler/issues/2039))
+ - `show GEM` now warns if the directory has been deleted (@rohit, [#2070](https://github.com/bundler/bundler/issues/2070))
- git output hidden when running in --quiet mode (@rohit)
## 1.3.0.pre (Nov 29, 2012)
@@ -1724,7 +1724,7 @@ Features:
- compatible with Rubygems 2.0.0.preview2 (@drbrain, @evanphx)
- ruby 2.0 added to the `:ruby19` ABI-compatible platform
- lazy load YAML, allowing Psych to be specified in the Gemfile
- - significant performance improvements (@cheald, #2181)
+ - significant performance improvements (@cheald, [#2181](https://github.com/bundler/bundler/issues/2181))
- `inject` command for scripted Gemfile additions (Engine Yard)
- :github option uses slashless arguments as repo owner (@rking)
- `open` suggests gem names for typos (@jdelStrother)
@@ -1737,12 +1737,12 @@ Features:
Bugfixes:
- JRuby new works with HTTPS gem sources (@davidcelis)
- - `install` installs both rake rake-built gems at once (@crowbot, #2107)
+ - `install` installs both rake rake-built gems at once (@crowbot, [#2107](https://github.com/bundler/bundler/issues/2107))
- handle Errno::ETIMEDOUT errors (@jmoses)
- handle Errno::EAGAIN errors on JRuby
- disable ANSI coloring when output is redirected (@tomykaira)
- raise LoadErrors correctly during Bundler.require (@Empact)
- - do not swallow --verbose on `bundle exec` (@sol, #2102)
+ - do not swallow --verbose on `bundle exec` (@sol, [#2102](https://github.com/bundler/bundler/issues/2102))
- `gem` generates gemspecs that block double-requires
- `gem` generates gemspecs that admit they depend on rake
@@ -1764,9 +1764,9 @@ Features:
Bugfixes:
- don't send user/pass when redirected to another host (@perplexes)
- - load gemspecs containing unicode (@gaffneyc, #2301)
+ - load gemspecs containing unicode (@gaffneyc, [#2301](https://github.com/bundler/bundler/issues/2301))
- support any ruby version in --standalone
- - resolve some ruby -w warnings (@chastell, #2193)
+ - resolve some ruby -w warnings (@chastell, [#2193](https://github.com/bundler/bundler/issues/2193))
- don't scare users with an error message during API fallback
## 1.2.3 (Nov 29, 2012)
@@ -1810,41 +1810,41 @@ Bugfixes:
Features:
- - `check` now has a `--dry-run` option (@svenfuchs, #1811)
+ - `check` now has a `--dry-run` option (@svenfuchs, [#1811](https://github.com/bundler/bundler/issues/1811))
- loosen ruby directive for engines
- - prune git/path directories inside vendor/cache (@josevalim, #1988)
+ - prune git/path directories inside vendor/cache (@josevalim, [#1988](https://github.com/bundler/bundler/issues/1988))
- update vendored thor to 0.15.2 (@sferik)
- - add .txt to LICENSE (@postmodern, #2001)
- - add `config disable_local_branch_check` (@josevalim, #1985)
- - fall back on the full index when experiencing syck errors (#1419)
- - handle syntax errors in Ruby gemspecs (#1974)
+ - add .txt to LICENSE (@postmodern, [#2001](https://github.com/bundler/bundler/issues/2001))
+ - add `config disable_local_branch_check` (@josevalim, [#1985](https://github.com/bundler/bundler/issues/1985))
+ - fall back on the full index when experiencing syck errors ([#1419](https://github.com/bundler/bundler/issues/1419))
+ - handle syntax errors in Ruby gemspecs ([#1974](https://github.com/bundler/bundler/issues/1974))
Bugfixes:
- - fix `pack`/`cache` with `--all` (@josevalim, #1989)
+ - fix `pack`/`cache` with `--all` (@josevalim, [#1989](https://github.com/bundler/bundler/issues/1989))
- don't display warning message when `cache_all` is set
- - check for `nil` PATH (#2006)
- - Always try to keep original GEM_PATH (@drogus, #1920)
+ - check for `nil` PATH ([#2006](https://github.com/bundler/bundler/issues/2006))
+ - Always try to keep original GEM_PATH (@drogus, [#1920](https://github.com/bundler/bundler/issues/1920))
## 1.2.0.pre.1 (May 27, 2012)
Features:
- - Git gems import submodules of submodules recursively (@nwwatson, #1935)
+ - Git gems import submodules of submodules recursively (@nwwatson, [#1935](https://github.com/bundler/bundler/issues/1935))
Bugfixes:
- Exit from `check` with a non-zero status when frozen with no lock
- - Use `latest_release` in Capistrano and Vlad integration (#1264)
+ - Use `latest_release` in Capistrano and Vlad integration ([#1264](https://github.com/bundler/bundler/issues/1264))
- Work around a Ruby 1.9.3p194 bug in Psych when config files are empty
Documentation:
- Add instructions for local git repos to the `config` manpage
- Update the `Gemfile` manpage to include ruby versions (@stevenh512)
- - When OpenSSL is missing, provide instructions for fixing (#1776 etc.)
+ - When OpenSSL is missing, provide instructions for fixing ([#1776](https://github.com/bundler/bundler/issues/1776) etc.)
- Unknown exceptions now link to ISSUES for help instead of a new ticket
- - Correct inline help for `clean --force` (@dougbarth, #1911)
+ - Correct inline help for `clean --force` (@dougbarth, [#1911](https://github.com/bundler/bundler/issues/1911))
## 1.2.0.pre (May 4, 2012)
@@ -1855,28 +1855,28 @@ Features:
- It is possible to override a git repository via configuration.
For instance, if you have a git dependency on rack, you can force
it to use a local repo with `bundle config local.rack ~/path/to/rack`
- - Cache gemspec loads for performance (@dekellum, #1635)
- - add --full-index flag to `bundle update` (@fluxx, #1829)
- - add --quiet flag to `bundle update` (@nashby, #1654)
- - Add Bundler::GemHelper.gemspec (@knu, #1637)
- - Graceful handling of Gemfile syntax errors (@koraktor, #1661)
+ - Cache gemspec loads for performance (@dekellum, [#1635](https://github.com/bundler/bundler/issues/1635))
+ - add --full-index flag to `bundle update` (@fluxx, [#1829](https://github.com/bundler/bundler/issues/1829))
+ - add --quiet flag to `bundle update` (@nashby, [#1654](https://github.com/bundler/bundler/issues/1654))
+ - Add Bundler::GemHelper.gemspec (@knu, [#1637](https://github.com/bundler/bundler/issues/1637))
+ - Graceful handling of Gemfile syntax errors (@koraktor, [#1661](https://github.com/bundler/bundler/issues/1661))
- `bundle platform` command
- add ruby to DSL, to specify version of ruby
- error out if the ruby version doesn't match
Performance:
- - bundle exec shouldn't run Bundler.setup just setting the right rubyopts options is enough (@spastorino, #1598)
+ - bundle exec shouldn't run Bundler.setup just setting the right rubyopts options is enough (@spastorino, [#1598](https://github.com/bundler/bundler/issues/1598))
Bugfixes:
- - Avoid passing RUBYOPT changes in with_clean_env block (@eric1234, #1604)
+ - Avoid passing RUBYOPT changes in with_clean_env block (@eric1234, [#1604](https://github.com/bundler/bundler/issues/1604))
- Use the same ruby to run subprocesses as is running rake (@brixen)
Documentation:
- - Add :github documentation in DSL (@zofrex, #1848, #1851, #1852)
- - Add docs for the --no-cache option (@fluxx, #1796)
+ - Add :github documentation in DSL (@zofrex, [#1848](https://github.com/bundler/bundler/issues/1848), [#1851](https://github.com/bundler/bundler/issues/1851), [#1852](https://github.com/bundler/bundler/issues/1852))
+ - Add docs for the --no-cache option (@fluxx, [#1796](https://github.com/bundler/bundler/issues/1796))
- Add basic documentation for bin_path and bundle_path (@radar)
- Add documentation for the run method in Bundler::Installer
@@ -1890,23 +1890,23 @@ Features:
Bugfixes:
- - Use `latest_release` in Capistrano and Vlad integration (#1264)
+ - Use `latest_release` in Capistrano and Vlad integration ([#1264](https://github.com/bundler/bundler/issues/1264))
- Unknown exceptions now link to ISSUES for help instead of a new ticket
- - When OpenSSL is missing, provide instructions for fixing (#1776 etc.)
- - Correct inline help for `clean --force` (@dougbarth, #1911)
+ - When OpenSSL is missing, provide instructions for fixing ([#1776](https://github.com/bundler/bundler/issues/1776) etc.)
+ - Correct inline help for `clean --force` (@dougbarth, [#1911](https://github.com/bundler/bundler/issues/1911))
- Work around a Ruby 1.9.3p194 bug in Psych when config files are empty
## 1.1.3 (March 23, 2012)
Bugfixes:
- - escape the bundler root path (@tenderlove, #1789)
+ - escape the bundler root path (@tenderlove, [#1789](https://github.com/bundler/bundler/issues/1789))
## 1.1.2 (March 20, 2012)
Bugfixes:
- - Fix --deployment for multiple PATH sections of the same source (#1782)
+ - Fix --deployment for multiple PATH sections of the same source ([#1782](https://github.com/bundler/bundler/issues/1782))
## 1.1.1 (March 14, 2012)
@@ -1916,8 +1916,8 @@ Bugfixes:
- Stop asking users to report gem installation errors
- Clarify "no sources" message
- Use $\ so `bundle gem` gemspecs work on Windows (@postmodern)
- - URI-encode gem names for dependency API (@rohit, #1672)
- - Fix `cache` edge case in rubygems 1.3.7 (#1202)
+ - URI-encode gem names for dependency API (@rohit, [#1672](https://github.com/bundler/bundler/issues/1672))
+ - Fix `cache` edge case in rubygems 1.3.7 ([#1202](https://github.com/bundler/bundler/issues/1202))
Performance:
@@ -1939,10 +1939,10 @@ Performance:
Bugfixes:
- - Load gemspecs from git even when a released gem has the same version (#1609)
- - Declare an accurate Ruby version requirement of 1.8.7 or newer (#1619)
- - handle gemspec development dependencies correctly (@raggi, #1639)
- - Avoid passing RUBYOPT changes in with_clean_env block. (eric1234, #1604)
+ - Load gemspecs from git even when a released gem has the same version ([#1609](https://github.com/bundler/bundler/issues/1609))
+ - Declare an accurate Ruby version requirement of 1.8.7 or newer ([#1619](https://github.com/bundler/bundler/issues/1619))
+ - handle gemspec development dependencies correctly (@raggi, [#1639](https://github.com/bundler/bundler/issues/1639))
+ - Avoid passing RUBYOPT changes in with_clean_env block. (eric1234, [#1604](https://github.com/bundler/bundler/issues/1604))
## 1.1.rc.7 (Dec 29, 2011)
@@ -1954,7 +1954,7 @@ Bugfixes:
Bugfixes:
- - Fix performance regression from 1.0 (@spastorino, #1511, #1591, #1592)
+ - Fix performance regression from 1.0 (@spastorino, [#1511](https://github.com/bundler/bundler/issues/1511), [#1591](https://github.com/bundler/bundler/issues/1591), [#1592](https://github.com/bundler/bundler/issues/1592))
- Load gems correctly when GEM_HOME is blank
- Refresh gems so Bundler works from inside a bundle
- Handle empty .bundle/config files without an error
@@ -1969,64 +1969,64 @@ Bugfixes:
Features:
- - `bundle viz` has the option to output a DOT file instead of a PNG (@hirochachacha, #683)
+ - `bundle viz` has the option to output a DOT file instead of a PNG (@hirochachacha, [#683](https://github.com/bundler/bundler/issues/683))
Bugfixes:
- - Ensure binstubs generated when using --standalone point to the standalonde bundle (@cowboyd, #1588)
- - fix `bundle viz` (@hirochachacha, #1586)
+ - Ensure binstubs generated when using --standalone point to the standalonde bundle (@cowboyd, [#1588](https://github.com/bundler/bundler/issues/1588))
+ - fix `bundle viz` (@hirochachacha, [#1586](https://github.com/bundler/bundler/issues/1586))
## 1.1.rc.3 (Dec 8, 2011)
Bugfixes:
- - fix relative_path so it checks Bundler.root is actually in the beginning of the path (#1582)
- - fix bundle outdated doesn't list all gems (@joelmoss, #1521)
+ - fix relative_path so it checks Bundler.root is actually in the beginning of the path ([#1582](https://github.com/bundler/bundler/issues/1582))
+ - fix bundle outdated doesn't list all gems (@joelmoss, [#1521](https://github.com/bundler/bundler/issues/1521))
## 1.1.rc.2 (Dec 6, 2011)
Features:
- - Added README.md to `newgem` (@ognevsky, #1574)
- - Added LICENSE (MIT) to newgem (@ognevsky, #1571)
+ - Added README.md to `newgem` (@ognevsky, [#1574](https://github.com/bundler/bundler/issues/1574))
+ - Added LICENSE (MIT) to newgem (@ognevsky, [#1571](https://github.com/bundler/bundler/issues/1571))
Bugfixes:
- - only auto-namespace requires for implied requires (#1531)
- - fix bundle clean output for git repos (#1473)
- - use Gem.bindir for bundle clean (#1544, #1532)
- - use `Gem.load_env_plugins` instead of `Gem.load_env_plugins` (#1500, #1543)
- - differentiate Ruby 2.0 (trunk) from Ruby 1.9 (@tenderlove, #1539)
- - `bundle clean` handles 7 length git hash for bundle clean (#1490, #1491)
+ - only auto-namespace requires for implied requires ([#1531](https://github.com/bundler/bundler/issues/1531))
+ - fix bundle clean output for git repos ([#1473](https://github.com/bundler/bundler/issues/1473))
+ - use Gem.bindir for bundle clean ([#1544](https://github.com/bundler/bundler/issues/1544), [#1532](https://github.com/bundler/bundler/issues/1532))
+ - use `Gem.load_env_plugins` instead of `Gem.load_env_plugins` ([#1500](https://github.com/bundler/bundler/issues/1500), [#1543](https://github.com/bundler/bundler/issues/1543))
+ - differentiate Ruby 2.0 (trunk) from Ruby 1.9 (@tenderlove, [#1539](https://github.com/bundler/bundler/issues/1539))
+ - `bundle clean` handles 7 length git hash for bundle clean ([#1490](https://github.com/bundler/bundler/issues/1490), [#1491](https://github.com/bundler/bundler/issues/1491))
- fix Psych loading issues
- - Search $PATH for a binary rather than shelling out to `which` (@tenderlove, #1573)
- - do not clear RG cache unless we actually modify GEM_PATH and GEM_HOME- use `Gem.load_env_plugins` instead of `Gem.load_env_plugins` (#1500, #1543)
- - `newgem` now uses https://rubygems.org (#1562)
- - `bundle init` now uses https://rubygems.org (@jjb, #1522)
+ - Search $PATH for a binary rather than shelling out to `which` (@tenderlove, [#1573](https://github.com/bundler/bundler/issues/1573))
+ - do not clear RG cache unless we actually modify GEM_PATH and GEM_HOME- use `Gem.load_env_plugins` instead of `Gem.load_env_plugins` ([#1500](https://github.com/bundler/bundler/issues/1500), [#1543](https://github.com/bundler/bundler/issues/1543))
+ - `newgem` now uses https://rubygems.org ([#1562](https://github.com/bundler/bundler/issues/1562))
+ - `bundle init` now uses https://rubygems.org (@jjb, [#1522](https://github.com/bundler/bundler/issues/1522))
- `bundle install/update` does not autoclean when using --path for semver
Documentation:
- - added documentation for --shebang option for `bundle install` (@lunks, #1475, #1558)
+ - added documentation for --shebang option for `bundle install` (@lunks, [#1475](https://github.com/bundler/bundler/issues/1475), [#1558](https://github.com/bundler/bundler/issues/1558))
## 1.1.rc (Oct 3, 2011)
Features:
- - add `--shebang` option to bundle install (@bensie, #1467)
- - build passes on ruby 1.9.3rc1 (#1458, #1469)
- - hide basic auth credentials for custom sources (#1440, #1463)
+ - add `--shebang` option to bundle install (@bensie, [#1467](https://github.com/bundler/bundler/issues/1467))
+ - build passes on ruby 1.9.3rc1 ([#1458](https://github.com/bundler/bundler/issues/1458), [#1469](https://github.com/bundler/bundler/issues/1469))
+ - hide basic auth credentials for custom sources ([#1440](https://github.com/bundler/bundler/issues/1440), [#1463](https://github.com/bundler/bundler/issues/1463))
Bugfixes:
- - fix index search result caching (#1446, #1466)
- - fix fetcher prints multiple times during install (#1445, #1462)
+ - fix index search result caching ([#1446](https://github.com/bundler/bundler/issues/1446), [#1466](https://github.com/bundler/bundler/issues/1466))
+ - fix fetcher prints multiple times during install ([#1445](https://github.com/bundler/bundler/issues/1445), [#1462](https://github.com/bundler/bundler/issues/1462))
- don't mention API errors from non-rubygems.org sources
- - fix autoclean so it doesn't remove bins that are used (#1459, #1460)
+ - fix autoclean so it doesn't remove bins that are used ([#1459](https://github.com/bundler/bundler/issues/1459), [#1460](https://github.com/bundler/bundler/issues/1460))
Documentation:
- - add :require => [...] to the gemfile(5) manpage (@nono, #1468)
+ - add :require => [...] to the gemfile(5) manpage (@nono, [#1468](https://github.com/bundler/bundler/issues/1468))
## 1.1.pre.10 (Sep 27, 2011)
@@ -2039,75 +2039,75 @@ Features:
Features:
- `clean` will now clean up all old .gem and .gemspec files, cleaning up older pres
- - `clean` will be automatically run after bundle install and update when using `--path` (#1420, #1425)
- - `clean` now takes a `--force` option (#1247, #1426)
- - `clean` will clean up cached git dirs in bundle clean (#1390)
- - remove deprecations from DSL (#1119)
- - autorequire tries directories for gems with dashed names (#1205)
- - adds a `--paths` flag to `bundle show` to list all the paths of bundled gems (@tiegz, #1360)
- - load rubygems plugins in the bundle binary (@tpope, #1364)
- - make `--standalone` respect `--path` (@cowboyd, #1361)
-
-Bugfixes:
-
- - Fix `clean` to handle nested gems in a git repo (#1329)
- - Fix conflict from revert of benchmark tool (@boffbowsh, #1355)
- - Fix fatal error when unable to connect to gem source (#1269)
- - Fix `outdated` to find pre-release gems that are installed. (#1359)
- - Fix color for ui. (#1374)
+ - `clean` will be automatically run after bundle install and update when using `--path` ([#1420](https://github.com/bundler/bundler/issues/1420), [#1425](https://github.com/bundler/bundler/issues/1425))
+ - `clean` now takes a `--force` option ([#1247](https://github.com/bundler/bundler/issues/1247), [#1426](https://github.com/bundler/bundler/issues/1426))
+ - `clean` will clean up cached git dirs in bundle clean ([#1390](https://github.com/bundler/bundler/issues/1390))
+ - remove deprecations from DSL ([#1119](https://github.com/bundler/bundler/issues/1119))
+ - autorequire tries directories for gems with dashed names ([#1205](https://github.com/bundler/bundler/issues/1205))
+ - adds a `--paths` flag to `bundle show` to list all the paths of bundled gems (@tiegz, [#1360](https://github.com/bundler/bundler/issues/1360))
+ - load rubygems plugins in the bundle binary (@tpope, [#1364](https://github.com/bundler/bundler/issues/1364))
+ - make `--standalone` respect `--path` (@cowboyd, [#1361](https://github.com/bundler/bundler/issues/1361))
+
+Bugfixes:
+
+ - Fix `clean` to handle nested gems in a git repo ([#1329](https://github.com/bundler/bundler/issues/1329))
+ - Fix conflict from revert of benchmark tool (@boffbowsh, [#1355](https://github.com/bundler/bundler/issues/1355))
+ - Fix fatal error when unable to connect to gem source ([#1269](https://github.com/bundler/bundler/issues/1269))
+ - Fix `outdated` to find pre-release gems that are installed. ([#1359](https://github.com/bundler/bundler/issues/1359))
+ - Fix color for ui. ([#1374](https://github.com/bundler/bundler/issues/1374))
- Fix installing to user-owned system gems on OS X
- - Fix caching issue in the resolver (#1353, #1421)
+ - Fix caching issue in the resolver ([#1353](https://github.com/bundler/bundler/issues/1353), [#1421](https://github.com/bundler/bundler/issues/1421))
- Fix :github DSL option
## 1.1.pre.8 (Aug 13, 2011)
Bugfixes:
- - Fix `bundle check` to not print fatal error message (@cldwalker, #1347)
- - Fix require_sudo when Gem.bindir isn't writeable (#1352)
- - Fix not asking Gemcutter API for dependency chain of git gems in --deployment (#1254)
- - Fix `install --binstubs` when using --path (#1332)
+ - Fix `bundle check` to not print fatal error message (@cldwalker, [#1347](https://github.com/bundler/bundler/issues/1347))
+ - Fix require_sudo when Gem.bindir isn't writeable ([#1352](https://github.com/bundler/bundler/issues/1352))
+ - Fix not asking Gemcutter API for dependency chain of git gems in --deployment ([#1254](https://github.com/bundler/bundler/issues/1254))
+ - Fix `install --binstubs` when using --path ([#1332](https://github.com/bundler/bundler/issues/1332))
## 1.1.pre.7 (Aug 8, 2011)
Bugfixes:
- - Fixed invalid byte sequence error while installing gem on Ruby 1.9 (#1341)
+ - Fixed invalid byte sequence error while installing gem on Ruby 1.9 ([#1341](https://github.com/bundler/bundler/issues/1341))
- Fixed exception when sudo was needed to install gems (@spastorino)
## 1.1.pre.6 (Aug 8, 2011)
Bugfixes:
- - Fix cross repository dependencies (#1138)
- - Fix git dependency fetching from API endpoint (#1254)
- - Fixes for bundle outdated (@joelmoss, #1238)
- - Fix bundle standalone when using the endpoint (#1240)
+ - Fix cross repository dependencies ([#1138](https://github.com/bundler/bundler/issues/1138))
+ - Fix git dependency fetching from API endpoint ([#1254](https://github.com/bundler/bundler/issues/1254))
+ - Fixes for bundle outdated (@joelmoss, [#1238](https://github.com/bundler/bundler/issues/1238))
+ - Fix bundle standalone when using the endpoint ([#1240](https://github.com/bundler/bundler/issues/1240))
Features:
- - Implement `to_ary` to avoid calls to method_missing (@tenderlove, #1274)
- - bundle clean removes old .gem files (@cldwalker, #1293)
+ - Implement `to_ary` to avoid calls to method_missing (@tenderlove, [#1274](https://github.com/bundler/bundler/issues/1274))
+ - bundle clean removes old .gem files (@cldwalker, [#1293](https://github.com/bundler/bundler/issues/1293))
- Correcly identify missing child dependency in error message
- - Run pre-install, post-build, and post-install gem hooks for git gems (@warhammerkid, #1120)
- - create Gemfile.lock for empty Gemfile (#1218)
+ - Run pre-install, post-build, and post-install gem hooks for git gems (@warhammerkid, [#1120](https://github.com/bundler/bundler/issues/1120))
+ - create Gemfile.lock for empty Gemfile ([#1218](https://github.com/bundler/bundler/issues/1218))
## 1.1.pre.5 (June 11, 2011)
Bugfixes:
- - Fix LazySpecification on Ruby 1.9 (@dpiddy, #1232)
- - Fix HTTP proxy support (@leobessa, #878)
+ - Fix LazySpecification on Ruby 1.9 (@dpiddy, [#1232](https://github.com/bundler/bundler/issues/1232))
+ - Fix HTTP proxy support (@leobessa, [#878](https://github.com/bundler/bundler/issues/878))
Features:
- Speed up `install --deployment` by using the API endpoint
- - Support Basic HTTP Auth for the API endpoint (@dpiddy, #1229)
+ - Support Basic HTTP Auth for the API endpoint (@dpiddy, [#1229](https://github.com/bundler/bundler/issues/1229))
- Add `install --full-index` to disable the API endpoint, just in case
- Significantly speed up install by removing unneeded gemspec fetches
- - `outdated` command shows outdated gems (@joelmoss, #1130)
- - Print gem post install messages (@csquared, #1155)
- - Reduce memory use by removing Specification.new inside method_missing (@tenderlove, #1222)
+ - `outdated` command shows outdated gems (@joelmoss, [#1130](https://github.com/bundler/bundler/issues/1130))
+ - Print gem post install messages (@csquared, [#1155](https://github.com/bundler/bundler/issues/1155))
+ - Reduce memory use by removing Specification.new inside method_missing (@tenderlove, [#1222](https://github.com/bundler/bundler/issues/1222))
- Allow `check --path`
## 1.1.pre.4 (May 5, 2011)
@@ -2175,7 +2175,7 @@ Bugfixes:
Features:
- - Add platform :maglev (@timfel, #1444)
+ - Add platform :maglev (@timfel, [#1444](https://github.com/bundler/bundler/issues/1444))
Bugfixes:
@@ -2186,73 +2186,73 @@ Bugfixes:
Features:
- - Rescue interrupts to `bundle` while loading bundler.rb (#1395)
- - Allow clearing without groups by passing `--without ''` (#1259)
+ - Rescue interrupts to `bundle` while loading bundler.rb ([#1395](https://github.com/bundler/bundler/issues/1395))
+ - Allow clearing without groups by passing `--without ''` ([#1259](https://github.com/bundler/bundler/issues/1259))
Bugfixes:
- - Manually sort requirements in the lockfile (#1375)
+ - Manually sort requirements in the lockfile ([#1375](https://github.com/bundler/bundler/issues/1375))
- Remove several warnings generated by ruby -w (@stephencelis)
- - Handle trailing slashes on names passed to `gem` (#1372)
- - Name modules for gems like 'test-foo_bar' correctly (#1303)
- - Don't require Psych if Syck is already loaded (#1239)
+ - Handle trailing slashes on names passed to `gem` ([#1372](https://github.com/bundler/bundler/issues/1372))
+ - Name modules for gems like 'test-foo_bar' correctly ([#1303](https://github.com/bundler/bundler/issues/1303))
+ - Don't require Psych if Syck is already loaded ([#1239](https://github.com/bundler/bundler/issues/1239))
## 1.0.19.rc (September 13, 2011)
Features:
- Compatibility with Rubygems 1.8.10 installer changes
- - Report gem installation failures clearly (@rwilcox, #1380)
+ - Report gem installation failures clearly (@rwilcox, [#1380](https://github.com/bundler/bundler/issues/1380))
- Useful error for cap and vlad on first deploy (@nexmat, @kirs)
Bugfixes:
- `exec` now works when the command contains 'exec'
- - Only touch lock after changes on Windows (@robertwahler, #1358)
- - Keep load paths when #setup is called multiple times (@radsaq, #1379)
+ - Only touch lock after changes on Windows (@robertwahler, [#1358](https://github.com/bundler/bundler/issues/1358))
+ - Keep load paths when #setup is called multiple times (@radsaq, [#1379](https://github.com/bundler/bundler/issues/1379))
## 1.0.18 (August 16, 2011)
Bugfixes:
- Fix typo in DEBUG_RESOLVER (@geemus)
- - Fixes rake 0.9.x warning (@mtylty, #1333)
+ - Fixes rake 0.9.x warning (@mtylty, [#1333](https://github.com/bundler/bundler/issues/1333))
- Fix `bundle cache` again for rubygems 1.3.x
Features:
- - Run the bundle install earlier in a Capistrano deployment (@cgriego, #1300)
- - Support hidden gemspec (@trans, @cldwalker, #827)
- - Make fetch_specs faster (@zeha, #1294)
- - Allow overriding development deps loaded by #gemspec (@lgierth, #1245)
+ - Run the bundle install earlier in a Capistrano deployment (@cgriego, [#1300](https://github.com/bundler/bundler/issues/1300))
+ - Support hidden gemspec (@trans, @cldwalker, [#827](https://github.com/bundler/bundler/issues/827))
+ - Make fetch_specs faster (@zeha, [#1294](https://github.com/bundler/bundler/issues/1294))
+ - Allow overriding development deps loaded by #gemspec (@lgierth, [#1245](https://github.com/bundler/bundler/issues/1245))
## 1.0.17 (August 8, 2011)
Bugfixes:
- - Fix rake issues with rubygems 1.3.x (#1342)
- - Fixed invalid byte sequence error while installing gem on Ruby 1.9 (#1341)
+ - Fix rake issues with rubygems 1.3.x ([#1342](https://github.com/bundler/bundler/issues/1342))
+ - Fixed invalid byte sequence error while installing gem on Ruby 1.9 ([#1341](https://github.com/bundler/bundler/issues/1341))
## 1.0.16 (August 8, 2011)
Features:
- - Performance fix for MRI 1.9 (@efficientcloud, #1288)
+ - Performance fix for MRI 1.9 (@efficientcloud, [#1288](https://github.com/bundler/bundler/issues/1288))
- Shortcuts (like `bundle i`) for all commands (@amatsuda)
- Correcly identify missing child dependency in error message
Bugfixes:
- - Allow Windows network share paths with forward slashes (@mtscout6, #1253)
- - Check for rubygems.org credentials so `rake release` doesn't hang (#980)
- - Find cached prerelease gems on rubygems 1.3.x (@dburt, #1202)
- - Fix `bundle install --without` on kiji (@tmm1, #1287)
- - Get rid of warning in ruby 1.9.3 (@smartinez87, #1231)
+ - Allow Windows network share paths with forward slashes (@mtscout6, [#1253](https://github.com/bundler/bundler/issues/1253))
+ - Check for rubygems.org credentials so `rake release` doesn't hang ([#980](https://github.com/bundler/bundler/issues/980))
+ - Find cached prerelease gems on rubygems 1.3.x (@dburt, [#1202](https://github.com/bundler/bundler/issues/1202))
+ - Fix `bundle install --without` on kiji (@tmm1, [#1287](https://github.com/bundler/bundler/issues/1287))
+ - Get rid of warning in ruby 1.9.3 (@smartinez87, [#1231](https://github.com/bundler/bundler/issues/1231))
Documentation:
- - Documentation for `gem ..., :require => false` (@kmayer, #1292)
- - Gems provide "executables", they are rarely also binaries (@fxn, #1242)
+ - Documentation for `gem ..., :require => false` (@kmayer, [#1292](https://github.com/bundler/bundler/issues/1292))
+ - Gems provide "executables", they are rarely also binaries (@fxn, [#1242](https://github.com/bundler/bundler/issues/1242))
## 1.0.15 (June 9, 2011)
@@ -2380,7 +2380,7 @@ Bugfixes:
Bugfixes:
- Fix regression in `update` that caused long/wrong results
- - Allow git gems on other platforms while installing (#579)
+ - Allow git gems on other platforms while installing ([#579](https://github.com/bundler/bundler/issues/579))
Features:
@@ -2712,18 +2712,18 @@ Features:
- cache command now prunes stale .gem files from vendor/cache
- init --gemspec command now generates development dependencies
- - handle Polyglot's changes to Kernel#require with Bundler::ENV_LOADED (#287)
- - remove .gem files generated after installing a gem from a :path (#286)
- - improve install/lock messaging (#284)
+ - handle Polyglot's changes to Kernel#require with Bundler::ENV_LOADED ([#287](https://github.com/bundler/bundler/issues/287))
+ - remove .gem files generated after installing a gem from a :path ([#286](https://github.com/bundler/bundler/issues/286))
+ - improve install/lock messaging ([#284](https://github.com/bundler/bundler/issues/284))
Bugfixes:
- - ignore cached gems that are for another platform (#288)
- - install Windows gems that have no architecture set, like rcov (#277)
- - exec command while locked now includes the bundler lib in $LOAD_PATH (#293)
+ - ignore cached gems that are for another platform ([#288](https://github.com/bundler/bundler/issues/288))
+ - install Windows gems that have no architecture set, like rcov ([#277](https://github.com/bundler/bundler/issues/277))
+ - exec command while locked now includes the bundler lib in $LOAD_PATH ([#293](https://github.com/bundler/bundler/issues/293))
- fix the `rake install` task
- - add GemspecError so it can be raised without (further) error (#292)
- - create a parent directory before cloning for git 1.5 compatibility (#285)
+ - add GemspecError so it can be raised without (further) error ([#292](https://github.com/bundler/bundler/issues/292))
+ - create a parent directory before cloning for git 1.5 compatibility ([#285](https://github.com/bundler/bundler/issues/285))
## 0.9.21 (April 16, 2010)
@@ -2748,14 +2748,14 @@ Bugfixes:
Features:
- - suggest `bundle install --relock` when the Gemfile has changed (#272)
- - source support for Rubygems servers without prerelease gem indexes (#262)
+ - suggest `bundle install --relock` when the Gemfile has changed ([#272](https://github.com/bundler/bundler/issues/272))
+ - source support for Rubygems servers without prerelease gem indexes ([#262](https://github.com/bundler/bundler/issues/262))
Bugfixes:
- - don't set up all groups every time Bundler.setup is called while locked (#263)
- - fix #full_gem_path for git gems while locked (#268)
- - eval gemspecs at the top level, not inside the Bundler class (#269)
+ - don't set up all groups every time Bundler.setup is called while locked ([#263](https://github.com/bundler/bundler/issues/263))
+ - fix #full_gem_path for git gems while locked ([#268](https://github.com/bundler/bundler/issues/268))
+ - eval gemspecs at the top level, not inside the Bundler class ([#269](https://github.com/bundler/bundler/issues/269))
## 0.9.18 (April 8, 2010)
@@ -2766,7 +2766,7 @@ Features:
Bugfixes:
- - Bundler.setup now fully disables system gems, even when unlocked (#266, #246)
+ - Bundler.setup now fully disables system gems, even when unlocked ([#266](https://github.com/bundler/bundler/issues/266), [#246](https://github.com/bundler/bundler/issues/246))
- fixes Yard, which found plugins in Gem.source_index that it could not load
- makes behaviour of `Bundler.require` consistent between locked and unlocked loads
@@ -2788,7 +2788,7 @@ Features:
- exit gracefully on INT signal
- resolver output now indicates whether remote sources were checked
- - print error instead of backtrace when exec cannot find a binary (#241)
+ - print error instead of backtrace when exec cannot find a binary ([#241](https://github.com/bundler/bundler/issues/241))
Bugfixes:
@@ -2797,9 +2797,9 @@ Bugfixes:
- outputs branch names other than master
- gets the correct sha from the checkout
- doesn't print sha twice if :ref is set
- - report errors from bundler/setup.rb without backtraces (#243)
+ - report errors from bundler/setup.rb without backtraces ([#243](https://github.com/bundler/bundler/issues/243))
- fix Gem::Spec#git_version to not error on unloaded specs
- - improve deprecation, Gemfile, and command error messages (#242)
+ - improve deprecation, Gemfile, and command error messages ([#242](https://github.com/bundler/bundler/issues/242))
## 0.9.15 (April 1, 2010)
@@ -2814,7 +2814,7 @@ Features:
Bugfixes:
- prep for Rubygems 1.3.7 changes
- - install command now pulls git branches correctly (#211)
+ - install command now pulls git branches correctly ([#211](https://github.com/bundler/bundler/issues/211))
- raise errors on invalid options in the Gemfile
## 0.9.14 (March 30, 2010)
@@ -2856,12 +2856,12 @@ Features:
Bugfixes:
- - perform a topological sort on resolved gems (#191)
- - gems from git work even when paths or repos have spaces (#196)
- - Specification#loaded_from returns a String, like Gem::Specification (#197)
+ - perform a topological sort on resolved gems ([#191](https://github.com/bundler/bundler/issues/191))
+ - gems from git work even when paths or repos have spaces ([#196](https://github.com/bundler/bundler/issues/196))
+ - Specification#loaded_from returns a String, like Gem::Specification ([#197](https://github.com/bundler/bundler/issues/197))
- specs eval from inside the gem directory, even when locked
- virtual gemspecs are now saved in environment.rb for use when loading
- - unify the Installer's local index and the runtime index (#204)
+ - unify the Installer's local index and the runtime index ([#204](https://github.com/bundler/bundler/issues/204))
## 0.9.11 (March 9, 2010)
@@ -2869,23 +2869,23 @@ Bugfixes:
Features:
- - install command can take the path to the gemfile with --gemfile (#125)
- - unknown command line options are now rejected (#163)
- - exec command hugely sped up while locked (#177)
- - show command prints the install path if you pass it a gem name (#148)
- - open command edits an installed gem with $EDITOR (#148)
- - Gemfile allows assigning an array of groups to a gem (#114)
+ - install command can take the path to the gemfile with --gemfile ([#125](https://github.com/bundler/bundler/issues/125))
+ - unknown command line options are now rejected ([#163](https://github.com/bundler/bundler/issues/163))
+ - exec command hugely sped up while locked ([#177](https://github.com/bundler/bundler/issues/177))
+ - show command prints the install path if you pass it a gem name ([#148](https://github.com/bundler/bundler/issues/148))
+ - open command edits an installed gem with $EDITOR ([#148](https://github.com/bundler/bundler/issues/148))
+ - Gemfile allows assigning an array of groups to a gem ([#114](https://github.com/bundler/bundler/issues/114))
- Gemfile allows :tag option on :git sources
- improve backtraces when a gemspec is invalid
- improve performance by installing gems from the cache if present
Bugfixes:
- - normalize parameters to Bundler.require (#153)
- - check now checks installed gems rather than cached gems (#162)
- - don't update the gem index when installing after locking (#169)
- - bundle parenthesises arguments for 1.8.6 (#179)
- - gems can now be assigned to multiple groups without problems (#135)
+ - normalize parameters to Bundler.require ([#153](https://github.com/bundler/bundler/issues/153))
+ - check now checks installed gems rather than cached gems ([#162](https://github.com/bundler/bundler/issues/162))
+ - don't update the gem index when installing after locking ([#169](https://github.com/bundler/bundler/issues/169))
+ - bundle parenthesises arguments for 1.8.6 ([#179](https://github.com/bundler/bundler/issues/179))
+ - gems can now be assigned to multiple groups without problems ([#135](https://github.com/bundler/bundler/issues/135))
- fix the warning when building extensions for a gem from git with Rubygems 1.3.6
- fix a Dependency.to_yaml error due to accidentally including sources and groups
- don't reinstall packed gems
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 9d9cc4343a..fc4d57388d 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,42 +1,136 @@
# Bundler Code of Conduct
-The Bundler project strongly values contributors from anywhere, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, ethnicity, age, religion, or nationality. As a result, the Bundler team has agreed to and enforces this code of conduct in order to provide a harassment-free experience for everyone who participates in the development of Bundler.
+## When Something Happens
-### Summary
+If you see a Code of Conduct violation, follow these steps:
-Harassment in code and discussion or violation of physical boundaries is completely unacceptable anywhere in the Bundler project’s codebases, issue trackers, chat rooms, mailing lists, meetups, and any other events. Violators will be warned and then blocked or banned by the core team at or before the 3rd violation.
+1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s).
+2. That person should immediately stop the behavior and correct the issue.
+3. If this doesn't happen, or if you're uncomfortable speaking up, [contact admins](#contacting-admins).
+4. As soon as available, an admin will join, identify themselves, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary deactivation, then long-term deactivation.
-### In detail
+When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation.
-Harassment includes offensive verbal comments related to level of experience, gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, ethnicity, age, religion, nationality, the use of sexualized language or imagery, deliberate intimidation, stalking, sustained disruption, and unwelcome sexual attention.
+**The admin team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples).
-Individuals asked to stop any harassing behavior are expected to comply immediately.
+## Our Pledge
-Maintainers, including the core team, are also subject to the anti-harassment policy.
+In the interest of fostering an open and welcoming environment, we as members of the Bundler community pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation.
-If anyone engages in abusive, harassing, or otherwise unacceptable behavior, including maintainers, we may take appropriate action, up to and including warning the offender, deletion of comments, removal from the project’s codebase and communication systems, and escalation to GitHub support.
+## Our Standards
-If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact a member of [the core team](http://bundler.io/contributors.html) or [email the core team](mailto:team@bundler.io) immediately.
+Examples of behavior that contributes to creating a positive environment include:
-We expect everyone to follow these rules anywhere in the Bundler project’s codebases, issue trackers, IRC channel, group chat, and mailing lists.
+- Using welcoming and inclusive language.
+- Being respectful of differing viewpoints and experiences.
+- Gracefully accepting constructive feedback.
+- Focusing on what is best for the community.
+- Showing empathy and kindness towards other community members.
-This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
+Examples of unacceptable behavior by participants include:
-Finally, don't forget that it is human to make mistakes! We all do. Let’s work together to help each other, resolve issues, and learn from the mistakes that we will all inevitably make from time to time.
+- The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity.
+- Trolling, insulting/derogatory comments, and personal or political attacks.
+- Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology.
+- Making light of/making mocking comments about trigger warnings and content warnings.
+- Public or private harassment, deliberate intimidation, or threats.
+- Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent.
+- Publishing screenshots or quotes, especially from identity channels, without all quoted users' _explicit_ consent.
+- Publishing or telling others that a member belongs to a particular identity channel without asking their consent first.
+- Publishing of non-harassing private communication.
+- Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism).
+- Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia".
+- Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are.
+- [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something.
+- "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)"
+- Other conduct which could reasonably be considered inappropriate in a professional or community setting.
+## Scope
-### Thanks
+This Code of Conduct applies both within community spaces and in other spaces involving the community. This includes the GitHub repository, the Bundler Slack instance, the Bundler Twitter community, private email communications in the context of the community, and any events where members of the community are participating, as well as adjacent communities and venues affecting the community's members.
-Thanks to the [JSConf Code of Conduct](http://jsconf.com/codeofconduct.html) and [Fedora Code of Conduct](http://fedoraproject.org/code-of-conduct) for inspiration and ideas. Additional thanks to [Contributor Covenant](http://contributor-covenant.org) for the [default code of conduct](https://github.com/bundler/bundler/blob/master/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt) included in generated gems.
+Depending on the violation, the admins may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members.
+This Code of Conduct is detailed for the purpose of removing ambiguity, not for the sake of strictness. It is the sincere hope of admins that it helps foster mutual understanding, and the creation of a space where everyone can participate in a way relevant to the project itself, without things going horribly due to accidental/well-intentioned toe stepping. Please be kind to one another!
-### License
+## Admin Enforcement Process
-<p class="license" xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
- To the extent possible under law, <a rel="dct:publisher" href="http://bundler.io">The Bundler Team</a> has waived all copyright and related or neighboring rights to the <span property="dct:title">Bundler Code of Conduct</span>. This work is published from the <span property="vcard:Country" datatype="dct:ISO3166" content="US" about="http://bundler.io">United States.</span>
- <br>
- <br>
- <a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/">
- <img src="http://i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style: none;" alt="CC0">
- </a>
-</p>
+Once the admins get involved, they will follow a documented series of steps and do their best to preserve the well-being of community members. This section covers actual concrete steps.
+
+### Contacting Admins
+
+You may get in touch with the Bundler admin team through any of the following methods:
+
+- Email [the Bundler maintainers](http://bundler.io/contributors.html) as a group at [team@bundler.io](mailto:team@bundler.io).
+- Directly message any maintainer in private (through Slack, Twitter, email, or other available option) if that is more comfortable
+
+### Further Enforcement
+
+If you've already followed the [initial enforcement steps](#enforcement), these are the steps admins will take for further enforcement, as needed:
+
+1. Repeat the request to stop.
+2. If the person doubles down, they will be removed from the discussion (where possible), and given an official warning.
+3. If the behavior continues or is repeated later, the person will be blocked/deactivated for 24 hours.
+4. If the behavior continues or is repeated after the temporary deactivation, a long-term (6-12mo) deactivation will be used.
+
+On top of this, admins may remove any offending messages, images, contributions, etc, as they deem necessary.
+
+Admins reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk.
+
+Members expelled from events or venues with any sort of paid attendance will not be refunded.
+
+### Who Watches the Watchers?
+
+Admins and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the community's leadership. These may include anything from removal from the admin team to a permanent ban from the community.
+
+### Enforcement Examples
+
+#### The Best Case
+
+The vast majority of situations work out like this, in our experience. This interaction is common, and generally positive.
+
+> Alex: "Yeah I used X and it was really crazy!"
+
+> Patt: "Hey, could you not use that word? What about 'ridiculous' instead?"
+
+> Alex: "oh sorry, sure." -> edits old message to say "it was really confusing!"
+
+#### The Admin Case
+
+Sometimes, though, you need to get admins involved. Admins will do their best to resolve conflicts, but people who were harmed by something **will take priority**.
+
+> Patt: "Honestly, sometimes I just really hate using $language and anyone who uses it probably sucks at their job."
+
+> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that."
+
+> Patt: "I'm not attacking anyone, are you deaf?"
+
+> Alex: _DMs admin_ "hey uh. Can someone look at #general? Patt is getting a bit aggro. I tried to nudge them about it, but nope."
+
+> MxAdmin1: <joins #general> "Hey Patt, admin here. Could you tone it down? This sort of attack is really not okay in this space."
+
+> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you."
+
+> MxAdmin1: _removes patt_ _DMs patt_ "I mean it. Please refer to the CoC over at bundler.io/conduct.html if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in #general, since they made folks there uncomfortable. Let's try and be kind, yeah?"
+
+> Patt: _Replies to DM_ "@mxadmin1 Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble."
+
+> MxAdmin1: _Replies to DM_ "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!"
+
+#### The Nope Case
+
+> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable."
+
+> Patt: "NOOOOPE. OH NOPE NOPE."
+
+> Alex: "JFC NO. NOPE. `/admin nope nope nope @ #javascript`"
+
+> MxAdmin1: "👀 Nope. NOPE NOPE NOPE. 🔥"
+
+> PepeTheFrog🐸 has been deactivated.
+
+## Attribution
+
+This Code of Conduct is adapted from the [package.community Code of Conduct], adapted from the [WeAllJS Code of Conduct](https://wealljs.org/code-of-conduct), itself adapted from [Contributor Covenant](http://contributor-covenant.org) version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4), as well as the LGBTQ in Technology Slack [Code of Conduct](http://lgbtq.technology/coc.html).
+
+Additional thanks to [Contributor Covenant](http://contributor-covenant.org) for the [default code of conduct](https://github.com/bundler/bundler/blob/master/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt) included in generated gems.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 3693e4e3b8..0000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# Contributing to Bundler
-
-Welcome to Bundler! We are so happy that you're here. We know joining a new open source project can be daunting, so here's a quick overview of what you can expect from this documentation.
-
-Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](http://bundler.io/conduct.html), so that everyone can be included.
-
-## Quick start
-
-Some guides you might find useful:
-
-* [Submitting pull requests](doc/development/PULL_REQUESTS.md)
-* [Filing an issue](doc/contributing/ISSUES.md)
-* [Bug triage](doc/contributing/BUG_TRIAGE.md)
-
-## Comprehensive guides
-
-Not finding what you're looking for? More comprehensive guides are [available here](doc/README.md).
diff --git a/README.md b/README.md
index db69f55f11..c596a32064 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
[![Version ](https://img.shields.io/gem/v/bundler.svg?style=flat)](https://rubygems.org/gems/bundler)
[![Build Status](https://img.shields.io/travis/bundler/bundler/master.svg?style=flat)](https://travis-ci.org/bundler/bundler)
-[![Code Climate](https://img.shields.io/codeclimate/github/bundler/bundler.svg?style=flat)](https://codeclimate.com/github/bundler/bundler)
+[![Code Climate](https://img.shields.io/codeclimate/maintainability/bundler/bundler.svg?style=flat)](https://codeclimate.com/github/bundler/bundler)
[![Inline docs ](http://inch-ci.org/github/bundler/bundler.svg?style=flat)](http://inch-ci.org/github/bundler/bundler)
[![Slack ](http://bundler-slackin.herokuapp.com/badge.svg)](http://bundler-slackin.herokuapp.com)
@@ -24,7 +24,7 @@ Bundler is most commonly used to manage your application's dependencies. For exa
```
bundle init
-echo 'gem "rspec"' >> Gemfile
+bundle add rspec
bundle install
bundle exec rspec
```
@@ -45,7 +45,9 @@ To get in touch with the Bundler core team and other Bundler users, please see [
### Contributing
-If you'd like to contribute to Bundler, that's awesome, and we <3 you. There's a guide to contributing to Bundler (both code and general help) over in [our documentation section](doc/README.md).
+If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put together [the Bundler contributor guide](https://github.com/bundler/bundler/blob/master/doc/contributing/README.md) with all of the information you need to get started.
+
+If you'd like to request a substantial change to Bundler or to the Bundler documentation, refer to the [Bundler RFC process](https://github.com/bundler/rfcs) for more information.
While some Bundler contributors are compensated by Ruby Together, the project maintainers make decisions independent of Ruby Together. As a project, we welcome contributions regardless of the author’s affiliation with Ruby Together.
@@ -60,4 +62,4 @@ Everyone interacting in the Bundler project’s codebases, issue trackers, chat
### License
-[MIT License](https://github.com/bundler/bundler/blob/master/LICENSE.md)
+Bundler is available under an [MIT License](https://github.com/bundler/bundler/blob/master/LICENSE.md).
diff --git a/Rakefile b/Rakefile
index 18831053a4..a4e4b19db2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -11,7 +11,9 @@ else
File.expand_path("tmp/rubygems")
end
-BUNDLER_SPEC = Gem::Specification.load("bundler.gemspec")
+def bundler_spec
+ @bundler_spec ||= Gem::Specification.load("bundler.gemspec")
+end
def safe_task(&block)
yield
@@ -37,10 +39,10 @@ end
namespace :spec do
desc "Ensure spec dependencies are installed"
task :deps do
- deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d|
+ deps = Hash[bundler_spec.development_dependencies.map do |d|
[d.name, d.requirement.to_s]
end]
- deps["rubocop"] ||= "= 0.49.1" if RUBY_VERSION >= "2.0.0" # can't go in the gemspec because of the ruby version requirement
+ deps["rubocop"] ||= "= 0.50.0" if RUBY_VERSION >= "2.0.0" # can't go in the gemspec because of the ruby version requirement
# JRuby can't build ronn or rdiscount, so we skip that
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
@@ -78,7 +80,7 @@ namespace :spec do
sh "sudo apt-get install graphviz -y 2>&1 | tail -n 2"
# Install the gems with a consistent version of RubyGems
- sh "gem update --system 2.6.12"
+ sh "gem update --system 2.6.13"
$LOAD_PATH.unshift("./spec")
require "support/rubygems_ext"
@@ -91,7 +93,7 @@ namespace :spec do
end
begin
- rspec = BUNDLER_SPEC.development_dependencies.find {|d| d.name == "rspec" }
+ rspec = bundler_spec.development_dependencies.find {|d| d.name == "rspec" }
gem "rspec", rspec.requirement.to_s
require "rspec/core/rake_task"
@@ -101,9 +103,10 @@ begin
if RUBY_VERSION >= "2.0.0"
# can't go in the gemspec because of the ruby version requirement
- gem "rubocop", "= 0.49.1"
+ gem "rubocop", "= 0.50.0"
require "rubocop/rake_task"
- RuboCop::RakeTask.new
+ rubocop = RuboCop::RakeTask.new
+ rubocop.options = ["--parallel"]
end
namespace :spec do
@@ -144,7 +147,7 @@ begin
rubyopt = ENV["RUBYOPT"]
# When editing this list, also edit .travis.yml!
branches = %w[master]
- releases = %w[v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.5 v2.4.8 v2.5.2 v2.6.8 v2.6.14 v2.7.4]
+ releases = %w[v2.5.2 v2.6.14 v2.7.7]
(branches + releases).each do |rg|
desc "Run specs with RubyGems #{rg}"
RSpec::Core::RakeTask.new(rg) do |t|
@@ -243,7 +246,6 @@ begin
end
end
end
-
rescue LoadError
task :spec do
abort "Run `rake spec:deps` to be able to run the specs"
@@ -311,7 +313,6 @@ begin
task(:require) {}
end
-
rescue LoadError
namespace :man do
task(:require) { abort "Install the ronn gem to be able to release!" }
diff --git a/bin/rubocop b/bin/rubocop
index 98ce0c89c2..81f4679fb8 100755
--- a/bin/rubocop
+++ b/bin/rubocop
@@ -10,7 +10,7 @@ bundler_spec.dependencies.each do |dep|
gem dep.name, dep.requirement
end
-gem "rubocop", "= 0.49.1"
+gem "rubocop", "= 0.50.0"
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
diff --git a/bundler.gemspec b/bundler.gemspec
index 89db4687a3..49f09c85bf 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.license = "MIT"
s.authors = [
"André Arko", "Samuel Giddins", "Colby Swandale", "Hiroshi Shibata",
- "David Rodríguez", "Grey Baker", "Chris Morris", "James Wen", "Tim Moore",
+ "David Rodríguez", "Grey Baker", "Stephanie Morillo", "Chris Morris", "James Wen", "Tim Moore",
"André Medeiros", "Jessica Lynn Suttles", "Terence Lee", "Carl Lerche",
"Yehuda Katz"
]
@@ -43,7 +43,8 @@ Gem::Specification.new do |s|
s.add_development_dependency "ronn", "~> 0.7.3"
s.add_development_dependency "rspec", "~> 3.6"
- s.files = `git ls-files -z`.split("\x0").select {|f| f.match(%r{^(lib|exe)/}) }
+ s.files = `git -C #{Shellwords.escape File.dirname(__FILE__)} ls-files -z`.split("\x0").select {|f| f.match(%r{^(lib|exe)/}) }
+
# we don't check in man pages, but we need to ship them because
# we use them to generate the long-form help for each command.
s.files += Dir.glob("man/**/*")
diff --git a/doc/POLICIES.md b/doc/POLICIES.md
new file mode 100644
index 0000000000..008883ab80
--- /dev/null
+++ b/doc/POLICIES.md
@@ -0,0 +1,77 @@
+# Bundler Policies
+
+This document is an attempt to record the policies and processes that are used to govern the Bundler project--it’s not fixed or permanent, and will likely evolve as events warrant.
+
+### Our Goals
+
+0. Treat everyone like a valuable human being, worthy of respect and empathy. No exceptions.
+1. Strive to empower users, the Ruby developers who use Bundler. For example, there is no such thing as user error, only insufficient UX design.
+2. Strive to empower Bundler contributors, as long as it does not harm users. For example, potential contributors should be able to set up a complete development and testing environment with a single command.
+3. Strive to empower maintainers, as long as it does not harm contributors or users. For example, automating issue triage to reduce repetitive work for maintainers, as long as users with problems are not worse off.
+
+These policies are intended to be examples of how to apply these goals, and we realize that we can’t possibly cover every edge case or loophole. In any case where policies turn out to conflict with these goals, the goals should win.
+
+### Compatibility guidelines
+
+Bundler tries for perfect backwards compatibility. That means that if something worked in version 1.x, it should continue to work in 1.y and 1.z. That thing may or may not continue to work in 2.x. We may not always get it right, and there may be extenuating circumstances that force us into choosing between different kinds of breakage, but compatibility is very important to us. Infrastructure should be as unsurprising as possible.
+
+Bundler will provide features and bugfixes to older versions on a schedule similar to Ruby itself. For example, when Bundler 4.x is the current version, Bundler 4 will be eligible for new features and bugfixes. Bundler 3 will be eligible for bugfixes only. Bundler 2 will be eligible for security bugfixes only. Bundler 1 will be unsupported.
+
+Bundler 2 and above will support Ruby and RubyGems versions for the same amount of time as the Ruby core team supports them. As of February 2018, that means no support for Bundler running on Ruby 2.2, security fixes only for Bundler running on Ruby 2.3, and full support (including new features and bugfixes) for Bundler running on Ruby 2.4 and 2.5. Unsupported Ruby versions will be dropped in the first Bundler minor release after support ends.
+
+These policies are not a guarantee that any particular fix will be backported. Instead, this is a way for us to set an upper limit on the versions of Ruby, RubyGems, and Bundler that we have to consider while making changes. Without the limit, the number of versions grows exponentially over time and quickly becomes overwhelming, which leads to maintainer burnout. We want to avoid that.
+
+### User experience guidelines
+
+The experience of using Bundler should not include surprises. If users are surprised, we did something wrong, and we should fix it. There are no user errors, only UX design failures. Warnings should always include actionable instructions to resolve them. Errors should include instructions, helpful references, or other information to help users attempt to debug.
+
+Changing existing behavior is also surprising. If reducing user surprise will result in a backwards-incompatible change, that change should include at least one major version of deprecation warning before the breaking change is made.
+
+### Issue guidelines
+
+Anyone is welcome to open an issue, or comment on an issue. Issue comments without useful content (like “me too”) may be removed.
+
+Opening an issue to ask for help may eventually get you help, but chances are help will arrive faster if you post on [Stack Overflow](https://stackoverflow.com) or ask in [the Bundler Slack](https://slack.bundler.io).
+
+Issues will be handled as soon as possible, which may take some time. Including a script that can be used to reproduce your issue is a great way to help maintainers help you. If you can, writing a failing test for your issue is even more helpful.
+
+### Contribution and pull request guidelines
+
+Anyone is welcome to [contribute to Bundler](README.md). Contributed code will be released under the same license as the existing codebase.
+
+Pull requests must have passing tests to be merged. Code changes must also include tests for the new behavior. Squashing commits is not required.
+
+Every pull request should explain:
+
+1. The problem being solved
+2. Why that problem is happening
+3. What changes to fix that problem are included in the PR, and
+4. Why that implementation was chosen out of the possible options.
+
+### RFC guidelines
+
+Large changes often benefit from being written out more completely, read by others, and discussed. The [Bundler RFC repo](https://github.com/bundler/rfcs) is the preferred place for that to happen.
+
+### Maintainer team guidelines
+
+Always create pull requests rather than pushing directly to the primary branch. Try to get code review and merge approval from someone other than yourself whenever possible. Always merge using `@bundlerbot` to guarantee the primary branch stays green.
+
+Contributors who have contributed regularly for more than six months (or implemented a completely new feature for a minor release) are eligible to join the maintainer team. Unless vetoed by an existing maintainer, these contributors will be asked to join the maintainer team. If they accept, new maintainers will be given permissions to view maintainer playbooks, accept pull requests, and release new versions.
+
+### Release guidelines
+
+Bugfix releases should generally be cut as soon as possible. Multiple bugfix releases are preferable to waiting for a specific fix to land.
+
+Minor/feature releases can be cut anytime at least one new feature is ready, but don’t have to be. Minor version releases should include an update to the documentation website, allowing users to view the documentation for whatever minor version they happen to be using.
+
+Major version releases should be cut no more than once per year, ideally between Ruby's release on December 25 and February 15 of the next year. Releasing soon after Ruby helps us stay in sync with deprecated Ruby versions. Breaking changes other than dropping support for old Ruby versions should be avoided whenever possible, but may be included in major releases. In general, breaking changes should include at least one major version with a deprecation warning before the breaking change takes effect.
+
+### Enforcement guidelines
+
+First off, Bundler’s policies and enforcement of those policies are subsidiary to [Bundler’s code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md) in any case where they conflict. The first priority is treating human beings with respect and empathy, and figuring out project guidelines and sticking to them will always come after that.
+
+When it comes to carrying out our own policies, we’re all regular humans trying to do the best we can. There will probably be times when we don’t stick to our policies or goals. If you notice a discrepancy between real-life actions and these policies and goals, please bring it up! We want to make sure that our actions and our policies line up, and that our policies exemplify our goals.
+
+Policies are not set in stone, and may be revised if policy violations are found to be in the spirit of the project goals. Likewise, actions that violate the spirit of the project goals will be considered policy violations, and enforcement action will be taken. We’re not interested in rules-lawyering, and we will take action when needed to ensure that everyone feels safe and included.
+
+If you are comfortable reporting issues to the entire Bundler team, please send an email to team@bundler.io. If you are not comfortable reporting to the entire team, for any reason, please check the [maintainers team list](https://bundler.io/team) and use email, Twitter, or Slack to report to a single maintainer of your choice. Anyone violating a policy or goal is expected to cooperate with the team (and the reporter, if they request it) to resolve the issue in a way that follows the project goals.
diff --git a/doc/README.md b/doc/README.md
index 534dd941a7..926a34823a 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -2,7 +2,7 @@
_If you're looking for documentation on how to use Bundler: visit [bundler.io](http://bundler.io/), or run `bundle help` from the command line. You may also be interested in [troubleshooting common issues](TROUBLESHOOTING.md) found when using Bundler._
-Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](http://bundler.io/conduct.html), so that everyone can be included.
+Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](http://bundler.io/conduct.html), so that everyone can be included. Maintainers are expected to work together with the community in accordance with [our project policies](POLICIES.md).
If you'd like to help make Bundler better, you totally rock! Thanks for helping us make Bundler better.
diff --git a/doc/TROUBLESHOOTING.md b/doc/TROUBLESHOOTING.md
index 6b1f831c70..8bdac2c43c 100644
--- a/doc/TROUBLESHOOTING.md
+++ b/doc/TROUBLESHOOTING.md
@@ -42,7 +42,7 @@ list](http://bundler.io/compatibility.html), and make sure that the version of B
If these instructions don't work, or you can't find any appropriate instructions, you can try these troubleshooting steps:
# Update to the latest version of bundler
- `gem install bundler`
+ gem install bundler
# Remove user-specific gems and git repos
rm -rf ~/.bundle/ ~/.gem/bundler/ ~/.gems/cache/bundler/
diff --git a/doc/contributing/HOW_YOU_CAN_HELP.md b/doc/contributing/HOW_YOU_CAN_HELP.md
index 32a6107049..284bae07b2 100644
--- a/doc/contributing/HOW_YOU_CAN_HELP.md
+++ b/doc/contributing/HOW_YOU_CAN_HELP.md
@@ -6,7 +6,7 @@ If at any point you get stuck, here's how to [get in touch with the Bundler team
## First contribution suggestions
-We track [small bugs and features](https://github.com/bundler/bundler/labels/contribution%3A%20small) so that anyone who wants to help can start with something that's not too overwhelming.
+We track [small bugs and features](https://github.com/bundler/bundler/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) so that anyone who wants to help can start with something that's not too overwhelming.
Generally, great ways to get started helping out with Bundler are:
diff --git a/doc/contributing/README.md b/doc/contributing/README.md
index 55c742d2ae..624e37cb73 100644
--- a/doc/contributing/README.md
+++ b/doc/contributing/README.md
@@ -1,38 +1,29 @@
-# Contributing to Bundler
+# Bundler Contributor Guidelines
-Welcome to Bundler! We are so happy that you're here. We know joining a new open source project can be daunting, so here's a quick overview of what you can expect from this documentation.
+Thank you for your interest in making Bundler better! We welcome contributions from everyone. Dozens of contributors like you have submitted feature improvements, fixed bugs, and written new documentation. [Join the Bundler Slack community](http://slack.bundler.io/) to connect with the Bundler core team and other contributors like you.
-*Something missing?* Send us a [pull request](../development/PULL_REQUESTS.md)!
+Before submitting a contribution, read through the following guidelines:
-**Recommended first steps**
+* [Bundler Code of Conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md) (By participating in Bundler, you agree to abide by the terms laid out in the CoC.)
+* [Issue Reporting Guidelines](https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md)
+* [Pull Request Guidelines](https://github.com/bundler/bundler/blob/master/doc/development/PULL_REQUESTS.md)
-- Join us in the Bundler slack! Generate an invite [here](http://slack.bundler.io/)
-- *If you're interested in helping with code:*
- - Get a quick overview of our [development process](../development/README.md)
- - [Setup your machine for development](../development/SETUP.md)
- - Checkout [How you can help: your first contributions!](HOW_YOU_CAN_HELP.md) for a list of suggestions to get started
-- *If you're interested in helping with documentation:*
- - Read up on [how documentation works for Bundler](../documentation/README.md)
- - Learn about our [documentation vision](../documentation/VISION.md)
+And be sure to [set up your development environment](https://github.com/bundler/bundler/blob/master/doc/development/SETUP.md).
-You can start learning about Bundler by reading [the documentation](http://bundler.io). If you want, you can also read a (lengthy) explanation of [why Bundler exists and what it does](http://bundler.io/rationale.html).
+## Feature Requests
-## [How you can help: your first contributions!](HOW_YOU_CAN_HELP.md)
+To request substantial changes to Bundler and/or Bundler documentation, please refer to the [README](https://github.com/bundler/rfcs/blob/master/README.md) in the [RFC repository](https://github.com/bundler/rfcs) for instructions.
-A detailed overview of how to get started contributing to Bundler, including a long list of suggestions for your first project.
+## Contributing to Bundler
-## [Bug triage](BUG_TRIAGE.md)
+Here are the different ways you can start contributing to the Bundler project:
-Want to take a stab at processing issues? Start here.
+* [First contribution suggestions](https://github.com/bundler/bundler/blob/master/doc/contributing/HOW_YOU_CAN_HELP.md)
+* [Adding new features](https://github.com/bundler/bundler/blob/master/doc/development/NEW_FEATURES.md)
+* [Triaging bugs](https://github.com/bundler/bundler/blob/master/doc/contributing/BUG_TRIAGE.md)
+* [Writing documentation](https://github.com/bundler/bundler/blob/master/doc/documentation/WRITING.md)
+* [Community engagement](https://github.com/bundler/bundler/blob/master/doc/contributing/COMMUNITY.md)
-## [Getting help](GETTING_HELP.md)
+## Supporting Bundler
-How to get in touch with folks who can help when you're stuck. Don't worry! This happens to all of us. We're really nice, we promise.
-
-## [Filing issues](ISSUES.md)
-
-We see a lot of issues in the Bundler repo! Use this guide to file informative, actionable issues.
-
-## [Community](COMMUNITY.md)
-
-Learn more about our goals for the Bundler community and the ways you can help us build better together.
+[Ruby Together](https://rubytogether.org/) pays some Bundler maintainers for their work, funded directly by the Ruby community. If you’d like to support Bundler with a financial contribution, [become an individual sponsor](https://rubytogether.org/developers#plans). We also welcome financial [contributions from companies](https://rubytogether.org/companies#plans), too! (You can also support us through [Open Collective](https://opencollective.com/rubytogether).)
diff --git a/doc/development/PULL_REQUESTS.md b/doc/development/PULL_REQUESTS.md
index 292aacc529..497febfe71 100644
--- a/doc/development/PULL_REQUESTS.md
+++ b/doc/development/PULL_REQUESTS.md
@@ -34,7 +34,3 @@ Please ensure that the commit messages included in the pull request __do not__ h
If you want to use these mechanisms, please instead include them in the pull request description. This prevents multiple notifications or references being created on commit rebases or pull request/branch force pushes.
Additionally, do not use `[ci skip]` or `[skip ci]` mechanisms in your pull request titles/descriptions or commit messages. Every potential commit and pull request should run through Bundler's CI system. This applies to all changes/commits (ex. even a change to just documentation or the removal of a comment).
-
-## CHANGELOG.md
-
-Don't forget to add your changes into the CHANGELOG! If you're submitting documentation, note the changes under the "Documentation" heading.
diff --git a/doc/development/RELEASING.md b/doc/development/RELEASING.md
deleted file mode 100644
index eb496470dc..0000000000
--- a/doc/development/RELEASING.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Releasing
-
-_Release process documentation is in progress, see [PR 5252](https://github.com/bundler/bundler/pull/5252)._
-
-## Beta testing
-
-Early releases require heavy testing, especially across various system setups. We :heart: testers, and are big fans of anyone who can run `gem install bundler --pre` and try out upcoming releases in their development and staging environments.
-
-There may not always be prereleases or beta versions of Bundler. The Bundler team will tweet from the [@bundlerio account](http://twitter.com/bundlerio) when a prerelease or beta version becomes available. You are also always welcome to try checking out master and building a gem yourself if you want to try out the latest changes.
diff --git a/doc/development/SETUP.md b/doc/development/SETUP.md
index cebe925c1b..80abe4cc6b 100644
--- a/doc/development/SETUP.md
+++ b/doc/development/SETUP.md
@@ -4,25 +4,29 @@ Bundler doesn't use a Gemfile to list development dependencies, because when we
1. [Fork the Bundler repo](https://github.com/bundler/bundler), and clone the fork onto your machine. ([Follow this tutorial](https://help.github.com/articles/fork-a-repo/) for instructions on forking a repo.)
-2. Install `groff-base` and `graphviz` packages using your package manager, e.g for Ubuntu:
+2. Install `groff-base` and `graphviz` packages using your package manager:
- `$ sudo apt-get install graphviz groff-base -y`
+ $ sudo apt-get install graphviz groff-base -y
- and for OS X (with brew installed):
+ And for OS X (with brew installed):
- `$ brew install graphviz homebrew/dupes/groff`
+ $ brew install graphviz groff
-3. Install Bundler's development dependencies:
+3. You may also have to install the `bsdmainutils` package on linux if your distribution does not include the `col` command.
- `$ bin/rake spec:deps`
+ $ sudo apt-get install bsdmainutils -y
-4. Run the test suite, to make sure things are working:
+4. Install Bundler's development dependencies:
- `$ bin/rake spec`
+ $ bin/rake spec:deps
-5. Set up a shell alias to run Bundler from your clone, e.g. a Bash alias ([follow these instructions](https://www.moncefbelyamani.com/create-aliases-in-bash-profile-to-assign-shortcuts-for-common-terminal-commands/) for adding aliases to your `~/.bashrc` profile):
+5. Run the test suite, to make sure things are working:
- `$ alias dbundle='/path/to/bundler/repo/bin/bundle'`
+ $ bin/rake spec
+
+6. Set up a shell alias to run Bundler from your clone, e.g. a Bash alias ([follow these instructions](https://www.moncefbelyamani.com/create-aliases-in-bash-profile-to-assign-shortcuts-for-common-terminal-commands/) for adding aliases to your `~/.bashrc` profile):
+
+ $ alias dbundle='/path/to/bundler/repo/bin/bundle'
## Debugging with `pry`
diff --git a/doc/documentation/WRITING.md b/doc/documentation/WRITING.md
index e3acf5de48..2fb3292e27 100644
--- a/doc/documentation/WRITING.md
+++ b/doc/documentation/WRITING.md
@@ -53,11 +53,11 @@ $ bin/rspec ./spec/commands/help_spec.rb
$ bin/rspec ./spec/quality_spec.rb
```
-# Writing docs for [the Bundler documentation site](bundler.io)
+# Writing docs for [the Bundler documentation site](http://www.bundler.io)
-If you'd like to submit a pull request for any of the primary commands or utilities on [the Bundler documentation site](bundler.io), please follow the instructions above for writing documentation for man pages from the `bundler/bundler` repository. They are the same in each case.
+If you'd like to submit a pull request for any of the primary commands or utilities on [the Bundler documentation site](http://www.bundler.io), please follow the instructions above for writing documentation for man pages from the `bundler/bundler` repository. They are the same in each case.
-Note: Editing `.ronn` files from the `bundler/bundler` repository for the primary commands and utilities documentation is all you need 🎉. There is no need to manually change anything in the `bundler/bundler-site` repository, because the man pages and the docs for primary commands and utilities on [the Bundler documentation site](bundler.io) are one in the same. They are generated automatically from the `bundler/bundler` repository's `.ronn` files from the `rake man/build` command. In other words, after updating `.ronn` file and running `rake man/build` in `bundler`, `.ronn` files map to the auto-generated files in the `source/man` directory of `bundler-site`.
+Note: Editing `.ronn` files from the `bundler/bundler` repository for the primary commands and utilities documentation is all you need 🎉. There is no need to manually change anything in the `bundler/bundler-site` repository, because the man pages and the docs for primary commands and utilities on [the Bundler documentation site](http://www.bundler.io) are one in the same. They are generated automatically from the `bundler/bundler` repository's `.ronn` files from the `rake man/build` command. In other words, after updating `.ronn` file and running `rake man/build` in `bundler`, `.ronn` files map to the auto-generated files in the `source/man` directory of `bundler-site`.
Additionally, if you'd like to add a guide or tutorial: in the `bundler/bundler-site` repository, go to `/bundler-site/source/current_version_of_bundler/guides` and add [a new Markdown file](https://guides.github.com/features/mastering-markdown/) (with an extension ending in `.md`). Be sure to correctly format the title of your new guide, like so:
```
diff --git a/doc/playbooks/RELEASING.md b/doc/playbooks/RELEASING.md
new file mode 100644
index 0000000000..58a6196fef
--- /dev/null
+++ b/doc/playbooks/RELEASING.md
@@ -0,0 +1,147 @@
+# Releasing
+
+Bundler uses [Semantic Versioning](https://semver.org/).
+
+_Note: In the documentation listed below, the *current* minor version number is
+1.11 and the *next* minor version number is 1.12_
+
+Regardless of the version, *all releases* must update the `CHANGELOG.md` and `lib/bundler/version.rb`
+files. The changelog for the first stable minor release (`1.12.0`) is a sum of all
+the preceding pre-release versions (`1.12.pre.1`, `1.12.pre.2`, etc) for that
+minor version. The changelog for the first stable minor release is left blank
+unless there are fixes included since the last pre/rc release.
+
+## Workflow
+
+In general, `master` will accept PRs for:
+
+* feature merges for the next minor version (1.12)
+* regression fix merges for a patch release on the current minor version (1.11)
+* feature-flagged development for the next major version (2.0)
+
+### Breaking releases
+
+Bundler cares a lot about preserving compatibility. As a result, changes that
+break backwards compatibility should (whenever this is possible) include a feature
+release that is backwards compatible, and issue warnings for all options and
+behaviors that will change.
+
+We try very hard to only release breaking changes when incrementing the _major_
+version of Bundler.
+
+### Cherry picking
+
+Patch releases are made by cherry-picking bug fixes from `master`.
+
+When we cherry-pick, we cherry-pick the merge commits using the following command:
+
+```bash
+$ git cherry-pick -m 1 MERGE_COMMIT_SHAS
+```
+
+For example, for PR [#5029](https://github.com/bundler/bundler/pull/5029), we
+cherry picked commit [dd6aef9](https://github.com/bundler/bundler/commit/dd6aef97a5f2e7173f406267256a8c319d6134ab),
+not [4fe9291](https://github.com/bundler/bundler/commit/4fe92919f51e3463f0aad6fa833ab68044311f03)
+using:
+
+```bash
+$ git cherry-pick -m 1 dd6aef9
+```
+
+The `rake release:patch` command will automatically handle cherry-picking, and is further detailed below.
+
+## Changelog
+
+Bundler maintains a list of changes present in each version in the `CHANGELOG.md` file.
+Entries should not be added in pull requests, but are rather written by the Bundler
+maintainers in the [bundler-changelog repo](https://github.com/bundler/bundler-changelog).
+That repository tracks changes by pull requests, with each entry having an associated version,
+PR, section, author(s), issue(s) closed, and message.
+
+Ensure that repo has been updated with all new PRs before releasing a new version,
+and copy over the new sections to the `CHANGELOG.md` in the Bundler repo.
+
+## Releases
+
+### Minor releases
+
+While pushing a gem version to RubyGems.org is as simple as `rake release`,
+releasing a new version of Bundler includes a lot of communication: team consensus,
+git branching, changelog writing, documentation site updates, and a blog post.
+
+Dizzy yet? Us too.
+
+Here's the checklist for releasing new minor versions:
+
+* [ ] Check with the core team to ensure that there is consensus around shipping a
+ feature release. As a general rule, this should always be okay, since features
+ should _never break backwards compatibility_
+* [ ] Create a new stable branch from master (see **Branching** below)
+* [ ] Update `version.rb` to a prerelease number, e.g. `1.12.pre.1`
+* [ ] Update `CHANGELOG.md` to include all of the features, bugfixes, etc for that
+ version, from the [bundler-changelog](https://github.com/bundler/bundler-changelog)
+ repo.
+* [ ] Run `rake release`, tweet, blog, let people know about the prerelease!
+* [ ] Wait a **minimum of 7 days**
+* [ ] If significant problems are found, increment the prerelease (i.e. 1.12.pre.2)
+ and repeat, but treating `.pre.2` as a _patch release_. In general, once a stable
+ branch has been cut from master, it should _not_ have master merged back into it.
+
+Wait! You're not done yet! After your prelease looks good:
+
+* [ ] Update `version.rb` to a final version (i.e. 1.12.0)
+* [ ] In the [bundler/bundler-site](https://github.com/bundler/bundler-site) repo,
+ copy the previous version's docs to create a new version (e.g. `cp -r v1.11 v1.12`)
+* [ ] Update the new docs as needed, paying special attention to the "What's new"
+ page for this version
+* [ ] Write a blog post announcing the new version, highlighting new features and
+ notable bugfixes
+* [ ] Run `rake release` in the bundler repo, tweet, link to the blog post, etc.
+
+At this point, you're a release manager! Pour yourself several tasty drinks and
+think about taking a vacation in the tropics.
+
+Beware, the first couple of days after the first non-prerelease version in a minor version
+series can often yield a lot of bug reports. This is normal, and doesn't mean you've done
+_anything_ wrong as the release manager.
+
+#### Branching
+
+Minor releases of the next version start with a new release branch from the
+current state of master: `1-12-stable`, and are immediately followed by a `.pre.0` release.
+
+Once that `-stable` branch has been cut from `master`, changes for that minor
+release series (1.12) will only be made _intentionally_, via patch releases.
+That is to say, changes to `master` by default _won't_ make their way into any
+`1.12` version, and development on `master` will be targeting the next minor
+or major release.
+
+### Patch releases (bug fixes!)
+
+Releasing new bugfix versions is really straightforward. Increment the tiny version
+number in `lib/bundler/version.rb`, and in `CHANGELOG.md` add one bullet point
+per bug fixed. Then run `rake release` from the `-stable` branch,
+and pour yourself a tasty drink!
+
+PRs containing regression fixes for a patch release of the current minor version
+are merged to master. These commits are then cherry-picked from master onto the
+minor branch (`1-12-stable`).
+
+There is a `rake release:patch` rake task that automates creating a patch release.
+It takes a single argument, the _exact_ patch release being made (e.g. `1.12.3`),
+and checks out the appropriate stable branch (`1-12-stable`), grabs the `1.12.3`
+milestone from GitHub, ensures all PRs are closed, and then cherry-picks those changes
+(and only those changes) to the stable branch. The task then bumps the version in the
+version file, prompts you to update the `CHANGELOG.md`, then will commit those changes
+and run `rake release`!
+
+## Beta testing
+
+Early releases require heavy testing, especially across various system setups.
+We :heart: testers, and are big fans of anyone who can run `gem install bundler --pre`
+and try out upcoming releases in their development and staging environments.
+
+There may not always be prereleases or beta versions of Bundler.
+The Bundler team will tweet from the [@bundlerio account](http://twitter.com/bundlerio)
+when a prerelease or beta version becomes available. You are also always welcome to try
+checking out master and building a gem yourself if you want to try out the latest changes.
diff --git a/doc/playbooks/TEAM_CHANGES.md b/doc/playbooks/TEAM_CHANGES.md
new file mode 100644
index 0000000000..f6a1e26bff
--- /dev/null
+++ b/doc/playbooks/TEAM_CHANGES.md
@@ -0,0 +1,43 @@
+# Team changes
+
+This file documents how to add and remove team members. For the rules governing adding and removing team members, see [POLICIES][policies].
+
+## Adding a new team member
+
+Interested in adding someone to the team? Here's the process.
+
+1. An existing team member nominates a potential team member to the rest of the team.
+2. The existing team reaches consensus about whether to invite the potential member.
+3. The nominator asks the potential member if they would like to join the team.
+4. The nominator also sends the candidate a link to [POLICIES][policies] as an orientation for being on the team.
+5. If the potential member accepts:
+ - Invite them to the maintainers Slack channel
+ - Add them to the [maintainers team][org_team] on GitHub
+ - Add them to the [Team page][team] on bundler.io, in the [maintainers list][maintainers]
+ - Add them to the [list of team members][list] in `contributors.rake`
+ - Add them to the authors list in `bundler.gemspec`
+ - Add them to the reviewer list in bundlerbot
+ - Add them to the owners list on RubyGems.org by running
+ ```
+ $ gem owner -a EMAIL bundler
+ ```
+
+
+## Removing a team member
+
+When the conditions in [POLICIES](https://github.com/bundler/bundler/blob/master/doc/POLICIES.md#maintainer-team-guidelines) are met, or when team members choose to retire, here's how to remove someone from the team.
+
+- Remove them from the owners list on RubyGems.org by running
+ ```
+ $ gem owner -r EMAIL bundler
+ ```
+- Remove their entry on the [Team page][team] on bundler.io, in the [maintainers list][maintainers]
+- Remove them from the [list of team members][list] in `contributors.rake`
+- Remove them from the [maintainers team][org_team] on GitHub
+- Remove them from the maintainers Slack channel
+
+[policies]: https://github.com/bundler/bundler/blob/master/doc/POLICIES.md#bundler-policies
+[org_team]: https://github.com/orgs/bundler/teams/maintainers/members
+[team]: https://bundler.io/contributors.html
+[maintainers]: https://github.com/bundler/bundler-site/blob/02483d3f79f243774722b3fc18a471ca77b1c424/source/contributors.html.haml#L25
+[list]: https://github.com/bundler/bundler-site/blob/02483d3f79f243774722b3fc18a471ca77b1c424/lib/tasks/contributors.rake#L8
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 52bbc57fb5..5da316ec4d 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -191,12 +191,30 @@ module Bundler
end
tmp_home_path.join(login).tap(&:mkpath)
end
- rescue => e
+ rescue RuntimeError => e
raise e.exception("#{warning}\nBundler also failed to create a temporary home directory at `#{path}':\n#{e}")
end
- def user_bundle_path
- Pathname.new(user_home).join(".bundle")
+ def user_bundle_path(dir = "home")
+ env_var, fallback = case dir
+ when "home"
+ ["BUNDLE_USER_HOME", Pathname.new(user_home).join(".bundle")]
+ when "cache"
+ ["BUNDLE_USER_CACHE", user_bundle_path.join("cache")]
+ when "config"
+ ["BUNDLE_USER_CONFIG", user_bundle_path.join("config")]
+ when "plugin"
+ ["BUNDLE_USER_PLUGIN", user_bundle_path.join("plugin")]
+ else
+ raise BundlerError, "Unknown user path requested: #{dir}"
+ end
+ # `fallback` will already be a Pathname, but Pathname.new() is
+ # idempotent so it's OK
+ Pathname.new(ENV.fetch(env_var, fallback))
+ end
+
+ def user_cache
+ user_bundle_path("cache")
end
def home
@@ -211,10 +229,6 @@ module Bundler
bundle_path.join("specifications")
end
- def user_cache
- user_bundle_path.join("cache")
- end
-
def root
@root ||= begin
SharedHelpers.root
@@ -353,7 +367,7 @@ EOF
bin_dir = bin_dir.parent until bin_dir.exist?
# if any directory is not writable, we need sudo
- files = [path, bin_dir] | Dir[path.join("build_info/*").to_s] | Dir[path.join("*").to_s]
+ files = [path, bin_dir] | Dir[bundle_path.join("build_info/*").to_s] | Dir[bundle_path.join("*").to_s]
sudo_needed = files.any? {|f| !File.writable?(f) }
end
@@ -416,7 +430,7 @@ EOF
def load_marshal(data)
Marshal.load(data)
- rescue => e
+ rescue StandardError => e
raise MarshalError, "#{e.class}: #{e.message}"
end
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 7dd54671de..f692ae5f13 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -166,6 +166,17 @@ module Bundler
Check.new(options).run
end
+ desc "remove [GEM [GEM ...]]", "Removes gems from the Gemfile"
+ long_desc <<-D
+ Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If the gem is not found, Bundler prints a error message and if gem could not be removed due to any reason Bundler will display a warning.
+ D
+ method_option "install", :type => :boolean, :banner =>
+ "Runs 'bundle install' after removing the gems from the Gemfile"
+ def remove(*gems)
+ require "bundler/cli/remove"
+ Remove.new(gems, options).run
+ end
+
desc "install [OPTIONS]", "Install the current environment to the system"
long_desc <<-D
Install will install all of the gems in the current bundle, making them available
@@ -233,6 +244,8 @@ module Bundler
D
method_option "full-index", :type => :boolean, :banner =>
"Fall back to using the single-file index of all gems"
+ method_option "gemfile", :type => :string, :banner =>
+ "Use the specified gemfile instead of Gemfile"
method_option "group", :aliases => "-g", :type => :array, :banner =>
"Update a specific group"
method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
@@ -285,6 +298,9 @@ module Bundler
if Bundler.feature_flag.list_command?
desc "list", "List all gems in the bundle"
method_option "name-only", :type => :boolean, :banner => "print only the gem names"
+ method_option "only-group", :type => :string, :banner => "print gems from a particular group"
+ method_option "without-group", :type => :string, :banner => "print all gems expect from a group"
+ method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle"
def list
require "bundler/cli/list"
List.new(options).run
@@ -316,6 +332,8 @@ module Bundler
"Specify a different shebang executable name than the default (usually 'ruby')"
method_option "standalone", :type => :boolean, :banner =>
"Make binstubs that can work without the Bundler runtime"
+ method_option "all", :type => :boolean, :banner =>
+ "Install binstubs for all gems"
def binstubs(*gems)
require "bundler/cli/binstubs"
Binstubs.new(options, gems).run
@@ -328,10 +346,13 @@ module Bundler
method_option "version", :aliases => "-v", :type => :string
method_option "group", :aliases => "-g", :type => :string
method_option "source", :aliases => "-s", :type => :string
-
- def add(gem_name)
+ method_option "skip-install", :type => :boolean, :banner =>
+ "Adds gem to the Gemfile but does not install it"
+ method_option "optimistic", :type => :boolean, :banner => "Adds optimistic declaration of version to gem"
+ method_option "strict", :type => :boolean, :banner => "Adds strict declaration of version to gem"
+ def add(*gems)
require "bundler/cli/add"
- Add.new(options.dup, gem_name).run
+ Add.new(options.dup, gems).run
end
desc "outdated GEM [OPTIONS]", "List installed gems with newer versions available"
@@ -350,9 +371,10 @@ module Bundler
"Do not attempt to fetch gems remotely and use the gem cache instead"
method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
method_option "source", :type => :array, :banner => "Check against a specific source"
- method_option "strict", :type => :boolean, :banner =>
+ strict_is_update = Bundler.feature_flag.forget_cli_options?
+ method_option "filter-strict", :type => :boolean, :aliases => strict_is_update ? [] : %w[--strict], :banner =>
"Only list newer versions allowed by your Gemfile requirements"
- method_option "update-strict", :type => :boolean, :banner =>
+ method_option "update-strict", :type => :boolean, :aliases => strict_is_update ? %w[--strict] : [], :banner =>
"Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major"
method_option "minor", :type => :boolean, :banner => "Prefer updating only to next minor version"
method_option "major", :type => :boolean, :banner => "Prefer updating to next major version (default)"
@@ -362,6 +384,8 @@ module Bundler
method_option "filter-patch", :type => :boolean, :banner => "Only list patch newer versions"
method_option "parseable", :aliases => "--porcelain", :type => :boolean, :banner =>
"Use minimal formatting for more parseable output"
+ method_option "only-explicit", :type => :boolean, :banner =>
+ "Only list gems specified in your Gemfile, not their dependencies"
def outdated(*gems)
require "bundler/cli/outdated"
Outdated.new(options, gems).run
@@ -413,6 +437,7 @@ module Bundler
desc "exec [OPTIONS]", "Run the command in context of the bundle"
method_option :keep_file_descriptors, :type => :boolean, :default => false
+ method_option :gemfile, :type => :string, :required => false
long_desc <<-D
Exec runs a command, providing it access to the gems in the bundle. While using
bundle exec you can require and call the bundled gems as if they were installed
@@ -436,11 +461,8 @@ module Bundler
will show the current value, as well as any superceded values and
where they were specified.
D
- method_option "parseable", :type => :boolean, :banner => "Use minimal formatting for more parseable output"
- def config(*args)
- require "bundler/cli/config"
- Config.new(options, args, self).run
- end
+ require "bundler/cli/config"
+ subcommand "config", Config
desc "open GEM", "Opens the source directory of the given bundled gem"
def open(name)
@@ -485,20 +507,23 @@ module Bundler
end
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
- require "bundler/cli/viz"
- Viz.new(options.dup).run
+ 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
end
old_gem = instance_method(:gem)
@@ -741,7 +766,7 @@ module Bundler
end
Bundler.ui.warn "The latest bundler is #{latest}, but you are currently running #{current}.\n#{suggestion}"
- rescue
+ rescue RuntimeError
nil
end
end
diff --git a/lib/bundler/cli/add.rb b/lib/bundler/cli/add.rb
index 1fcbd22f28..9709e71be0 100644
--- a/lib/bundler/cli/add.rb
+++ b/lib/bundler/cli/add.rb
@@ -2,13 +2,18 @@
module Bundler
class CLI::Add
- def initialize(options, gem_name)
- @gem_name = gem_name
+ def initialize(options, gems)
+ @gems = gems
@options = options
@options[:group] = @options[:group].split(",").map(&:strip) if !@options[:group].nil? && !@options[:group].empty?
end
def run
+ raise InvalidOption, "You can not specify `--strict` and `--optimistic` at the same time." if @options[:strict] && @options[:optimistic]
+
+ # raise error when no gems are specified
+ raise InvalidOption, "Please specify gems to add." if @gems.empty?
+
version = @options[:version].nil? ? nil : @options[:version].split(",").map(&:strip)
unless version.nil?
@@ -16,10 +21,15 @@ module Bundler
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN =~ v.to_s
end
end
- dependency = Bundler::Dependency.new(@gem_name, version, @options)
- Injector.inject([dependency], :conservative_versioning => @options[:version].nil?) # Perform conservative versioning only when version is not specified
- Installer.install(Bundler.root, Bundler.definition)
+ dependencies = @gems.map {|g| Bundler::Dependency.new(g, version, @options) }
+
+ Injector.inject(dependencies,
+ :conservative_versioning => @options[:version].nil?, # Perform conservative versioning only when version is not specified
+ :optimistic => @options[:optimistic],
+ :strict => @options[:strict])
+
+ Installer.install(Bundler.root, Bundler.definition) unless @options["skip-install"]
end
end
end
diff --git a/lib/bundler/cli/binstubs.rb b/lib/bundler/cli/binstubs.rb
index 449204d821..266396eedc 100644
--- a/lib/bundler/cli/binstubs.rb
+++ b/lib/bundler/cli/binstubs.rb
@@ -16,7 +16,13 @@ module Bundler
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
installer = Installer.new(Bundler.root, Bundler.definition)
- if gems.empty?
+ installer_opts = { :force => options[:force], :binstubs_cmd => true }
+
+ if options[:all]
+ raise InvalidOption, "Cannot specify --all with specific gems" unless gems.empty?
+ @gems = Bundler.definition.specs.map(&:name)
+ installer_opts.delete(:binstubs_cmd)
+ elsif gems.empty?
Bundler.ui.error "`bundle binstubs` needs at least one gem to run."
exit 1
end
@@ -35,7 +41,7 @@ module Bundler
installer.generate_standalone_bundler_executable_stubs(spec)
end
else
- installer.generate_bundler_executable_stubs(spec, :force => options[:force], :binstubs_cmd => true)
+ installer.generate_bundler_executable_stubs(spec, installer_opts)
end
end
end
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 9d40ee9dfd..8084405b38 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -23,7 +23,7 @@ module Bundler
groups = Bundler.settings[:without]
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
reject {|s| s.to_s.empty? }.join(" and ")
- group_str = (groups.size == 1) ? "group" : "groups"
+ group_str = groups.size == 1 ? "group" : "groups"
"Gems in the #{group_str} #{group_list} were not installed."
end
@@ -83,7 +83,7 @@ module Bundler
raise InvalidOption, "Provide only one of the following options: #{patch_level.join(", ")}" unless patch_level.length <= 1
definition.gem_version_promoter.tap do |gvp|
gvp.level = patch_level.first || :major
- gvp.strict = options[:strict] || options["update-strict"]
+ gvp.strict = options[:strict] || options["update-strict"] || options["filter-strict"]
end
end
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb
index 12f71ea8fe..cc89465adc 100644
--- a/lib/bundler/cli/config.rb
+++ b/lib/bundler/cli/config.rb
@@ -1,119 +1,182 @@
# frozen_string_literal: true
module Bundler
- class CLI::Config
- attr_reader :name, :options, :scope, :thor
- attr_accessor :args
-
- def initialize(options, args, thor)
- @options = options
- @args = args
- @thor = thor
- @name = peek = args.shift
- @scope = "global"
- return unless peek && peek.start_with?("--")
- @name = args.shift
- @scope = peek[2..-1]
+ class CLI::Config < Thor
+ class_option :parseable, :type => :boolean, :banner => "Use minimal formatting for more parseable output"
+
+ def self.scope_options
+ method_option :global, :type => :boolean, :banner => "Only change the global config"
+ method_option :local, :type => :boolean, :banner => "Only change the local config"
end
+ private_class_method :scope_options
- def run
- unless name
- confirm_all
- return
- end
+ desc "base NAME [VALUE]", "The Bundler 1 config interface", :hide => true
+ scope_options
+ method_option :delete, :type => :boolean, :banner => "delete"
+ def base(name = nil, *value)
+ SharedHelpers.major_deprecation 3,
+ "Using the `config` command without a subcommand [list, get, set, unset]"
+ Base.new(options, name, value, self).run
+ end
- unless valid_scope?(scope)
- Bundler.ui.error "Invalid scope --#{scope} given. Please use --local or --global."
- exit 1
- end
+ desc "list", "List out all configured settings"
+ def list
+ Base.new(options, nil, nil, self).run
+ end
+
+ desc "get NAME", "Returns the value for the given key"
+ def get(name)
+ Base.new(options, name, nil, self).run
+ end
+
+ desc "set NAME VALUE", "Sets the given value for the given key"
+ scope_options
+ def set(name, value, *value_)
+ Base.new(options, name, value_.unshift(value), self).run
+ end
+
+ desc "unset NAME", "Unsets the value for the given key"
+ scope_options
+ def unset(name)
+ options[:delete] = true
+ Base.new(options, name, nil, self).run
+ end
- if scope == "delete"
- Bundler.settings.set_local(name, nil)
- Bundler.settings.set_global(name, nil)
- return
+ default_task :base
+
+ class Base
+ attr_reader :name, :value, :options, :scope, :thor
+
+ def initialize(options, name, value, thor)
+ @options = options
+ @name = name
+ value = Array(value)
+ @value = value.empty? ? nil : value.join(" ")
+ @thor = thor
+ validate_scope!
end
- if args.empty?
- if options[:parseable]
- if value = Bundler.settings[name]
- Bundler.ui.info("#{name}=#{value}")
+ def run
+ unless name
+ warn_unused_scope "Ignoring --#{scope}"
+ confirm_all
+ return
+ end
+
+ if options[:delete]
+ if !explicit_scope? || scope != "global"
+ Bundler.settings.set_local(name, nil)
+ end
+ if !explicit_scope? || scope != "local"
+ Bundler.settings.set_global(name, nil)
end
return
end
- confirm(name)
- return
- end
+ if value.nil?
+ warn_unused_scope "Ignoring --#{scope} since no value to set was given"
- Bundler.ui.info(message) if message
- Bundler.settings.send("set_#{scope}", name, new_value)
- end
+ if options[:parseable]
+ if value = Bundler.settings[name]
+ Bundler.ui.info("#{name}=#{value}")
+ end
+ return
+ end
+
+ confirm(name)
+ return
+ end
- private
+ Bundler.ui.info(message) if message
+ Bundler.settings.send("set_#{scope}", name, new_value)
+ end
- def confirm_all
- if @options[:parseable]
- thor.with_padding do
+ def confirm_all
+ if @options[:parseable]
+ thor.with_padding do
+ Bundler.settings.all.each do |setting|
+ val = Bundler.settings[setting]
+ Bundler.ui.info "#{setting}=#{val}"
+ end
+ end
+ else
+ Bundler.ui.confirm "Settings are listed in order of priority. The top value will be used.\n"
Bundler.settings.all.each do |setting|
- val = Bundler.settings[setting]
- Bundler.ui.info "#{setting}=#{val}"
+ Bundler.ui.confirm "#{setting}"
+ show_pretty_values_for(setting)
+ Bundler.ui.confirm ""
end
end
- else
- Bundler.ui.confirm "Settings are listed in order of priority. The top value will be used.\n"
- Bundler.settings.all.each do |setting|
- Bundler.ui.confirm "#{setting}"
- show_pretty_values_for(setting)
- Bundler.ui.confirm ""
- end
end
- end
- def confirm(name)
- Bundler.ui.confirm "Settings for `#{name}` in order of priority. The top value will be used"
- show_pretty_values_for(name)
- end
+ def confirm(name)
+ Bundler.ui.confirm "Settings for `#{name}` in order of priority. The top value will be used"
+ show_pretty_values_for(name)
+ end
- def new_value
- pathname = Pathname.new(args.join(" "))
- if name.start_with?("local.") && pathname.directory?
- pathname.expand_path.to_s
- else
- args.join(" ")
+ def new_value
+ pathname = Pathname.new(value)
+ if name.start_with?("local.") && pathname.directory?
+ pathname.expand_path.to_s
+ else
+ value
+ end
end
- end
- def message
- locations = Bundler.settings.locations(name)
- if @options[:parseable]
- "#{name}=#{new_value}" if new_value
- elsif scope == "global"
- if locations[:local]
- "Your application has set #{name} to #{locations[:local].inspect}. " \
- "This will override the global value you are currently setting"
- elsif locations[:env]
- "You have a bundler environment variable for #{name} set to " \
- "#{locations[:env].inspect}. This will take precedence over the global value you are setting"
- elsif locations[:global] && locations[:global] != args.join(" ")
- "You are replacing the current global value of #{name}, which is currently " \
- "#{locations[:global].inspect}"
+ def message
+ locations = Bundler.settings.locations(name)
+ if @options[:parseable]
+ "#{name}=#{new_value}" if new_value
+ elsif scope == "global"
+ if !locations[:local].nil?
+ "Your application has set #{name} to #{locations[:local].inspect}. " \
+ "This will override the global value you are currently setting"
+ elsif locations[:env]
+ "You have a bundler environment variable for #{name} set to " \
+ "#{locations[:env].inspect}. This will take precedence over the global value you are setting"
+ elsif !locations[:global].nil? && locations[:global] != value
+ "You are replacing the current global value of #{name}, which is currently " \
+ "#{locations[:global].inspect}"
+ end
+ elsif scope == "local" && !locations[:local].nil? && locations[:local] != value
+ "You are replacing the current local value of #{name}, which is currently " \
+ "#{locations[:local].inspect}"
end
- elsif scope == "local" && locations[:local] != args.join(" ")
- "You are replacing the current local value of #{name}, which is currently " \
- "#{locations[:local].inspect}"
end
- end
- def show_pretty_values_for(setting)
- thor.with_padding do
- Bundler.settings.pretty_values_for(setting).each do |line|
- Bundler.ui.info line
+ def show_pretty_values_for(setting)
+ thor.with_padding do
+ Bundler.settings.pretty_values_for(setting).each do |line|
+ Bundler.ui.info line
+ end
end
end
- end
- def valid_scope?(scope)
- %w[delete local global].include?(scope)
+ def explicit_scope?
+ @explicit_scope
+ end
+
+ def warn_unused_scope(msg)
+ return unless explicit_scope?
+ return if options[:parseable]
+
+ Bundler.ui.warn(msg)
+ end
+
+ def validate_scope!
+ @explicit_scope = true
+ scopes = %w[global local].select {|s| options[s] }
+ case scopes.size
+ when 0
+ @scope = "global"
+ @explicit_scope = false
+ when 1
+ @scope = scopes.first
+ else
+ raise InvalidOption,
+ "The options #{scopes.join " and "} were specified. Please only use one of the switches at a time."
+ end
+ end
end
end
end
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb
index 853eca8358..6e0dfe28af 100644
--- a/lib/bundler/cli/console.rb
+++ b/lib/bundler/cli/console.rb
@@ -12,7 +12,7 @@ module Bundler
Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
"by `bin/console` generated by `bundle gem <name>`"
- group ? Bundler.require(:default, *(group.split.map!(&:to_sym))) : Bundler.require
+ group ? Bundler.require(:default, *group.split.map!(&:to_sym)) : Bundler.require
ARGV.clear
console = get_console(Bundler.settings[:console] || "irb")
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb
index 7f28a5eb13..3e0898ff8a 100644
--- a/lib/bundler/cli/doctor.rb
+++ b/lib/bundler/cli/doctor.rb
@@ -78,6 +78,8 @@ module Bundler
end
end
+ permissions_valid = check_home_permissions
+
if broken_links.any?
message = "The following gems are missing OS dependencies:"
broken_links.map do |spec, paths|
@@ -86,9 +88,53 @@ module Bundler
end
end.flatten.sort.each {|m| message += m }
raise ProductionError, message
- else
+ elsif !permissions_valid
Bundler.ui.info "No issues found with the installed bundle"
end
end
+
+ private
+
+ def check_home_permissions
+ require "find"
+ files_not_readable_or_writable = []
+ files_not_rw_and_owned_by_different_user = []
+ files_not_owned_by_current_user_but_still_rw = []
+ Find.find(Bundler.home.to_s).each do |f|
+ if !File.writable?(f) || !File.readable?(f)
+ if File.stat(f).uid != Process.uid
+ files_not_rw_and_owned_by_different_user << f
+ else
+ files_not_readable_or_writable << f
+ end
+ elsif File.stat(f).uid != Process.uid
+ files_not_owned_by_current_user_but_still_rw << f
+ end
+ end
+
+ ok = true
+ if files_not_owned_by_current_user_but_still_rw.any?
+ Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
+ "user, but are still readable/writable. These files are:\n - #{files_not_owned_by_current_user_but_still_rw.join("\n - ")}"
+
+ ok = false
+ end
+
+ if files_not_rw_and_owned_by_different_user.any?
+ Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
+ "user, and are not readable/writable. These files are:\n - #{files_not_rw_and_owned_by_different_user.join("\n - ")}"
+
+ ok = false
+ end
+
+ if files_not_readable_or_writable.any?
+ Bundler.ui.warn "Files exist in the Bundler home that are not " \
+ "readable/writable by the current user. These files are:\n - #{files_not_readable_or_writable.join("\n - ")}"
+
+ ok = false
+ end
+
+ ok
+ end
end
end
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index ea017dfc09..b40e5f0e9e 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -71,8 +71,7 @@ module Bundler
if Bundler.use_system_gems?
Bundler.ui.confirm "Use `bundle info [gemname]` to see where a bundled gem is installed."
else
- absolute_path = File.expand_path(Bundler.configured_bundle_path.base_path)
- relative_path = absolute_path.sub(File.expand_path(".") + File::SEPARATOR, "." + File::SEPARATOR)
+ relative_path = Bundler.configured_bundle_path.base_path_relative_to_pwd
Bundler.ui.confirm "Bundled gems are installed into `#{relative_path}`"
end
@@ -169,9 +168,13 @@ module Bundler
def normalize_settings
Bundler.settings.set_command_option :path, nil if options[:system]
- Bundler.settings.set_command_option :path, "vendor/bundle" if options[:deployment]
- Bundler.settings.set_command_option_if_given :path, options["path"]
- Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?
+ Bundler.settings.temporary(:path_relative_to_cwd => false) do
+ Bundler.settings.set_command_option :path, "vendor/bundle" if options[:deployment]
+ end
+ Bundler.settings.set_command_option_if_given :path, options[:path]
+ Bundler.settings.temporary(:path_relative_to_cwd => false) do
+ Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?
+ end
bin_option = options["binstubs"]
bin_option = nil if bin_option && bin_option.empty?
diff --git a/lib/bundler/cli/list.rb b/lib/bundler/cli/list.rb
index b5e7c1e650..d1799196e7 100644
--- a/lib/bundler/cli/list.rb
+++ b/lib/bundler/cli/list.rb
@@ -7,16 +7,52 @@ module Bundler
end
def run
- specs = Bundler.load.specs.reject {|s| s.name == "bundler" }.sort_by(&:name)
- return specs.each {|s| Bundler.ui.info s.name } if @options["name-only"]
+ raise InvalidOption, "The `--only-group` and `--without-group` options cannot be used together" if @options["only-group"] && @options["without-group"]
+
+ raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options[:paths]
+
+ specs = if @options["only-group"] || @options["without-group"]
+ filtered_specs_by_groups
+ else
+ Bundler.load.specs
+ end.reject {|s| s.name == "bundler" }.sort_by(&:name)
return Bundler.ui.info "No gems in the Gemfile" if specs.empty?
+
+ return specs.each {|s| Bundler.ui.info s.name } if @options["name-only"]
+ return specs.each {|s| Bundler.ui.info s.full_gem_path } if @options["paths"]
+
Bundler.ui.info "Gems included by the bundle:"
- specs.each do |s|
- Bundler.ui.info " * #{s.name} (#{s.version}#{s.git_version})"
- end
+
+ specs.each {|s| Bundler.ui.info " * #{s.name} (#{s.version}#{s.git_version})" }
Bundler.ui.info "Use `bundle info` to print more detailed information about a gem"
end
+
+ private
+
+ def verify_group_exists(groups)
+ raise InvalidOption, "`#{@options["without-group"]}` group could not be found." if @options["without-group"] && !groups.include?(@options["without-group"].to_sym)
+
+ raise InvalidOption, "`#{@options["only-group"]}` group could not be found." if @options["only-group"] && !groups.include?(@options["only-group"].to_sym)
+ end
+
+ def filtered_specs_by_groups
+ definition = Bundler.definition
+ groups = definition.groups
+
+ verify_group_exists(groups)
+
+ show_groups =
+ if @options["without-group"]
+ groups.reject {|g| g == @options["without-group"].to_sym }
+ elsif @options["only-group"]
+ groups.select {|g| g == @options["only-group"].to_sym }
+ else
+ groups
+ end.map(&:to_sym)
+
+ definition.specs_for(show_groups)
+ end
end
end
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 501d6eed38..6cbb3452cb 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -41,7 +41,7 @@ module Bundler
# the patch level options imply strict is also true. It wouldn't make
# sense otherwise.
- strict = options[:strict] ||
+ strict = options["filter-strict"] ||
Bundler::CLI::Common.patch_level_options(options).any?
filter_options_patch = options.keys &
@@ -66,7 +66,13 @@ module Bundler
current_dependencies.key? spec.name
end
- (gemfile_specs + dependency_specs).sort_by(&:name).each do |current_spec|
+ specs = if options["only-explicit"]
+ gemfile_specs
+ else
+ gemfile_specs + dependency_specs
+ end
+
+ specs.sort_by(&:name).each do |current_spec|
next if !gems.empty? && !gems.include?(current_spec.name)
dependency = current_dependencies[current_spec.name]
@@ -118,7 +124,7 @@ module Bundler
[nil, ordered_groups].flatten.each do |groups|
gems = outdated_gems_by_groups[groups]
contains_group = if groups
- groups.split(",").include?(options[:group])
+ groups.split(", ").include?(options[:group])
else
options[:group] == "group"
end
diff --git a/lib/bundler/cli/plugin.rb b/lib/bundler/cli/plugin.rb
index 5488a9f28d..92d4653bda 100644
--- a/lib/bundler/cli/plugin.rb
+++ b/lib/bundler/cli/plugin.rb
@@ -20,5 +20,10 @@ module Bundler
def install(*plugins)
Bundler::Plugin.install(plugins, options)
end
+
+ desc "list", "List the installed plugins and available commands"
+ def list
+ Bundler::Plugin.list
+ end
end
end
diff --git a/lib/bundler/cli/pristine.rb b/lib/bundler/cli/pristine.rb
index 9b9cdaa9b3..532b3e0b5b 100644
--- a/lib/bundler/cli/pristine.rb
+++ b/lib/bundler/cli/pristine.rb
@@ -30,6 +30,10 @@ module Bundler
FileUtils.rm_rf spec.full_gem_path
when Source::Git
source.remote!
+ if extension_cache_path = source.extension_cache_path(spec)
+ FileUtils.rm_rf extension_cache_path
+ end
+ FileUtils.rm_rf spec.extension_dir
FileUtils.rm_rf spec.full_gem_path
else
Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is sourced from local path.")
diff --git a/lib/bundler/cli/remove.rb b/lib/bundler/cli/remove.rb
new file mode 100644
index 0000000000..cd6a2cec28
--- /dev/null
+++ b/lib/bundler/cli/remove.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module Bundler
+ class CLI::Remove
+ def initialize(gems, options)
+ @gems = gems
+ @options = options
+ end
+
+ def run
+ raise InvalidOption, "Please specify gems to remove." if @gems.empty?
+
+ Injector.remove(@gems, {})
+
+ Installer.install(Bundler.root, Bundler.definition) if @options["install"]
+ end
+ end
+end
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 0a02547f0d..3964c07fb5 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -9,7 +9,6 @@ module Bundler
attr_reader(
:dependencies,
- :gem_version_promoter,
:locked_deps,
:locked_gems,
:platforms,
@@ -125,25 +124,25 @@ module Bundler
@unlock[:gems] = @locked_specs.for(eager_unlock, [], false, false, false).map(&:name)
end
- @gem_version_promoter = create_gem_version_promoter
-
@dependency_changes = converge_dependencies
@local_changes = converge_locals
@requires = compute_requires
end
- def create_gem_version_promoter
- locked_specs =
- if unlocking? && @locked_specs.empty? && !@lockfile_contents.empty?
- # Definition uses an empty set of locked_specs to indicate all gems
- # are unlocked, but GemVersionPromoter needs the locked_specs
- # for conservative comparison.
- Bundler::SpecSet.new(@locked_gems.specs)
- else
- @locked_specs
- end
- GemVersionPromoter.new(locked_specs, @unlock[:gems])
+ def gem_version_promoter
+ @gem_version_promoter ||= begin
+ locked_specs =
+ if unlocking? && @locked_specs.empty? && !@lockfile_contents.empty?
+ # Definition uses an empty set of locked_specs to indicate all gems
+ # are unlocked, but GemVersionPromoter needs the locked_specs
+ # for conservative comparison.
+ Bundler::SpecSet.new(@locked_gems.specs)
+ else
+ @locked_specs
+ end
+ GemVersionPromoter.new(locked_specs, @unlock[:gems])
+ end
end
def resolve_with_cache!
@@ -214,7 +213,7 @@ module Bundler
@index = nil
@resolve = nil
@specs = nil
- @gem_version_promoter = create_gem_version_promoter
+ @gem_version_promoter = nil
Bundler.ui.debug "The definition is missing dependencies, failed to resolve & materialize locally (#{e})"
true
@@ -246,17 +245,22 @@ module Bundler
def resolve
@resolve ||= begin
last_resolve = converge_locked_specs
- if Bundler.frozen_bundle?
- Bundler.ui.debug "Frozen, using resolution from the lockfile"
- last_resolve
- elsif !unlocking? && nothing_changed?
- Bundler.ui.debug("Found no changes, using resolution from the lockfile")
- last_resolve
- else
- # Run a resolve against the locally available gems
- Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
- last_resolve.merge Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
- end
+ resolve =
+ if Bundler.frozen_bundle?
+ Bundler.ui.debug "Frozen, using resolution from the lockfile"
+ last_resolve
+ elsif !unlocking? && nothing_changed?
+ Bundler.ui.debug("Found no changes, using resolution from the lockfile")
+ last_resolve
+ else
+ # Run a resolve against the locally available gems
+ Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
+ last_resolve.merge Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
+ end
+
+ # filter out gems that _can_ be installed on multiple platforms, but don't need
+ # to be
+ resolve.for(expand_dependencies(dependencies, true), [], false, false, false)
end
end
@@ -851,8 +855,8 @@ module Bundler
concat_ruby_version_requirements(locked_ruby_version_object) unless @unlock[:ruby]
end
[
- Dependency.new("ruby\0", ruby_versions),
- Dependency.new("rubygems\0", Gem::VERSION),
+ Dependency.new("Ruby\0", ruby_versions),
+ Dependency.new("RubyGems\0", Gem::VERSION),
]
end
end
@@ -880,7 +884,7 @@ module Bundler
dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
next if !remote && !dep.current_platform?
platforms = dep.gem_platforms(sorted_platforms)
- if platforms.empty?
+ if platforms.empty? && !Bundler.settings[:disable_platform_warnings]
mapped_platforms = dep.platforms.map {|p| Dependency::PLATFORM_MAP[p] }
Bundler.ui.warn \
"The dependency #{dep} will be unused by any of the platforms Bundler is installing for. " \
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index 8fd59bd809..8840ad6a9c 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -7,8 +7,7 @@ require "bundler/rubygems_ext"
module Bundler
class Dependency < Gem::Dependency
attr_reader :autorequire
- attr_reader :groups
- attr_reader :platforms
+ attr_reader :groups, :platforms, :gemfile
PLATFORM_MAP = {
:ruby => Gem::Platform::RUBY,
@@ -88,6 +87,7 @@ module Bundler
@platforms = Array(options["platforms"])
@env = options["env"]
@should_include = options.fetch("should_include", true)
+ @gemfile = options["gemfile"]
@autorequire = Array(options["require"] || []) if options.key?("require")
end
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 8681163277..80d208e463 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -16,7 +16,7 @@ module Bundler
VALID_PLATFORMS = Bundler::Dependency::PLATFORM_MAP.keys.freeze
VALID_KEYS = %w[group groups git path glob name branch ref tag require submodules
- platform platforms type source install_if].freeze
+ platform platforms type source install_if gemfile].freeze
attr_reader :gemspecs
attr_accessor :dependencies
@@ -93,6 +93,7 @@ module Bundler
def gem(name, *args)
options = args.last.is_a?(Hash) ? args.pop.dup : {}
+ options["gemfile"] = @gemfile
version = args || [">= 0"]
normalize_options(name, version, options)
@@ -106,13 +107,28 @@ module Bundler
if current.requirement != dep.requirement
unless deleted_dep
return if dep.type == :development
+
+ update_prompt = ""
+
+ if File.basename(@gemfile) == Injector::INJECTED_GEMS
+ if dep.requirements_list.include?(">= 0") && !current.requirements_list.include?(">= 0")
+ update_prompt = ". Gem already added"
+ else
+ update_prompt = ". If you want to update the gem version, run `bundle update #{current.name}`"
+
+ update_prompt += ". You may also need to change the version requirement specified in the Gemfile if it's too restrictive." unless current.requirements_list.include?(">= 0")
+ end
+ end
+
raise GemfileError, "You cannot specify the same gem twice with different version requirements.\n" \
- "You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})"
+ "You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})" \
+ "#{update_prompt}"
end
else
Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
"You should probably keep only one of them.\n" \
+ "Remove any duplicate entries and specify the gem only once (per group).\n" \
"While it's not a problem now, it could cause errors if you change the version of one of them later."
end
@@ -347,9 +363,7 @@ repo_name ||= user_name
if name =~ /\s/
raise GemfileError, %('#{name}' is not a valid gem name because it contains whitespace)
end
- if name.empty?
- raise GemfileError, %(an empty gem name is not valid)
- end
+ raise GemfileError, %(an empty gem name is not valid) if name.empty?
normalize_hash(opts)
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 8668c4ea7f..9a00b64e0e 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -123,7 +123,7 @@ module Bundler
@required_ruby_version = Gem::Requirement.new(v)
end
end
- rescue => e
+ rescue StandardError => e
raise GemspecError, "There was an error parsing the metadata for the gem #{name} (#{version}): #{e.class}\n#{e}\nThe metadata was #{data.inspect}"
end
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 6e13b8f9f4..171b6520ad 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -64,7 +64,7 @@ module Bundler
Bundler.read_file(filename.to_s).strip
rescue Errno::ENOENT
"<No #{filename} found>"
- rescue => e
+ rescue RuntimeError => e
"#{e.class}: #{e.message}"
end
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index 6a1809cd40..83e7ff0389 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -30,6 +30,7 @@ module Bundler
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? }
@@ -38,11 +39,13 @@ module Bundler
settings_flag(:disable_multisource) { bundler_2_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(: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? }
@@ -52,6 +55,8 @@ module Bundler
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_option(:default_cli_command) { bundler_2_mode? ? :cli_help : :install }
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 444778b36b..4dd42e42ff 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -178,7 +178,7 @@ module Bundler
# engine_version raises on unknown engines
engine_version = begin
ruby.engine_versions
- rescue
+ rescue RuntimeError
"???"
end
agent << " #{ruby.engine}/#{ruby.versions_string(engine_version)}"
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 1d7fc508d5..8ed1af231f 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -2,6 +2,7 @@
require "bundler/vendored_thor" unless defined?(Thor)
require "bundler"
+require "shellwords"
module Bundler
class GemHelper
@@ -74,7 +75,7 @@ module Bundler
def build_gem
file_name = nil
- sh("gem build -V '#{spec_path}'") do
+ sh(%W[gem build -V #{spec_path}]) 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")
@@ -85,17 +86,21 @@ module Bundler
def install_gem(built_gem_path = nil, local = false)
built_gem_path ||= build_gem
- out, _ = sh_with_code("gem install '#{built_gem_path}'#{" --local" if local}")
- raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" unless out[/Successfully installed/]
+ cmd = %W[gem install #{built_gem_path}]
+ cmd << "--local" if local
+ out, status = sh_with_status(cmd)
+ unless status.success? && out[/Successfully installed/]
+ raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output"
+ end
Bundler.ui.confirm "#{name} (#{version}) installed."
end
protected
def rubygem_push(path)
- gem_command = "gem push '#{path}'"
- gem_command += " --key #{gem_key}" if gem_key
- gem_command += " --host #{allowed_push_host}" if allowed_push_host
+ gem_command = %W[gem push #{path}]
+ gem_command << "--key" << gem_key if gem_key
+ gem_command << "--host" << allowed_push_host if allowed_push_host
unless allowed_push_host || Bundler.user_home.join(".gem/credentials").file?
raise "Your rubygems.org credentials aren't set. Run `gem push` to set them."
end
@@ -127,12 +132,14 @@ module Bundler
def perform_git_push(options = "")
cmd = "git push #{options}"
- out, code = sh_with_code(cmd)
- raise "Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n" unless code == 0
+ out, status = sh_with_status(cmd)
+ 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
def already_tagged?
- return false unless sh("git tag").split(/\n/).include?(version_tag)
+ return false unless sh(%w[git tag]).split(/\n/).include?(version_tag)
Bundler.ui.confirm "Tag #{version_tag} has already been created."
true
end
@@ -142,20 +149,20 @@ module Bundler
end
def clean?
- sh_with_code("git diff --exit-code")[1] == 0
+ sh_with_status(%w[git diff --exit-code])[1].success?
end
def committed?
- sh_with_code("git diff-index --quiet --cached HEAD")[1] == 0
+ sh_with_status(%w[git diff-index --quiet --cached HEAD])[1].success?
end
def tag_version
- sh "git tag -m \"Version #{version}\" #{version_tag}"
+ sh %W[git tag -m Version\ #{version} #{version_tag}]
Bundler.ui.confirm "Tagged #{version_tag}."
yield if block_given?
- rescue
+ rescue RuntimeError
Bundler.ui.error "Untagging #{version_tag} due to error."
- sh_with_code "git tag -d #{version_tag}"
+ sh_with_status %W[git tag -d #{version_tag}]
raise
end
@@ -172,22 +179,36 @@ module Bundler
end
def sh(cmd, &block)
- out, code = sh_with_code(cmd, &block)
- unless code.zero?
+ out, status = sh_with_status(cmd, &block)
+ unless status.success?
+ cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin)
raise(out.empty? ? "Running `#{cmd}` failed. Run this command directly for more detailed output." : out)
end
out
end
- def sh_with_code(cmd, &block)
- cmd += " 2>&1"
- outbuf = String.new
- Bundler.ui.debug(cmd)
- SharedHelpers.chdir(base) do
- outbuf = `#{cmd}`
- status = $?.exitstatus
- block.call(outbuf) if status.zero? && block
- [outbuf, status]
+ if RUBY_VERSION >= "1.9"
+ def sh_with_status(cmd, &block)
+ Bundler.ui.debug(cmd)
+ SharedHelpers.chdir(base) do
+ outbuf = IO.popen(cmd, :err => [:child, :out], &:read)
+ status = $?
+ block.call(outbuf) if status.success? && block
+ [outbuf, status]
+ end
+ end
+ else
+ def sh_with_status(cmd, &block)
+ cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin)
+ cmd += " 2>&1"
+ outbuf = String.new
+ Bundler.ui.debug(cmd)
+ SharedHelpers.chdir(base) do
+ outbuf = `#{cmd}`
+ status = $?
+ block.call(outbuf) if status.success? && block
+ [outbuf, status]
+ end
end
end
diff --git a/lib/bundler/gem_version_promoter.rb b/lib/bundler/gem_version_promoter.rb
index 2751e70929..ed950ad28b 100644
--- a/lib/bundler/gem_version_promoter.rb
+++ b/lib/bundler/gem_version_promoter.rb
@@ -7,6 +7,8 @@ module Bundler
# available dependency versions as found in its index, before returning it to
# to the resolution engine to select the best version.
class GemVersionPromoter
+ DEBUG = ENV["DEBUG_RESOLVER"]
+
attr_reader :level, :locked_specs, :unlock_gems
# By default, strict is false, meaning every available version of a gem
@@ -64,7 +66,7 @@ module Bundler
# @return [SpecGroup] A new instance of the SpecGroup Array sorted and
# possibly filtered.
def sort_versions(dep, spec_groups)
- before_result = "before sort_versions: #{debug_format_result(dep, spec_groups).inspect}" if ENV["DEBUG_RESOLVER"]
+ before_result = "before sort_versions: #{debug_format_result(dep, spec_groups).inspect}" if DEBUG
@sort_versions[dep] ||= begin
gem_name = dep.name
@@ -78,7 +80,7 @@ module Bundler
else
sort_dep_specs(spec_groups, locked_spec)
end.tap do |specs|
- if ENV["DEBUG_RESOLVER"]
+ if DEBUG
STDERR.puts before_result
STDERR.puts " after sort_versions: #{debug_format_result(dep, specs).inspect}"
end
@@ -107,7 +109,7 @@ module Bundler
must_match = minor? ? [0] : [0, 1]
matches = must_match.map {|idx| gsv.segments[idx] == lsv.segments[idx] }
- (matches.uniq == [true]) ? (gsv >= lsv) : false
+ matches.uniq == [true] ? (gsv >= lsv) : false
else
true
end
diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb
index 9c67a80777..1bb29f0b36 100644
--- a/lib/bundler/injector.rb
+++ b/lib/bundler/injector.rb
@@ -2,13 +2,20 @@
module Bundler
class Injector
+ INJECTED_GEMS = "injected gems".freeze
+
def self.inject(new_deps, options = {})
injector = new(new_deps, options)
injector.inject(Bundler.default_gemfile, Bundler.default_lockfile)
end
- def initialize(new_deps, options = {})
- @new_deps = new_deps
+ def self.remove(gems, options = {})
+ injector = new(gems, options)
+ injector.remove(Bundler.default_gemfile, Bundler.default_lockfile)
+ end
+
+ def initialize(deps, options = {})
+ @deps = deps
@options = options
end
@@ -28,18 +35,19 @@ module Bundler
builder.eval_gemfile(gemfile_path)
# don't inject any gems that are already in the Gemfile
- @new_deps -= builder.dependencies
+ @deps -= builder.dependencies
# add new deps to the end of the in-memory Gemfile
- # Set conservative versioning to false because we want to let the resolver resolve the version first
- builder.eval_gemfile("injected gems", build_gem_lines(false)) if @new_deps.any?
+ # Set conservative versioning to false because
+ # we want to let the resolver resolve the version first
+ builder.eval_gemfile(INJECTED_GEMS, build_gem_lines(false)) if @deps.any?
# resolve to see if the new deps broke anything
@definition = builder.to_definition(lockfile_path, {})
@definition.resolve_remotely!
# since nothing broke, we can add those gems to the gemfile
- append_to(gemfile_path, build_gem_lines(@options[:conservative_versioning])) if @new_deps.any?
+ append_to(gemfile_path, build_gem_lines(@options[:conservative_versioning])) if @deps.any?
# since we resolved successfully, write out the lockfile
@definition.lock(Bundler.default_lockfile)
@@ -48,7 +56,21 @@ module Bundler
Bundler.reset_paths!
# return an array of the deps that we added
- @new_deps
+ @deps
+ end
+ end
+
+ # @param [Pathname] gemfile_path The Gemfile from which to remove dependencies.
+ # @param [Pathname] lockfile_path The lockfile from which to remove dependencies.
+ # @return [Array]
+ def remove(gemfile_path, lockfile_path)
+ # remove gems from each gemfiles we have
+ Bundler.definition.gemfiles.each do |path|
+ deps = remove_deps(path)
+
+ show_warning("No gems were removed from the gemfile.") if deps.empty?
+
+ deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep, false)} was removed." }
end
end
@@ -61,11 +83,21 @@ module Bundler
seg_end_index = version >= Gem::Version.new("1.0") ? 1 : 2
prerelease_suffix = version.to_s.gsub(version.release.to_s, "") if version.prerelease?
- "~> #{segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
+ "#{version_prefix}#{segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
+ end
+
+ def version_prefix
+ if @options[:strict]
+ "= "
+ elsif @options[:optimistic]
+ ">= "
+ else
+ "~> "
+ end
end
def build_gem_lines(conservative_versioning)
- @new_deps.map do |d|
+ @deps.map do |d|
name = d.name.dump
requirement = if conservative_versioning
@@ -75,7 +107,7 @@ module Bundler
end
if d.groups != Array(:default)
- group = d.groups.size == 1 ? ", :group => #{d.groups.inspect}" : ", :groups => #{d.groups.inspect}"
+ group = d.groups.size == 1 ? ", :group => #{d.groups.first.inspect}" : ", :groups => #{d.groups.inspect}"
end
source = ", :source => \"#{d.source}\"" unless d.source.nil?
@@ -90,5 +122,132 @@ module Bundler
f.puts new_gem_lines
end
end
+
+ # evalutes a gemfile to remove the specified gem
+ # from it.
+ def remove_deps(gemfile_path)
+ initial_gemfile = IO.readlines(gemfile_path)
+
+ Bundler.ui.info "Removing gems from #{gemfile_path}"
+
+ # evaluate the Gemfile we have
+ builder = Dsl.new
+ builder.eval_gemfile(gemfile_path)
+
+ removed_deps = remove_gems_from_dependencies(builder, @deps, gemfile_path)
+
+ # abort the opertion if no gems were removed
+ # no need to operate on gemfile furthur
+ return [] if removed_deps.empty?
+
+ cleaned_gemfile = remove_gems_from_gemfile(@deps, gemfile_path)
+
+ SharedHelpers.write_to_gemfile(gemfile_path, cleaned_gemfile)
+
+ # check for errors
+ # including extra gems being removed
+ # or some gems not being removed
+ # and return the actual removed deps
+ cross_check_for_errors(gemfile_path, builder.dependencies, removed_deps, initial_gemfile)
+ end
+
+ # @param [Dsl] builder Dsl object of current Gemfile.
+ # @param [Array] gems Array of names of gems to be removed.
+ # @param [Pathname] path of the Gemfile
+ # @return [Array] removed_deps Array of removed dependencies.
+ def remove_gems_from_dependencies(builder, gems, gemfile_path)
+ removed_deps = []
+
+ gems.each do |gem_name|
+ deleted_dep = builder.dependencies.find {|d| d.name == gem_name }
+
+ if deleted_dep.nil?
+ raise GemfileError, "`#{gem_name}` is not specified in #{gemfile_path} so it could not be removed."
+ end
+
+ builder.dependencies.delete(deleted_dep)
+
+ removed_deps << deleted_dep
+ end
+
+ removed_deps
+ end
+
+ # @param [Array] gems Array of names of gems to be removed.
+ # @param [Pathname] gemfile_path The Gemfile from which to remove dependencies.
+ def remove_gems_from_gemfile(gems, gemfile_path)
+ patterns = /gem\s+(['"])#{Regexp.union(gems)}\1|gem\s*\((['"])#{Regexp.union(gems)}\2\)/
+
+ # remove lines which match the regex
+ new_gemfile = IO.readlines(gemfile_path).reject {|line| line.match(patterns) }
+
+ # remove lone \n and append them with other strings
+ new_gemfile.each_with_index do |_line, index|
+ if new_gemfile[index + 1] == "\n"
+ new_gemfile[index] += new_gemfile[index + 1]
+ new_gemfile.delete_at(index + 1)
+ end
+ end
+
+ %w[group source env install_if].each {|block| remove_nested_blocks(new_gemfile, block) }
+
+ new_gemfile.join.chomp
+ end
+
+ # @param [Array] gemfile Array of gemfile contents.
+ # @param [String] block_name Name of block name to look for.
+ def remove_nested_blocks(gemfile, block_name)
+ nested_blocks = 0
+
+ # count number of nested blocks
+ gemfile.each_with_index {|line, index| nested_blocks += 1 if !gemfile[index + 1].nil? && gemfile[index + 1].include?(block_name) && line.include?(block_name) }
+
+ while nested_blocks >= 0
+ nested_blocks -= 1
+
+ gemfile.each_with_index do |line, index|
+ next unless !line.nil? && line.include?(block_name)
+ if gemfile[index + 1] =~ /^\s*end\s*$/
+ gemfile[index] = nil
+ gemfile[index + 1] = nil
+ end
+ end
+
+ gemfile.compact!
+ end
+ end
+
+ # @param [Pathname] gemfile_path The Gemfile from which to remove dependencies.
+ # @param [Array] original_deps Array of original dependencies.
+ # @param [Array] removed_deps Array of removed dependencies.
+ # @param [Array] initial_gemfile Contents of original Gemfile before any operation.
+ def cross_check_for_errors(gemfile_path, original_deps, removed_deps, initial_gemfile)
+ # evalute the new gemfile to look for any failure cases
+ builder = Dsl.new
+ builder.eval_gemfile(gemfile_path)
+
+ # record gems which were removed but not requested
+ extra_removed_gems = original_deps - builder.dependencies
+
+ # if some extra gems were removed then raise error
+ # and revert Gemfile to original
+ unless extra_removed_gems.empty?
+ SharedHelpers.write_to_gemfile(gemfile_path, initial_gemfile.join)
+
+ raise InvalidOption, "Gems could not be removed. #{extra_removed_gems.join(", ")} would also have been removed. Bundler cannot continue."
+ end
+
+ # record gems which could not be removed due to some reasons
+ errored_deps = builder.dependencies.select {|d| d.gemfile == gemfile_path } & removed_deps.select {|d| d.gemfile == gemfile_path }
+
+ show_warning "#{errored_deps.map(&:name).join(", ")} could not be removed." unless errored_deps.empty?
+
+ # return actual removed dependencies
+ removed_deps - errored_deps
+ end
+
+ def show_warning(message)
+ Bundler.ui.info Bundler.ui.add_color(message, :yellow)
+ end
end
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 4956fad2ea..dd30bd5b64 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -21,8 +21,9 @@ module Bundler
# For more information see the #run method on this class.
def self.install(root, definition, options = {})
installer = new(root, definition)
- Plugin.hook("before-install-all", definition.dependencies)
+ Plugin.hook(Plugin::Events::GEM_BEFORE_INSTALL_ALL, definition.dependencies)
installer.run(options)
+ Plugin.hook(Plugin::Events::GEM_AFTER_INSTALL_ALL, definition.dependencies)
installer
end
@@ -192,14 +193,36 @@ module Bundler
# installation is SO MUCH FASTER. so we let people opt in.
def install(options)
force = options["force"]
- jobs = options.delete(:jobs) do
- if can_install_in_parallel?
- [Bundler.settings[:jobs].to_i - 1, 1].max
+ jobs = installation_parallelization(options)
+ install_in_parallel jobs, options[:standalone], force
+ end
+
+ def installation_parallelization(options)
+ if jobs = options.delete(:jobs)
+ return jobs
+ end
+
+ return 1 unless can_install_in_parallel?
+
+ auto_config_jobs = Bundler.feature_flag.auto_config_jobs?
+ if jobs = Bundler.settings[:jobs]
+ if auto_config_jobs
+ jobs
else
- 1
+ [jobs.pred, 1].max
end
+ elsif auto_config_jobs
+ processor_count
+ else
+ 1
end
- install_in_parallel jobs, options[:standalone], force
+ end
+
+ def processor_count
+ require "etc"
+ Etc.nprocessors
+ rescue StandardError
+ 1
end
def load_plugins
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index d4ef4942e2..e5e245f970 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -21,7 +21,7 @@ module Bundler
raise
rescue Errno::ENOSPC
return false, out_of_space_message
- rescue => e
+ rescue StandardError => e
return false, specific_failure_message(e)
end
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb
index 95d9575c44..29dee3e514 100644
--- a/lib/bundler/installer/parallel_installer.rb
+++ b/lib/bundler/installer/parallel_installer.rb
@@ -87,6 +87,7 @@ module Bundler
@force = force
@specs = all_specs.map {|s| SpecInstallation.new(s) }
@spec_set = all_specs
+ @rake = @specs.find {|s| s.name == "rake" }
end
def call
@@ -114,7 +115,7 @@ module Bundler
s,
s.missing_lockfile_dependencies(@specs.map(&:name)),
]
- end.reject { |a| a.last.empty? }
+ end.reject {|a| a.last.empty? }
return if missing_dependencies.empty?
warning = []
@@ -149,18 +150,19 @@ module Bundler
end
def worker_pool
- @worker_pool ||= Bundler::Worker.new @size, "Parallel Installer", lambda { |spec_install, worker_num|
+ @worker_pool ||= Bundler::Worker.new @size, "Parallel Installer", lambda {|spec_install, worker_num|
do_install(spec_install, worker_num)
}
end
def do_install(spec_install, worker_num)
+ Plugin.hook(Plugin::Events::GEM_BEFORE_INSTALL, spec_install)
gem_installer = Bundler::GemInstaller.new(
spec_install.spec, @installer, @standalone, worker_num, @force
)
success, message = begin
gem_installer.install_from_spec
- rescue => e
+ rescue RuntimeError => e
raise e, "#{e}\n\n#{require_tree_for_spec(spec_install.spec)}"
end
if success
@@ -170,6 +172,7 @@ module Bundler
spec_install.state = :failed
spec_install.error = "#{message}\n\n#{require_tree_for_spec(spec_install.spec)}"
end
+ Plugin.hook(Plugin::Events::GEM_AFTER_INSTALL, spec_install)
spec_install
end
@@ -218,6 +221,8 @@ module Bundler
# are installed.
def enqueue_specs
@specs.select(&:ready_to_enqueue?).each do |spec|
+ next if @rake && !@rake.installed? && spec.name != @rake.name
+
if spec.dependencies_installed? @specs
spec.state = :enqueued
worker_pool.enq spec
diff --git a/lib/bundler/mirror.rb b/lib/bundler/mirror.rb
index a6fa070eb8..b15190e7e5 100644
--- a/lib/bundler/mirror.rb
+++ b/lib/bundler/mirror.rb
@@ -152,7 +152,7 @@ module Bundler
socket.connect_nonblock(address)
rescue Errno::EINPROGRESS
wait_for_writtable_socket(socket, address, timeout)
- rescue # Connection failed somehow, again
+ rescue RuntimeError # Connection failed somehow, again
false
end
end
@@ -172,7 +172,7 @@ module Bundler
socket.connect_nonblock(address)
rescue Errno::EISCONN
true
- rescue # Connection failed
+ rescue StandardError # Connection failed
false
end
end
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb
index 99c9a867b0..422d4acfbc 100644
--- a/lib/bundler/plugin.rb
+++ b/lib/bundler/plugin.rb
@@ -5,6 +5,7 @@ require "bundler/plugin/api"
module Bundler
module Plugin
autoload :DSL, "bundler/plugin/dsl"
+ autoload :Events, "bundler/plugin/events"
autoload :Index, "bundler/plugin/index"
autoload :Installer, "bundler/plugin/installer"
autoload :SourceList, "bundler/plugin/source_list"
@@ -46,6 +47,26 @@ module Bundler
Bundler.ui.error "Failed to install plugin #{name}: #{e.message}\n #{e.backtrace.join("\n ")}"
end
+ # List installed plugins and commands
+ #
+ def list
+ installed_plugins = index.installed_plugins
+ if installed_plugins.any?
+ output = String.new
+ installed_plugins.each do |plugin|
+ output << "#{plugin}\n"
+ output << "-----\n"
+ index.plugin_commands(plugin).each do |command|
+ output << " #{command}\n"
+ end
+ output << "\n"
+ end
+ else
+ output = "No plugins installed"
+ end
+ Bundler.ui.info output
+ end
+
# Evaluates the Gemfile with a limited DSL and installs the plugins
# specified by plugin method
#
@@ -66,7 +87,7 @@ module Bundler
installed_specs = Installer.new.install_definition(definition)
save_plugins plugins, installed_specs, builder.inferred_plugins
- rescue => e
+ rescue RuntimeError => e
unless e.is_a?(GemfileError)
Bundler.ui.error "Failed to install plugin: #{e.message}\n #{e.backtrace[0]}"
end
@@ -80,8 +101,8 @@ module Bundler
# The directory root for all plugin related data
#
- # Points to root in app_config_path if ran in an app else points to the one
- # in user_bundle_path
+ # If run in an app, points to local root, in app_config_path
+ # Otherwise, points to global root, in Bundler.user_bundle_path("plugin")
def root
@root ||= if SharedHelpers.in_bundle?
local_root
@@ -96,7 +117,7 @@ module Bundler
# The global directory root for all plugin related data
def global_root
- Bundler.user_bundle_path.join("plugin")
+ Bundler.user_bundle_path("plugin")
end
# The cache directory for plugin stuffs
@@ -155,6 +176,9 @@ module Bundler
# To be called via the API to register a hooks and corresponding block that
# will be called to handle the hook
def add_hook(event, &block)
+ unless Events.defined_event?(event)
+ raise ArgumentError, "Event '#{event}' not defined in Bundler::Plugin::Events"
+ end
@hooks_by_event[event.to_s] << block
end
@@ -166,6 +190,9 @@ module Bundler
# @param [String] event
def hook(event, *args, &arg_blk)
return unless Bundler.feature_flag.plugins?
+ unless Events.defined_event?(event)
+ raise ArgumentError, "Event '#{event}' not defined in Bundler::Plugin::Events"
+ end
plugins = index.hook_plugins(event)
return unless plugins.any?
@@ -264,7 +291,7 @@ module Bundler
load path.join(PLUGIN_FILE_NAME)
@loaded_plugin_names << name
- rescue => e
+ rescue RuntimeError => e
Bundler.ui.error "Failed loading plugin #{name}: #{e.message}"
raise
end
diff --git a/lib/bundler/plugin/events.rb b/lib/bundler/plugin/events.rb
new file mode 100644
index 0000000000..bc037d1af5
--- /dev/null
+++ b/lib/bundler/plugin/events.rb
@@ -0,0 +1,61 @@
+# frozen_string_literal: true
+
+module Bundler
+ module Plugin
+ module Events
+ def self.define(const, event)
+ const = const.to_sym.freeze
+ if const_defined?(const) && const_get(const) != event
+ raise ArgumentError, "Attempting to reassign #{const} to a different value"
+ end
+ const_set(const, event) unless const_defined?(const)
+ @events ||= {}
+ @events[event] = const
+ end
+ private_class_method :define
+
+ def self.reset
+ @events.each_value do |const|
+ remove_const(const)
+ end
+ @events = nil
+ end
+ private_class_method :reset
+
+ # Check if an event has been defined
+ # @param event [String] An event to check
+ # @return [Boolean] A boolean indicating if the event has been defined
+ def self.defined_event?(event)
+ @events ||= {}
+ @events.key?(event)
+ end
+
+ # @!parse
+ # A hook called before each individual gem is installed
+ # Includes a Bundler::ParallelInstaller::SpecInstallation.
+ # No state, error, post_install_message will be present as nothing has installed yet
+ # GEM_BEFORE_INSTALL = "before-install"
+ define :GEM_BEFORE_INSTALL, "before-install"
+
+ # @!parse
+ # A hook called after each individual gem is installed
+ # Includes a Bundler::ParallelInstaller::SpecInstallation.
+ # - If state is failed, an error will be present.
+ # - If state is success, a post_install_message may be present.
+ # GEM_AFTER_INSTALL = "after-install"
+ define :GEM_AFTER_INSTALL, "after-install"
+
+ # @!parse
+ # A hook called before any gems install
+ # Includes an Array of Bundler::Dependency objects
+ # GEM_BEFORE_INSTALL_ALL = "before-install-all"
+ define :GEM_BEFORE_INSTALL_ALL, "before-install-all"
+
+ # @!parse
+ # A hook called after any gems install
+ # Includes an Array of Bundler::Dependency objects
+ # GEM_AFTER_INSTALL_ALL = "after-install-all"
+ define :GEM_AFTER_INSTALL_ALL, "after-install-all"
+ end
+ end
+end
diff --git a/lib/bundler/plugin/index.rb b/lib/bundler/plugin/index.rb
index 770a98de3a..642e7c8163 100644
--- a/lib/bundler/plugin/index.rb
+++ b/lib/bundler/plugin/index.rb
@@ -63,7 +63,7 @@ module Bundler
@plugin_paths[name] = path
@load_paths[name] = load_paths
save_index
- rescue
+ rescue StandardError
@commands = old_commands
raise
end
@@ -100,6 +100,14 @@ module Bundler
@plugin_paths[name]
end
+ def installed_plugins
+ @plugin_paths.keys
+ end
+
+ def plugin_commands(plugin)
+ @commands.find_all {|_, n| n == plugin }.map(&:first)
+ end
+
def source?(source)
@sources.key? source
end
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index dd75dba9ab..fac28ced90 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -38,6 +38,7 @@ module Bundler
@platforms = platforms
@gem_version_promoter = gem_version_promoter
@allow_bundler_dependency_conflicts = Bundler.feature_flag.allow_bundler_dependency_conflicts?
+ @use_gvp = Bundler.feature_flag.use_gem_version_promoter_for_major_updates? || !@gem_version_promoter.major?
@lockfile_uses_separate_rubygems_sources = Bundler.feature_flag.lockfile_uses_separate_rubygems_sources?
end
@@ -47,9 +48,12 @@ module Bundler
verify_gemfile_dependencies_are_found!(requirements)
dg = @resolver.resolve(requirements, @base_dg)
- dg.map(&:payload).
+ dg.
+ tap {|resolved| validate_resolved_specs!(resolved) }.
+ map(&:payload).
reject {|sg| sg.name.end_with?("\0") }.
- map(&:to_specs).flatten
+ map(&:to_specs).
+ flatten
rescue Molinillo::VersionConflict => e
message = version_conflict_message(e)
raise VersionConflict.new(e.conflicts.keys.uniq, message)
@@ -136,7 +140,7 @@ module Bundler
end
# GVP handles major itself, but it's still a bit risky to trust it with it
# until we get it settled with new behavior. For 2.x it can take over all cases.
- if @gem_version_promoter.major?
+ if !@use_gvp
spec_groups
else
@gem_version_promoter.sort_versions(dependency, spec_groups)
@@ -299,9 +303,19 @@ module Bundler
end
def version_conflict_message(e)
+ # only show essential conflicts, if possible
+ conflicts = e.conflicts.dup
+ conflicts.delete_if do |_name, conflict|
+ deps = conflict.requirement_trees.map(&:last).flatten(1)
+ !Bundler::VersionRanges.empty?(*Bundler::VersionRanges.for_many(deps.map(&:requirement)))
+ end
+ e = Molinillo::VersionConflict.new(conflicts, e.specification_provider) unless conflicts.empty?
+
+ solver_name = "Bundler"
+ possibility_type = "gem"
e.message_with_trees(
- :solver_name => "Bundler",
- :possibility_type => "gem",
+ :solver_name => solver_name,
+ :possibility_type => possibility_type,
:reduce_trees => lambda do |trees|
# called first, because we want to reduce the amount of work required to find maximal empty sets
trees = trees.uniq {|t| t.flatten.map {|dep| [dep.name, dep.requirement] } }
@@ -313,10 +327,8 @@ module Bundler
end.flatten(1).select do |deps|
Bundler::VersionRanges.empty?(*Bundler::VersionRanges.for_many(deps.map(&:requirement)))
end.min_by(&:size)
- trees.reject! {|t| !maximal.include?(t.last) } if maximal
- trees = trees.sort_by {|t| t.flatten.map(&:to_s) }
- trees.uniq! {|t| t.flatten.map {|dep| [dep.name, dep.requirement] } }
+ trees.reject! {|t| !maximal.include?(t.last) } if maximal
trees.sort_by {|t| t.reverse.map(&:name) }
end,
@@ -324,7 +336,7 @@ module Bundler
:additional_message_for_conflict => lambda do |o, name, conflict|
if name == "bundler"
o << %(\n Current Bundler version:\n bundler (#{Bundler::VERSION}))
- other_bundler_required = !conflict.requirement.requirement.satisfied_by?(Gem::Version.new Bundler::VERSION)
+ other_bundler_required = !conflict.requirement.requirement.satisfied_by?(Gem::Version.new(Bundler::VERSION))
end
if name == "bundler" && other_bundler_required
@@ -351,7 +363,11 @@ module Bundler
[]
end.compact.map(&:to_s).uniq.sort
- o << "Could not find gem '#{SharedHelpers.pretty_dependency(conflict.requirement)}'"
+ metadata_requirement = name.end_with?("\0")
+
+ o << "Could not find gem '" unless metadata_requirement
+ o << SharedHelpers.pretty_dependency(conflict.requirement)
+ o << "'" unless metadata_requirement
if conflict.requirement_trees.first.size > 1
o << ", which is required by "
o << "gem '#{SharedHelpers.pretty_dependency(conflict.requirement_trees.first[-2])}',"
@@ -360,13 +376,46 @@ module Bundler
o << if relevant_sources.empty?
"in any of the sources.\n"
+ elsif metadata_requirement
+ "is not available in #{relevant_sources.join(" or ")}"
else
"in any of the relevant sources:\n #{relevant_sources * "\n "}\n"
end
end
end,
- :version_for_spec => lambda {|spec| spec.version }
+ :version_for_spec => lambda {|spec| spec.version },
+ :incompatible_version_message_for_conflict => lambda do |name, _conflict|
+ if name.end_with?("\0")
+ %(#{solver_name} found conflicting requirements for the #{name} version:)
+ else
+ %(#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":)
+ end
+ end
)
end
+
+ def validate_resolved_specs!(resolved_specs)
+ resolved_specs.each do |v|
+ name = v.name
+ next unless sources = relevant_sources_for_vertex(v)
+ sources.compact!
+ if default_index = sources.index(@source_requirements[:default])
+ sources.delete_at(default_index)
+ end
+ sources.reject! {|s| s.specs[name].empty? }
+ sources.uniq!
+ next if sources.size <= 1
+
+ multisource_disabled = Bundler.feature_flag.disable_multisource?
+
+ msg = ["The gem '#{name}' was found in multiple relevant sources."]
+ msg.concat sources.map {|s| " * #{s}" }.sort
+ msg << "You #{multisource_disabled ? :must : :should} add this gem to the source block for the source you wish it to be installed from."
+ msg = msg.join("\n")
+
+ raise SecurityError, msg if multisource_disabled
+ Bundler.ui.error "Warning: #{msg}"
+ end
+ end
end
end
diff --git a/lib/bundler/resolver/spec_group.rb b/lib/bundler/resolver/spec_group.rb
index 40d5460643..119f63b5c8 100644
--- a/lib/bundler/resolver/spec_group.rb
+++ b/lib/bundler/resolver/spec_group.rb
@@ -54,10 +54,6 @@ module Bundler
dependencies.concat(metadata_dependencies).flatten
end
- def platforms_for_dependency_named(dependency)
- __dependencies.select {|_, deps| deps.map(&:name).include? dependency }.keys
- end
-
def ==(other)
return unless other.is_a?(SpecGroup)
name == other.name &&
@@ -98,10 +94,10 @@ module Bundler
return [] if !spec.is_a?(EndpointSpecification) && !spec.is_a?(Gem::Specification)
dependencies = []
if !spec.required_ruby_version.nil? && !spec.required_ruby_version.none?
- dependencies << DepProxy.new(Gem::Dependency.new("ruby\0", spec.required_ruby_version), platform)
+ dependencies << DepProxy.new(Gem::Dependency.new("Ruby\0", spec.required_ruby_version), platform)
end
if !spec.required_rubygems_version.nil? && !spec.required_rubygems_version.none?
- dependencies << DepProxy.new(Gem::Dependency.new("rubygems\0", spec.required_rubygems_version), platform)
+ dependencies << DepProxy.new(Gem::Dependency.new("RubyGems\0", spec.required_rubygems_version), platform)
end
dependencies
end
diff --git a/lib/bundler/retry.rb b/lib/bundler/retry.rb
index 244606dcc9..5e4f0c502d 100644
--- a/lib/bundler/retry.rb
+++ b/lib/bundler/retry.rb
@@ -35,7 +35,7 @@ module Bundler
private
def run(&block)
- @failed = false
+ @failed = false
@current_run += 1
@result = block.call
rescue => e
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index e9f0eac355..d746bdb41b 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -34,7 +34,9 @@ module Gem
(defined?(@source) && @source) || Gem::Source::Installed.new
end
else
+ # rubocop:disable Lint/DuplicateMethods
attr_accessor :source
+ # rubocop:enable Lint/DuplicateMethods
end
alias_method :rg_full_gem_path, :full_gem_path
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 5b295b525e..762e7b3ec6 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -79,7 +79,7 @@ module Bundler
required_file = file
begin
Kernel.require file
- rescue => e
+ rescue RuntimeError => e
raise e if e.is_a?(LoadError) # we handle this a little later
raise Bundler::GemRequireError.new e,
"There was an error while trying to load the gem '#{file}'."
@@ -163,6 +163,7 @@ module Bundler
gem_dirs = Dir["#{Gem.dir}/gems/*"]
gem_files = Dir["#{Gem.dir}/cache/*.gem"]
gemspec_files = Dir["#{Gem.dir}/specifications/*.gemspec"]
+ extension_dirs = Dir["#{Gem.dir}/extensions/*/*/*"]
spec_gem_paths = []
# need to keep git sources around
spec_git_paths = @definition.spec_git_paths
@@ -170,6 +171,7 @@ module Bundler
spec_gem_executables = []
spec_cache_paths = []
spec_gemspec_paths = []
+ spec_extension_paths = []
specs.each do |spec|
spec_gem_paths << spec.full_gem_path
# need to check here in case gems are nested like for the rails git repo
@@ -181,6 +183,7 @@ module Bundler
end
spec_cache_paths << spec.cache_file
spec_gemspec_paths << spec.spec_file
+ spec_extension_paths << spec.extension_dir if spec.respond_to?(:extension_dir)
spec_git_cache_dirs << spec.source.cache_path.to_s if spec.source.is_a?(Bundler::Source::Git)
end
spec_gem_paths.uniq!
@@ -192,6 +195,7 @@ module Bundler
stale_gem_dirs = gem_dirs - spec_gem_paths
stale_gem_files = gem_files - spec_cache_paths
stale_gemspec_files = gemspec_files - spec_gemspec_paths
+ stale_extension_dirs = extension_dirs - spec_extension_paths
removed_stale_gem_dirs = stale_gem_dirs.collect {|dir| remove_dir(dir, dry_run) }
removed_stale_git_dirs = stale_git_dirs.collect {|dir| remove_dir(dir, dry_run) }
@@ -204,8 +208,10 @@ module Bundler
FileUtils.rm(file) if File.exist?(file)
end
end
- stale_git_cache_dirs.each do |cache_dir|
- SharedHelpers.filesystem_access(cache_dir) do |dir|
+
+ stale_dirs = stale_git_cache_dirs + stale_extension_dirs
+ stale_dirs.each do |stale_dir|
+ SharedHelpers.filesystem_access(stale_dir) do |dir|
FileUtils.rm_rf(dir) if File.exist?(dir)
end
end
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index f33e9453be..fe68d510ff 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -14,6 +14,7 @@ module Bundler
allow_offline_install
auto_clean_without_path
auto_install
+ auto_config_jobs
cache_all
cache_all_platforms
cache_command_is_package
@@ -25,6 +26,7 @@ module Bundler
disable_exec_load
disable_local_branch_check
disable_multisource
+ disable_platform_warnings
disable_shared_gems
disable_version_check
error_on_stderr
@@ -33,6 +35,7 @@ module Bundler
frozen
gem.coc
gem.mit
+ global_path_appends_ruby_scope
global_gem_cache
ignore_messages
init_gems_rb
@@ -42,6 +45,7 @@ module Bundler
no_install
no_prune
only_update_to_newer_versions
+ path_relative_to_cwd
path.system
plugins
prefer_gems_rb
@@ -53,9 +57,12 @@ module Bundler
suppress_install_using_messages
unlock_source_unlocks_spec
update_requires_all_flag
+ use_gem_version_promoter_for_major_updates
+ viz_command
].freeze
NUMBER_KEYS = %w[
+ jobs
redirect
retry
ssl_verify_mode
@@ -213,13 +220,13 @@ module Bundler
locations
end
- # for legacy reasons, the ruby scope isnt appended when the setting comes from ENV or the global config,
+ # for legacy reasons, in Bundler 1, the ruby scope isnt appended when the setting comes from ENV or the global config,
# nor do we respect :disable_shared_gems
def path
key = key_for(:path)
path = ENV[key] || @global_config[key]
if path && !@temporary.key?(key) && !@local_config.key?(key)
- return Path.new(path, false, false, false)
+ return Path.new(path, Bundler.feature_flag.global_path_appends_ruby_scope?, false, false)
end
system_path = self["path.system"] || (self[:disable_shared_gems] == false)
@@ -246,6 +253,20 @@ module Bundler
path
end
+ def base_path_relative_to_pwd
+ base_path = Pathname.new(self.base_path)
+ expanded_base_path = base_path.expand_path(Bundler.root)
+ relative_path = expanded_base_path.relative_path_from(Pathname.pwd)
+ if relative_path.to_s.start_with?("..")
+ relative_path = base_path if base_path.absolute?
+ else
+ relative_path = Pathname.new(File.join(".", relative_path))
+ end
+ relative_path
+ rescue ArgumentError
+ expanded_base_path
+ end
+
def validate!
return unless explicit_path && system_path
path = Bundler.settings.pretty_values_for(:path)
@@ -374,7 +395,7 @@ module Bundler
Pathname.new(ENV["BUNDLE_CONFIG"])
else
begin
- Bundler.user_bundle_path.join("config")
+ Bundler.user_bundle_path("config")
rescue PermissionError, GenericSystemCallError
nil
end
diff --git a/lib/bundler/settings/validator.rb b/lib/bundler/settings/validator.rb
index 9aa1627fb2..0a57ea7f03 100644
--- a/lib/bundler/settings/validator.rb
+++ b/lib/bundler/settings/validator.rb
@@ -74,6 +74,29 @@ module Bundler
fail!(key, value, "`#{other_key}` is current set to #{other_setting.inspect}", "the `#{conflicting.join("`, `")}` groups conflict")
end
end
+
+ rule %w[path], "relative paths are expanded relative to the current working directory" do |key, value, settings|
+ next if value.nil?
+
+ path = Pathname.new(value)
+ next if !path.relative? || !Bundler.feature_flag.path_relative_to_cwd?
+
+ path = path.expand_path
+
+ root = begin
+ Bundler.root
+ rescue GemfileNotFound
+ Pathname.pwd.expand_path
+ end
+
+ path = begin
+ path.relative_path_from(root)
+ rescue ArgumentError
+ path
+ end
+
+ set(settings, key, path.to_s)
+ end
end
end
end
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 505bd0843a..dca17885dd 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -140,12 +140,13 @@ module Bundler
end
def major_deprecation(major_version, message)
- if Bundler.bundler_major_version >= major_version
+ bundler_major_version = Bundler.bundler_major_version
+ if bundler_major_version > major_version
require "bundler/errors"
- raise DeprecatedError, "[REMOVED FROM #{major_version}.0] #{message}"
+ raise DeprecatedError, "[REMOVED FROM #{major_version.succ}.0] #{message}"
end
- return unless prints_major_deprecations?
+ return unless bundler_major_version >= major_version || prints_major_deprecations?
@major_deprecation_ui ||= Bundler::UI::Shell.new("no-color" => true)
ui = Bundler.ui.is_a?(@major_deprecation_ui.class) ? Bundler.ui : @major_deprecation_ui
ui.warn("[DEPRECATED FOR #{major_version}.0] #{message}")
@@ -197,10 +198,12 @@ module Bundler
def pretty_dependency(dep, print_source = false)
msg = String.new(dep.name)
msg << " (#{dep.requirement})" unless dep.requirement == Gem::Requirement.default
+
if dep.is_a?(Bundler::Dependency)
platform_string = dep.platforms.join(", ")
msg << " " << platform_string if !platform_string.empty? && platform_string != Gem::Platform::RUBY
end
+
msg << " from the `#{dep.source}` source" if print_source && dep.source
msg
end
@@ -223,6 +226,10 @@ module Bundler
Digest(name)
end
+ def write_to_gemfile(gemfile_path, contents)
+ filesystem_access(gemfile_path) {|g| File.open(g, "w") {|file| file.puts contents } }
+ end
+
private
def validate_bundle_path
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 5a1f05098b..26a3625bb1 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -54,6 +54,15 @@ module Bundler
instance_of?(Bundler::Source::Path)
end
+ def extension_cache_path(spec)
+ return unless Bundler.feature_flag.global_gem_cache?
+ return unless source_slug = extension_cache_slug(spec)
+ Bundler.user_cache.join(
+ "extensions", Gem::Platform.local.to_s, Bundler.ruby_scope,
+ source_slug, spec.full_name
+ )
+ end
+
private
def version_color(spec_version, locked_spec_version)
@@ -78,15 +87,6 @@ module Bundler
end
end
- def extension_cache_path(spec)
- return unless Bundler.feature_flag.global_gem_cache?
- return unless source_slug = extension_cache_slug(spec)
- Bundler.user_cache.join(
- "extensions", Gem::Platform.local.to_s, Bundler.ruby_scope,
- source_slug, spec.full_name
- )
- end
-
def extension_cache_slug(_)
nil
end
diff --git a/lib/bundler/source/metadata.rb b/lib/bundler/source/metadata.rb
index 93909002c7..ff8861c710 100644
--- a/lib/bundler/source/metadata.rb
+++ b/lib/bundler/source/metadata.rb
@@ -5,8 +5,10 @@ module Bundler
class Metadata < Source
def specs
@specs ||= Index.build do |idx|
- idx << Gem::Specification.new("ruby\0", RubyVersion.system.to_gem_version_with_patchlevel)
- idx << Gem::Specification.new("rubygems\0", Gem::VERSION)
+ idx << Gem::Specification.new("Ruby\0", RubyVersion.system.to_gem_version_with_patchlevel)
+ idx << Gem::Specification.new("RubyGems\0", Gem::VERSION) do |s|
+ s.required_rubygems_version = Gem::Requirement.default
+ end
idx << Gem::Specification.new do |s|
s.name = "bundler"
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 485b388a32..9e5032c079 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -120,8 +120,14 @@ module Bundler
uris.uniq!
Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
- s = Bundler.rubygems.spec_from_gem(fetch_gem(spec), Bundler.settings["trust-policy"])
- spec.__swap__(s)
+ path = fetch_gem(spec)
+ begin
+ s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
+ spec.__swap__(s)
+ rescue
+ Bundler.rm_rf(path)
+ raise
+ end
end
unless Bundler.settings[:no_install]
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 5003b2cbec..e6c30603f0 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -7,7 +7,8 @@ require "set"
module Bundler
class SpecSet
extend Forwardable
- include TSort, Enumerable
+ include Enumerable
+ include TSort
def_delegators :@specs, :<<, :length, :add, :remove, :size, :empty?
def_delegators :sorted, :each
@@ -64,7 +65,6 @@ module Bundler
@specs << value
@lookup = nil
@sorted = nil
- value
end
def sort!
diff --git a/lib/bundler/templates/newgem/README.md.tt b/lib/bundler/templates/newgem/README.md.tt
index 868a0afe67..22ddeaa91a 100644
--- a/lib/bundler/templates/newgem/README.md.tt
+++ b/lib/bundler/templates/newgem/README.md.tt
@@ -14,7 +14,7 @@ gem '<%= config[:name] %>'
And then execute:
- $ bundle
+ $ bundle install
Or install it yourself as:
diff --git a/lib/bundler/templates/newgem/lib/newgem.rb.tt b/lib/bundler/templates/newgem/lib/newgem.rb.tt
index 7d8ad90ab0..fae6337c3e 100644
--- a/lib/bundler/templates/newgem/lib/newgem.rb.tt
+++ b/lib/bundler/templates/newgem/lib/newgem.rb.tt
@@ -6,6 +6,7 @@ require "<%= config[:namespaced_path] %>/<%= config[:underscored_name] %>"
<%- config[:constant_array].each_with_index do |c, i| -%>
<%= " " * i %>module <%= c %>
<%- end -%>
+<%= " " * config[:constant_array].size %>class Error < StandardError; end
<%= " " * config[:constant_array].size %># Your code goes here...
<%- (config[:constant_array].size-1).downto(0) do |i| -%>
<%= " " * i %>end
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index cb5d1ae3e6..113bf82eb2 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -1,8 +1,10 @@
<%- if RUBY_VERSION < "2.0.0" -%>
# coding: utf-8
-<%- end -%>
lib = File.expand_path("../lib", __FILE__)
+<%- else -%>
+lib = File.expand_path("lib", __dir__)
+<%- end -%>
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "<%= config[:namespaced_path] %>/version"
@@ -23,6 +25,10 @@ Gem::Specification.new do |spec|
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
+ spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
else
raise "RubyGems 2.0 or newer is required to protect against " \
"public gem pushes."
diff --git a/lib/bundler/templates/newgem/test/test_helper.rb.tt b/lib/bundler/templates/newgem/test/test_helper.rb.tt
index 725e3e4647..335c4704ec 100644
--- a/lib/bundler/templates/newgem/test/test_helper.rb.tt
+++ b/lib/bundler/templates/newgem/test/test_helper.rb.tt
@@ -1,4 +1,8 @@
+<%- if RUBY_VERSION < "2.0.0" -%>
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
+<%- else -%>
+$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
+<%- end -%>
require "<%= config[:namespaced_path] %>"
require "minitest/autorun"
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
index 7ecdc4b65a..41bc013143 100644
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
+++ b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
@@ -50,14 +50,25 @@ module Bundler::Molinillo
incoming_edges.map(&:origin)
end
- # @return [Array<Vertex>] the vertices of {#graph} where `self` is a
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is a
# {#descendent?}
def recursive_predecessors
- vertices = predecessors
- vertices += Compatibility.flat_map(vertices, &:recursive_predecessors)
- vertices.uniq!
+ _recursive_predecessors
+ end
+
+ # @param [Set<Vertex>] vertices the set to add the predecessors to
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is a
+ # {#descendent?}
+ def _recursive_predecessors(vertices = Set.new)
+ incoming_edges.each do |edge|
+ vertex = edge.origin
+ next unless vertices.add?(vertex)
+ vertex._recursive_predecessors(vertices)
+ end
+
vertices
end
+ protected :_recursive_predecessors
# @return [Array<Vertex>] the vertices of {#graph} that have an edge with
# `self` as their {Edge#origin}
@@ -65,14 +76,25 @@ module Bundler::Molinillo
outgoing_edges.map(&:destination)
end
- # @return [Array<Vertex>] the vertices of {#graph} where `self` is an
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is an
# {#ancestor?}
def recursive_successors
- vertices = successors
- vertices += Compatibility.flat_map(vertices, &:recursive_successors)
- vertices.uniq!
+ _recursive_successors
+ end
+
+ # @param [Set<Vertex>] vertices the set to add the successors to
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is an
+ # {#ancestor?}
+ def _recursive_successors(vertices = Set.new)
+ outgoing_edges.each do |edge|
+ vertex = edge.destination
+ next unless vertices.add?(vertex)
+ vertex._recursive_successors(vertices)
+ end
+
vertices
end
+ protected :_recursive_successors
# @return [String] a string suitable for debugging
def inspect
diff --git a/lib/bundler/vendor/thor/lib/thor/base.rb b/lib/bundler/vendor/thor/lib/thor/base.rb
index 9bd1077170..7e41dc226b 100644
--- a/lib/bundler/vendor/thor/lib/thor/base.rb
+++ b/lib/bundler/vendor/thor/lib/thor/base.rb
@@ -113,7 +113,7 @@ class Bundler::Thor
end
# Whenever a class inherits from Bundler::Thor or Bundler::Thor::Group, we should track the
- # class and the file on Bundler::Thor::Base. This is the method responsable for it.
+ # class and the file on Bundler::Thor::Base. This is the method responsible for it.
#
def register_klass_file(klass) #:nodoc:
file = caller[1].match(/(.*):\d+/)[1]
diff --git a/lib/bundler/vendor/thor/lib/thor/util.rb b/lib/bundler/vendor/thor/lib/thor/util.rb
index 5d03177a28..0fe7d4d859 100644
--- a/lib/bundler/vendor/thor/lib/thor/util.rb
+++ b/lib/bundler/vendor/thor/lib/thor/util.rb
@@ -27,7 +27,7 @@ class Bundler::Thor
end
# Receives a constant and converts it to a Bundler::Thor namespace. Since Bundler::Thor
- # commands can be added to a sandbox, this method is also responsable for
+ # commands can be added to a sandbox, this method is also responsible for
# removing the sandbox namespace.
#
# This method should not be used in general because it's used to deal with
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index 837de2a75b..75d0817cca 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -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 = "1.16.5" unless defined?(::Bundler::VERSION)
+ VERSION = "2.0.0.dev" unless defined?(::Bundler::VERSION)
def self.overwrite_loaded_gem_version
begin
diff --git a/lib/bundler/version_ranges.rb b/lib/bundler/version_ranges.rb
index ec25716cde..12a956d6a0 100644
--- a/lib/bundler/version_ranges.rb
+++ b/lib/bundler/version_ranges.rb
@@ -5,11 +5,42 @@ module Bundler
NEq = Struct.new(:version)
ReqR = Struct.new(:left, :right)
class ReqR
- Endpoint = Struct.new(:version, :inclusive)
+ Endpoint = Struct.new(:version, :inclusive) do
+ def <=>(other)
+ if version.equal?(INFINITY)
+ return 0 if other.version.equal?(INFINITY)
+ return 1
+ elsif other.version.equal?(INFINITY)
+ return -1
+ end
+
+ comp = version <=> other.version
+ return comp unless comp.zero?
+
+ if inclusive && !other.inclusive
+ 1
+ elsif !inclusive && other.inclusive
+ -1
+ else
+ 0
+ end
+ end
+ end
+
def to_s
"#{left.inclusive ? "[" : "("}#{left.version}, #{right.version}#{right.inclusive ? "]" : ")"}"
end
- INFINITY = Object.new.freeze
+ INFINITY = begin
+ inf = Object.new
+ def inf.to_s
+ "∞"
+ end
+ def inf.<=>(other)
+ return 0 if other.equal?(self)
+ 1
+ end
+ inf.freeze
+ end
ZERO = Gem::Version.new("0.a")
def cover?(v)
@@ -32,6 +63,15 @@ module Bundler
left.version == right.version
end
+ def <=>(other)
+ return -1 if other.equal?(INFINITY)
+
+ comp = left <=> other.left
+ return comp unless comp.zero?
+
+ right <=> other.right
+ end
+
UNIVERSAL = ReqR.new(ReqR::Endpoint.new(Gem::Version.new("0.a"), true), ReqR::Endpoint.new(ReqR::INFINITY, false)).freeze
end
@@ -57,7 +97,7 @@ module Bundler
end.uniq
ranges, neqs = ranges.partition {|r| !r.is_a?(NEq) }
- [ranges.sort_by {|range| [range.left.version, range.left.inclusive ? 0 : 1] }, neqs.map(&:version)]
+ [ranges.sort, neqs.map(&:version)]
end
def self.empty?(ranges, neqs)
@@ -66,8 +106,14 @@ module Bundler
next false if curr_range.single? && neqs.include?(curr_range.left.version)
next curr_range if last_range.right.version == ReqR::INFINITY
case last_range.right.version <=> curr_range.left.version
- when 1 then next curr_range
- when 0 then next(last_range.right.inclusive && curr_range.left.inclusive && !neqs.include?(curr_range.left.version) && curr_range)
+ # higher
+ when 1 then next ReqR.new(curr_range.left, last_range.right)
+ # equal
+ when 0
+ if last_range.right.inclusive && curr_range.left.inclusive && !neqs.include?(curr_range.left.version)
+ ReqR.new(curr_range.left, [curr_range.right, last_range.right].max)
+ end
+ # lower
when -1 then next false
end
end
diff --git a/man/bundle-add.ronn b/man/bundle-add.ronn
index f0f9b54d8f..1e2d732ec6 100644
--- a/man/bundle-add.ronn
+++ b/man/bundle-add.ronn
@@ -3,10 +3,10 @@ bundle-add(1) -- Add gem to the Gemfile and run bundle install
## SYNOPSIS
-`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE]
+`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--skip-install] [--strict] [--optimistic]
## DESCRIPTION
-Adds the named gem to the Gemfile and run `bundle install`.
+Adds the named gem to the Gemfile and run `bundle install`. `bundle install` can be avoided by using the flag `--skip-install`.
Example:
@@ -16,6 +16,8 @@ bundle add rails --version "< 3.0, > 1.1"
bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development"
+bundle add rails --skip-install
+
bundle add rails --group "development, test"
## OPTIONS
@@ -27,3 +29,12 @@ bundle add rails --group "development, test"
* `--source`, , `-s`:
Specify the source for the added gem.
+
+* `--skip-install`:
+ Adds the gem to the Gemfile but does not install it.
+
+* `--optimistic`:
+ Adds optimistic declaration of version
+
+* `--strict`:
+ Adds strict declaration of version
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn
index dc0b0b8ad9..4d8bda61f7 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.ronn
@@ -170,6 +170,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
When set, Gemfiles containing multiple sources will produce errors
instead of warnings.
Use `bundle config --delete disable_multisource` to unset.
+* `disable_platform_warnings` (`BUNDLE_DISABLE_PLATFORM_WARNINGS`):
+ Disable warnings during bundle install when a dependency is unused on the current platform.
* `disable_shared_gems` (`BUNDLE_DISABLE_SHARED_GEMS`):
Stop Bundler from accessing gems installed to RubyGems' normal location.
* `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`):
@@ -196,6 +198,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
* `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`):
Whether Bundler should cache all gems globally, rather than locally to the
installing Ruby installation.
+* `global_path_appends_ruby_scope` (`BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE`):
+ Whether Bundler should append the Ruby scope (e.g. engine and ABI version)
+ to a globally-configured path.
* `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`): When set, no post install
messages will be printed. To silence a single gem, use dot notation like
`ignore_messages.httparty true`.
@@ -222,6 +227,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
is used, defaults to vendor/bundle.
* `path.system` (`BUNDLE_PATH__SYSTEM`):
Whether Bundler will install gems into the default system path (`Gem.dir`).
+* `path_relative_to_cwd` (`PATH_RELATIVE_TO_CWD`)
+ Makes `--path` relative to the CWD instead of the `Gemfile`.
* `plugins` (`BUNDLE_PLUGINS`):
Enable Bundler's experimental plugin system.
* `prefer_gems_rb` (`BUNDLE_PREFER_GEMS_RB`)
diff --git a/man/bundle-install.ronn b/man/bundle-install.ronn
index e57aaca118..0bfd29234a 100644
--- a/man/bundle-install.ronn
+++ b/man/bundle-install.ronn
@@ -47,7 +47,12 @@ To apply any of `--binstubs`, `--deployment`, `--path`, or `--without` every
time `bundle install` is run, use `bundle config` (see bundle-config(1)).
* `--binstubs[=<directory>]`:
- Creates a directory (defaults to `~/bin`) and place any executables from the
+ Binstubs are scripts that wrap around executables. Bundler creates a small Ruby
+ file (a binstub) that loads Bundler, runs the command, and puts it in `bin/`.
+ This lets you link the binstub inside of an application to the exact gem
+ version the application needs.
+
+ Creates a directory (defaults to `~/bin`) and places any executables from the
gem there. These executables run in Bundler's context. If used, you might add
this directory to your environment's `PATH` variable. For instance, if the
`rails` gem comes with a `rails` executable, this flag will create a
@@ -290,12 +295,21 @@ of a dependency of a gem in your Gemfile(5)) can result in radically
different gems being needed to satisfy all dependencies.
As a result, you `SHOULD` check your `Gemfile.lock` into version
-control. If you do not, every machine that checks out your
-repository (including your production server) will resolve all
+control, in both applications and gems. If you do not, every machine that
+checks out your repository (including your production server) will resolve all
dependencies again, which will result in different versions of
third-party code being used if `any` of the gems in the Gemfile(5)
or any of their dependencies have been updated.
+When Bundler first shipped, the `Gemfile.lock` was included in the `.gitignore`
+file included with generated gems. Over time, however, it became clear that
+this practice forces the pain of broken dependencies onto new contributors,
+while leaving existing contributors potentially unaware of the problem. Since
+`bundle install` is usually the first step towards a contribution, the pain of
+broken dependencies would discourage new contributors from contributing. As a
+result, we have revised our guidance for gem authors to now recommend checking
+in the lock for gems.
+
## CONSERVATIVE UPDATING
When you make a change to the Gemfile(5) and then run `bundle install`,
diff --git a/man/bundle-list.ronn b/man/bundle-list.ronn
index 79fcfff701..120cf5e307 100644
--- a/man/bundle-list.ronn
+++ b/man/bundle-list.ronn
@@ -3,13 +3,31 @@ bundle-list(1) -- List all the gems in the bundle
## SYNOPSIS
-`bundle list` [--name-only]
+`bundle list` [--name-only] [--paths] [--without-group=GROUP] [--only-group=GROUP]
## DESCRIPTION
Prints a list of all the gems in the bundle including their version.
+Example:
+
+bundle list --name-only
+
+bundle list --paths
+
+bundle list --without-group test
+
+bundle list --only-group dev
+
+bundle list --only-group dev --paths
+
## OPTIONS
* `--name-only`:
Print only the name of each gem.
+* `--paths`:
+ Print the path to each gem in the bundle.
+* `--without-group`:
+ Print all gems expect from a group.
+* `--only-group`:
+ Print gems from a particular group.
diff --git a/man/bundle-outdated.ronn b/man/bundle-outdated.ronn
index 8b05af1e52..a991d23789 100644
--- a/man/bundle-outdated.ronn
+++ b/man/bundle-outdated.ronn
@@ -15,6 +15,7 @@ bundle-outdated(1) -- List installed gems with newer versions available
[--filter-major]
[--filter-minor]
[--filter-patch]
+ [--only-explicit]
## DESCRIPTION
@@ -67,6 +68,9 @@ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
* `--filter-patch`:
Only list patch newer versions.
+* `--only-explicit`:
+ Only list gems specified in your Gemfile, not their dependencies.
+
## PATCH LEVEL OPTIONS
See [bundle update(1)](bundle-update.1.html) for details.
diff --git a/man/bundle-remove.ronn b/man/bundle-remove.ronn
new file mode 100644
index 0000000000..40a239b4a2
--- /dev/null
+++ b/man/bundle-remove.ronn
@@ -0,0 +1,23 @@
+bundle-remove(1) -- Removes gems from the Gemfile
+===========================================================================
+
+## SYNOPSIS
+
+`bundle remove [GEM [GEM ...]] [--install]`
+
+## DESCRIPTION
+
+Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If a gem cannot be removed, a warning is printed. If a gem is already absent from the Gemfile, and error is raised.
+
+## OPTIONS
+
+* `--install`:
+ Runs `bundle install` after the given gems have been removed from the Gemfile, which ensures that both the lockfile and the installed gems on disk are also updated to remove the given gem(s).
+
+Example:
+
+bundle remove rails
+
+bundle remove rails rack
+
+bundle remove rails rack --install
diff --git a/man/bundle-update.ronn b/man/bundle-update.ronn
index c8bd2991c5..2ad678f424 100644
--- a/man/bundle-update.ronn
+++ b/man/bundle-update.ronn
@@ -3,7 +3,8 @@ bundle-update(1) -- Update your gems to the latest available versions
## SYNOPSIS
-`bundle update` <*gems> [--group=NAME]
+`bundle update` <*gems> [--all]
+ [--group=NAME]
[--source=NAME]
[--local]
[--ruby]
@@ -18,7 +19,7 @@ bundle-update(1) -- Update your gems to the latest available versions
## DESCRIPTION
-Update the gems specified (all gems, if none are specified), ignoring
+Update the gems specified (all gems, if `--all` flag is used), ignoring
the previously installed gems specified in the `Gemfile.lock`. In
general, you should use [bundle install(1)](bundle-install.1.html) to install the same exact
gems and versions across machines.
@@ -28,6 +29,9 @@ gem.
## OPTIONS
+* `--all`:
+ Update all gems specified in Gemfile.
+
* `--group=<name>`, `-g=[<name>]`:
Only update the gems in the specified group. For instance, you can update all gems
in the development group with `bundle update --group development`. You can also
@@ -80,7 +84,7 @@ gem.
## UPDATING ALL GEMS
-If you run `bundle update` with no parameters, bundler will ignore
+If you run `bundle update --all`, bundler will ignore
any previously installed gems and resolve all dependencies again
based on the latest versions of all gems available in the sources.
@@ -139,10 +143,10 @@ the gems you use.
However, from time to time, you might want to update the gems you are using to the
newest versions that still match the gems in your Gemfile(5).
-To do this, run `bundle update`, which will ignore the `Gemfile.lock`, and resolve
+To do this, run `bundle update --all`, which will ignore the `Gemfile.lock`, and resolve
all the dependencies again. Keep in mind that this process can result in a significantly
different set of the 25 gems, based on the requirements of new gems that the gem
-authors released since the last time you ran `bundle update`.
+authors released since the last time you ran `bundle update --all`.
## UPDATING A LIST OF GEMS
@@ -343,4 +347,4 @@ use the following workflow:
* If you want to update all the gems to the latest possible versions that
still match the gems listed in the Gemfile(5), run
- $ bundle update
+ $ bundle update --all
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb
index 40dc094885..06435b9888 100644
--- a/spec/bundler/bundler_spec.rb
+++ b/spec/bundler/bundler_spec.rb
@@ -2,6 +2,7 @@
# frozen_string_literal: true
require "bundler"
+require "tmpdir"
RSpec.describe Bundler do
describe "#load_gemspec_uncached" do
@@ -306,4 +307,128 @@ EOF
expect(Bundler.tmp_home_path("USER", "")).to eq(Pathname("/TMP/bundler/home/USER"))
end
end
+
+ describe "#requires_sudo?" do
+ let!(:tmpdir) { Dir.mktmpdir }
+ let(:bundle_path) { Pathname("#{tmpdir}/bundle") }
+
+ def clear_cached_requires_sudo
+ # Private in ruby 1.8.7
+ return unless Bundler.instance_variable_defined?(:@requires_sudo_ran)
+ Bundler.send(:remove_instance_variable, :@requires_sudo_ran)
+ Bundler.send(:remove_instance_variable, :@requires_sudo)
+ end
+
+ before do
+ clear_cached_requires_sudo
+ allow(Bundler).to receive(:which).with("sudo").and_return("/usr/bin/sudo")
+ allow(Bundler).to receive(:bundle_path).and_return(bundle_path)
+ end
+
+ after do
+ FileUtils.rm_rf(tmpdir)
+ clear_cached_requires_sudo
+ end
+
+ subject { Bundler.requires_sudo? }
+
+ context "bundle_path doesn't exist" do
+ it { should be false }
+
+ context "and parent dir can't be written" do
+ before do
+ FileUtils.chmod(0o500, tmpdir)
+ end
+
+ it { should be true }
+ end
+
+ context "with unwritable files in a parent dir" do
+ # Regression test for https://github.com/bundler/bundler/pull/6316
+ # It doesn't matter if there are other unwritable files so long as
+ # bundle_path can be created
+ before do
+ file = File.join(tmpdir, "unrelated_file")
+ FileUtils.touch(file)
+ FileUtils.chmod(0o400, file)
+ end
+
+ it { should be false }
+ end
+ end
+
+ context "bundle_path exists" do
+ before do
+ FileUtils.mkdir_p(bundle_path)
+ end
+
+ it { should be false }
+
+ context "and is unwritable" do
+ before do
+ FileUtils.chmod(0o500, bundle_path)
+ end
+
+ it { should be true }
+ end
+ end
+ end
+
+ context "user cache dir" do
+ let(:home_path) { Pathname.new(ENV["HOME"]) }
+
+ let(:xdg_data_home) { home_path.join(".local") }
+ let(:xdg_cache_home) { home_path.join(".cache") }
+ let(:xdg_config_home) { home_path.join(".config") }
+
+ let(:bundle_user_home_default) { home_path.join(".bundle") }
+ let(:bundle_user_home_custom) { xdg_data_home.join("bundle") }
+
+ let(:bundle_user_cache_default) { bundle_user_home_default.join("cache") }
+ let(:bundle_user_cache_custom) { xdg_cache_home.join("bundle") }
+
+ let(:bundle_user_config_default) { bundle_user_home_default.join("config") }
+ let(:bundle_user_config_custom) { xdg_config_home.join("bundle") }
+
+ let(:bundle_user_plugin_default) { bundle_user_home_default.join("plugin") }
+ let(:bundle_user_plugin_custom) { xdg_data_home.join("bundle").join("plugin") }
+
+ describe "#user_bundle_path" do
+ before do
+ allow(Bundler.rubygems).to receive(:user_home).and_return(home_path)
+ end
+
+ it "should use the default home path" do
+ expect(Bundler.user_bundle_path).to eq(bundle_user_home_default)
+ expect(Bundler.user_bundle_path("home")).to eq(bundle_user_home_default)
+ expect(Bundler.user_bundle_path("cache")).to eq(bundle_user_cache_default)
+ expect(Bundler.user_cache).to eq(bundle_user_cache_default)
+ expect(Bundler.user_bundle_path("config")).to eq(bundle_user_config_default)
+ expect(Bundler.user_bundle_path("plugin")).to eq(bundle_user_plugin_default)
+ end
+
+ it "should use custom home path as root for other paths" do
+ ENV["BUNDLE_USER_HOME"] = bundle_user_home_custom.to_s
+ expect(Bundler.user_bundle_path).to eq(bundle_user_home_custom)
+ expect(Bundler.user_bundle_path("home")).to eq(bundle_user_home_custom)
+ expect(Bundler.user_bundle_path("cache")).to eq(bundle_user_home_custom.join("cache"))
+ expect(Bundler.user_cache).to eq(bundle_user_home_custom.join("cache"))
+ expect(Bundler.user_bundle_path("config")).to eq(bundle_user_home_custom.join("config"))
+ expect(Bundler.user_bundle_path("plugin")).to eq(bundle_user_home_custom.join("plugin"))
+ end
+
+ it "should use all custom paths, except home" do
+ ENV.delete("BUNDLE_USER_HOME")
+ ENV["BUNDLE_USER_CACHE"] = bundle_user_cache_custom.to_s
+ ENV["BUNDLE_USER_CONFIG"] = bundle_user_config_custom.to_s
+ ENV["BUNDLE_USER_PLUGIN"] = bundle_user_plugin_custom.to_s
+ expect(Bundler.user_bundle_path).to eq(bundle_user_home_default)
+ expect(Bundler.user_bundle_path("home")).to eq(bundle_user_home_default)
+ expect(Bundler.user_bundle_path("cache")).to eq(bundle_user_cache_custom)
+ expect(Bundler.user_cache).to eq(bundle_user_cache_custom)
+ expect(Bundler.user_bundle_path("config")).to eq(bundle_user_config_custom)
+ expect(Bundler.user_bundle_path("plugin")).to eq(bundle_user_plugin_custom)
+ end
+ end
+ end
end
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb
index c36204c542..3620035fe1 100644
--- a/spec/bundler/gem_helper_spec.rb
+++ b/spec/bundler/gem_helper_spec.rb
@@ -77,6 +77,7 @@ RSpec.describe Bundler::GemHelper do
before(:each) do
content = app_gemspec_content.gsub("TODO: ", "")
content.sub!(/homepage\s+= ".*"/, 'homepage = ""')
+ content.gsub!(/spec\.metadata.+\n/, "")
File.open(app_gemspec_path, "w") {|file| file << content }
end
@@ -197,6 +198,7 @@ RSpec.describe Bundler::GemHelper do
`git init`
`git config user.email "you@example.com"`
`git config user.name "name"`
+ `git config commit.gpgsign false`
`git config push.default simple`
end
diff --git a/spec/bundler/plugin/events_spec.rb b/spec/bundler/plugin/events_spec.rb
new file mode 100644
index 0000000000..b09e915682
--- /dev/null
+++ b/spec/bundler/plugin/events_spec.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+RSpec.describe Bundler::Plugin::Events do
+ context "plugin events" do
+ describe "#define" do
+ it "raises when redefining a constant" do
+ expect do
+ Bundler::Plugin::Events.send(:define, :GEM_BEFORE_INSTALL_ALL, "another-value")
+ end.to raise_error(ArgumentError)
+ end
+
+ it "can define a new constant" do
+ Bundler::Plugin::Events.send(:define, :NEW_CONSTANT, "value")
+ expect(Bundler::Plugin::Events::NEW_CONSTANT).to eq("value")
+ end
+ end
+ end
+end
diff --git a/spec/bundler/plugin_spec.rb b/spec/bundler/plugin_spec.rb
index 9796b580a3..eaa0b80905 100644
--- a/spec/bundler/plugin_spec.rb
+++ b/spec/bundler/plugin_spec.rb
@@ -32,6 +32,29 @@ RSpec.describe Bundler::Plugin do
allow(index).to receive(:register_plugin)
end
+ describe "list command" do
+ context "when no plugins are installed" do
+ before { allow(index).to receive(:installed_plugins) { [] } }
+ it "outputs no plugins installed" do
+ expect(Bundler.ui).to receive(:info).with("No plugins installed")
+ subject.list
+ end
+ end
+
+ context "with installed plugins" do
+ before do
+ allow(index).to receive(:installed_plugins) { %w[plug1 plug2] }
+ allow(index).to receive(:plugin_commands).with("plug1") { %w[c11 c12] }
+ allow(index).to receive(:plugin_commands).with("plug2") { %w[c21 c22] }
+ end
+ it "list plugins followed by commands" do
+ expected_output = "plug1\n-----\n c11\n c12\n\nplug2\n-----\n c21\n c22\n\n"
+ expect(Bundler.ui).to receive(:info).with(expected_output)
+ subject.list
+ end
+ end
+ end
+
describe "install command" do
let(:opts) { { "version" => "~> 1.0", "source" => "foo" } }
@@ -228,6 +251,16 @@ RSpec.describe Bundler::Plugin do
end
end
+ describe "#add_hook" do
+ it "raises an ArgumentError on an unregistered event" do
+ ran = false
+ expect do
+ Plugin.add_hook("unregistered-hook") { ran = true }
+ end.to raise_error(ArgumentError)
+ expect(ran).to be(false)
+ end
+ end
+
describe "#hook" do
before do
path = lib_path("foo-plugin")
@@ -235,7 +268,13 @@ RSpec.describe Bundler::Plugin do
s.write "plugins.rb", code
end
- allow(index).to receive(:hook_plugins).with(event).
+ Bundler::Plugin::Events.send(:reset)
+ Bundler::Plugin::Events.send(:define, :EVENT_1, "event-1")
+ Bundler::Plugin::Events.send(:define, :EVENT_2, "event-2")
+
+ allow(index).to receive(:hook_plugins).with(Bundler::Plugin::Events::EVENT_1).
+ and_return(["foo-plugin"])
+ allow(index).to receive(:hook_plugins).with(Bundler::Plugin::Events::EVENT_2).
and_return(["foo-plugin"])
allow(index).to receive(:plugin_path).with("foo-plugin").and_return(path)
allow(index).to receive(:load_paths).with("foo-plugin").and_return([])
@@ -245,11 +284,15 @@ RSpec.describe Bundler::Plugin do
Bundler::Plugin::API.hook("event-1") { puts "hook for event 1" }
RUBY
- let(:event) { "event-1" }
+ it "raises an ArgumentError on an unregistered event" do
+ expect do
+ Plugin.hook("unregistered-hook")
+ end.to raise_error(ArgumentError)
+ end
it "executes the hook" do
out = capture(:stdout) do
- Plugin.hook("event-1")
+ Plugin.hook(Bundler::Plugin::Events::EVENT_1)
end.strip
expect(out).to eq("hook for event 1")
@@ -257,17 +300,15 @@ RSpec.describe Bundler::Plugin do
context "single plugin declaring more than one hook" do
let(:code) { <<-RUBY }
- Bundler::Plugin::API.hook("event-1") {}
- Bundler::Plugin::API.hook("event-2") {}
+ Bundler::Plugin::API.hook(Bundler::Plugin::Events::EVENT_1) {}
+ Bundler::Plugin::API.hook(Bundler::Plugin::Events::EVENT_2) {}
puts "loaded"
RUBY
- let(:event) { /event-1|event-2/ }
-
it "evals plugins.rb once" do
out = capture(:stdout) do
- Plugin.hook("event-1")
- Plugin.hook("event-2")
+ Plugin.hook(Bundler::Plugin::Events::EVENT_1)
+ Plugin.hook(Bundler::Plugin::Events::EVENT_2)
end.strip
expect(out).to eq("loaded")
@@ -276,12 +317,12 @@ RSpec.describe Bundler::Plugin do
context "a block is passed" do
let(:code) { <<-RUBY }
- Bundler::Plugin::API.hook("#{event}") { |&blk| blk.call }
+ Bundler::Plugin::API.hook(Bundler::Plugin::Events::EVENT_1) { |&blk| blk.call }
RUBY
it "is passed to the hook" do
out = capture(:stdout) do
- Plugin.hook("event-1") { puts "win" }
+ Plugin.hook(Bundler::Plugin::Events::EVENT_1) { puts "win" }
end.strip
expect(out).to eq("win")
diff --git a/spec/bundler/vendored_persistent_spec.rb b/spec/bundler/vendored_persistent_spec.rb
index 338431c4a6..d62279447d 100644
--- a/spec/bundler/vendored_persistent_spec.rb
+++ b/spec/bundler/vendored_persistent_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe Bundler::PersistentHTTP do
before do
allow(connection).to receive(:use_ssl?).and_return(!tls_version.nil?)
- allow(socket).to receive(:io).and_return(socket_io)
+ allow(socket).to receive(:io).and_return(socket_io) if socket
connection.instance_variable_set(:@socket, socket)
if tls_version
diff --git a/spec/bundler/version_ranges_spec.rb b/spec/bundler/version_ranges_spec.rb
index ccbb9285d5..bca044b0c0 100644
--- a/spec/bundler/version_ranges_spec.rb
+++ b/spec/bundler/version_ranges_spec.rb
@@ -25,9 +25,12 @@ RSpec.describe Bundler::VersionRanges do
include_examples "empty?", false, ">= 1.0.0", "< 2.0.0"
include_examples "empty?", false, "~> 1"
include_examples "empty?", false, "~> 2.0", "~> 2.1"
+ include_examples "empty?", true, ">= 4.1.0", "< 5.0", "= 5.2.1"
+ include_examples "empty?", true, "< 5.0", "< 5.3", "< 6.0", "< 6", "= 5.2.0", "> 2", ">= 3.0", ">= 3.1", ">= 3.2", ">= 4.0.0", ">= 4.1.0", ">= 4.2.0", ">= 4.2", ">= 4"
include_examples "empty?", true, "!= 1", "< 2", "> 2"
include_examples "empty?", true, "!= 1", "<= 1", ">= 1"
include_examples "empty?", true, "< 2", "> 2"
+ include_examples "empty?", true, "< 2", "> 2", "= 2"
include_examples "empty?", true, "= 1", "!= 1"
include_examples "empty?", true, "= 1", "= 2"
include_examples "empty?", true, "= 1", "~> 2"
diff --git a/spec/commands/add_spec.rb b/spec/commands/add_spec.rb
index d1f2050aa0..9f11adbcf8 100644
--- a/spec/commands/add_spec.rb
+++ b/spec/commands/add_spec.rb
@@ -17,6 +17,14 @@ RSpec.describe "bundle add" do
G
end
+ context "when no gems are specified" do
+ it "shows error" do
+ bundle "add"
+
+ expect(last_command.bundler_err).to include("Please specify gems to add")
+ end
+ end
+
describe "without version specified" do
it "version requirement becomes ~> major.minor.patch when resolved version is < 1.0" do
bundle "add 'bar'"
@@ -61,7 +69,7 @@ RSpec.describe "bundle add" do
describe "with --group" do
it "adds dependency for the specified group" do
bundle "add 'foo' --group='development'"
- expect(bundled_app("Gemfile").read).to match(/gem "foo", "~> 2.0", :group => \[:development\]/)
+ expect(bundled_app("Gemfile").read).to match(/gem "foo", "~> 2.0", :group => :development/)
expect(the_bundle).to include_gems "foo 2.0"
end
@@ -75,14 +83,24 @@ RSpec.describe "bundle add" do
describe "with --source" do
it "adds dependency with specified source" do
bundle "add 'foo' --source='file://#{gem_repo2}'"
+
expect(bundled_app("Gemfile").read).to match(%r{gem "foo", "~> 2.0", :source => "file:\/\/#{gem_repo2}"})
expect(the_bundle).to include_gems "foo 2.0"
end
end
+ describe "with --skip-install" do
+ it "adds gem to Gemfile but is not installed" do
+ bundle "add foo --skip-install --version=2.0"
+
+ expect(bundled_app("Gemfile").read).to match(/gem "foo", "= 2.0"/)
+ expect(the_bundle).to_not include_gems "foo 2.0"
+ end
+ end
+
it "using combination of short form options works like long form" do
bundle "add 'foo' -s='file://#{gem_repo2}' -g='development' -v='~>1.0'"
- expect(bundled_app("Gemfile").read).to include %(gem "foo", "~> 1.0", :group => [:development], :source => "file://#{gem_repo2}")
+ expect(bundled_app("Gemfile").read).to include %(gem "foo", "~> 1.0", :group => :development, :source => "file://#{gem_repo2}")
expect(the_bundle).to include_gems "foo 1.1"
end
@@ -106,4 +124,94 @@ RSpec.describe "bundle add" do
bundle "add 'baz' --source='file://does/not/exist'"
expect(out).to include("Could not fetch specs from file://does/not/exist/")
end
+
+ describe "with --optimistic" do
+ it "adds optimistic version" do
+ bundle! "add 'foo' --optimistic"
+ expect(bundled_app("Gemfile").read).to include %(gem "foo", ">= 2.0")
+ expect(the_bundle).to include_gems "foo 2.0"
+ end
+ end
+
+ describe "with --strict option" do
+ it "adds strict version" do
+ bundle! "add 'foo' --strict"
+ expect(bundled_app("Gemfile").read).to include %(gem "foo", "= 2.0")
+ expect(the_bundle).to include_gems "foo 2.0"
+ end
+ end
+
+ describe "with no option" do
+ it "adds pessimistic version" do
+ bundle! "add 'foo'"
+ expect(bundled_app("Gemfile").read).to include %(gem "foo", "~> 2.0")
+ expect(the_bundle).to include_gems "foo 2.0"
+ end
+ end
+
+ describe "with --optimistic and --strict" do
+ it "throws error" do
+ bundle "add 'foo' --strict --optimistic"
+
+ expect(out).to include("You can not specify `--strict` and `--optimistic` at the same time")
+ end
+ end
+
+ context "multiple gems" do
+ it "adds multiple gems to gemfile" do
+ bundle! "add bar baz"
+
+ expect(bundled_app("Gemfile").read).to match(/gem "bar", "~> 0.12.3"/)
+ expect(bundled_app("Gemfile").read).to match(/gem "baz", "~> 1.2"/)
+ end
+
+ it "throws error if any of the specified gems are present in the gemfile with different version" do
+ bundle "add weakling bar"
+
+ expect(out).to include("You cannot specify the same gem twice with different version requirements")
+ expect(out).to include("You specified: weakling (~> 0.0.1) and weakling (>= 0).")
+ end
+ end
+
+ describe "when a gem is added which is already specified in Gemfile with version" do
+ it "shows an error when added with different version requirement" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack", "1.0"
+ G
+
+ bundle "add 'rack' --version=1.1"
+
+ expect(out).to include("You cannot specify the same gem twice with different version requirements")
+ expect(out).to include("If you want to update the gem version, run `bundle update rack`. You may also need to change the version requirement specified in the Gemfile if it's too restrictive")
+ end
+
+ it "shows error when added without version requirements" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack", "1.0"
+ G
+
+ bundle "add 'rack'"
+
+ expect(out).to include("Gem already added.")
+ expect(out).to include("You cannot specify the same gem twice with different version requirements")
+ expect(out).not_to include("If you want to update the gem version, run `bundle update rack`. You may also need to change the version requirement specified in the Gemfile if it's too restrictive")
+ end
+ end
+
+ describe "when a gem is added which is already specified in Gemfile without version" do
+ it "shows an error when added with different version requirement" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack"
+ G
+
+ bundle "add 'rack' --version=1.1"
+
+ expect(out).to include("You cannot specify the same gem twice with different version requirements")
+ expect(out).to include("If you want to update the gem version, run `bundle update rack`.")
+ expect(out).not_to include("You may also need to change the version requirement specified in the Gemfile if it's too restrictive")
+ end
+ end
end
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb
index f6a353cb4d..ad859a21d5 100644
--- a/spec/commands/binstubs_spec.rb
+++ b/spec/commands/binstubs_spec.rb
@@ -39,6 +39,18 @@ RSpec.describe "bundle binstubs <gem>" do
expect(bundled_app("bin/rails")).to exist
end
+ it "allows installing all binstubs" do
+ install_gemfile! <<-G
+ source "file://#{gem_repo1}"
+ gem "rails"
+ G
+
+ bundle! :binstubs, :all => true
+
+ expect(bundled_app("bin/rails")).to exist
+ expect(bundled_app("bin/rake")).to exist
+ end
+
it "displays an error when used without any gem" do
install_gemfile <<-G
source "file://#{gem_repo1}"
@@ -50,6 +62,17 @@ RSpec.describe "bundle binstubs <gem>" do
expect(out).to include("`bundle binstubs` needs at least one gem to run.")
end
+ it "displays an error when used with --all and gems" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+
+ bundle "binstubs rack", :all => true
+ expect(last_command).to be_failure
+ expect(last_command.bundler_err).to include("Cannot specify --all with specific gems")
+ end
+
context "when generating bundle binstub outside bundler" do
it "should abort" do
install_gemfile <<-G
@@ -101,25 +124,14 @@ RSpec.describe "bundle binstubs <gem>" do
bundle! "binstubs bundler rack prints_loaded_gems"
end
- # When environment has a same version of bundler as default gems.
- # `system_gems "bundler-x.y.z"` will detect system binstub.
- # We need to avoid it by virtual version of bundler.
- let(:system_bundler_version) { Gem::Version.new(Bundler::VERSION).bump.to_s }
+ let(:system_bundler_version) { Bundler::VERSION }
- context "when system bundler was used" do
- # Support master branch of bundler
- if ENV["BUNDLER_SPEC_SUB_VERSION"]
- let(:system_bundler_version) { Bundler::VERSION }
- end
- it "runs bundler" do
- sys_exec! "#{bundled_app("bin/bundle")} install"
- expect(out).to eq %(system bundler #{system_bundler_version}\n["install"])
- end
+ it "runs bundler" do
+ sys_exec! "#{bundled_app("bin/bundle")} install"
+ expect(out).to eq %(system bundler #{system_bundler_version}\n["install"])
end
context "when BUNDLER_VERSION is set" do
- let(:system_bundler_version) { Bundler::VERSION }
-
it "runs the correct version of bundler" do
sys_exec "BUNDLER_VERSION='999.999.999' #{bundled_app("bin/bundle")} install"
expect(exitstatus).to eq(42) if exitstatus
@@ -129,8 +141,6 @@ RSpec.describe "bundle binstubs <gem>" do
end
context "when a lockfile exists with a locked bundler version" do
- let(:system_bundler_version) { Bundler::VERSION }
-
it "runs the correct version of bundler when the version is newer" do
lockfile lockfile.gsub(system_bundler_version, "999.999.999")
sys_exec "#{bundled_app("bin/bundle")} install"
@@ -186,13 +196,7 @@ RSpec.describe "bundle binstubs <gem>" do
let(:system_bundler_version) { :bundler }
it "loads all gems" do
sys_exec! bundled_app("bin/print_loaded_gems").to_s
- # RG < 2.0.14 didn't have a `Gem::Specification#default_gem?`
- # This is dirty detection for old RG versions.
- if File.dirname(Bundler.load.specs["bundler"][0].loaded_from) =~ %r{specifications/default}
- expect(out).to eq %(["prints_loaded_gems-1.0", "rack-1.2"])
- else
- expect(out).to eq %(["bundler-#{Bundler::VERSION}", "prints_loaded_gems-1.0", "rack-1.2"])
- end
+ expect(out).to eq %(["bundler-#{Bundler::VERSION}", "prints_loaded_gems-1.0", "rack-1.2"])
end
context "when requesting a different bundler version" do
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index d0df6d30d7..ff3317bb1d 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -733,4 +733,39 @@ RSpec.describe "bundle clean" do
expect(vendored_gems("bundler/gems/extensions")).to exist
expect(vendored_gems("bundler/gems/very_simple_git_binary-1.0-#{revision[0..11]}")).to exist
end
+
+ it "removes extension directories", :rubygems => "2.2" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "thin"
+ gem "very_simple_binary"
+ gem "simple_binary"
+ G
+
+ bundle! "install", forgotten_command_line_options(:path => "vendor/bundle")
+
+ very_simple_binary_extensions_dir =
+ Pathname.glob("#{vendored_gems}/extensions/*/*/very_simple_binary-1.0").first
+
+ simple_binary_extensions_dir =
+ Pathname.glob("#{vendored_gems}/extensions/*/*/simple_binary-1.0").first
+
+ expect(very_simple_binary_extensions_dir).to exist
+ expect(simple_binary_extensions_dir).to exist
+
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "thin"
+ gem "simple_binary"
+ G
+
+ bundle! "install"
+ bundle! :clean
+ expect(out).to eq("Removing very_simple_binary (1.0)")
+
+ expect(very_simple_binary_extensions_dir).not_to exist
+ expect(simple_binary_extensions_dir).to exist
+ end
end
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
index 9e49357465..c76135d72c 100644
--- a/spec/commands/config_spec.rb
+++ b/spec/commands/config_spec.rb
@@ -362,6 +362,92 @@ E
expect(out).to match(long_string_without_special_characters)
end
end
+
+ describe "subcommands" do
+ it "list" do
+ bundle! "config list"
+ expect(last_command.stdout).to eq "Settings are listed in order of priority. The top value will be used.\nspec_run\nSet via BUNDLE_SPEC_RUN: \"true\""
+
+ bundle! "config list", :parseable => true
+ expect(last_command.stdout).to eq "spec_run=true"
+ end
+
+ it "get" do
+ ENV["BUNDLE_BAR"] = "bar_val"
+
+ bundle! "config get foo"
+ expect(last_command.stdout).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`"
+
+ ENV["BUNDLE_FOO"] = "foo_val"
+
+ bundle! "config get foo --parseable"
+ expect(last_command.stdout).to eq "foo=foo_val"
+
+ bundle! "config get foo"
+ expect(last_command.stdout).to eq "Settings for `foo` in order of priority. The top value will be used\nSet via BUNDLE_FOO: \"foo_val\""
+ end
+
+ it "set" do
+ bundle! "config set foo 1"
+ expect(last_command.stdout).to eq ""
+
+ bundle! "config set --local foo 2"
+ expect(last_command.stdout).to eq ""
+
+ bundle! "config set --global foo 3"
+ expect(last_command.stdout).to eq "Your application has set foo to \"2\". This will override the global value you are currently setting"
+
+ bundle! "config set --parseable --local foo 4"
+ expect(last_command.stdout).to eq "foo=4"
+
+ bundle! "config set --local foo 4.1"
+ expect(last_command.stdout).to eq "You are replacing the current local value of foo, which is currently \"4\""
+
+ bundle "config set --global --local foo 5"
+ expect(last_command).to be_failure
+ expect(last_command.bundler_err).to eq "The options global and local were specified. Please only use one of the switches at a time."
+ end
+
+ it "unset" do
+ bundle! "config unset foo"
+ expect(last_command.stdout).to eq ""
+
+ bundle! "config set foo 1"
+ bundle! "config unset foo --parseable"
+ expect(last_command.stdout).to eq ""
+
+ bundle! "config set --local foo 1"
+ bundle! "config set --global foo 2"
+
+ bundle! "config unset foo"
+ expect(last_command.stdout).to eq ""
+ expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`"
+
+ bundle! "config set --local foo 1"
+ bundle! "config set --global foo 2"
+
+ bundle! "config unset foo --local"
+ expect(last_command.stdout).to eq ""
+ expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nSet for the current user (#{home(".bundle/config")}): \"2\""
+ bundle! "config unset foo --global"
+ expect(last_command.stdout).to eq ""
+ expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`"
+
+ bundle! "config set --local foo 1"
+ bundle! "config set --global foo 2"
+
+ bundle! "config unset foo --global"
+ expect(last_command.stdout).to eq ""
+ expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nSet for your local app (#{bundled_app(".bundle/config")}): \"1\""
+ bundle! "config unset foo --local"
+ expect(last_command.stdout).to eq ""
+ expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`"
+
+ bundle "config unset foo --local --global"
+ expect(last_command).to be_failure
+ expect(last_command.bundler_err).to eq "The options global and local were specified. Please only use one of the switches at a time."
+ end
+ end
end
RSpec.describe "setting gemfile via config" do
diff --git a/spec/commands/doctor_spec.rb b/spec/commands/doctor_spec.rb
index 2572d4ff4d..5260e6cb36 100644
--- a/spec/commands/doctor_spec.rb
+++ b/spec/commands/doctor_spec.rb
@@ -1,11 +1,17 @@
# frozen_string_literal: true
+require "find"
require "stringio"
require "bundler/cli"
require "bundler/cli/doctor"
RSpec.describe "bundle doctor" do
before(:each) do
+ install_gemfile! <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+
@stdout = StringIO.new
[:error, :warn].each do |method|
@@ -16,46 +22,89 @@ RSpec.describe "bundle doctor" do
end
end
- it "exits with no message if the installed gem has no C extensions" do
- install_gemfile! <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
+ context "when all files in home are readable/writable" do
+ before(:each) do
+ stat = double("stat")
+ unwritable_file = double("file")
+ allow(Find).to receive(:find).with(Bundler.home.to_s) { [unwritable_file] }
+ allow(File).to receive(:stat).with(unwritable_file) { stat }
+ allow(stat).to receive(:uid) { Process.uid }
+ allow(File).to receive(:writable?).with(unwritable_file) { true }
+ allow(File).to receive(:readable?).with(unwritable_file) { true }
+ end
- expect { Bundler::CLI::Doctor.new({}).run }.not_to raise_error
- expect(@stdout.string).to be_empty
- end
+ it "exits with no message if the installed gem has no C extensions" do
+ expect { Bundler::CLI::Doctor.new({}).run }.not_to raise_error
+ expect(@stdout.string).to be_empty
+ end
- it "exits with no message if the installed gem's C extension dylib breakage is fine" do
- install_gemfile! <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
+ it "exits with no message if the installed gem's C extension dylib breakage is fine" do
+ doctor = Bundler::CLI::Doctor.new({})
+ expect(doctor).to receive(:bundles_for_gem).exactly(2).times.and_return ["/path/to/rack/rack.bundle"]
+ expect(doctor).to receive(:dylibs).exactly(2).times.and_return ["/usr/lib/libSystem.dylib"]
+ allow(File).to receive(:exist?).and_call_original
+ allow(File).to receive(:exist?).with("/usr/lib/libSystem.dylib").and_return(true)
+ expect { doctor.run }.not_to(raise_error, @stdout.string)
+ expect(@stdout.string).to be_empty
+ end
- doctor = Bundler::CLI::Doctor.new({})
- expect(doctor).to receive(:bundles_for_gem).exactly(2).times.and_return ["/path/to/rack/rack.bundle"]
- expect(doctor).to receive(:dylibs).exactly(2).times.and_return ["/usr/lib/libSystem.dylib"]
- allow(File).to receive(:exist?).and_call_original
- allow(File).to receive(:exist?).with("/usr/lib/libSystem.dylib").and_return(true)
- expect { doctor.run }.not_to(raise_error, @stdout.string)
- expect(@stdout.string).to be_empty
+ it "exits with a message if one of the linked libraries is missing" do
+ doctor = Bundler::CLI::Doctor.new({})
+ expect(doctor).to receive(:bundles_for_gem).exactly(2).times.and_return ["/path/to/rack/rack.bundle"]
+ expect(doctor).to receive(:dylibs).exactly(2).times.and_return ["/usr/local/opt/icu4c/lib/libicui18n.57.1.dylib"]
+ allow(File).to receive(:exist?).and_call_original
+ allow(File).to receive(:exist?).with("/usr/local/opt/icu4c/lib/libicui18n.57.1.dylib").and_return(false)
+ expect { doctor.run }.to raise_error(Bundler::ProductionError, strip_whitespace(<<-E).strip), @stdout.string
+ The following gems are missing OS dependencies:
+ * bundler: /usr/local/opt/icu4c/lib/libicui18n.57.1.dylib
+ * rack: /usr/local/opt/icu4c/lib/libicui18n.57.1.dylib
+ E
+ end
end
- it "exits with a message if one of the linked libraries is missing" do
- install_gemfile! <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
+ context "when home contains files that are not readable/writable" do
+ before(:each) do
+ @stat = double("stat")
+ @unwritable_file = double("file")
+ allow(Find).to receive(:find).with(Bundler.home.to_s) { [@unwritable_file] }
+ allow(File).to receive(:stat).with(@unwritable_file) { @stat }
+ end
- doctor = Bundler::CLI::Doctor.new({})
- expect(doctor).to receive(:bundles_for_gem).exactly(2).times.and_return ["/path/to/rack/rack.bundle"]
- expect(doctor).to receive(:dylibs).exactly(2).times.and_return ["/usr/local/opt/icu4c/lib/libicui18n.57.1.dylib"]
- allow(File).to receive(:exist?).and_call_original
- allow(File).to receive(:exist?).with("/usr/local/opt/icu4c/lib/libicui18n.57.1.dylib").and_return(false)
- expect { doctor.run }.to raise_error(Bundler::ProductionError, strip_whitespace(<<-E).strip), @stdout.string
- The following gems are missing OS dependencies:
- * bundler: /usr/local/opt/icu4c/lib/libicui18n.57.1.dylib
- * rack: /usr/local/opt/icu4c/lib/libicui18n.57.1.dylib
- E
+ it "exits with an error if home contains files that are not readable/writable" do
+ allow(@stat).to receive(:uid) { Process.uid }
+ allow(File).to receive(:writable?).with(@unwritable_file) { false }
+ allow(File).to receive(:readable?).with(@unwritable_file) { false }
+ expect { Bundler::CLI::Doctor.new({}).run }.not_to raise_error
+ expect(@stdout.string).to include(
+ "Files exist in the Bundler home that are not readable/writable by the current user. These files are:\n - #{@unwritable_file}"
+ )
+ expect(@stdout.string).not_to include("No issues")
+ end
+
+ context "when home contains files that are not owned by the current process" do
+ before(:each) do
+ allow(@stat).to receive(:uid) { 0o0000 }
+ end
+
+ it "exits with an error if home contains files that are not readable/writable and are not owned by the current user" do
+ allow(File).to receive(:writable?).with(@unwritable_file) { false }
+ allow(File).to receive(:readable?).with(@unwritable_file) { false }
+ expect { Bundler::CLI::Doctor.new({}).run }.not_to raise_error
+ expect(@stdout.string).to include(
+ "Files exist in the Bundler home that are owned by another user, and are not readable/writable. These files are:\n - #{@unwritable_file}"
+ )
+ expect(@stdout.string).not_to include("No issues")
+ end
+
+ it "exits with a warning if home contains files that are read/write but not owned by current user" do
+ allow(File).to receive(:writable?).with(@unwritable_file) { true }
+ allow(File).to receive(:readable?).with(@unwritable_file) { true }
+ expect { Bundler::CLI::Doctor.new({}).run }.not_to raise_error
+ expect(@stdout.string).to include(
+ "Files exist in the Bundler home that are owned by another user, but are still readable/writable. These files are:\n - #{@unwritable_file}"
+ )
+ expect(@stdout.string).not_to include("No issues")
+ end
+ end
end
end
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index 03212fd9b3..492907743a 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -6,6 +6,15 @@ RSpec.describe "bundle exec" do
system_gems(system_gems_to_install, :path => :bundle_path)
end
+ it "works with --gemfile flag" do
+ create_file "CustomGemfile", <<-G
+ gem "rack", "1.0.0"
+ G
+
+ bundle "exec --gemfile CustomGemfile rackup"
+ expect(out).to eq("1.0.0")
+ end
+
it "activates the correct gem" do
gemfile <<-G
gem "rack", "0.9.1"
@@ -552,7 +561,7 @@ RSpec.describe "bundle exec" do
ex << "raise SignalException, 'SIGTERM'\n"
ex
end
- let(:expected_err) { ENV["TRAVIS"] ? "Terminated" : "" }
+ let(:expected_err) { RUBY_PLATFORM =~ /darwin/ ? "" : "Terminated" }
let(:exit_code) do
# signal mask 128 + plus signal 15 -> TERM
# this is specified by C99
@@ -834,9 +843,9 @@ __FILE__: #{path.to_s.inspect}
expect(bundle!("exec #{file}", :artifice => nil)).to eq(expected)
expect(bundle!("exec bundle exec #{file}", :artifice => nil)).to eq(expected)
expect(bundle!("exec ruby #{file}", :artifice => nil)).to eq(expected)
- # Ignore expectaion for default bundler gem conflict.
+ # Ignore expectation for default bundler gem conflict.
unless ENV["BUNDLER_SPEC_SUB_VERSION"]
- expect(run!(file.read, :no_lib => true, :artifice => nil)).to eq(expected)
+ expect(run!(file.read, :artifice => nil)).to eq(expected)
end
end
diff --git a/spec/commands/inject_spec.rb b/spec/commands/inject_spec.rb
index 6c1994b59d..b7ffc89a34 100644
--- a/spec/commands/inject_spec.rb
+++ b/spec/commands/inject_spec.rb
@@ -64,7 +64,7 @@ Usage: "bundle inject GEM VERSION"
it "add gem with group option in gemfile" do
bundle "inject 'rack-obama' '>0' --group=development"
gemfile = bundled_app("Gemfile").read
- str = "gem \"rack-obama\", \"> 0\", :group => [:development]"
+ str = "gem \"rack-obama\", \"> 0\", :group => :development"
expect(gemfile).to include str
end
diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb
index 85593ee0ff..394f672fef 100644
--- a/spec/commands/install_spec.rb
+++ b/spec/commands/install_spec.rb
@@ -321,6 +321,56 @@ RSpec.describe "bundle install with gem sources" do
expect(File.exist?(bundled_app("Gemfile.lock"))).to eq(true)
end
+ context "throws a warning if a gem is added twice in Gemfile" do
+ it "without version requirements" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack"
+ gem "rack"
+ G
+
+ expect(out).to include("Your Gemfile lists the gem rack (>= 0) more than once.")
+ expect(out).to include("Remove any duplicate entries and specify the gem only once (per group).")
+ expect(out).to include("While it's not a problem now, it could cause errors if you change the version of one of them later.")
+ end
+
+ it "with same versions" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack", "1.0"
+ gem "rack", "1.0"
+ G
+
+ expect(out).to include("Your Gemfile lists the gem rack (= 1.0) more than once.")
+ expect(out).to include("Remove any duplicate entries and specify the gem only once (per group).")
+ expect(out).to include("While it's not a problem now, it could cause errors if you change the version of one of them later.")
+ end
+ end
+
+ context "throws an error if a gem is added twice in Gemfile" do
+ it "when version of one dependency is not specified" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack"
+ gem "rack", "1.0"
+ G
+
+ expect(out).to include("You cannot specify the same gem twice with different version requirements")
+ expect(out).to include("You specified: rack (>= 0) and rack (= 1.0).")
+ end
+
+ it "when different versions of both dependencies are specified" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack", "1.0"
+ gem "rack", "1.1"
+ G
+
+ expect(out).to include("You cannot specify the same gem twice with different version requirements")
+ expect(out).to include("You specified: rack (= 1.0) and rack (= 1.1).")
+ end
+ end
+
it "gracefully handles error when rubygems server is unavailable" do
install_gemfile <<-G, :artifice => nil
source "file://#{gem_repo1}"
diff --git a/spec/commands/licenses_spec.rb b/spec/commands/licenses_spec.rb
index d61d3492f3..144931fb27 100644
--- a/spec/commands/licenses_spec.rb
+++ b/spec/commands/licenses_spec.rb
@@ -12,14 +12,7 @@ RSpec.describe "bundle licenses" do
it "prints license information for all gems in the bundle" do
bundle "licenses"
- loaded_bundler_spec = Bundler.load.specs["bundler"]
- expected = if !loaded_bundler_spec.empty?
- loaded_bundler_spec[0].license
- else
- "Unknown"
- end
-
- expect(out).to include("bundler: #{expected}")
+ expect(out).to include("bundler: Unknown")
expect(out).to include("with_license: MIT")
end
diff --git a/spec/commands/list_spec.rb b/spec/commands/list_spec.rb
index 0ea70f015c..5305176c65 100644
--- a/spec/commands/list_spec.rb
+++ b/spec/commands/list_spec.rb
@@ -4,14 +4,105 @@ RSpec.describe "bundle list", :bundler => "2" do
before do
install_gemfile <<-G
source "file://#{gem_repo1}"
+
gem "rack"
+ gem "rspec", :group => [:test]
G
end
+ context "with name-only and paths option" do
+ it "raises an error" do
+ bundle "list --name-only --paths"
+
+ expect(out).to eq "The `--name-only` and `--paths` options cannot be used together"
+ end
+ end
+
+ context "with without-group and only-group option" do
+ it "raises an error" do
+ bundle "list --without-group dev --only-group test"
+
+ expect(out).to eq "The `--only-group` and `--without-group` options cannot be used together"
+ end
+ end
+
+ describe "with without-group option" do
+ context "when group is present" do
+ it "prints the gems not in the specified group" do
+ bundle! "list --without-group test"
+
+ expect(out).to include(" * rack (1.0.0)")
+ expect(out).not_to include(" * rspec (1.2.7)")
+ end
+ end
+
+ context "when group is not found" do
+ it "raises an error" do
+ bundle "list --without-group random"
+
+ expect(out).to eq "`random` group could not be found."
+ end
+ end
+ end
+
+ describe "with only-group option" do
+ context "when group is present" do
+ it "prints the gems in the specified group" do
+ bundle! "list --only-group default"
+
+ expect(out).to include(" * rack (1.0.0)")
+ expect(out).not_to include(" * rspec (1.2.7)")
+ end
+ end
+
+ context "when group is not found" do
+ it "raises an error" do
+ bundle "list --only-group random"
+
+ expect(out).to eq "`random` group could not be found."
+ end
+ end
+ end
+
context "with name-only option" do
it "prints only the name of the gems in the bundle" do
bundle "list --name-only"
- expect(out).to eq "rack"
+
+ expect(out).to include("rack")
+ expect(out).to include("rspec")
+ end
+ end
+
+ context "with paths option" do
+ before do
+ build_repo2 do
+ build_gem "bar"
+ end
+
+ build_git "git_test", "1.0.0", :path => lib_path("git_test")
+
+ build_lib("gemspec_test", :path => tmp.join("gemspec_test")) do |s|
+ s.write("Gemfile", "source :rubygems\ngemspec")
+ s.add_dependency "bar", "=1.0.0"
+ end
+
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack"
+ gem "rails"
+ gem "git_test", :git => "#{lib_path("git_test")}"
+ gemspec :path => "#{tmp.join("gemspec_test")}"
+ G
+
+ bundle! "install"
+ end
+
+ it "prints the path of each gem in the bundle" do
+ bundle "list --paths"
+ expect(out).to match(%r{.*\/rails\-2\.3\.2})
+ expect(out).to match(%r{.*\/rack\-1\.2})
+ expect(out).to match(%r{.*\/git_test\-\w})
+ expect(out).to match(%r{.*\/gemspec_test})
end
end
diff --git a/spec/commands/lock_spec.rb b/spec/commands/lock_spec.rb
index 0b77605f01..f4997b0620 100644
--- a/spec/commands/lock_spec.rb
+++ b/spec/commands/lock_spec.rb
@@ -93,7 +93,7 @@ RSpec.describe "bundle lock" do
bundle "lock --lockfile=lock"
expect(out).to match(/Writing lockfile to.+lock/)
- expect(read_lockfile "lock").to eq(@lockfile)
+ expect(read_lockfile("lock")).to eq(@lockfile)
expect { read_lockfile }.to raise_error(Errno::ENOENT)
end
@@ -122,6 +122,19 @@ RSpec.describe "bundle lock" do
expect(read_lockfile).to eq(@lockfile)
end
+ it "can lock without downloading gems" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "thin"
+ gem "rack_middleware", :group => "test"
+ G
+ bundle! "config set without test"
+ bundle! "config set path .bundle"
+ bundle! "lock"
+ expect(bundled_app(".bundle")).not_to exist
+ end
+
# see update_spec for more coverage on same options. logic is shared so it's not necessary
# to repeat coverage here.
context "conservative updates" do
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
index 1a3e8236b6..4b5db87b00 100644
--- a/spec/commands/newgem_spec.rb
+++ b/spec/commands/newgem_spec.rb
@@ -196,7 +196,7 @@ RSpec.describe "bundle gem" do
process_file(bundled_app("newgem", "newgem.gemspec")) do |line|
# Simulate replacing TODOs with real values
case line
- when /spec\.metadata\['allowed_push_host'\]/, /spec\.homepage/
+ when /spec\.metadata\["(?:allowed_push_host|homepage_uri|source_code_uri|changelog_uri)"\]/, /spec\.homepage/
line.gsub(/\=.*$/, "= 'http://example.org'")
when /spec\.summary/
line.gsub(/\=.*$/, "= %q{A short summary of my new gem.}")
@@ -310,6 +310,10 @@ RSpec.describe "bundle gem" do
expect(bundled_app("test_gem/lib/test_gem.rb").read).to match(%r{require "test_gem/version"})
end
+ it "creates a base error class" do
+ expect(bundled_app("test_gem/lib/test_gem.rb").read).to match(/class Error < StandardError; end$/)
+ end
+
it "runs rake without problems" do
system_gems ["rake-10.0.2"]
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index f0ad136c98..394db664d8 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -135,6 +135,17 @@ RSpec.describe "bundle outdated" do
expect(out).to include("activesupport")
expect(out).to include("duradura")
end
+
+ it "returns a sorted list of outdated gems from one group => 'test'" do
+ test_group_option("test", 2)
+
+ expect(out).not_to include("===== Group default =====")
+ expect(out).not_to include("terranova (")
+
+ expect(out).to include("===== Group development, test =====")
+ expect(out).to include("activesupport")
+ expect(out).to include("duradura")
+ end
end
describe "with --groups option" do
@@ -302,14 +313,15 @@ RSpec.describe "bundle outdated" do
end
end
- describe "with --strict option" do
+ filter_strict_option = Bundler.feature_flag.bundler_2_mode? ? :"filter-strict" : :strict
+ describe "with --#{filter_strict_option} option" do
it "only reports gems that have a newer version that matches the specified dependency version requirements" do
update_repo2 do
build_gem "activesupport", "3.0"
build_gem "weakling", "0.0.5"
end
- bundle "outdated --strict"
+ bundle :outdated, filter_strict_option => true
expect(out).to_not include("activesupport (newest")
expect(out).to include("(newest 0.0.5, installed 0.0.3, requested ~> 0.0.1)")
@@ -321,7 +333,7 @@ RSpec.describe "bundle outdated" do
gem "rack_middleware", "1.0"
G
- bundle "outdated --strict"
+ bundle :outdated, filter_strict_option => true
expect(out).to_not include("rack (1.2")
end
@@ -339,7 +351,7 @@ RSpec.describe "bundle outdated" do
build_gem "weakling", "0.0.5"
end
- bundle "outdated --strict --filter-patch"
+ bundle :outdated, filter_strict_option => true, "filter-patch" => true
expect(out).to_not include("activesupport (newest")
expect(out).to include("(newest 0.0.5, installed 0.0.3")
@@ -357,7 +369,7 @@ RSpec.describe "bundle outdated" do
build_gem "weakling", "0.1.5"
end
- bundle "outdated --strict --filter-minor"
+ bundle :outdated, filter_strict_option => true, "filter-minor" => true
expect(out).to_not include("activesupport (newest")
expect(out).to include("(newest 0.1.5, installed 0.0.3")
@@ -375,7 +387,7 @@ RSpec.describe "bundle outdated" do
build_gem "weakling", "1.1.5"
end
- bundle "outdated --strict --filter-major"
+ bundle :outdated, filter_strict_option => true, "filter-major" => true
expect(out).to_not include("activesupport (newest")
expect(out).to include("(newest 1.1.5, installed 0.0.3")
@@ -752,4 +764,31 @@ RSpec.describe "bundle outdated" do
end
end
end
+
+ describe "with --only-explicit" do
+ it "does not report outdated dependent gems" do
+ build_repo4 do
+ build_gem "weakling", %w[0.2 0.3] do |s|
+ s.add_dependency "bar", "~> 2.1"
+ end
+ build_gem "bar", %w[2.1 2.2]
+ end
+
+ install_gemfile <<-G
+ source "file://#{gem_repo4}"
+ gem 'weakling', '0.2'
+ gem 'bar', '2.1'
+ G
+
+ gemfile <<-G
+ source "file://#{gem_repo4}"
+ gem 'weakling'
+ G
+
+ bundle "outdated --only-explicit"
+
+ expect(out).to include("weakling (newest 0.3")
+ expect(out).not_to include("bar (newest 2.2")
+ end
+ end
end
diff --git a/spec/commands/pristine_spec.rb b/spec/commands/pristine_spec.rb
index 140b111d2d..de3cb8054b 100644
--- a/spec/commands/pristine_spec.rb
+++ b/spec/commands/pristine_spec.rb
@@ -14,6 +14,7 @@ RSpec.describe "bundle pristine" do
build_gem "baz-dev", "1.0.0"
build_gem "very_simple_binary", &:add_c_extension
build_git "foo", :path => lib_path("foo")
+ build_git "git_with_ext", :path => lib_path("git_with_ext"), &:add_c_extension
build_lib "bar", :path => lib_path("bar")
end
@@ -22,6 +23,7 @@ RSpec.describe "bundle pristine" do
gem "weakling"
gem "very_simple_binary"
gem "foo", :git => "#{lib_path("foo")}"
+ gem "git_with_ext", :git => "#{lib_path("git_with_ext")}"
gem "bar", :path => "#{lib_path("bar")}"
gemspec
@@ -46,14 +48,9 @@ RSpec.describe "bundle pristine" do
bundle! "install"
bundle! "pristine", :system_bundler => true
bundle! "-v", :system_bundler => true
-
- expected = if Bundler::VERSION < "2.0"
- "Bundler version"
- else
- Bundler::VERSION
- end
-
- expect(out).to start_with(expected)
+ # An old rubygems couldn't handle a correct version of vendoered bundler.
+ bundler_version = Gem::VERSION < "2.1" ? "1.16.0" : Bundler::VERSION
+ expect(out).to end_with(bundler_version)
end
end
@@ -170,4 +167,21 @@ RSpec.describe "bundle pristine" do
expect(makefile_contents).to match(/LIBPATH =.*-L#{c_ext_dir}/)
end
end
+
+ context "when a build config exists for a git sourced gem" do
+ let(:git_with_ext) { Bundler.definition.specs["git_with_ext"].first }
+ let(:c_ext_dir) { Pathname.new(git_with_ext.full_gem_path).join("ext") }
+ let(:build_opt) { "--with-ext-lib=#{c_ext_dir}" }
+ before { bundle "config build.git_with_ext -- #{build_opt}" }
+
+ # This just verifies that the generated Makefile from the c_ext gem makes
+ # use of the build_args from the bundle config
+ it "applies the config when installing the gem" do
+ bundle! "pristine"
+
+ makefile_contents = File.read(c_ext_dir.join("Makefile").to_s)
+ expect(makefile_contents).to match(/libpath =.*#{c_ext_dir}/)
+ expect(makefile_contents).to match(/LIBPATH =.*-L#{c_ext_dir}/)
+ end
+ end
end
diff --git a/spec/commands/remove_spec.rb b/spec/commands/remove_spec.rb
new file mode 100644
index 0000000000..37594b1ece
--- /dev/null
+++ b/spec/commands/remove_spec.rb
@@ -0,0 +1,571 @@
+# frozen_string_literal: true
+
+RSpec.describe "bundle remove" do
+ context "when no gems are specified" do
+ it "throws error" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ G
+
+ bundle "remove"
+
+ expect(out).to include("Please specify gems to remove.")
+ end
+ end
+
+ context "when --install flag is specified" do
+ it "removes gems from .bundle" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ G
+
+ bundle! "remove rack --install"
+
+ expect(out).to include("rack was removed.")
+ expect(the_bundle).to_not include_gems "rack"
+ end
+ end
+
+ describe "remove single gem from gemfile" do
+ context "when gem is present in gemfile" do
+ it "shows success for removed gem" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ G
+
+ bundle! "remove rack"
+
+ expect(out).to include("rack was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "when gem is not present in gemfile" do
+ it "shows warning for gem that could not be removed" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ G
+
+ bundle "remove rack"
+
+ expect(out).to include("`rack` is not specified in #{bundled_app("Gemfile")} so it could not be removed.")
+ end
+ end
+ end
+
+ describe "remove mutiple gems from gemfile" do
+ context "when all gems are present in gemfile" do
+ it "shows success fir all removed gems" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ gem "rails"
+ G
+
+ bundle! "remove rack rails"
+
+ expect(out).to include("rack was removed.")
+ expect(out).to include("rails was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "when some gems are not present in the gemfile" do
+ it "shows warning for those not present and success for those that can be removed" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rails"
+ gem "minitest"
+ gem "rspec"
+ G
+
+ bundle "remove rails rack minitest"
+
+ expect(out).to include("`rack` is not specified in #{bundled_app("Gemfile")} so it could not be removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rails"
+ gem "minitest"
+ gem "rspec"
+ G
+ end
+ end
+ end
+
+ context "with inline groups" do
+ it "removes the specified gem" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack", :group => [:dev]
+ G
+
+ bundle! "remove rack"
+
+ expect(out).to include("rack was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ describe "with group blocks" do
+ context "when single group block with gem to be removed is present" do
+ it "removes the group block" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ gem "rspec"
+ end
+ G
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "when an empty block is also present" do
+ it "removes all empty blocks" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ gem "rspec"
+ end
+
+ group :dev do
+ end
+ G
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "when the gem belongs to mutiple groups" do
+ it "removes the groups" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ group :test, :serioustest do
+ gem "rspec"
+ end
+ G
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "when the gem is present in mutiple groups" do
+ it "removes all empty blocks" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ group :one do
+ gem "rspec"
+ end
+
+ group :two do
+ gem "rspec"
+ end
+ G
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+ end
+
+ describe "nested group blocks" do
+ context "when all the groups will be empty after removal" do
+ it "removes the empty nested blocks" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ group :serioustest do
+ gem "rspec"
+ end
+ end
+ G
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "when outer group will not be empty after removal" do
+ it "removes only empty blocks" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ gem "rack-test"
+
+ group :serioustest do
+ gem "rspec"
+ end
+ end
+ G
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ gem "rack-test"
+
+ end
+ G
+ end
+ end
+
+ context "when inner group will not be empty after removal" do
+ it "removes only empty blocks" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ group :serioustest do
+ gem "rspec"
+ gem "rack-test"
+ end
+ end
+ G
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ group :serioustest do
+ gem "rack-test"
+ end
+ end
+ G
+ end
+ end
+ end
+
+ describe "arbitrary gemfile" do
+ context "when mutiple gems are present in same line" do
+ it "shows warning for gems not removed" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"; gem "rails"
+ G
+
+ bundle "remove rails"
+
+ expect(out).to include("Gems could not be removed. rack (>= 0) would also have been removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"; gem "rails"
+ G
+ end
+ end
+
+ context "when some gems could not be removed" do
+ it "shows warning for gems not removed and success for those removed" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem"rack"
+ gem"rspec"
+ gem "rails"
+ gem "minitest"
+ G
+
+ bundle! "remove rails rack rspec minitest"
+
+ expect(out).to include("rails was removed.")
+ expect(out).to include("minitest was removed.")
+ expect(out).to include("rack, rspec could not be removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ gem"rack"
+ gem"rspec"
+ G
+ end
+ end
+ end
+
+ context "with sources" do
+ before do
+ build_repo gem_repo3 do
+ build_gem "rspec"
+ end
+ end
+
+ it "removes gems and empty source blocks" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+
+ source "file://#{gem_repo3}" do
+ gem "rspec"
+ end
+ G
+
+ bundle! "install"
+
+ bundle! "remove rspec"
+
+ expect(out).to include("rspec was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ G
+ end
+ end
+
+ describe "with eval_gemfile" do
+ context "when gems are present in both gemfiles" do
+ it "removes the gems" do
+ create_file "Gemfile-other", <<-G
+ gem "rack"
+ G
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+
+ gem "rack"
+ G
+
+ bundle! "remove rack"
+
+ expect(out).to include("rack was removed.")
+ end
+ end
+
+ context "when gems are present in other gemfile" do
+ it "removes the gems" do
+ create_file "Gemfile-other", <<-G
+ gem "rack"
+ G
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ G
+
+ bundle! "remove rack"
+
+ expect(bundled_app("Gemfile-other").read).to_not include("gem \"rack\"")
+ expect(out).to include("rack was removed.")
+ end
+ end
+
+ context "when gems to be removed are not specified in any of the gemfiles" do
+ it "throws error for the gems not present" do
+ # an empty gemfile
+ # indicating the gem is not present in the gemfile
+ create_file "Gemfile-other", <<-G
+ G
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ G
+
+ bundle "remove rack"
+
+ expect(out).to include("`rack` is not specified in #{bundled_app("Gemfile")} so it could not be removed.")
+ end
+ end
+
+ context "when the gem is present in parent file but not in gemfile specified by eval_gemfile" do
+ it "removes the gem" do
+ create_file "Gemfile-other", <<-G
+ gem "rails"
+ G
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ gem "rack"
+ G
+
+ bundle "remove rack"
+
+ expect(out).to include("rack was removed.")
+ expect(out).to include("`rack` is not specified in #{bundled_app("Gemfile-other")} so it could not be removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ G
+ end
+ end
+
+ context "when gems can not be removed from other gemfile" do
+ it "shows error" do
+ create_file "Gemfile-other", <<-G
+ gem "rails"; gem "rack"
+ G
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ gem "rack"
+ G
+
+ bundle "remove rack"
+
+ expect(out).to include("rack was removed.")
+ expect(out).to include("Gems could not be removed. rails (>= 0) would also have been removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ G
+ end
+ end
+
+ context "when gems could not be removed from parent gemfile" do
+ it "shows error" do
+ create_file "Gemfile-other", <<-G
+ gem "rack"
+ G
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ gem "rails"; gem "rack"
+ G
+
+ bundle "remove rack"
+
+ expect(out).to include("Gems could not be removed. rails (>= 0) would also have been removed.")
+ expect(bundled_app("Gemfile-other").read).to include("gem \"rack\"")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ gem "rails"; gem "rack"
+ G
+ end
+ end
+
+ context "when gem present in gemfiles but could not be removed from one from one of them" do
+ it "removes gem which can be removed and shows warning for file from which it can not be removed" do
+ create_file "Gemfile-other", <<-G
+ gem "rack"
+ G
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ eval_gemfile "Gemfile-other"
+ gem"rack"
+ G
+
+ bundle! "remove rack"
+
+ expect(out).to include("rack was removed.")
+ expect(bundled_app("Gemfile-other").read).to_not include("gem \"rack\"")
+ end
+ end
+ end
+
+ context "with install_if" do
+ it "removes gems inside blocks and empty blocks" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ install_if(lambda { false }) do
+ gem "rack"
+ end
+ G
+
+ bundle! "remove rack"
+
+ expect(out).to include("rack was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "with env" do
+ it "removes gems inside blocks and empty blocks" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ env "BUNDLER_TEST" do
+ gem "rack"
+ end
+ G
+
+ bundle! "remove rack"
+
+ expect(out).to include("rack was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+ G
+ end
+ end
+
+ context "with gemspec" do
+ it "should not remove the gem" do
+ build_lib("foo", :path => tmp.join("foo")) do |s|
+ s.write("foo.gemspec", "")
+ s.add_dependency "rack"
+ end
+
+ install_gemfile(<<-G)
+ source "file://#{gem_repo1}"
+ gemspec :path => '#{tmp.join("foo")}', :name => 'foo'
+ G
+
+ bundle! "remove foo"
+
+ expect(out).to include("foo could not be removed.")
+ end
+ end
+end
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 93734e4bc9..0bdf6a4a9c 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -63,16 +63,9 @@ RSpec.describe "bundle show", :bundler => "< 2" do
it "prints summary of gems" do
bundle "show --verbose"
- loaded_bundler_spec = Bundler.load.specs["bundler"]
- expected = if !loaded_bundler_spec.empty?
- loaded_bundler_spec[0].homepage
- else
- "No website available."
- end
-
expect(out).to include("* actionmailer (2.3.2)")
expect(out).to include("\tSummary: This is just a fake gem for testing")
- expect(out).to include("\tHomepage: #{expected}")
+ expect(out).to include("\tHomepage: No website available.")
expect(out).to include("\tStatus: Up to date")
end
end
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index 675e8574f1..b06eaa47e2 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -57,6 +57,19 @@ RSpec.describe "bundle update" do
end
end
+ describe "with --gemfile" do
+ it "creates lock files based on the Gemfile name" do
+ gemfile bundled_app("OmgFile"), <<-G
+ source "file://#{gem_repo1}"
+ gem "rack", "1.0"
+ G
+
+ bundle! "update --gemfile OmgFile", :all => bundle_update_requires_all?
+
+ expect(bundled_app("OmgFile.lock")).to exist
+ end
+ end
+
context "when update_requires_all_flag is set" do
before { bundle! "config update_requires_all_flag true" }
diff --git a/spec/commands/viz_spec.rb b/spec/commands/viz_spec.rb
index 0e8667eaa7..3804d3561c 100644
--- a/spec/commands/viz_spec.rb
+++ b/spec/commands/viz_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle viz", :ruby => "1.9.3", :if => Bundler.which("dot") do
+RSpec.describe "bundle viz", :ruby => "1.9.3", :bundler => "< 2", :if => Bundler.which("dot") do
let(:ruby_graphviz) do
graphviz_glob = base_system_gems.join("cache/ruby-graphviz*")
Pathname.glob(graphviz_glob).first
diff --git a/spec/install/bundler_spec.rb b/spec/install/bundler_spec.rb
index 08b7e2b673..42863ed89b 100644
--- a/spec/install/bundler_spec.rb
+++ b/spec/install/bundler_spec.rb
@@ -140,6 +140,7 @@ RSpec.describe "bundle install" do
it "can install dependencies with newer bundler version with a local path", :ruby => "> 2" do
bundle! "config path .bundle"
+ bundle! "config global_path_appends_ruby_scope true"
install_gemfile! <<-G
source "file://#{gem_repo2}"
gem "rails", "3.0"
diff --git a/spec/install/failure_spec.rb b/spec/install/failure_spec.rb
index b4cdf13857..49e2771dca 100644
--- a/spec/install/failure_spec.rb
+++ b/spec/install/failure_spec.rb
@@ -121,5 +121,24 @@ In Gemfile:
activesupport
M
end
+
+ context "because the downloaded .gem was invalid" do
+ before do
+ build_repo4 do
+ build_gem "a"
+ end
+
+ gem_repo4("gems", "a-1.0.gem").open("w") {|f| f << "<html></html>" }
+ end
+
+ it "removes the downloaded .gem" do
+ install_gemfile <<-G
+ source "file:#{gem_repo4}"
+ gem "a"
+ G
+
+ expect(default_bundle_path("cache", "a-1.0.gem")).not_to exist
+ end
+ end
end
end
diff --git a/spec/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb
index d7d4e0a53c..6c226eb29f 100644
--- a/spec/install/gemfile/platform_spec.rb
+++ b/spec/install/gemfile/platform_spec.rb
@@ -73,6 +73,149 @@ RSpec.describe "bundle install across platforms" do
expect(the_bundle).not_to include_gems "weakling"
end
+ it "does not keep unneeded platforms for gems that are used" do
+ build_repo4 do
+ build_gem "empyrean", "0.1.0"
+ build_gem "coderay", "1.1.2"
+ build_gem "method_source", "0.9.0"
+ build_gem("spoon", "0.0.6") {|s| s.add_runtime_dependency "ffi" }
+ build_gem "pry", "0.11.3" do |s|
+ s.platform = "java"
+ s.add_runtime_dependency "coderay", "~> 1.1.0"
+ s.add_runtime_dependency "method_source", "~> 0.9.0"
+ s.add_runtime_dependency "spoon", "~> 0.0"
+ end
+ build_gem "pry", "0.11.3" do |s|
+ s.add_runtime_dependency "coderay", "~> 1.1.0"
+ s.add_runtime_dependency "method_source", "~> 0.9.0"
+ end
+ build_gem("ffi", "1.9.23") {|s| s.platform = "java" }
+ build_gem("ffi", "1.9.23")
+ end
+
+ simulate_platform java
+
+ install_gemfile! <<-G
+ source "file://localhost/#{gem_repo4}"
+
+ gem "empyrean", "0.1.0"
+ gem "pry"
+ G
+
+ expect(the_bundle.lockfile).to read_as strip_whitespace(<<-L)
+ GEM
+ remote: file://localhost/#{gem_repo4}/
+ specs:
+ coderay (1.1.2)
+ empyrean (0.1.0)
+ ffi (1.9.23-java)
+ method_source (0.9.0)
+ pry (0.11.3-java)
+ coderay (~> 1.1.0)
+ method_source (~> 0.9.0)
+ spoon (~> 0.0)
+ spoon (0.0.6)
+ ffi
+
+ PLATFORMS
+ java
+
+ DEPENDENCIES
+ empyrean (= 0.1.0)
+ pry
+
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
+
+ bundle! "lock --add-platform ruby"
+
+ good_lockfile = strip_whitespace(<<-L)
+ GEM
+ remote: file://localhost/#{gem_repo4}/
+ specs:
+ coderay (1.1.2)
+ empyrean (0.1.0)
+ ffi (1.9.23-java)
+ method_source (0.9.0)
+ pry (0.11.3)
+ coderay (~> 1.1.0)
+ method_source (~> 0.9.0)
+ pry (0.11.3-java)
+ coderay (~> 1.1.0)
+ method_source (~> 0.9.0)
+ spoon (~> 0.0)
+ spoon (0.0.6)
+ ffi
+
+ PLATFORMS
+ java
+ ruby
+
+ DEPENDENCIES
+ empyrean (= 0.1.0)
+ pry
+
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
+
+ expect(the_bundle.lockfile).to read_as good_lockfile
+
+ bad_lockfile = strip_whitespace <<-L
+ GEM
+ remote: file://localhost/#{gem_repo4}/
+ specs:
+ coderay (1.1.2)
+ empyrean (0.1.0)
+ ffi (1.9.23)
+ ffi (1.9.23-java)
+ method_source (0.9.0)
+ pry (0.11.3)
+ coderay (~> 1.1.0)
+ method_source (~> 0.9.0)
+ pry (0.11.3-java)
+ coderay (~> 1.1.0)
+ method_source (~> 0.9.0)
+ spoon (~> 0.0)
+ spoon (0.0.6)
+ ffi
+
+ PLATFORMS
+ java
+ ruby
+
+ DEPENDENCIES
+ empyrean (= 0.1.0)
+ pry
+
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
+
+ aggregate_failures do
+ lockfile bad_lockfile
+ bundle! :install
+ expect(the_bundle.lockfile).to read_as good_lockfile
+
+ lockfile bad_lockfile
+ bundle! :update, :all => true
+ expect(the_bundle.lockfile).to read_as good_lockfile
+
+ lockfile bad_lockfile
+ bundle! "update ffi"
+ expect(the_bundle.lockfile).to read_as good_lockfile
+
+ lockfile bad_lockfile
+ bundle! "update empyrean"
+ expect(the_bundle.lockfile).to read_as good_lockfile
+
+ lockfile bad_lockfile
+ bundle! :lock
+ expect(the_bundle.lockfile).to read_as good_lockfile
+ end
+ end
+
it "works the other way with gems that have different dependencies" do
simulate_platform "ruby"
install_gemfile <<-G
@@ -246,6 +389,25 @@ RSpec.describe "bundle install with platform conditionals" do
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
end
+
+ context "when disable_platform_warnings is true" do
+ before { bundle! "config disable_platform_warnings true" }
+
+ it "does not print the warning when a dependency is unused on any platform" do
+ simulate_platform "ruby"
+ simulate_ruby_engine "ruby"
+
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack", :platform => [:mingw, :mswin, :x64_mingw, :jruby]
+ G
+
+ bundle! "install"
+
+ expect(out).not_to match(/The dependency (.*) will be unused/)
+ end
+ end
end
RSpec.describe "when a gem has no architecture" do
diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb
index c814d0de76..384deca7c2 100644
--- a/spec/install/gemfile/sources_spec.rb
+++ b/spec/install/gemfile/sources_spec.rb
@@ -544,7 +544,7 @@ RSpec.describe "bundle install with gems on multiple sources" do
end
it "does not re-resolve" do
- bundle :install, :verbose => true
+ bundle! :install, :verbose => true
expect(out).to include("using resolution from the lockfile")
expect(out).not_to include("re-resolving dependencies")
end
@@ -616,4 +616,31 @@ RSpec.describe "bundle install with gems on multiple sources" do
end
end
end
+
+ context "when a gem is available from multiple ambiguous sources", :bundler => "2" do
+ it "raises, suggesting a source block" do
+ build_repo4 do
+ build_gem "depends_on_rack" do |s|
+ s.add_dependency "rack"
+ end
+ build_gem "rack"
+ end
+
+ install_gemfile <<-G
+ source "file://localhost#{gem_repo4}"
+ source "file://localhost#{gem_repo1}" do
+ gem "thin"
+ end
+ gem "depends_on_rack"
+ G
+ expect(last_command).to be_failure
+ expect(last_command.stderr).to eq normalize_uri_file(strip_whitespace(<<-EOS).strip)
+ The gem 'rack' was found in multiple relevant sources.
+ * rubygems repository file://localhost#{gem_repo1}/ or installed locally
+ * rubygems repository file://localhost#{gem_repo4}/ or installed locally
+ You must add this gem to the source block for the source you wish it to be installed from.
+ EOS
+ expect(the_bundle).not_to be_locked
+ end
+ end
end
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb
index 5961bcbfbd..e74c5ffe59 100644
--- a/spec/install/gemfile_spec.rb
+++ b/spec/install/gemfile_spec.rb
@@ -21,6 +21,8 @@ RSpec.describe "bundle install" do
bundle :install, :gemfile => bundled_app("NotGemfile")
+ # Specify BUNDLE_GEMFILE for `the_bundle`
+ # to retrieve the proper Gemfile
ENV["BUNDLE_GEMFILE"] = "NotGemfile"
expect(the_bundle).to include_gems "rack 1.0.0"
end
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index e58f32836c..f581522c71 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -142,15 +142,14 @@ RSpec.describe "bundle install with install-time dependencies" do
expect(out).to_not include("Gem::InstallError: require_ruby requires Ruby version > 9000")
nice_error = strip_whitespace(<<-E).strip
- Bundler could not find compatible versions for gem "ruby\0":
+ Bundler found conflicting requirements for the Ruby\0 version:
In Gemfile:
- ruby\0 (#{error_message_requirement})
+ Ruby\0 (#{error_message_requirement})
require_ruby was resolved to 1.0, which depends on
- ruby\0 (> 9000)
+ Ruby\0 (> 9000)
- Could not find gem 'ruby\0 (> 9000)', which is required by gem 'require_ruby', in any of the relevant sources:
- the local ruby installation
+ Ruby\0 (> 9000), which is required by gem 'require_ruby', is not available in the local ruby installation
E
expect(last_command.bundler_err).to end_with(nice_error)
end
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb
index 431854e6d5..b149d9d00b 100644
--- a/spec/install/gems/standalone_spec.rb
+++ b/spec/install/gems/standalone_spec.rb
@@ -54,7 +54,7 @@ RSpec.shared_examples "bundle install --standalone" do
source "file://#{gem_repo1}"
gem "rails"
G
- bundle! :install, forgotten_command_line_options(:path => "bundle").merge(:standalone => true)
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true)
end
let(:expected_gems) do
@@ -69,14 +69,15 @@ RSpec.shared_examples "bundle install --standalone" do
describe "with gems with native extension" do
before do
- install_gemfile <<-G, forgotten_command_line_options(:path => "bundle").merge(:standalone => true)
+ install_gemfile <<-G, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true)
source "file://#{gem_repo1}"
gem "very_simple_binary"
G
end
it "generates a bundle/bundler/setup.rb with the proper paths", :rubygems => "2.4" do
- extension_line = File.read(bundled_app("bundle/bundler/setup.rb")).each_line.find {|line| line.include? "/extensions/" }.strip
+ expected_path = bundled_app("bundle/bundler/setup.rb")
+ extension_line = File.read(expected_path).each_line.find {|line| line.include? "/extensions/" }.strip
expect(extension_line).to start_with '$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/'
expect(extension_line).to end_with '/very_simple_binary-1.0"'
end
@@ -101,7 +102,7 @@ RSpec.shared_examples "bundle install --standalone" do
end
G
end
- install_gemfile <<-G, forgotten_command_line_options(:path => "bundle").merge(:standalone => true)
+ install_gemfile <<-G, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true)
gem "bar", :git => "#{lib_path("bar-1.0")}"
G
end
@@ -121,7 +122,7 @@ RSpec.shared_examples "bundle install --standalone" do
gem "rails"
gem "devise", :git => "#{lib_path("devise-1.0")}"
G
- bundle! :install, forgotten_command_line_options(:path => "bundle").merge(:standalone => true)
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true)
end
let(:expected_gems) do
@@ -148,7 +149,7 @@ RSpec.shared_examples "bundle install --standalone" do
gem "rack-test"
end
G
- bundle! :install, forgotten_command_line_options(:path => "bundle").merge(:standalone => true)
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true)
end
let(:expected_gems) do
@@ -161,7 +162,7 @@ RSpec.shared_examples "bundle install --standalone" do
include_examples "common functionality"
it "allows creating a standalone file with limited groups" do
- bundle! "install", forgotten_command_line_options(:path => "bundle").merge(:standalone => "default")
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => "default")
Dir.chdir(bundled_app) do
load_error_ruby <<-RUBY, "spec", :no_lib => true
@@ -179,7 +180,7 @@ RSpec.shared_examples "bundle install --standalone" do
end
it "allows --without to limit the groups used in a standalone" do
- bundle! :install, forgotten_command_line_options(:path => "bundle", :without => "test").merge(:standalone => true)
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle"), :without => "test").merge(:standalone => true)
Dir.chdir(bundled_app) do
load_error_ruby <<-RUBY, "spec", :no_lib => true
@@ -196,7 +197,7 @@ RSpec.shared_examples "bundle install --standalone" do
expect(last_command.stderr).to eq("ZOMG LOAD ERROR")
end
- it "allows --path to change the location of the standalone bundle" do
+ it "allows --path to change the location of the standalone bundle", :bundler => "< 2" do
bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true)
Dir.chdir(bundled_app) do
@@ -212,9 +213,26 @@ RSpec.shared_examples "bundle install --standalone" do
expect(last_command.stdout).to eq("2.3.2")
end
+ it "allows --path to change the location of the standalone bundle", :bundler => "2" do
+ bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true)
+ path = File.expand_path("path/to/bundle")
+
+ Dir.chdir(bundled_app) do
+ ruby <<-RUBY, :no_lib => true
+ $:.unshift File.expand_path(#{path.dump})
+ require "bundler/setup"
+
+ require "actionpack"
+ puts ACTIONPACK
+ RUBY
+ end
+
+ expect(last_command.stdout).to eq("2.3.2")
+ end
+
it "allows remembered --without to limit the groups used in a standalone" do
bundle! :install, forgotten_command_line_options(:without => "test")
- bundle! :install, forgotten_command_line_options(:path => "bundle").merge(:standalone => true)
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true)
Dir.chdir(bundled_app) do
load_error_ruby <<-RUBY, "spec", :no_lib => true
@@ -241,7 +259,7 @@ RSpec.shared_examples "bundle install --standalone" do
source "#{source_uri}"
gem "rails"
G
- bundle! :install, forgotten_command_line_options(:path => "bundle").merge(:standalone => true, :artifice => "endpoint")
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :artifice => "endpoint")
end
let(:expected_gems) do
@@ -261,7 +279,7 @@ RSpec.shared_examples "bundle install --standalone" do
source "file://#{gem_repo1}"
gem "rails"
G
- bundle! :install, forgotten_command_line_options(:path => "bundle").merge(:standalone => true, :binstubs => true)
+ bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :binstubs => true)
end
let(:expected_gems) do
@@ -312,9 +330,7 @@ end
RSpec.describe "bundle install --standalone run in a subdirectory" do
before do
- subdir = bundled_app("bob")
- FileUtils.mkdir_p(subdir)
- Dir.chdir(subdir)
+ Dir.chdir(bundled_app("bob").tap(&:mkpath))
end
include_examples("bundle install --standalone")
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index ae94eee9c6..1781451c98 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -52,6 +52,8 @@ RSpec.describe "when using sudo", :sudo => true do
end
it "installs when BUNDLE_PATH is owned by root" do
+ bundle! "config global_path_appends_ruby_scope false" # consistency in tests between 1.x and 2.x modes
+
bundle_path = tmp("owned_by_root")
FileUtils.mkdir_p bundle_path
sudo "chown -R root #{bundle_path}"
@@ -68,6 +70,8 @@ RSpec.describe "when using sudo", :sudo => true do
end
it "installs when BUNDLE_PATH does not exist" do
+ bundle! "config global_path_appends_ruby_scope false" # consistency in tests between 1.x and 2.x modes
+
root_path = tmp("owned_by_root")
FileUtils.mkdir_p root_path
sudo "chown -R root #{root_path}"
diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb
index 666707b295..35f96367f7 100644
--- a/spec/install/gemspecs_spec.rb
+++ b/spec/install/gemspecs_spec.rb
@@ -48,11 +48,11 @@ RSpec.describe "bundle install" do
end
it "does not hang when gemspec has incompatible encoding" do
- create_file "foo.gemspec", <<-G
+ create_file("foo.gemspec", <<-G)
Gem::Specification.new do |gem|
gem.name = "pry-byebug"
gem.version = "3.4.2"
- gem.author = "David Rodriguez"
+ gem.author = "David Rodríguez"
gem.summary = "Good stuff"
end
G
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index 3fce72b78e..5f3fedb862 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -23,7 +23,7 @@ RSpec.describe "bundle install" do
dir.mkpath
Dir.chdir(dir) do
- bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
+ bundle! :install, forgotten_command_line_options(:path => dir.join("vendor/bundle"))
expect(out).to include("installed into `./vendor/bundle`")
end
@@ -49,6 +49,37 @@ RSpec.describe "bundle install" do
expect(vendored_gems("gems/rack-1.0.0")).to be_directory
expect(the_bundle).to include_gems "rack 1.0.0"
end
+
+ context "with path_relative_to_cwd set to true" do
+ before { bundle! "config path_relative_to_cwd true" }
+
+ it "installs the bundle relatively to current working directory", :bundler => "< 2" do
+ Dir.chdir(bundled_app.parent) do
+ bundle! "install --gemfile='#{bundled_app}/Gemfile' --path vendor/bundle"
+ expect(out).to include("installed into `./vendor/bundle`")
+ expect(bundled_app("../vendor/bundle")).to be_directory
+ end
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
+
+ it "installs the standalone bundle relative to the cwd" do
+ Dir.chdir(bundled_app.parent) do
+ bundle! :install, :gemfile => bundled_app("Gemfile"), :standalone => true
+ expect(out).to include("installed into `./bundled_app/bundle`")
+ expect(bundled_app("bundle")).to be_directory
+ expect(bundled_app("bundle/ruby")).to be_directory
+ end
+
+ bundle! "config unset path"
+
+ Dir.chdir(bundled_app("subdir").tap(&:mkpath)) do
+ bundle! :install, :gemfile => bundled_app("Gemfile"), :standalone => true
+ expect(out).to include("installed into `../bundle`")
+ expect(bundled_app("bundle")).to be_directory
+ expect(bundled_app("bundle/ruby")).to be_directory
+ end
+ end
+ end
end
describe "when BUNDLE_PATH or the global path config is set" do
@@ -72,44 +103,82 @@ RSpec.describe "bundle install" do
end
[:env, :global].each do |type|
- it "installs gems to a path if one is specified" do
- set_bundle_path(type, bundled_app("vendor2").to_s)
- bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
+ context "when set via #{type}" do
+ it "installs gems to a path if one is specified" do
+ set_bundle_path(type, bundled_app("vendor2").to_s)
+ bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
+
+ expect(vendored_gems("gems/rack-1.0.0")).to be_directory
+ expect(bundled_app("vendor2")).not_to be_directory
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
- expect(vendored_gems("gems/rack-1.0.0")).to be_directory
- expect(bundled_app("vendor2")).not_to be_directory
- expect(the_bundle).to include_gems "rack 1.0.0"
- end
+ context "with global_path_appends_ruby_scope set", :bundler => "2" do
+ it "installs gems to ." do
+ set_bundle_path(type, ".")
+ bundle! "config --global disable_shared_gems true"
- it "installs gems to ." do
- set_bundle_path(type, ".")
- bundle! "config --global disable_shared_gems true"
+ bundle! :install
- bundle! :install
+ paths_to_exist = %w[cache/rack-1.0.0.gem gems/rack-1.0.0 specifications/rack-1.0.0.gemspec].map {|path| bundled_app(Bundler.ruby_scope, path) }
+ expect(paths_to_exist).to all exist
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
- expect([bundled_app("cache/rack-1.0.0.gem"), bundled_app("gems/rack-1.0.0"), bundled_app("specifications/rack-1.0.0.gemspec")]).to all exist
- expect(the_bundle).to include_gems "rack 1.0.0"
- end
+ it "installs gems to the path" do
+ set_bundle_path(type, bundled_app("vendor").to_s)
- it "installs gems to BUNDLE_PATH with #{type}" do
- set_bundle_path(type, bundled_app("vendor").to_s)
+ bundle! :install
- bundle :install
+ expect(bundled_app("vendor", Bundler.ruby_scope, "gems/rack-1.0.0")).to be_directory
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
- expect(bundled_app("vendor/gems/rack-1.0.0")).to be_directory
- expect(the_bundle).to include_gems "rack 1.0.0"
- end
+ it "installs gems to the path relative to root when relative" do
+ set_bundle_path(type, "vendor")
- it "installs gems to BUNDLE_PATH relative to root when relative" do
- set_bundle_path(type, "vendor")
+ FileUtils.mkdir_p bundled_app("lol")
+ Dir.chdir(bundled_app("lol")) do
+ bundle! :install
+ end
- FileUtils.mkdir_p bundled_app("lol")
- Dir.chdir(bundled_app("lol")) do
- bundle :install
+ expect(bundled_app("vendor", Bundler.ruby_scope, "gems/rack-1.0.0")).to be_directory
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
end
- expect(bundled_app("vendor/gems/rack-1.0.0")).to be_directory
- expect(the_bundle).to include_gems "rack 1.0.0"
+ context "with global_path_appends_ruby_scope unset", :bundler => "< 2" do
+ it "installs gems to ." do
+ set_bundle_path(type, ".")
+ bundle! "config --global disable_shared_gems true"
+
+ bundle! :install
+
+ expect([bundled_app("cache/rack-1.0.0.gem"), bundled_app("gems/rack-1.0.0"), bundled_app("specifications/rack-1.0.0.gemspec")]).to all exist
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
+
+ it "installs gems to BUNDLE_PATH with #{type}" do
+ set_bundle_path(type, bundled_app("vendor").to_s)
+
+ bundle :install
+
+ expect(bundled_app("vendor/gems/rack-1.0.0")).to be_directory
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
+
+ it "installs gems to BUNDLE_PATH relative to root when relative" do
+ set_bundle_path(type, "vendor")
+
+ FileUtils.mkdir_p bundled_app("lol")
+ Dir.chdir(bundled_app("lol")) do
+ bundle :install
+ end
+
+ expect(bundled_app("vendor/gems/rack-1.0.0")).to be_directory
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
+ end
end
end
@@ -170,7 +239,7 @@ RSpec.describe "bundle install" do
describe "to a file" do
before do
in_app_root do
- `touch /tmp/idontexist bundle`
+ FileUtils.touch "bundle"
end
end
@@ -181,7 +250,7 @@ RSpec.describe "bundle install" do
G
bundle :install, forgotten_command_line_options(:path => "bundle")
- expect(out).to match(/file already exists/)
+ expect(out).to include("file already exists")
end
end
end
diff --git a/spec/plugins/hook_spec.rb b/spec/plugins/hook_spec.rb
index 8bdf61a8ab..53062095e2 100644
--- a/spec/plugins/hook_spec.rb
+++ b/spec/plugins/hook_spec.rb
@@ -1,27 +1,109 @@
# frozen_string_literal: true
RSpec.describe "hook plugins" do
- before do
- build_repo2 do
- build_plugin "before-install-plugin" do |s|
- s.write "plugins.rb", <<-RUBY
- Bundler::Plugin::API.hook "before-install-all" do |deps|
- puts "gems to be installed \#{deps.map(&:name).join(", ")}"
- end
- RUBY
+ context "before-install-all hook" do
+ before do
+ build_repo2 do
+ build_plugin "before-install-all-plugin" do |s|
+ s.write "plugins.rb", <<-RUBY
+ Bundler::Plugin::API.hook Bundler::Plugin::Events::GEM_BEFORE_INSTALL_ALL do |deps|
+ puts "gems to be installed \#{deps.map(&:name).join(", ")}"
+ end
+ RUBY
+ end
end
+
+ bundle "plugin install before-install-all-plugin --source file://#{gem_repo2}"
+ end
+
+ it "runs before all rubygems are installed" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rake"
+ gem "rack"
+ G
+
+ expect(out).to include "gems to be installed rake, rack"
+ end
+ end
+
+ context "before-install hook" do
+ before do
+ build_repo2 do
+ build_plugin "before-install-plugin" do |s|
+ s.write "plugins.rb", <<-RUBY
+ Bundler::Plugin::API.hook Bundler::Plugin::Events::GEM_BEFORE_INSTALL do |spec_install|
+ puts "installing gem \#{spec_install.name}"
+ end
+ RUBY
+ end
+ end
+
+ bundle "plugin install before-install-plugin --source file://#{gem_repo2}"
+ end
+
+ it "runs before each rubygem is installed" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rake"
+ gem "rack"
+ G
+
+ expect(out).to include "installing gem rake"
+ expect(out).to include "installing gem rack"
end
+ end
+
+ context "after-install-all hook" do
+ before do
+ build_repo2 do
+ build_plugin "after-install-all-plugin" do |s|
+ s.write "plugins.rb", <<-RUBY
+ Bundler::Plugin::API.hook Bundler::Plugin::Events::GEM_AFTER_INSTALL_ALL do |deps|
+ puts "installed gems \#{deps.map(&:name).join(", ")}"
+ end
+ RUBY
+ end
+ end
+
+ bundle "plugin install after-install-all-plugin --source file://#{gem_repo2}"
+ end
+
+ it "runs after each rubygem is installed" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rake"
+ gem "rack"
+ G
- bundle "plugin install before-install-plugin --source file://#{gem_repo2}"
+ expect(out).to include "installed gems rake, rack"
+ end
end
- it "runs after a rubygem is installed" do
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rake"
- gem "rack"
- G
+ context "after-install hook" do
+ before do
+ build_repo2 do
+ build_plugin "after-install-plugin" do |s|
+ s.write "plugins.rb", <<-RUBY
+ Bundler::Plugin::API.hook Bundler::Plugin::Events::GEM_AFTER_INSTALL do |spec_install|
+ puts "installed gem \#{spec_install.name} : \#{spec_install.state}"
+ end
+ RUBY
+ end
+ end
+
+ bundle "plugin install after-install-plugin --source file://#{gem_repo2}"
+ end
+
+ it "runs after each rubygem is installed" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rake"
+ gem "rack"
+ G
- expect(out).to include "gems to be installed rake, rack"
+ expect(out).to include "installed gem rake : installed"
+ expect(out).to include "installed gem rack : installed"
+ end
end
end
diff --git a/spec/plugins/list_spec.rb b/spec/plugins/list_spec.rb
new file mode 100644
index 0000000000..9b09f74498
--- /dev/null
+++ b/spec/plugins/list_spec.rb
@@ -0,0 +1,70 @@
+# frozen_string_literal: true
+
+RSpec.describe "bundler plugin list" do
+ before do
+ build_repo2 do
+ build_plugin "foo" do |s|
+ s.write "plugins.rb", <<-RUBY
+ class Foo < Bundler::Plugin::API
+ command "shout"
+
+ def exec(command, args)
+ puts "Foo shout"
+ end
+ end
+ RUBY
+ end
+ build_plugin "bar" do |s|
+ s.write "plugins.rb", <<-RUBY
+ class Bar < Bundler::Plugin::API
+ command "scream"
+
+ def exec(command, args)
+ puts "Bar scream"
+ end
+ end
+ RUBY
+ end
+ end
+ end
+
+ context "no plugins installed" do
+ it "shows proper no plugins installed message" do
+ bundle "plugin list"
+
+ expect(out).to include("No plugins installed")
+ end
+ end
+
+ context "single plugin installed" do
+ it "shows plugin name with commands list" do
+ bundle "plugin install foo --source file://#{gem_repo2}"
+ plugin_should_be_installed("foo")
+ bundle "plugin list"
+
+ expected_output = "foo\n-----\n shout"
+ expect(out).to include(expected_output)
+ end
+ end
+
+ context "multiple plugins installed" do
+ it "shows plugin names with commands list" do
+ bundle "plugin install foo bar --source file://#{gem_repo2}"
+ plugin_should_be_installed("foo", "bar")
+ bundle "plugin list"
+
+ if RUBY_VERSION < "1.9"
+ # Bundler::Plugin::Index#installed_plugins is keys of Hash,
+ # and Hash is not ordered in prior to Ruby 1.9.
+ # So, foo and bar plugins are not always listed in that order.
+ expected_output1 = "foo\n-----\n shout"
+ expect(out).to include(expected_output1)
+ expected_output2 = "bar\n-----\n scream"
+ expect(out).to include(expected_output2)
+ else
+ expected_output = "foo\n-----\n shout\n\nbar\n-----\n scream"
+ expect(out).to include(expected_output)
+ end
+ end
+ end
+end
diff --git a/spec/quality_es_spec.rb b/spec/quality_es_spec.rb
new file mode 100644
index 0000000000..20df9912a3
--- /dev/null
+++ b/spec/quality_es_spec.rb
@@ -0,0 +1,79 @@
+# encoding: utf-8
+# frozen_string_literal: true
+
+if defined?(Encoding) && Encoding.default_external.name != "UTF-8"
+ # An approximation of ruby -E UTF-8, since it works on 1.8.7
+ Encoding.default_external = Encoding.find("UTF-8")
+end
+
+RSpec.describe "La biblioteca si misma" do
+ def check_for_expendable_words(filename)
+ failing_line_message = []
+ useless_words = %w[
+ básicamente
+ claramente
+ sólo
+ solamente
+ obvio
+ obviamente
+ fácil
+ fácilmente
+ sencillamente
+ simplemente
+ ]
+ pattern = /\b#{Regexp.union(useless_words)}\b/i
+
+ File.readlines(filename).each_with_index do |line, number|
+ next unless word_found = pattern.match(line)
+ failing_line_message << "#{filename}:#{number.succ} contiene '#{word_found}'. Esta palabra tiene un significado subjetivo y es mejor obviarla en textos técnicos."
+ end
+
+ failing_line_message unless failing_line_message.empty?
+ end
+
+ def check_for_specific_pronouns(filename)
+ failing_line_message = []
+ specific_pronouns = /\b(él|ella|ellos|ellas)\b/i
+
+ File.readlines(filename).each_with_index do |line, number|
+ next unless word_found = specific_pronouns.match(line)
+ failing_line_message << "#{filename}:#{number.succ} contiene '#{word_found}'. Use pronombres más genéricos en la documentación."
+ end
+
+ failing_line_message unless failing_line_message.empty?
+ end
+
+ RSpec::Matchers.define :be_well_formed do
+ match(&:empty?)
+
+ failure_message do |actual|
+ actual.join("\n")
+ end
+ end
+
+ it "mantiene la calidad de lenguaje de la documentación" do
+ included = /ronn/
+ error_messages = []
+ Dir.chdir(root) do
+ `git ls-files -z -- man`.split("\x0").each do |filename|
+ next unless filename =~ included
+ error_messages << check_for_expendable_words(filename)
+ error_messages << check_for_specific_pronouns(filename)
+ end
+ end
+ expect(error_messages.compact).to be_well_formed
+ end
+
+ it "mantiene la calidad de lenguaje de oraciones usadas en el código fuente" do
+ error_messages = []
+ exempt = /vendor/
+ Dir.chdir(root) do
+ `git ls-files -z -- lib`.split("\x0").each do |filename|
+ next if filename =~ exempt
+ error_messages << check_for_expendable_words(filename)
+ error_messages << check_for_specific_pronouns(filename)
+ end
+ end
+ expect(error_messages.compact).to be_well_formed
+ end
+end
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index 067e9c4901..f8aec009ef 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
if defined?(Encoding) && Encoding.default_external.name != "UTF-8"
- # Poor man's ruby -E UTF-8, since it works on 1.8.7
+ # An approximation of ruby -E UTF-8, since it works on 1.8.7
Encoding.default_external = Encoding.find("UTF-8")
end
@@ -169,20 +169,21 @@ RSpec.describe "The library itself" do
it "documents all used settings" do
exemptions = %w[
+ auto_config_jobs
cache_command_is_package
console_command
- default_cli_command
deployment_means_frozen
forget_cli_options
gem.coc
gem.mit
inline
lockfile_uses_separate_rubygems_sources
- warned_version
+ use_gem_version_promoter_for_major_updates
+ viz_command
]
all_settings = Hash.new {|h, k| h[k] = [] }
- documented_settings = exemptions
+ documented_settings = []
Bundler::Settings::BOOL_KEYS.each {|k| all_settings[k] << "in Bundler::Settings::BOOL_KEYS" }
Bundler::Settings::NUMBER_KEYS.each {|k| all_settings[k] << "in Bundler::Settings::NUMBER_KEYS" }
@@ -198,8 +199,14 @@ RSpec.describe "The library itself" do
documented_settings = File.read("man/bundle-config.ronn")[/LIST OF AVAILABLE KEYS.*/m].scan(/^\* `#{key_pattern}`/).flatten
end
- documented_settings.each {|s| all_settings.delete(s) }
- exemptions.each {|s| all_settings.delete(s) }
+ documented_settings.each do |s|
+ all_settings.delete(s)
+ expect(exemptions.delete(s)).to be_nil, "setting #{s} was exempted but was actually documented"
+ end
+
+ exemptions.each do |s|
+ expect(all_settings.delete(s)).to be_truthy, "setting #{s} was exempted but unused"
+ end
error_messages = all_settings.map do |setting, refs|
"The `#{setting}` setting is undocumented\n\t- #{refs.join("\n\t- ")}\n"
end
@@ -214,7 +221,7 @@ RSpec.describe "The library itself" do
begin
gem_command! :build, "bundler.gemspec"
if Bundler.rubygems.provides?(">= 2.4")
- # there's no way aroudn this warning
+ # there's no way around this warning
last_command.stderr.sub!(/^YAML safe loading.*/, "")
# older rubygems have weird warnings, and we won't actually be using them
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
index c023f5d7aa..9f92303447 100644
--- a/spec/resolver/basic_spec.rb
+++ b/spec/resolver/basic_spec.rb
@@ -35,7 +35,7 @@ RSpec.describe "Resolving" do
should_resolve_as %w[berkshelf-2.0.7 chef-10.26 chef_app-1.0.0 json-1.7.7]
end
- it "prefers expicitly requested dependencies when resolving an index which would otherwise be ambiguous" do
+ it "prefers explicitly requested dependencies when resolving an index which would otherwise be ambiguous" do
@index = an_ambiguous_index
dep "a"
dep "b"
@@ -169,10 +169,10 @@ Bundler could not find compatible versions for gem "a":
s.required_ruby_version = "~> 2.0.0"
end
- gem "ruby\0", "1.8.7"
+ gem "Ruby\0", "1.8.7"
end
dep "foo"
- dep "ruby\0", "1.8.7"
+ dep "Ruby\0", "1.8.7"
deps = []
@deps.each do |d|
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 1979ede829..7fec55c4c3 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -159,10 +159,6 @@ RSpec.describe "Bundler.setup" do
load_path = clean_load_path(out.split("\n"))
- unless Bundler.load.specs["bundler"].empty?
- load_path.delete_if {|path| path =~ /bundler/ }
- end
-
expect(load_path).to start_with(
"/gems/rails-2.3.2/lib",
"/gems/activeresource-2.3.2/lib",
@@ -831,7 +827,7 @@ end
it "should clean $LOAD_PATH properly" do
gem_name = "very_simple_binary"
full_gem_name = gem_name + "-1.0"
- ext_dir = File.join(tmp "extenstions", full_gem_name)
+ ext_dir = File.join(tmp("extenstions", full_gem_name))
install_gem full_gem_name
@@ -885,7 +881,7 @@ end
end
end
- it "should succesfully require 'bundler/setup'" do
+ it "should successfully require 'bundler/setup'" do
install_gemfile ""
ENV["GEM_PATH"] = symlinked_gem_home.path
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 90a88fac5b..56094b72f5 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -126,6 +126,10 @@ RSpec.configure do |config|
c.syntax = :expect
end
+ config.mock_with :rspec do |mocks|
+ mocks.allow_message_expectations_on_nil = false
+ end
+
config.before :all do
build_repo1
end
diff --git a/spec/support/artifice/compact_index.rb b/spec/support/artifice/compact_index.rb
index 01e8eb7837..38559e2e23 100644
--- a/spec/support/artifice/compact_index.rb
+++ b/spec/support/artifice/compact_index.rb
@@ -82,7 +82,7 @@ class CompactIndexAPI < Endpoint
CompactIndex::Dependency.new(d.name, reqs)
end
checksum = begin
- Digest::SHA256.file("#{GEM_REPO}/gems/#{spec.original_name}.gem").base64digest
+ Digest(:SHA256).file("#{GEM_REPO}/gems/#{spec.original_name}.gem").base64digest
rescue
nil
end
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 64c3f5cc7b..fa32b12b65 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -190,6 +190,7 @@ module Spec
end
build_gem "very_simple_binary", &:add_c_extension
+ build_gem "simple_binary", &:add_c_extension
build_gem "bundler", "0.9" do |s|
s.executables = "bundle"
@@ -652,6 +653,7 @@ module Spec
`git add *`
`git config user.email "lol@wut.com"`
`git config user.name "lolwut"`
+ `git config commit.gpgsign false`
`git commit -m 'OMG INITIAL COMMIT'`
end
end
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb
index 69f8d9f679..b76f493d01 100644
--- a/spec/support/indexes.rb
+++ b/spec/support/indexes.rb
@@ -77,7 +77,7 @@ module Spec
gem "rack-mount", %w[0.4 0.5 0.5.1 0.5.2 0.6]
# --- Pre-release support
- gem "rubygems\0", ["1.3.2"]
+ gem "RubyGems\0", ["1.3.2"]
# --- Rails
versions "1.2.3 2.2.3 2.3.5 3.0.0.beta 3.0.0.beta1" do |version|
@@ -414,7 +414,7 @@ module Spec
gem("b", %w[0.9.0 1.5.0 2.0.0.pre])
# --- Pre-release support
- gem "rubygems\0", ["1.3.2"]
+ gem "RubyGems\0", ["1.3.2"]
end
end
end
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index 0244927bdc..8e17be3a02 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -238,5 +238,9 @@ module Spec
def lockfile_should_be(expected)
expect(bundled_app("Gemfile.lock")).to read_as(normalize_uri_file(strip_whitespace(expected)))
end
+
+ def gemfile_should_be(expected)
+ expect(bundled_app("Gemfile")).to read_as(strip_whitespace(expected))
+ end
end
end
diff --git a/spec/update/gemfile_spec.rb b/spec/update/gemfile_spec.rb
new file mode 100644
index 0000000000..f59f3a2d32
--- /dev/null
+++ b/spec/update/gemfile_spec.rb
@@ -0,0 +1,66 @@
+# frozen_string_literal: true
+
+RSpec.describe "bundle update" do
+ context "with --gemfile" do
+ it "finds the gemfile" do
+ gemfile bundled_app("NotGemfile"), <<-G
+ source "file://#{gem_repo1}"
+ gem 'rack'
+ G
+
+ bundle! :install, :gemfile => bundled_app("NotGemfile")
+ bundle! :update, :gemfile => bundled_app("NotGemfile"), :all => bundle_update_requires_all?
+
+ # Specify BUNDLE_GEMFILE for `the_bundle`
+ # to retrieve the proper Gemfile
+ ENV["BUNDLE_GEMFILE"] = "NotGemfile"
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
+ end
+
+ context "with gemfile set via config" do
+ before do
+ gemfile bundled_app("NotGemfile"), <<-G
+ source "file://#{gem_repo1}"
+ gem 'rack'
+ G
+
+ bundle "config --local gemfile #{bundled_app("NotGemfile")}"
+ bundle! :install
+ end
+
+ it "uses the gemfile to update" do
+ bundle! "update", :all => bundle_update_requires_all?
+ bundle "list"
+
+ expect(out).to include("rack (1.0.0)")
+ end
+
+ it "uses the gemfile while in a subdirectory" do
+ bundled_app("subdir").mkpath
+ Dir.chdir(bundled_app("subdir")) do
+ bundle! "update", :all => bundle_update_requires_all?
+ bundle "list"
+
+ expect(out).to include("rack (1.0.0)")
+ end
+ end
+ end
+
+ context "with prefer_gems_rb set" do
+ before { bundle! "config prefer_gems_rb true" }
+
+ it "prefers gems.rb to Gemfile" do
+ create_file("gems.rb", "gem 'bundler'")
+ create_file("Gemfile", "raise 'wrong Gemfile!'")
+
+ bundle! :install
+ bundle! :update, :all => bundle_update_requires_all?
+
+ expect(bundled_app("gems.rb")).to be_file
+ expect(bundled_app("Gemfile.lock")).not_to be_file
+
+ expect(the_bundle).to include_gem "bundler #{Bundler::VERSION}"
+ end
+ end
+end
diff --git a/task/build_metadata.rake b/task/build_metadata.rake
index e06a795259..f899562b46 100644
--- a/task/build_metadata.rake
+++ b/task/build_metadata.rake
@@ -4,7 +4,7 @@ def write_build_metadata(build_metadata)
build_metadata_file = "lib/bundler/build_metadata.rb"
ivars = build_metadata.sort.map do |k, v|
- " @#{k} = #{BUNDLER_SPEC.send(:ruby_code, v)}"
+ " @#{k} = #{bundler_spec.send(:ruby_code, v)}"
end.join("\n")
contents = File.read(build_metadata_file)
@@ -14,7 +14,7 @@ end
task :build_metadata do
build_metadata = {
- :built_at => BUNDLER_SPEC.date.utc.strftime("%Y-%m-%d"),
+ :built_at => bundler_spec.date.utc.strftime("%Y-%m-%d"),
:git_commit_sha => `git rev-parse --short HEAD`.strip,
:release => Rake::Task["release"].instance_variable_get(:@already_invoked),
}
diff --git a/task/release.rake b/task/release.rake
index 42c120fecd..e90eec0bef 100644
--- a/task/release.rake
+++ b/task/release.rake
@@ -1,14 +1,10 @@
# frozen_string_literal: true
require "bundler/gem_tasks"
-
task :build => ["build_metadata", "man:build", "generate_files"] do
Rake::Task["build_metadata:clean"].tap(&:reenable).real_invoke
end
-
-["man:require", "release:verify_github"].reverse_each do |task|
- Rake::Task["release"].prerequisites.unshift(task)
-end
+task :release => ["man:require", "man:build", "release:verify_github", "build_metadata"]
namespace :release do
def gh_api_post(opts)
@@ -38,17 +34,15 @@ namespace :release do
if response.code.to_i >= 400
raise "#{uri}\n#{response.inspect}\n#{begin
JSON.parse(response.body)
- rescue
+ rescue JSON::ParseError
response.body
end}"
end
JSON.parse(response.body)
- rescue => e
- puts "GitHub request error! Make sure your .netrc for api.github.com is valid.\n\n"
- raise e
end
task :verify_github do
+ require "pp"
gh_api_post :path => "/user"
end
@@ -86,12 +80,12 @@ namespace :release do
def release_notes(version)
title_token = "## "
- current_verison_title = "#{title_token}#{version}"
+ current_version_title = "#{title_token}#{version}"
current_minor_title = "#{title_token}#{version.segments[0, 2].join(".")}"
text = File.open("CHANGELOG.md", "r:UTF-8", &:read)
lines = text.split("\n")
- current_version_index = lines.find_index {|line| line.strip =~ /^#{current_verison_title}($|\b)/ }
+ current_version_index = lines.find_index {|line| line.strip =~ /^#{current_version_title}($|\b)/ }
unless current_version_index
raise "Update the changelog for the last version (#{version})"
end
@@ -129,7 +123,7 @@ namespace :release do
version = args.version
version ||= begin
- version = BUNDLER_SPEC.version
+ version = bundler_spec.version
segments = version.segments
if segments.last.is_a?(String)
segments << "1"
@@ -139,7 +133,7 @@ namespace :release do
segments.join(".")
end
- confirm "You are about to release #{version}, currently #{BUNDLER_SPEC.version}"
+ confirm "You are about to release #{version}, currently #{bundler_spec.version}"
milestones = gh_api_request(:path => "repos/bundler/bundler/milestones?state=open")
unless patch_milestone = milestones.find {|m| m["title"] == version }
@@ -153,7 +147,7 @@ namespace :release do
end
prs.compact!
- BUNDLER_SPEC.version = version
+ bundler_spec.version = version
branch = version.split(".", 3)[0, 2].push("stable").join("-")
sh("git", "checkout", branch)