summaryrefslogtreecommitdiff
path: root/lib/bundler/dsl.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-07-15 20:58:03 -0500
committerwycats <wycats@gmail.com>2010-07-15 22:43:45 -0500
commit7078db948751cdc4626bd65509f65bdc371656ba (patch)
tree5b46a66b73a2cbadf1ae2ef24eee483ce32dfdb0 /lib/bundler/dsl.rb
parenta0082b979c0c60b0ba49fce99c173d80794c3d50 (diff)
downloadbundler-7078db948751cdc4626bd65509f65bdc371656ba.tar.gz
Actually test #gemspec and deprecate #add_bundler_dependencies
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r--lib/bundler/dsl.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index e2994e4b26..6f63f79205 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -20,14 +20,16 @@ module Bundler
@env = nil
end
- def gemspec(opts)
+ def gemspec(opts = nil)
path = opts && opts[:path] || '.'
name = opts && opts[:name] || '*'
development_group = opts && opts[:development_group] || :development
gemspecs = Dir[File.join(path, "#{name}.gemspec")]
+
case gemspecs.size
when 1
spec = Gem::Specification.load(gemspecs.first)
+ gem spec.name, :path => path
spec.runtime_dependencies.each do |dep|
gem dep.name, dep.requirement.to_s
end