diff options
98 files changed, 1931 insertions, 1196 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f411b8e11d..6658ae4bb9 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,18 @@ 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/quality_es_spec.rb' + # Offense count: 1 # Configuration parameters: SupportedStyles. # SupportedStyles: annotated, template @@ -245,12 +268,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 +284,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 +306,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 +314,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 +325,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 +334,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 +358,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 +372,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 73fbc19e3c..543df2bcda 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 @@ -29,13 +26,9 @@ addons: secure: "TrzIv116JLGUxm6PAUskCYrv8KTDguncKROVwbnjVPKTGDAgoDderd8JUdDEXrKoZ9qGLD2TPYKExt9/QDl71E+qHdWnVqWv4HKCUk2P9z/VLKzHuggOUBkCXiJUhjywUieCJhI3N92bfq2EjSBbu2/OFHqWOjLQ+QCooTEBjv8=" rvm: - - 2.4.1 - - 2.3.4 - - 2.2.7 - - 2.1.10 - - 2.0.0 - - 1.9.3 - - 1.8.7 + - 2.5.0 + - 2.4.3 + - 2.3.6 # Rubygems versions MUST be available as rake tasks # see Rakefile:125 for the list of possible RGV values @@ -43,86 +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.6.8 + - RGV=v2.7.4 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 + - rvm: 2.4.2 + env: RGV=v2.6.14 # Ruby 2.3, Rubygems 2.5.1 and up - - rvm: 2.2.6 + - rvm: 2.3.5 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 - - # 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.5 + 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.4.2 + env: RGV=v2.7.4 BUNDLER_SPEC_SUB_VERSION=1.98 + - rvm: 1.8.7 + env: RGV=v2.7.4 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 3aff6a5532..22dd5f53db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,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) @@ -33,10 +33,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) @@ -50,51 +50,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) @@ -102,7 +102,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) @@ -113,24 +113,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) @@ -141,7 +141,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) @@ -151,32 +151,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: @@ -190,95 +190,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) @@ -286,17 +286,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) @@ -309,31 +309,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) @@ -341,28 +341,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) @@ -375,12 +375,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: @@ -390,8 +390,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) @@ -402,32 +402,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) @@ -438,9 +438,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) @@ -450,9 +450,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: @@ -460,14 +460,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) @@ -475,18 +475,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) @@ -496,17 +496,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) @@ -517,16 +517,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) @@ -536,7 +536,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) @@ -548,11 +548,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) @@ -560,13 +560,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) @@ -577,80 +577,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) @@ -660,16 +660,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) @@ -681,12 +681,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: @@ -694,36 +694,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) @@ -734,8 +734,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) @@ -746,9 +746,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) @@ -765,24 +765,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) @@ -792,54 +792,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: @@ -855,65 +855,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) @@ -922,7 +922,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) @@ -935,8 +935,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": @@ -953,20 +953,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) @@ -979,44 +979,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) @@ -1026,7 +1026,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: @@ -1036,7 +1036,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) @@ -1071,66 +1071,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) @@ -1142,17 +1142,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) @@ -1210,15 +1210,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) @@ -1228,30 +1228,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: @@ -1262,15 +1262,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) @@ -1281,13 +1281,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: @@ -1297,7 +1297,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) @@ -1342,19 +1342,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 @@ -1363,10 +1363,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) @@ -1378,56 +1378,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) @@ -1503,28 +1503,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. @@ -1532,7 +1532,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) @@ -1556,7 +1556,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: @@ -1589,7 +1589,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) @@ -1597,15 +1597,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) @@ -1616,7 +1616,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) @@ -1629,12 +1629,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 @@ -1656,9 +1656,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) @@ -1702,41 +1702,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) @@ -1747,28 +1747,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 @@ -1782,23 +1782,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) @@ -1808,8 +1808,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: @@ -1831,10 +1831,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) @@ -1846,7 +1846,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 @@ -1861,64 +1861,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) @@ -1931,75 +1931,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) @@ -2067,7 +2067,7 @@ Bugfixes: Features: - - Add platform :maglev (@timfel, #1444) + - Add platform :maglev (@timfel, [#1444](https://github.com/bundler/bundler/issues/1444)) Bugfixes: @@ -2078,73 +2078,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) @@ -2272,7 +2272,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: @@ -2604,18 +2604,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) @@ -2640,14 +2640,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) @@ -2658,7 +2658,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 @@ -2680,7 +2680,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: @@ -2689,9 +2689,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) @@ -2706,7 +2706,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) @@ -2748,12 +2748,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) @@ -2761,23 +2761,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 @@ -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) @@ -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] + 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] (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 6cd542c95a..cb1cb7fff3 100644 --- a/bundler.gemspec +++ b/bundler.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.authors = [ "André Arko", "Samuel Giddins", "Chris Morris", "James Wen", "Tim Moore", "André Medeiros", "Jessica Lynn Suttles", "Terence Lee", "Carl Lerche", - "Yehuda Katz" + "Yehuda Katz", "Colby Swandale", "Hiroshi Shibata" ] s.email = ["team@bundler.io"] s.homepage = "http://bundler.io" @@ -42,7 +42,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/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/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/SETUP.md b/doc/development/SETUP.md index cebe925c1b..a05f9861a1 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 homebrew/dupes/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/lib/bundler.rb b/lib/bundler.rb index bef2caabcf..63ae335ac6 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -136,7 +136,7 @@ module Bundler end end - def frozen? + def frozen_bundle? frozen = settings[:deployment] frozen ||= settings[:frozen] unless feature_flag.deployment_means_frozen? frozen @@ -193,8 +193,26 @@ module Bundler 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 @@ -209,10 +227,6 @@ module Bundler bundle_path.join("specifications") end - def user_cache - user_bundle_path.join("cache") - end - def root @root ||= begin SharedHelpers.root diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 86796a7358..33796ea9a6 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -287,6 +287,7 @@ 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 "paths", :type => :boolean, :banner => "print the path to each gem in the bundle" def list require "bundler/cli/list" List.new(options).run @@ -352,9 +353,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)" @@ -438,11 +440,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) @@ -487,20 +486,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) @@ -719,6 +721,8 @@ module Bundler command_name = current_command.name return if PARSEABLE_COMMANDS.include?(command_name) + return unless SharedHelpers.md5_available? + latest = Fetcher::CompactIndex. new(nil, Source::Rubygems::Remote.new(URI("https://rubygems.org")), nil). send(:compact_index_client). diff --git a/lib/bundler/cli/check.rb b/lib/bundler/cli/check.rb index e572787dc4..19c0aaea06 100644 --- a/lib/bundler/cli/check.rb +++ b/lib/bundler/cli/check.rb @@ -26,7 +26,7 @@ module Bundler not_installed.each {|s| Bundler.ui.error " * #{s.name} (#{s.version})" } Bundler.ui.warn "Install missing gems with `bundle install`" exit 1 - elsif !Bundler.default_lockfile.file? && Bundler.frozen? + elsif !Bundler.default_lockfile.file? && Bundler.frozen_bundle? Bundler.ui.error "This bundle has been frozen, but there is no #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} present" exit 1 else 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/gem.rb b/lib/bundler/cli/gem.rb index 885578e819..ebfaf75b8c 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -105,7 +105,7 @@ module Bundler if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?", "This means that any other developer or company will be legally allowed to use your code " \ "for free as long as they admit you created it. You can read more about the MIT license " \ - "at http://choosealicense.com/licenses/mit.") + "at https://choosealicense.com/licenses/mit.") config[:mit] = true Bundler.ui.info "MIT License enabled in config" templates.merge!("LICENSE.txt.tt" => "LICENSE.txt") @@ -118,7 +118,7 @@ module Bundler "of enforcing it, so be sure that you are prepared to do that. Be sure that your email " \ "address is specified as a contact in the generated code of conduct so that people know " \ "who to contact in case of a violation. For suggestions about " \ - "how to enforce codes of conduct, see http://bit.ly/coc-enforcement.") + "how to enforce codes of conduct, see https://bit.ly/coc-enforcement.") config[:coc] = true Bundler.ui.info "Code of conduct enabled in config" templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md") diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb index fa53e7c74b..40df797269 100644 --- a/lib/bundler/cli/init.rb +++ b/lib/bundler/cli/init.rb @@ -13,6 +13,11 @@ module Bundler exit 1 end + unless File.writable?(Dir.pwd) + Bundler.ui.error "Can not create #{gemfile} as the current directory is not writable." + exit 1 + end + if options[:gemspec] gemspec = File.expand_path(options[:gemspec]) unless File.exist?(gemspec) diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index f0b821ed84..b40e5f0e9e 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -23,7 +23,7 @@ module Bundler check_trust_policy - if options[:deployment] || options[:frozen] || Bundler.frozen? + if options[:deployment] || options[:frozen] || Bundler.frozen_bundle? unless Bundler.default_lockfile.exist? flag = "--deployment flag" if options[:deployment] flag ||= "--frozen flag" if options[:frozen] @@ -63,7 +63,7 @@ module Bundler definition.validate_runtime! installer = Installer.install(Bundler.root, definition, options) - Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen? + Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle? Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}." Bundler::CLI::Common.output_without_groups_message @@ -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..c92f05df07 100644 --- a/lib/bundler/cli/list.rb +++ b/lib/bundler/cli/list.rb @@ -8,7 +8,10 @@ module Bundler def run specs = Bundler.load.specs.reject {|s| s.name == "bundler" }.sort_by(&:name) + + raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options["paths"] 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"] return Bundler.ui.info "No gems in the Gemfile" if specs.empty? Bundler.ui.info "Gems included by the bundle:" diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 5125cc710b..e230163c68 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 & @@ -118,7 +118,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 @@ -213,7 +213,7 @@ module Bundler end def check_for_deployment_mode - return unless Bundler.frozen? + return unless Bundler.frozen_bundle? suggested_command = if Bundler.settings.locations("frozen")[:global] "bundle config --delete frozen" elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any? 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/compact_index_client/updater.rb b/lib/bundler/compact_index_client/updater.rb index 3a4e4441ca..950306fee5 100644 --- a/lib/bundler/compact_index_client/updater.rb +++ b/lib/bundler/compact_index_client/updater.rb @@ -78,6 +78,13 @@ module Bundler update(local_path, remote_path, :retrying) end + rescue Errno::EACCES + raise Bundler::PermissionError, + "Bundler does not have write access to create a temp directory " \ + "within #{Dir.tmpdir}. Bundler must have write access to your " \ + "systems temp directory to function properly. " + rescue Zlib::GzipFile::Error + raise Bundler::HTTPError end def etag_for(path) diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb index 31532d108d..220d638b87 100644 --- a/lib/bundler/current_ruby.rb +++ b/lib/bundler/current_ruby.rb @@ -18,6 +18,7 @@ module Bundler 2.3 2.4 2.5 + 2.6 ].freeze KNOWN_MAJOR_VERSIONS = KNOWN_MINOR_VERSIONS.map {|v| v.split(".", 2).first }.uniq.freeze diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index ad16389dae..b30ae81623 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, @@ -113,7 +112,7 @@ module Bundler end @unlocking ||= @unlock[:ruby] ||= (!@locked_ruby_version ^ !@ruby_version) - add_current_platform unless Bundler.frozen? + add_current_platform unless Bundler.frozen_bundle? converge_path_sources_to_gemspec_sources @path_changes = converge_paths @@ -124,25 +123,25 @@ module Bundler @unlock[:gems] = @locked_specs.for(eager_unlock).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! @@ -213,7 +212,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 @@ -245,7 +244,7 @@ module Bundler def resolve @resolve ||= begin last_resolve = converge_locked_specs - if Bundler.frozen? + if Bundler.frozen_bundle? Bundler.ui.debug "Frozen, using resolution from the lockfile" last_resolve elsif !unlocking? && nothing_changed? @@ -336,10 +335,10 @@ module Bundler end end - preserve_unknown_sections ||= !updating_major && (Bundler.frozen? || !(unlocking? || @unlocking_bundler)) + preserve_unknown_sections ||= !updating_major && (Bundler.frozen_bundle? || !(unlocking? || @unlocking_bundler)) return if lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections) - if Bundler.frozen? + if Bundler.frozen_bundle? Bundler.ui.error "Cannot write a changed lockfile while frozen." return end @@ -682,7 +681,7 @@ module Bundler end def converge_dependencies - frozen = Bundler.frozen? + frozen = Bundler.frozen_bundle? (@dependencies + @locked_deps.values).each do |dep| locked_source = @locked_deps[dep.name] # This is to make sure that if bundler is installing in deployment mode and diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 8681163277..37bfe36740 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -347,9 +347,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/feature_flag.rb b/lib/bundler/feature_flag.rb index 6a1809cd40..f7bb5d1cf8 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? } @@ -43,6 +44,7 @@ module Bundler 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 +54,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/friendly_errors.rb b/lib/bundler/friendly_errors.rb index f624185773..ae3299a7c8 100644 --- a/lib/bundler/friendly_errors.rb +++ b/lib/bundler/friendly_errors.rb @@ -45,6 +45,8 @@ module Bundler "Alternatively, you can increase the amount of memory the JVM is able to use by running Bundler with jruby -J-Xmx1024m -S bundle (JRuby defaults to 500MB)." else request_issue_report_for(error) end + rescue + raise error end def exit_status(error) diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 1d7fc508d5..3458a2adda 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 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,41 @@ 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] + outbuf, status = sh_with_code(cmd, &block) + [outbuf, (status && status.exitstatus) || -1] + end + + 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 52b5386045..8d412c2cc0 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 @@ -61,7 +63,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 @@ -75,7 +77,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 @@ -104,7 +106,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 7fe6a91ddd..ea563e3d25 100644 --- a/lib/bundler/injector.rb +++ b/lib/bundler/injector.rb @@ -13,7 +13,7 @@ module Bundler end def inject(gemfile_path, lockfile_path) - if Bundler.frozen? + if Bundler.frozen_bundle? # ensure the lock and Gemfile are synced Bundler.definition.ensure_equivalent_gemfile_and_lockfile(true) end diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index d1066c9c19..5082a6bffe 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -70,7 +70,7 @@ module Bundler create_bundle_path ProcessLock.lock do - if Bundler.frozen? + if Bundler.frozen_bundle? @definition.ensure_equivalent_gemfile_and_lockfile(options[:deployment]) end @@ -90,7 +90,7 @@ module Bundler end install(options) - lock unless Bundler.frozen? + lock unless Bundler.frozen_bundle? Standalone.new(options[:standalone], @definition).generate if options[:standalone] end end @@ -184,14 +184,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 + 1 end def load_plugins diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb index 95d9575c44..e6e81fddff 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,7 +150,7 @@ 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 @@ -218,6 +219,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/plugin.rb b/lib/bundler/plugin.rb index 99c9a867b0..f7e6093fa5 100644 --- a/lib/bundler/plugin.rb +++ b/lib/bundler/plugin.rb @@ -46,6 +46,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 # @@ -80,8 +100,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 +116,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 diff --git a/lib/bundler/plugin/index.rb b/lib/bundler/plugin/index.rb index 8dde072f16..f5c2baf431 100644 --- a/lib/bundler/plugin/index.rb +++ b/lib/bundler/plugin/index.rb @@ -95,6 +95,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 052d776183..d7911c1de2 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) @@ -135,7 +139,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) @@ -324,7 +328,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 @@ -368,5 +372,29 @@ module Bundler :version_for_spec => lambda {|spec| spec.version } ) 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/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/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 0f16b6231d..2d70eae7dc 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -570,8 +570,10 @@ module Bundler @replaced_methods.each do |(sym, klass), method| redefine_method(klass, sym, method) end - post_reset_hooks.reject! do |proc| - proc.binding.eval("__FILE__") == __FILE__ + if Binding.public_method_defined?(:source_location) + post_reset_hooks.reject! {|proc| proc.binding.source_location == __FILE__ } + else + post_reset_hooks.reject! {|proc| proc.binding.eval("__FILE__") == __FILE__ } end @replaced_methods.clear end diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb index f27597b854..acaae3cedf 100644 --- a/lib/bundler/runtime.rb +++ b/lib/bundler/runtime.rb @@ -10,7 +10,7 @@ module Bundler end def setup(*groups) - @definition.ensure_equivalent_gemfile_and_lockfile if Bundler.frozen? + @definition.ensure_equivalent_gemfile_and_lockfile if Bundler.frozen_bundle? groups.map!(&:to_sym) @@ -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..75e2d4dff2 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 @@ -42,6 +43,7 @@ module Bundler no_install no_prune only_update_to_newer_versions + path_relative_to_cwd path.system plugins prefer_gems_rb @@ -53,9 +55,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 @@ -246,6 +251,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 +393,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/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 3cf22a50f1..72dbc0c588 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] @@ -138,6 +144,8 @@ module Bundler bin_path = Bundler.system_bindir end + Bundler.mkdir_p bin_path unless spec.executables.empty? || Bundler.rubygems.provides?(">= 2.7.5") + installed_spec = nil Bundler.rubygems.preserve_paths do installed_spec = Bundler::RubyGemsGemInstaller.at( diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 7cd3021997..4674936d39 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 @@ -61,7 +62,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..f441eab5f2 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 9a87a1374a..97da2b14d8 100644 --- a/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -1,7 +1,7 @@ <%- if RUBY_VERSION < "2.0.0" -%> # coding: utf-8 -<%- end -%> +<%- end -%> lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "<%= config[:namespaced_path] %>/version" @@ -28,8 +28,8 @@ Gem::Specification.new do |spec| "public gem pushes." end - spec.files = `git ls-files -z`.split("\x0").reject do |f| - f.match(%r{^(test|spec|features)/}) + spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb index 3b3b6bfb53..fdf073ffb8 100644 --- a/lib/bundler/ui/shell.rb +++ b/lib/bundler/ui/shell.rb @@ -109,7 +109,7 @@ module Bundler end def tell_err(message, color = nil, newline = nil) - newline = message.to_s !~ /( |\t)\Z/ unless newline + newline ||= message.to_s !~ /( |\t)\Z/ message = word_wrap(message) if newline.is_a?(Hash) && newline[:wrap] color = nil if color && !$stderr.tty? diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb index 87b648681a..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.1" unless defined?(::Bundler::VERSION) + VERSION = "2.0.0.dev" unless defined?(::Bundler::VERSION) def self.overwrite_loaded_gem_version begin diff --git a/man/bundle-binstubs.ronn b/man/bundle-binstubs.ronn index b5f76433c5..550c0f6d66 100644 --- a/man/bundle-binstubs.ronn +++ b/man/bundle-binstubs.ronn @@ -7,7 +7,7 @@ bundle-binstubs(1) -- Install the binstubs of the listed gems ## DESCRIPTION -Binstubs are scripts that wrap aroung executables. Bundler creates a +Binstubs are scripts that wrap around executables. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it into `bin/`. Binstubs are a shortcut-or alternative- to always using `bundle exec`. This gives you a file that can by run @@ -34,10 +34,10 @@ Calling binstubs with [GEM [GEM]] will create binstubs for all given gems. Makes binstubs that can work without depending on Rubygems or Bundler at runtime. -* `--sheband`: +* `--shebang`: Specify a different shebang executable name than the default (default 'ruby') ## BUNDLE INSTALL --BINSTUBS To create binstubs for all the gems in the bundle you can use the `--binstubs` -flag in [bundle install(1)][bundle-install]. +flag in [bundle install(1)][bundle-install(1)]. diff --git a/man/bundle-check.ronn b/man/bundle-check.ronn index b299da422f..f2846b8ff2 100644 --- a/man/bundle-check.ronn +++ b/man/bundle-check.ronn @@ -18,9 +18,9 @@ If not, the first missing gem is listed and Bundler exits status 1. ## OPTIONS * `--dry-run`: - Locks the `Gemfile(5)` before running the command. + Locks the [`Gemfile(5)`][Gemfile(5)] before running the command. * `--gemfile`: - Use the specified gemfile instead of the `Gemfile(5)` + Use the specified gemfile instead of the [`Gemfile(5)`][Gemfile(5)]. * `--path`: - Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). + Specify a different path than the system default (`$BUNDLE_PATH` or `$GEM_HOME`). Bundler will remember this value for future installs on this machine. diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn index f1f3062aea..88ad827313 100644 --- a/man/bundle-config.ronn +++ b/man/bundle-config.ronn @@ -98,11 +98,11 @@ After running this command, every time bundler needs to install the Configuration keys in bundler have two forms: the canonical form and the environment variable form. -For instance, passing the `--without` flag to [bundle install(1)][bundle-install] +For instance, passing the `--without` flag to [bundle install(1)][bundle-install(1)] prevents Bundler from installing certain groups specified in the Gemfile(5). Bundler persists this value in `app/.bundle/config` so that calls to `Bundler.setup` do not try to find gems from the `Gemfile` that you didn't install. Additionally, -subsequent calls to [bundle install(1)][bundle-install] remember this setting +subsequent calls to [bundle install(1)][bundle-install(1)] remember this setting and skip those groups. The canonical form of this configuration is `"without"`. To convert the canonical @@ -116,7 +116,7 @@ the environment variable `BUNDLE_LOCAL__RACK`. ## LIST OF AVAILABLE KEYS The following is a list of all configuration keys and their purpose. You can -learn more about their operation in [bundle install(1)][bundle-install]. +learn more about their operation in [bundle install(1)][bundle-install(1)]. * `allow_bundler_dependency_conflicts` (`BUNDLE_ALLOW_BUNDLER_DEPENDENCY_CONFLICTS`): Allow resolving to specifications that have dependencies on `bundler` that @@ -218,6 +218,8 @@ learn more about their operation in [bundle install(1)][bundle-install]. 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`) @@ -277,7 +279,7 @@ learn more about their operation in [bundle install(1)][bundle-install]. A `:`-separated list of groups whose gems bundler should not install. In general, you should set these settings per-application by using the applicable -flag to the [bundle install(1)][bundle-install] or [bundle package(1)][bundle-package] command. +flag to the [bundle install(1)][bundle-install(1)] or [bundle package(1)][bundle-package(1)] command. You can set them globally either via environment variables or `bundle config`, whichever is preferable for your setup. If you use both, environment variables diff --git a/man/bundle-exec.ronn b/man/bundle-exec.ronn index bd6e36d981..7b63cc7b47 100644 --- a/man/bundle-exec.ronn +++ b/man/bundle-exec.ronn @@ -8,11 +8,11 @@ bundle-exec(1) -- Execute a command in the context of the bundle ## DESCRIPTION This command executes the command, making all gems specified in the -`Gemfile(5)` available to `require` in Ruby programs. +[`Gemfile(5)`][Gemfile(5)] available to `require` in Ruby programs. Essentially, if you would normally have run something like `rspec spec/my_spec.rb`, and you want to use the gems specified -in the `Gemfile(5)` and installed via [bundle install(1)][bundle-install], you +in the [`Gemfile(5)`][Gemfile(5)] and installed via [bundle install(1)][bundle-install(1)], you should run `bundle exec rspec spec/my_spec.rb`. Note that `bundle exec` does not require that an executable is @@ -27,7 +27,7 @@ available on your shell's `$PATH`. ## BUNDLE INSTALL --BINSTUBS -If you use the `--binstubs` flag in [bundle install(1)][bundle-install], Bundler will +If you use the `--binstubs` flag in [bundle install(1)][bundle-install(1)], Bundler will automatically create a directory (which defaults to `app_root/bin`) containing all of the executables available from gems in the bundle. diff --git a/man/bundle-gem.ronn b/man/bundle-gem.ronn index f7e648c7fd..0002f05c40 100644 --- a/man/bundle-gem.ronn +++ b/man/bundle-gem.ronn @@ -75,4 +75,4 @@ configuration file using the following names: ## SEE ALSO -* [bundle-config](http://bundler.io/v1.14/bundle_config.html) +* [bundle config(1)][bundle-config(1)] diff --git a/man/bundle-init.ronn b/man/bundle-init.ronn index e5dfd420e9..781a25b1a2 100644 --- a/man/bundle-init.ronn +++ b/man/bundle-init.ronn @@ -7,12 +7,12 @@ bundle-init(1) -- Generates a Gemfile into the current working directory ## DESCRIPTION -Init generates a default `Gemfile(5)` in the current working directory. When -adding a `Gemfile(5)` to a gem with a gemspec, the `--gemspec` option will +Init generates a default [`Gemfile(5)`][Gemfile(5)] in the current working directory. When +adding a [`Gemfile(5)`][Gemfile(5)] to a gem with a gemspec, the `--gemspec` option will automatically add each dependency listed in the gemspec file to the newly -created `Gemfile(5)`. +created [`Gemfile(5)`][Gemfile(5)]. ## OPTIONS * `--gemspec`: - Use the specified .gemspec to create the `Gemfile(5)` + Use the specified .gemspec to create the [`Gemfile(5)`][Gemfile(5)] diff --git a/man/bundle-inject.ronn b/man/bundle-inject.ronn index 02f5dd8bd2..f454341896 100644 --- a/man/bundle-inject.ronn +++ b/man/bundle-inject.ronn @@ -8,9 +8,9 @@ bundle-inject(1) -- Add named gem(s) with version requirements to Gemfile ## DESCRIPTION Adds the named gem(s) with their version requirements to the resolved -`Gemfile(5)`. +[`Gemfile(5)`][Gemfile(5)]. -This command will add the gem to both your `Gemfile(5)` and Gemfile.lock if it +This command will add the gem to both your [`Gemfile(5)`][Gemfile(5)] and Gemfile.lock if it isn't listed yet. Example: @@ -19,4 +19,4 @@ Example: bundle inject 'rack' '> 0' This will inject the 'rack' gem with a version greater than 0 in your -`Gemfile(5)` and Gemfile.lock +[`Gemfile(5)`][Gemfile(5)] and Gemfile.lock diff --git a/man/bundle-install.ronn b/man/bundle-install.ronn index de081b4139..59e5adcd58 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 @@ -361,7 +366,7 @@ which other gems in the Gemfile(5) still depend on, run `Summary`: In general, after making a change to the Gemfile(5) , you should first try to run `bundle install`, which will guarantee that no other gem in the Gemfile(5) is impacted by the change. If that -does not work, run [bundle update(1)][bundle-update]. +does not work, run [bundle update(1)][bundle-update(1)]. ## SEE ALSO diff --git a/man/bundle-list.ronn b/man/bundle-list.ronn index 79fcfff701..b7a9d3f786 100644 --- a/man/bundle-list.ronn +++ b/man/bundle-list.ronn @@ -13,3 +13,5 @@ Prints a list of all the gems in the bundle including their version. * `--name-only`: Print only the name of each gem. +* `--paths`: + Print the path to each gem in the bundle. diff --git a/man/bundle-lock.ronn b/man/bundle-lock.ronn index 31ecd3c877..951194715f 100644 --- a/man/bundle-lock.ronn +++ b/man/bundle-lock.ronn @@ -91,4 +91,4 @@ For a full explanation of gem platforms, see `gem help platform`. ## PATCH LEVEL OPTIONS -See [bundle update(1)][bundle-update] for details. +See [bundle update(1)][bundle-update(1)] for details. diff --git a/man/bundle-outdated.ronn b/man/bundle-outdated.ronn index 7eacad5dc0..76baa3d755 100644 --- a/man/bundle-outdated.ronn +++ b/man/bundle-outdated.ronn @@ -69,7 +69,7 @@ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1. ## PATCH LEVEL OPTIONS -See [bundle update(1)][bundle-update] for details. +See [bundle update(1)][bundle-update(1)] for details. One difference between the patch level options in `bundle update` and here is the `--strict` option. `--strict` was already an option on outdated before the patch level options were added. `--strict` diff --git a/man/bundle-package.ronn b/man/bundle-package.ronn index 78bbd88c4b..e2d83c092f 100644 --- a/man/bundle-package.ronn +++ b/man/bundle-package.ronn @@ -27,8 +27,8 @@ in your local bundler configuration. ## REMOTE FETCHING -By default, if you run [bundle install(1)][bundle-install] after running -[bundle package(1)][bundle-package], bundler will still connect to `rubygems.org` +By default, if you run `bundle install(1)`][bundle-install(1)] after running +[bundle package(1)][bundle-package(1)], bundler will still connect to `rubygems.org` to check whether a platform-specific gem exists for any of the gems in `vendor/cache`. @@ -66,7 +66,7 @@ machine and check in the gems. For instance, you can run staging process, and check in the `vendor/cache` before deploying to production. -By default, [bundle package(1)][bundle-package] fetches and also +By default, [bundle package(1)][bundle-package(1)] fetches and also installs the gems to the default location. To package the dependencies to `vendor/cache` without installing them to the local install location, you can run `bundle package --no-install`. diff --git a/man/bundle-show.ronn b/man/bundle-show.ronn index 714b6067aa..a333a44e5d 100644 --- a/man/bundle-show.ronn +++ b/man/bundle-show.ronn @@ -9,7 +9,7 @@ bundle-show(1) -- Shows all the gems in your bundle, or the path to a gem ## DESCRIPTION Without the [GEM] option, `show` will print a list of the names and versions of -all gems that are required by your `Gemfile(5)`. +all gems that are required by your [`Gemfile(5)`][Gemfile(5)]. Calling show with [GEM] will list the exact location of that gem on your machine. @@ -17,4 +17,4 @@ machine. ## OPTIONS * `--paths`: - List the paths of all gems that are required by your `Gemfile(5)`. + List the paths of all gems that are required by your [`Gemfile(5)`][Gemfile(5)]. diff --git a/man/bundle-update.ronn b/man/bundle-update.ronn index b29965985b..413a446c60 100644 --- a/man/bundle-update.ronn +++ b/man/bundle-update.ronn @@ -20,7 +20,7 @@ bundle-update(1) -- Update your gems to the latest available versions Update the gems specified (all gems, if none are specified), ignoring the previously installed gems specified in the `Gemfile.lock`. In -general, you should use [bundle install(1)][bundle-install] to install the same exact +general, you should use [bundle install(1)][bundle-install(1)] to install the same exact gems and versions across machines. You would use `bundle update` to explicitly update the version of a @@ -91,7 +91,7 @@ Consider the following Gemfile(5): gem "rails", "3.0.0.rc" gem "nokogiri" -When you run [bundle install(1)][bundle-install] the first time, bundler will resolve +When you run [bundle install(1)][bundle-install(1)] the first time, bundler will resolve all of the dependencies, all the way down, and install what you need: Fetching gem metadata from https://rubygems.org/......... @@ -128,11 +128,11 @@ all of the dependencies, all the way down, and install what you need: As you can see, even though you have two gems in the Gemfile(5), your application needs 26 different gems in order to run. Bundler remembers the exact versions -it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install], bundler skips +it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install(1)], bundler skips the dependency resolution and installs the same gems as it installed last time. After checking in the `Gemfile.lock` into version control and cloning it on another -machine, running [bundle install(1)][bundle-install] will _still_ install the gems that you installed +machine, running [bundle install(1)][bundle-install(1)] will _still_ install the gems that you installed last time. You don't need to worry that a new release of `erubis` or `mail` changes the gems you use. @@ -192,12 +192,12 @@ update all dependencies of that gem, including those that are also dependencies of another gem. To prevent updating shared dependencies, prior to version 1.14 the only option -was the `CONSERVATIVE UPDATING` behavior in [bundle install(1)][bundle-install]: +was the `CONSERVATIVE UPDATING` behavior in [bundle install(1)][bundle-install(1)]: In this scenario, updating the `thin` version manually in the Gemfile(5), -and then running [bundle install(1)][bundle-install] will only update `daemons` and `eventmachine`, +and then running [bundle install(1)][bundle-install(1)] will only update `daemons` and `eventmachine`, but not `rack`. For more information, see the `CONSERVATIVE UPDATING` section -of [bundle install(1)][bundle-install]. +of [bundle install(1)][bundle-install(1)]. Starting with 1.14, specifying the `--conservative` option will also prevent shared dependencies from being updated. @@ -335,7 +335,7 @@ use the following workflow: $ git add Gemfile.lock -* If [bundle install(1)][bundle-install] reports a conflict, manually update the specific +* If [bundle install(1)][bundle-install(1)] reports a conflict, manually update the specific gems that you changed in the Gemfile(5) $ bundle update rails thin diff --git a/man/bundle-viz.ronn b/man/bundle-viz.ronn index f43faab635..762558c184 100644 --- a/man/bundle-viz.ronn +++ b/man/bundle-viz.ronn @@ -14,7 +14,7 @@ bundle-viz(1) -- Generates a visual dependency graph for your Gemfile `viz` generates a PNG file of the current `Gemfile(5)` as a dependency graph. `viz` requires the ruby-graphviz gem (and its dependencies). -The associated gems must also be installed via `bundle install(1)`. +The associated gems must also be installed via [`bundle install(1)`][bundle-install(1)]. ## OPTIONS diff --git a/man/bundle.ronn b/man/bundle.ronn index 01a3018413..60cb54a9b9 100644 --- a/man/bundle.ronn +++ b/man/bundle.ronn @@ -30,20 +30,20 @@ We divide `bundle` subcommands into primary commands and utilities. ## PRIMARY COMMANDS -* [`bundle install(1)`][bundle-install]: +* [`bundle install(1)`][bundle-install(1)]: Install the gems specified by the `Gemfile` or `Gemfile.lock` -* [`bundle update(1)`][bundle-update]: +* [`bundle update(1)`][bundle-update(1)]: Update dependencies to their latest versions -* [`bundle package(1)`][bundle-package]: +* [`bundle package(1)`][bundle-package(1)]: Package the .gem files required by your application into the `vendor/cache` directory -* [`bundle exec(1)`][bundle-exec]: +* [`bundle exec(1)`][bundle-exec(1)]: Execute a script in the context of the current bundle -* [`bundle config(1)`][bundle-config]: +* [`bundle config(1)`][bundle-config(1)]: Specify and read configuration options for bundler * `bundle help(1)`: @@ -51,44 +51,44 @@ We divide `bundle` subcommands into primary commands and utilities. ## UTILITIES -* `bundle add(1)`: +* [`bundle add(1)`][bundle-add(1)]: Add the named gem to the Gemfile and run `bundle install` -* `bundle binstubs(1)`: +* [`bundle binstubs(1)`][bundle-binstubs(1)]: Generate binstubs for executables in a gem -* `bundle check(1)`: +* [`bundle check(1)`][bundle-check(1)]: Determine whether the requirements for your application are installed and available to bundler -* `bundle show(1)`: +* [`bundle show(1)`][bundle-show(1)]: Show the source location of a particular gem in the bundle -* [`bundle outdated(1)`][bundle-outdated]: +* [`bundle outdated(1)`][bundle-outdated(1)]: Show all of the outdated gems in the current bundle * `bundle console(1)`: Start an IRB session in the context of the current bundle -* `bundle open(1)`: +* [`bundle open(1)`][bundle-open(1)]: Open an installed gem in the editor * [`bundle lock(1)`][bundle-lock]: Generate a lockfile for your dependencies -* `bundle viz(1)`: +* [`bundle viz(1)`][bundle-viz(1)]: Generate a visual representation of your dependencies -* `bundle init(1)`: +* [`bundle init(1)`][bundle-init(1)]: Generate a simple `Gemfile`, placed in the current directory -* [`bundle gem(1)`][bundle-gem]: +* [`bundle gem(1)`][bundle-gem(1)]: Create a simple gem, suitable for development with bundler -* [`bundle platform(1)`][bundle-platform]: +* [`bundle platform(1)`][bundle-platform(1)]: Display platform compatibility information -* `bundle clean(1)`: +* [`bundle clean(1)`][bundle-clean(1)]: Clean up unused gems in your bundler directory * `bundle doctor(1)`: diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn index 9baa7f8e3e..9f6bbce93a 100644 --- a/man/gemfile.5.ronn +++ b/man/gemfile.5.ronn @@ -35,7 +35,7 @@ this warning, by using the [`:source` option](#SOURCE) or a ### CREDENTIALS -Some gem sources require a username and password. Use [bundle config(1)][bundle-config] to set +Some gem sources require a username and password. Use [bundle config(1)][bundle-config(1)] to set the username and password for any of the sources that need it. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control. @@ -228,7 +228,7 @@ As with groups, you can specify one or more platforms: gem "ruby-debug", :platforms => :mri_18 gem "nokogiri", :platforms => [:mri_18, :jruby] -All operations involving groups (`bundle install`, `Bundler.setup`, +All operations involving groups ([`bundle install`][bundle-install(1)], `Bundler.setup`, `Bundler.require`) behave exactly the same as if any groups not matching the current platform were explicitly excluded. @@ -465,7 +465,7 @@ software is installed or some other conditions are met. ## GEMSPEC -The [.gemspec](http://guides.rubygems.org/specification-reference/) file is where +The [`.gemspec`](http://guides.rubygems.org/specification-reference/) file is where you provide metadata about your gem to Rubygems. Some required Gemspec attributes include the name, description, and homepage of your gem. This is also where you specify the dependencies your gem needs to run. diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb index 19e3f0336f..94d4096cd3 100644 --- a/spec/bundler/bundler_spec.rb +++ b/spec/bundler/bundler_spec.rb @@ -227,4 +227,62 @@ EOF expect(Bundler.tmp_home_path("USER", "")).to eq(Pathname("/TMP/bundler/home/USER")) 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/compact_index_client/updater_spec.rb b/spec/bundler/compact_index_client/updater_spec.rb index 3c4f212b60..fd554a7b0d 100644 --- a/spec/bundler/compact_index_client/updater_spec.rb +++ b/spec/bundler/compact_index_client/updater_spec.rb @@ -5,16 +5,16 @@ require "bundler/compact_index_client" require "bundler/compact_index_client/updater" RSpec.describe Bundler::CompactIndexClient::Updater do - subject(:updater) { described_class.new(fetcher) } - let(:fetcher) { double(:fetcher) } + let(:local_path) { Pathname("/tmp/localpath") } + let(:remote_path) { double(:remote_path) } + + subject(:updater) { described_class.new(fetcher) } context "when the ETag header is missing" do # Regression test for https://github.com/bundler/bundler/issues/5463 let(:response) { double(:response, :body => "") } - let(:local_path) { Pathname("/tmp/localpath") } - let(:remote_path) { double(:remote_path) } it "MisMatchedChecksumError is raised" do # Twice: #update retries on failure @@ -27,4 +27,29 @@ RSpec.describe Bundler::CompactIndexClient::Updater do end.to raise_error(Bundler::CompactIndexClient::Updater::MisMatchedChecksumError) end end + + context "when the download is corrupt" do + let(:response) { double(:response, :body => "") } + + it "raises HTTPError" do + expect(response).to receive(:[]).with("Content-Encoding") { "gzip" } + expect(fetcher).to receive(:call) { response } + + expect do + updater.update(local_path, remote_path) + end.to raise_error(Bundler::HTTPError) + end + end + + context "when bundler doesn't have permissions on Dir.tmpdir" do + let(:response) { double(:response, :body => "") } + + it "Errno::EACCES is raised" do + allow(Dir).to receive(:mktmpdir) { raise Errno::EACCES } + + expect do + updater.update(local_path, remote_path) + end.to raise_error(Bundler::PermissionError) + end + end end diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb index 3ca0dc0f79..2ed87ec81d 100644 --- a/spec/bundler/definition_spec.rb +++ b/spec/bundler/definition_spec.rb @@ -74,7 +74,7 @@ RSpec.describe Bundler::Definition do build_lib "foo", "1.0", :path => lib_path("foo") install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "foo", :path => "#{lib_path("foo")}" G @@ -87,7 +87,7 @@ RSpec.describe Bundler::Definition do expect(out).to match(/re-resolving dependencies/) lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -152,7 +152,7 @@ RSpec.describe Bundler::Definition do end install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "foo", :path => "#{lib_path("foo")}" G @@ -161,7 +161,7 @@ RSpec.describe Bundler::Definition do expect(out).to match(/using resolution from the lockfile/) lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) diff --git a/spec/bundler/plugin_spec.rb b/spec/bundler/plugin_spec.rb index 9796b580a3..68a7e32ad1 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" } } 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/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 24ee03ec3c..8157173b42 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -86,7 +86,8 @@ RSpec.describe "bundle binstubs <gem>" do build_repo2 do build_gem "prints_loaded_gems", "1.0" do |s| s.executables = "print_loaded_gems" - s.write "bin/print_loaded_gems", <<-R + s.bindir = "exe" + s.write "exe/print_loaded_gems", <<-R specs = Gem.loaded_specs.values.reject {|s| Bundler.rubygems.spec_default_gem?(s) } puts specs.map(&:full_name).sort.inspect R 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/exec_spec.rb b/spec/commands/exec_spec.rb index af88f3f043..8a53ff67f0 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -784,9 +784,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/init_spec.rb b/spec/commands/init_spec.rb index c1cd7b90c8..9b5bd95814 100644 --- a/spec/commands/init_spec.rb +++ b/spec/commands/init_spec.rb @@ -64,6 +64,24 @@ RSpec.describe "bundle init" do end end + context "when the dir is not writable by the current user" do + let(:subdir) { "child_dir" } + + it "notifies the user that it can not write to it" do + FileUtils.mkdir bundled_app(subdir) + # chmod a-w it + mode = File.stat(bundled_app(subdir)).mode ^ 0o222 + FileUtils.chmod mode, bundled_app(subdir) + + Dir.chdir bundled_app(subdir) do + bundle :init + end + + expect(out).to include("directory is not writable") + expect(Dir[bundled_app("#{subdir}/*")]).to be_empty + end + end + context "when a gems.rb file exists in a parent directory", :bundler => ">= 2" do let(:subdir) { "child_dir" } diff --git a/spec/commands/list_spec.rb b/spec/commands/list_spec.rb index 0ea70f015c..4ebe934ca7 100644 --- a/spec/commands/list_spec.rb +++ b/spec/commands/list_spec.rb @@ -8,6 +8,13 @@ RSpec.describe "bundle list", :bundler => "2" do 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 name-only option" do it "prints only the name of the gems in the bundle" do bundle "list --name-only" @@ -15,6 +22,39 @@ RSpec.describe "bundle list", :bundler => "2" do 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 + context "when no gems are in the gemfile" do before do install_gemfile <<-G diff --git a/spec/commands/lock_spec.rb b/spec/commands/lock_spec.rb index 01337d27ce..b08cc865b1 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 diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 1a3e8236b6..f4642787cb 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -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 include("class Error < StandardError") + 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..877e648f5d 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") 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/failure_spec.rb b/spec/install/failure_spec.rb index 896138c659..44006be52e 100644 --- a/spec/install/failure_spec.rb +++ b/spec/install/failure_spec.rb @@ -28,5 +28,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/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index 8ba3ec2d27..2cadc61161 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 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/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb index f8b40f8e4e..37d2e4958a 100644 --- a/spec/install/gems/flex_spec.rb +++ b/spec/install/gems/flex_spec.rb @@ -277,25 +277,25 @@ RSpec.describe "bundle flex_install" do it "updates the lockfile", :bundler => "2" do build_repo2 install_gemfile! <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G install_gemfile! <<-G - source "file://#{gem_repo1}" - source "file://#{gem_repo2}" do + source "file://localhost#{gem_repo1}" + source "file://localhost#{gem_repo2}" do end gem "rack" G lockfile_should_be <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: PLATFORMS 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/path_spec.rb b/spec/install/path_spec.rb index fb356899a6..467e95ec57 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 diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb index a953847bac..53a93845c2 100644 --- a/spec/install/post_bundle_message_spec.rb +++ b/spec/install/post_bundle_message_spec.rb @@ -103,7 +103,7 @@ RSpec.describe "post bundle message" do describe "with misspelled or non-existent gem name" do it "should report a helpful error message", :bundler => "< 2" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" gem "not-a-gem", :group => :development G @@ -112,25 +112,25 @@ RSpec.describe "post bundle message" do it "should report a helpful error message", :bundler => "2" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" gem "not-a-gem", :group => :development G expect(out).to include <<-EOS.strip -Could not find gem 'not-a-gem' in rubygems repository file:#{gem_repo1}/ or installed locally. +Could not find gem 'not-a-gem' in rubygems repository file://localhost#{gem_repo1}/ or installed locally. The source does not contain any versions of 'not-a-gem' EOS end it "should report a helpful error message with reference to cache if available" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G bundle :cache expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" gem "not-a-gem", :group => :development G diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb index b4bf81ded2..5be77de7ef 100644 --- a/spec/lock/lockfile_spec.rb +++ b/spec/lock/lockfile_spec.rb @@ -7,14 +7,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "generates a simple lockfile for a single source, gem" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -37,7 +37,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do specs: GEM - remote: file://#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -53,14 +53,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -80,7 +80,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -95,14 +95,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -120,7 +120,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "updates the lockfile's bundler version if not present" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -132,14 +132,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack", "> 0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -157,7 +157,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "outputs a warning if the current is older than lockfile's bundler version" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -173,7 +173,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do simulate_bundler_version "9999999.0.0" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G @@ -185,7 +185,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -203,7 +203,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "errors if the current is a major version older than lockfile's bundler version" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -218,7 +218,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G @@ -268,7 +268,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "warns when updating bundler major version" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -284,7 +284,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do simulate_bundler_version "9999999.0.0" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G @@ -295,7 +295,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -312,14 +312,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "generates a simple lockfile for a single source, gem with dependencies" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -338,14 +338,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "generates a simple lockfile for a single source, gem with a version requirement" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama", ">= 1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -403,13 +403,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "generates lockfiles with multiple requirements" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "net-sftp" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: net-sftp (1.1.1) net-ssh (>= 1.0.0, < 1.99.0) @@ -488,7 +488,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do build_lib "omg", :path => lib_path("omg") gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" platforms :#{not_local_tag} do gem "omg", :path => "#{lib_path("omg")}" @@ -504,7 +504,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do specs: GEM - remote: file://#{gem_repo1}/ + remote: file://localhost#{gem_repo1}// specs: rack (1.0.0) @@ -675,7 +675,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do bar = build_git "bar" install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "foo", :path => "#{lib_path("foo-1.0")}" @@ -684,7 +684,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -714,7 +714,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "lists gems alphabetically" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "thin" gem "actionpack" @@ -723,7 +723,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: actionpack (2.3.2) activesupport (= 2.3.2) @@ -749,14 +749,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "orders dependencies' dependencies in alphabetical order" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rails" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: actionmailer (2.3.2) activesupport (= 2.3.2) @@ -788,13 +788,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "orders dependencies by version" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem 'double_deps' G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: double_deps (1.0) net-ssh @@ -814,14 +814,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add the :require option to the lockfile" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama", ">= 1.0", :require => "rack/obama" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -840,14 +840,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add the :group option to the lockfile" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama", ">= 1.0", :group => :test G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -981,7 +981,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "keeps existing platforms in the lockfile" do lockfile <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -996,14 +996,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do G install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1028,13 +1028,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do simulate_platform "universal-java-16" install_gemfile! <<-G - source "file://#{gem_repo2}" + source "file://localhost#{gem_repo2}" gem "platform_specific" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: platform_specific (1.0-java) platform_specific (1.0-universal-java-16) @@ -1053,19 +1053,19 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate gems" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "activesupport" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: activesupport (2.3.5) rack (1.0.0) @@ -1084,14 +1084,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate dependencies" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1108,14 +1108,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate dependencies with versions" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "1.0" gem "rack", "1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1132,14 +1132,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate dependencies in different groups" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "1.0", :group => :one gem "rack", "1.0", :group => :two G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1156,7 +1156,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "raises if two different versions are used" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "1.0" gem "rack", "1.1" G @@ -1167,7 +1167,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "raises if two different sources are used" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "rack", :git => "git://hubz.com" G @@ -1178,13 +1178,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "works correctly with multiple version dependencies" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "> 0.9", "< 1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (0.9.1) @@ -1201,14 +1201,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "captures the Ruby version in the lockfile" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" ruby '#{RUBY_VERSION}' gem "rack", "> 0.9", "< 1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (0.9.1) @@ -1237,7 +1237,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do revision = revision_for(lib_path("omg")) gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "omg", :git => "#{lib_path("omg")}", :branch => 'master' G @@ -1247,7 +1247,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do # Create a Gemfile.lock that has duplicate GIT sections lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: GIT @@ -1281,7 +1281,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do # Confirm that duplicate specs do not appear expect(File.read(bundled_app("Gemfile.lock"))).to eq(strip_whitespace(<<-L)) GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: GIT @@ -1305,7 +1305,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "raises a helpful error message when the lockfile is missing deps" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack_middleware (1.0) @@ -1317,7 +1317,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile <<-G - source "file:#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack_middleware" G @@ -1334,7 +1334,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "file://localhost#{gem_repo2}" gem "rack" G set_lockfile_mtime_to_known_value @@ -1396,7 +1396,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "refuses to install if Gemfile.lock contains conflict markers" do lockfile <<-L GEM - remote: file://#{gem_repo1}/ + remote: file://localhost#{gem_repo1}// specs: <<<<<<< rack (1.0.0) @@ -1415,7 +1415,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile(<<-G) - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G 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 623d092644..c829243a9f 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" diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index d758232723..e84cdaabf5 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -827,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 diff --git a/spec/support/artifice/compact_index.rb b/spec/support/artifice/compact_index.rb index 123efe3c58..434307576f 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 377ca35523..c2ab183fdf 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -182,6 +182,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" 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 de543b84d7..abf7bb340a 100644 --- a/task/release.rake +++ b/task/release.rake @@ -80,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 @@ -123,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" @@ -133,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 } @@ -147,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) |