summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml20
-rw-r--r--README.md2
-rw-r--r--Rakefile2
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb38
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb2
-rw-r--r--man/bundle-show.ronn5
-rw-r--r--man/gemfile.5.ronn13
7 files changed, 59 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml
index 543df2bcda..95b959aea1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,9 +26,9 @@ addons:
secure: "TrzIv116JLGUxm6PAUskCYrv8KTDguncKROVwbnjVPKTGDAgoDderd8JUdDEXrKoZ9qGLD2TPYKExt9/QDl71E+qHdWnVqWv4HKCUk2P9z/VLKzHuggOUBkCXiJUhjywUieCJhI3N92bfq2EjSBbu2/OFHqWOjLQ+QCooTEBjv8="
rvm:
- - 2.5.0
+ - 2.5.1
- 2.4.3
- - 2.3.6
+ - 2.3.7
# Rubygems versions MUST be available as rake tasks
# see Rakefile:125 for the list of possible RGV values
@@ -36,26 +36,26 @@ env:
# We need to know if changes to rubygems will break bundler on release
- RGV=master
# Test the latest rubygems release with all of our supported rubies
- - RGV=v2.7.4
+ - RGV=v2.7.7
matrix:
include:
- # Ruby 2.4, Rubygems 2.6.8 and up
+ # Ruby 2.4, Rubygems 2.6 and up
- rvm: 2.4.2
env: RGV=v2.6.14
- # Ruby 2.3, Rubygems 2.5.1 and up
- - rvm: 2.3.5
+ # Ruby 2.3, Rubygems 2.5 and up
+ - rvm: 2.3.7
env: RGV=v2.5.2
- - rvm: 2.3.5
+ - rvm: 2.3.7
env: RGV=v2.6.14
# Ruby-head (we want to know how we're doing, but not fail the build)
- rvm: ruby-head
env: RGV=master
# 1.x mode (we want to keep stuff passing in 1.x mode for now)
- - rvm: 2.4.2
- env: RGV=v2.7.4 BUNDLER_SPEC_SUB_VERSION=1.98
+ - rvm: 2.5.1
+ env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
- rvm: 1.8.7
- env: RGV=v2.7.4 BUNDLER_SPEC_SUB_VERSION=1.98
+ env: RGV=v2.7.7 BUNDLER_SPEC_SUB_VERSION=1.98
allow_failures:
- rvm: ruby-head
diff --git a/README.md b/README.md
index 3e00dfd24a..db71b644dd 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Bundler is most commonly used to manage your application's dependencies. For exa
```
bundle init
-echo 'gem "rspec"' >> Gemfile
+bundle add rspec
bundle install
bundle exec rspec
```
diff --git a/Rakefile b/Rakefile
index dcecf91165..2f7db8253c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -147,7 +147,7 @@ begin
rubyopt = ENV["RUBYOPT"]
# When editing this list, also edit .travis.yml!
branches = %w[master]
- releases = %w[v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.5 v2.4.8 v2.5.2 v2.6.8 v2.6.14 v2.7.4]
+ releases = %w[v2.5.2 v2.6.14 v2.7.7]
(branches + releases).each do |rg|
desc "Run specs with RubyGems #{rg}"
RSpec::Core::RakeTask.new(rg) do |t|
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
index e4d016de24..821f79871f 100644
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
+++ b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
@@ -50,14 +50,25 @@ module Bundler::Molinillo
incoming_edges.map(&:origin)
end
- # @return [Array<Vertex>] the vertices of {#graph} where `self` is a
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is a
# {#descendent?}
def recursive_predecessors
- vertices = predecessors
- vertices += Compatibility.flat_map(vertices, &:recursive_predecessors)
- vertices.uniq!
+ _recursive_predecessors
+ end
+
+ # @param [Set<Vertex>] vertices the set to add the predecessors to
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is a
+ # {#descendent?}
+ def _recursive_predecessors(vertices = Set.new)
+ incoming_edges.each do |edge|
+ vertex = edge.origin
+ next unless vertices.add?(vertex)
+ vertex._recursive_predecessors(vertices)
+ end
+
vertices
end
+ protected :_recursive_predecessors
# @return [Array<Vertex>] the vertices of {#graph} that have an edge with
# `self` as their {Edge#origin}
@@ -65,14 +76,25 @@ module Bundler::Molinillo
outgoing_edges.map(&:destination)
end
- # @return [Array<Vertex>] the vertices of {#graph} where `self` is an
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is an
# {#ancestor?}
def recursive_successors
- vertices = successors
- vertices += Compatibility.flat_map(vertices, &:recursive_successors)
- vertices.uniq!
+ _recursive_successors
+ end
+
+ # @param [Set<Vertex>] vertices the set to add the successors to
+ # @return [Set<Vertex>] the vertices of {#graph} where `self` is an
+ # {#ancestor?}
+ def _recursive_successors(vertices = Set.new)
+ outgoing_edges.each do |edge|
+ vertex = edge.destination
+ next unless vertices.add?(vertex)
+ vertex._recursive_successors(vertices)
+ end
+
vertices
end
+ protected :_recursive_successors
# @return [String] a string suitable for debugging
def inspect
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
index 3feb7be9b5..d9eee767ce 100644
--- a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
+++ b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
@@ -2,5 +2,5 @@
module Bundler::Molinillo
# The version of Bundler::Molinillo.
- VERSION = '0.6.4'.freeze
+ VERSION = '0.6.5'.freeze
end
diff --git a/man/bundle-show.ronn b/man/bundle-show.ronn
index a333a44e5d..a6a59a1445 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)`][Gemfile(5)].
+all gems that are required by your [`Gemfile(5)`][Gemfile(5)], sorted by name.
Calling show with [GEM] will list the exact location of that gem on your
machine.
@@ -17,4 +17,5 @@ machine.
## OPTIONS
* `--paths`:
- List the paths of all gems that are required by your [`Gemfile(5)`][Gemfile(5)].
+ List the paths of all gems that are required by your [`Gemfile(5)`][Gemfile(5)],
+ sorted by gem name.
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn
index 5c7ba23b29..4354bcd622 100644
--- a/man/gemfile.5.ronn
+++ b/man/gemfile.5.ronn
@@ -251,6 +251,12 @@ Selecting a specific source repository this way also suppresses the ambiguous
gem warning described above in
[GLOBAL SOURCES (#source)](#GLOBAL-SOURCES).
+Using the `:source` option for an individual gem will also make that source
+available as a possible global source for any other gems which do not specify
+explicit sources. Thus, when adding gems with explicit sources, it is
+recommended that you also ensure all other gems in the Gemfile are using
+explicit sources.
+
### GIT
If necessary, you can specify that a gem is located at a particular
@@ -453,6 +459,13 @@ In the case of the `git` block form, the `:ref`, `:branch`, `:tag`,
and `:submodules` options may be passed to the `git` method, and
all gems in the block will inherit those options.
+The presence of a `source` block in a Gemfile also makes that source
+available as a possible global source for any other gems which do not specify
+explicit sources. Thus, when defining source blocks, it is
+recommended that you also ensure all other gems in the Gemfile are using
+explicit sources, either via source blocks or `:source` directives on
+individual gems.
+
## INSTALL_IF
The `install_if` method allows gems to be installed based on a proc or lambda.