diff options
author | Adam Prescott <adam@aprescott.com> | 2015-05-07 16:51:45 -0400 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-05-11 18:57:44 -0700 |
commit | e3e9f4add3ab25776c43816b916543995db8fb4e (patch) | |
tree | cac30b1aa3bde1f48fd5c0b24c3cf59c989ee2ac /Rakefile | |
parent | 62987f84dc6d34c94956a5f4a54338abcf240e8f (diff) | |
download | bundler-e3e9f4add3ab25776c43816b916543995db8fb4e.tar.gz |
Allow bundle viz to work with dependencies satisfied by prereleases.
Suppose a Gemfile specifies a dependency, `foo`:
foo
Let's say `foo` requires a certain `bar`:
foo
bar (>= 0.5)
If this dependency happens to be satisfied by a prerelease `bar`, e.g.,
0.6.pre, then `bundle viz` will error.
The cause of this error is that `Bundler::Graph#_populate_relations`
executes
child_dependencies = dependency.to_spec.runtime_dependencies.to_set
and if `dependency` (here, `bar`), is a prerelease, then
`dependency.to_spec` will be `nil` on Rubygems 2.4.0 and higher because
of changes to `#to_spec`.
By forcing `dependency.prerelease = true`, then `to_spec` won't ignore
the prerelease `bar` dependency, which prevents `dependency.to_spec` to
from being `nil`.
This should address GitHub issues 3621 and 3217.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -114,8 +114,10 @@ namespace :spec do system "sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd" # Strip secure_path so that RVM paths transmit through sudo -E system "sudo sed -i '/secure_path/d' /etc/sudoers" - # Install groff for the ronn gem + # Install groff so ronn can generate man/help pages sh "sudo apt-get install groff -y" + # Install graphviz so that the viz specs can run + sh "sudo apt-get install graphviz -y 2>&1 | tail -n 2" if RUBY_VERSION < '1.9' # Downgrade Rubygems on 1.8 so Ronn can be required # https://github.com/rubygems/rubygems/issues/784 |