Class: Gem::Dependent

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygems/dependent.rb,
lib/rubygems/dependent/version.rb,
lib/rubygems/dependent/parallel.rb

Defined Under Namespace

Classes: Parallel

Constant Summary collapse

VERSION =
Version = '0.2.5'

Class Method Summary collapse

Class Method Details

.find(gem, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/rubygems/dependent.rb', line 7

def self.find(gem, options={})
  # get all gems
  specs_and_sources = with_changed_gem_source(options[:source]) do
    all_specs_and_sources(:all_versions => options[:all_versions])
  end

  if options[:fetch_limit]
    specs_and_sources = specs_and_sources.first(options[:fetch_limit])
  end

  if options[:progress]
    $stderr.puts "Downloading specs for #{specs_and_sources.size} gems"
  end

  gems_and_dependencies = fetch_all_dependencies(specs_and_sources, options) do
    print_dot if options[:progress]
  end
  $stderr.print "\n" if options[:progress]

  select_dependent(gems_and_dependencies, gem, options)
end