Class: Bundler::Dsl

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/local_development.rb

Instance Method Summary collapse

Instance Method Details

#gem_with_development(name, *args) ⇒ Object Also known as: gem



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/bundler/local_development.rb', line 30

def gem_with_development(name, *args)
  if ENV['GEM_DEV']
    if Bundler.development_gems == [:all] || Bundler.development_gems.any?{ |s| name[s] }
      gem_development_dirs.each do |dir|
        path = File.join(dir, name)
        if File.exist?(path)
          # Check each local gem's gemspec to see if any dependencies need to be made local
          gemspec_path = File.join(dir, name, "#{name}.gemspec")
          process_gemspec_dependencies(gemspec_path) if File.exist?(gemspec_path)
          return gem_without_development name, :path => path
        end
      end
    end
  end
  gem_without_development(name, *args)
end