Permalink
Switch branches/tags
Commits on Jun 23, 2017
  1. Auto merge of #5800 - bundler:seg-bundler-2-specs, r=segiddins

    [2.0] Update the specs to pass under Bundler 2
    
    ### What was the end-user problem that led to this PR?
    
    The problem was we have all these _amazing_ Bundler 2.0 features hidden behind feature flags. But we weren't testing all of bundler in that 2.0 mode.
    
    ### Was was your diagnosis of the problem?
    
    My diagnosis was we needed to get the bundler 2 specs running, and passing!
    
    ### What is your fix for the problem, implemented in this PR?
    
    My fix is to add a travis build entry to change `version.rb` to a 2.0 version and run the tests!
    
    ### Why did you choose this fix out of the possible options?
    
    I chose this fix because it will completely imitate what happens once we change the version on `master`, and by keeping the test suite passing on both 1.0 and 2.0 modes, we'll be in a position to release a 1.16 to which we'll be able to (relatively easily) backport fixes that land after master switches to completely target 2.0.
    bundlerbot committed Jun 23, 2017
  2. Auto merge of #5813 - bundler:add-slackin-to-readme, r=indirect

    Add Slack badge to README
    
    This PR adds the Slackin badge to the readme, which will make it easier to discover for people who want to get involved.
    bundlerbot committed Jun 23, 2017
  3. [Definition] Avoid a group_by when not running a new resolve

    segiddins committed Jun 23, 2017
  4. Update the version spec to handle when the specs start in the day bef…

    …ore that example is run
    segiddins committed Jun 23, 2017
  5. Improve realworld specs on 2.0

    segiddins committed Jun 22, 2017
  6. Add Slack badge to README

    andremedeiros committed Jun 23, 2017
  7. Auto merge of #5809 - bundler:seg-config-converted-value, r=indirect

    [Settings] Print pretty values for settings as their converted values, rather than strings
    
    ### What was the end-user problem that led to this PR?
    
    The problem was `bundle config` would print bool keys as strings (i.e. `true` was printed as `"true"`)
    
    ### Was was your diagnosis of the problem?
    
    My diagnosis was we needed to convert the values before formatting them
    
    ### What is your fix for the problem, implemented in this PR?
    
    My fix extracts the conversion method, and calls it in `pretty_values_for`
    bundlerbot committed Jun 23, 2017
  8. Auto merge of #5806 - bundler:seg-dont-hit-remote-twice, r=indirect

    Avoid hitting RubyGems remotes when all missing gems are in --without groups
    
    ### What was the end-user problem that led to this PR?
    
    The problem was we would attempt to fetch dependency info from a RubyGems remote even when it was only needed for gems whose groups were excluded.
    
    ### Was was your diagnosis of the problem?
    
    My diagnosis was that the test we had for this case was insufficient, since it checked only that `stderr` was empty, and since Bundler 1 prints errors to `stdout`... it went undetected for a year.
    
    ### What is your fix for the problem, implemented in this PR?
    
    My fix is to only report that deps are missing when they are either requested or are path/git/gemspec-sourced.
    
    ### Why did you choose this fix out of the possible options?
    
    I chose this fix because it keeps the behavior of always ensuring all git repos are checked out.
    bundlerbot committed Jun 23, 2017
  9. Auto merge of #5801 - jakauppila:fix_no_proxy_patch, r=segiddins

    Add explicit nil proxy arguments - Fixes no_proxy support
    
    ### What was the end-user problem that led to this PR?
    
    When the `no_proxy` environment variable is configured it is not being honored and requests for hosts that are present in the list will be sent through the proxy defined via `http_proxy` and `https_proxy`.
    
    Ultimately this means that a user utilizing the `http_proxy`, `https_proxy`, and `no_proxy` environment variables will unable to access an internal RubyGems source.
    
    ### Was was your diagnosis of the problem?
    
    The underlying `net-http-persistent` gem currently does not explicitly pass in nil arguments when a host matches a value within `no_proxy`, so when `Net::HTTP.new()` is called, it will fall back an utilize the values defined in `http_proxy` and `https_proxy`.
    
    drbrain/net-http-persistent#88 has been submitted to add the explicit nil argument to be defined.
    
    ### What is your fix for the problem, implemented in this PR?
    
    Adding explicit nil arguments for the proxy definition for `Net::HTTP.new()` as defined by the documentation.
    
    https://ruby-doc.org/stdlib-2.4.1/libdoc/net/http/rdoc/Net/HTTP.html#method-c-new
    
    ### Why did you choose this fix out of the possible options?
    
    Per the discussion in #5781, as Bundler is currently stuck to v2.9.4 of `net-http-persistent` for now, it would be best addressed by a change to the vendored code.
    
    A PR has been submitted to `net-http-persistent` which can be pulled into Bundler when v3.x will be integrated.
    bundlerbot committed Jun 23, 2017
  10. Auto merge of #5725 - bundler:seg-default-command, r=indirect

    Default to printing a help message when `bundle` is run without arguments on 2.0
    
    ### What was the end-user problem that led to this PR?
    
    The problem was that users unfamiliar with Bundler would run `bundle` and either install gems (if in a directory with a gemfile), or else get the error `Could not locate Gemfile`. You'd need to know to run `bundle help` or `bundle -h` to get the man page, and even that could be overwhelming (not to mention turfing you into a pager).
    
    ### Was was your diagnosis of the problem?
    
    My diagnosis was that we ought to print some form of help when the bare `bundle` command is run, rather than defaulting to running `bundle install`.
    
    This work was prompted by https://trello.com/c/OpuOdTZl/112-print-help-when-bundle-is-run-without-arguments, and is an improvement (rather than a straight port) on #3831.
    
    ### What is your fix for the problem, implemented in this PR?
    
    My fix was to print the following help output when the CLI is invoked without arguments, contingent upon a feature flag.
    
    ```
    Bundler version 1.15.1
    
    Commands:
      bundle add GEM VERSION            # Add gem to Gemfile and run bundle install
      bundle binstubs GEM [OPTIONS]     # Install the binstubs of the listed gem
      bundle check [OPTIONS]            # Checks if the dependencies listed in Gemfile are satisfied by currently installed gems
      bundle clean [OPTIONS]            # Cleans up unused gems in your bundler directory
      bundle config NAME [VALUE]        # retrieve or set a configuration value
      bundle console [GROUP]            # Opens an IRB session with the bundle pre-loaded
      bundle doctor [OPTIONS]           # Checks the bundle for common problems
      bundle env                        # Print information about the environment Bundler is running under
      bundle exec [OPTIONS]             # Run the command in context of the bundle
      bundle gem GEM [OPTIONS]          # Creates a skeleton for creating a rubygem
      bundle help [COMMAND]             # Describe available commands or one specific command
      bundle help [COMMAND]             # Describe subcommands or one specific subcommand
      bundle info GEM [OPTIONS]         # Show information for the given gem
      bundle init [OPTIONS]             # Generates a Gemfile into the current working directory
      bundle inject GEM VERSION         # Add the named gem, with version requirements, to the resolved Gemfile
      bundle install PLUGINS            # Install the plugin from the source
      bundle install [OPTIONS]          # Install the current environment to the system
      bundle issue                      # Learn how to report an issue in Bundler
      bundle licenses                   # Prints the license of all gems in the bundle
      bundle lock                       # Creates a lockfile without installing
      bundle open GEM                   # Opens the source directory of the given bundled gem
      bundle outdated GEM [OPTIONS]     # list installed gems with newer versions available
      bundle package [OPTIONS]          # Locks and then caches all of the gems into vendor/cache
      bundle platform [OPTIONS]         # Displays platform compatibility information
      bundle plugin SUBCOMMAND ...ARGS  # manage the bundler plugins
      bundle pristine                   # Restores installed gems to pristine condition from files located in the gem cache. Gem installed from a git repository will be issued `git checkout --force`.
      bundle show GEM [OPTIONS]         # Shows all gems that are part of the bundle, or the path to a given gem
      bundle update [OPTIONS]           # update the current environment
      bundle version                    # Prints the bundler's version information
      bundle viz [OPTIONS]              # Generates a visual dependency graph
    
    Options:
          [--no-color]                 # Disable colorization in output
      -r, [--retry=NUM]                # Specify the number of times you wish to attempt network commands
      -V, [--verbose], [--no-verbose]  # Enable verbose output mode
    ```
    
    ### Why did you choose this fix out of the possible options?
    
    I chose this fix because it aligns the Bundler CLI with many other package managers that display a help message of some sort when invoked without arguments:
    
    - CocoaPods
    - npm
    - RubyGems
    - Homebrew
    - pip
    - Swift Package Manager
    - Carthage
    - Cargo
    
    And unlike the following, which _do_ install by default:
    
    - yarn
    
    As to the particular format of the help printed, I thought something concise would be less disruptive than the full man page.
    
    Improvements to the output would be welcome, this is just using the Thor default right now but we can easily implement our own. This will require test coverage, but I thought I'd hold off until the general change got some buy-in.
    bundlerbot committed Jun 23, 2017
  11. Auto merge of #5788 - bundler:seg-allow-bundler-dep-conflicts, r=indi…

    …rect
    
    [2.0] Allow conflicts between bundler dependencies and the current bundler version
    
    ### What was the end-user problem that led to this PR?
    
    The problem will occur once 2.0 is released -- there are many gems that declare a `s.dependency "bundler", "~> 1.x"` dependency on bundler. This would essentially make them inoperable with Bundler 2. We want to make adopting 2.0 as pain-free as possible, so hard conflicts are a no-go.
    
    ### Was was your diagnosis of the problem?
    
    My diagnosis was that we need a way to allow conflicts on the bundler dependency once 2.0 comes out, so people can use 2.0.
    
    ### What is your fix for the problem, implemented in this PR?
    
    My fix introduces a feature flag for allowing these conflicts (enabled on 2.0), which when enabled will ignore bundler dependencies during resolution, and warn in the installer when a conflict would've occurred.
    
    ### Why did you choose this fix out of the possible options?
    
    I chose this fix because it has the minimal performance penalty with the feature flag enabled. This is mostly a port of #3871 to master.
    bundlerbot committed Jun 23, 2017
Commits on Jun 22, 2017
  1. Make pretty-printing a dependency consistent

    segiddins committed Jun 22, 2017
  2. [Settings] Print pretty values for settings as their converted values…

    …, rather than strings
    segiddins committed Jun 22, 2017
  3. [Definition] Allow installing in deployment mode when an unused path …

    …source is missing
    segiddins committed Jun 22, 2017
  4. Auto merge of #5805 - bundler:colby/welcome-message, r=colby-swandale

    add welcome message for PR auto replies
    
    This PR is adding the welcome message that will serve as the auto reply for Bundlerbot when a new PR is opened.
    bundlerbot committed Jun 22, 2017
  5. remove info about running test suite, its redundant

    colby-swandale committed Jun 22, 2017
  6. Add explicit nil proxy arguments - Fixes no_proxy support

    Add proxy environment variable tests
    jakauppila committed with jakauppila Jun 21, 2017