aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/rubygems_ext.rb
diff options
context:
space:
mode:
authorAdam Prescott <adam@aprescott.com>2015-05-07 16:51:45 -0400
committerAndre Arko <andre@arko.net>2015-05-11 18:57:44 -0700
commite3e9f4add3ab25776c43816b916543995db8fb4e (patch)
treecac30b1aa3bde1f48fd5c0b24c3cf59c989ee2ac /spec/support/rubygems_ext.rb
parent62987f84dc6d34c94956a5f4a54338abcf240e8f (diff)
downloadbundler-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 'spec/support/rubygems_ext.rb')
-rw-r--r--spec/support/rubygems_ext.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 6d71d32e..3426deff 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -12,7 +12,7 @@ module Spec
unless File.exist?("#{Path.base_system_gems}")
FileUtils.mkdir_p(Path.base_system_gems)
- puts "fetching fakeweb, artifice, sinatra, rake, rack, and builder for the tests to use..."
+ puts "installing gems for the tests to use..."
`gem install fakeweb artifice --no-rdoc --no-ri`
`gem install sinatra --version 1.2.7 --no-rdoc --no-ri`
# Rake version has to be consistent for tests to pass
@@ -20,6 +20,8 @@ module Spec
# 3.0.0 breaks 1.9.2 specs
`gem install builder --version 2.1.2 --no-rdoc --no-ri`
`gem install rack --no-rdoc --no-ri`
+ # ruby-graphviz is used by the viz tests
+ `gem install ruby-graphviz --no-rdoc --no-ri`
end
ENV['HOME'] = Path.home.to_s