Skip to content

Commit

Permalink
Evaluate local gem's Gemfile, if present
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Nov 10, 2012
1 parent 1e60d65 commit 200e038
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/bundler/local_development.rb
Expand Up @@ -36,6 +36,14 @@ def gem_with_development(name, *args)
# Check each local gem's gemspec to see if any dependencies need to be made local # Check each local gem's gemspec to see if any dependencies need to be made local
gemspec_path = File.join(dir, name, "#{name}.gemspec") gemspec_path = File.join(dir, name, "#{name}.gemspec")
process_gemspec_dependencies(gemspec_path) if File.exist?(gemspec_path) process_gemspec_dependencies(gemspec_path) if File.exist?(gemspec_path)
# Evaluate local gem's Gemfile, if present
gemfile_path = File.join(dir, name, "Gemfile")
if File.exist?(gemfile_path)
gemfile = File.read(gemfile_path).
gsub(/^(source|gemspec).*\s+/, ''). # Strip sources and gemspecs
gsub(/^\s*gem ['"]rake['"].*/, '') # Strip rake
eval gemfile
end
return gem_without_development name, :path => path return gem_without_development name, :path => path
end end
end end
Expand Down

0 comments on commit 200e038

Please sign in to comment.