Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a bug where dependencies were not getting pulled in if the depend…

…ency type was invalid.
  • Loading branch information...
commit 6455764e08aa6ace4d15f35dd557bd8f7570b3f7 1 parent e23ada4
Carl Lerche authored indirect committed
View
2  Rakefile
@@ -17,6 +17,8 @@ spec = Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
+ s.add_development_dependency "rspec"
+
s.files = Dir.glob("{bin,lib}/**/*") + %w(LICENSE README.md ROADMAP.md CHANGELOG.md)
s.executables = ['bundle']
s.require_path = 'lib'
View
2  lib/bundler/spec_set.rb
@@ -36,7 +36,7 @@ def append_subgraph(specs, current)
return if specs[current.name]
specs[current.name] = true
current.dependencies.each do |dep|
- next unless dep.type == :runtime
+ next if dep.type == :development
append_subgraph(specs, lookup[dep.name])
end
end
View
20 spec/install/gems/resolving_spec.rb
@@ -19,6 +19,26 @@
out.should == "YES\nYES"
end
+ it "installs gems with a dependency with no type" do
+ build_repo2
+
+ path = "#{gem_repo2}/#{Gem::MARSHAL_SPEC_DIR}/actionpack-2.3.2.gemspec.rz"
+ spec = Marshal.load(Gem.inflate(File.read(path)))
+ spec.dependencies.each do |d|
+ d.instance_variable_set(:@type, :fail)
+ end
+ File.open(path, 'w') do |f|
+ f.write Gem.deflate(Marshal.dump(spec))
+ end
+
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "actionpack", "2.3.2"
+ G
+
+ should_be_installed "actionpack 2.3.2", "activesupport 2.3.2"
+ end
+
it "works with crazy rubygem plugin stuff" do
install_gemfile <<-G
source "file://#{gem_repo1}"
Please sign in to comment.
Something went wrong with that request. Please try again.