Object
# File lib/geminstaller/missing_dependency_finder.rb, line 41
41: def add_include_dependency_option(install_options)
42: return if install_options.index('-y') or install_options.index('--include-dependencies')
43: install_options << '--include-dependencies'
44: end
# File lib/geminstaller/missing_dependency_finder.rb, line 4
4: def find(dependent_gem)
5: if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
6: # missing_dependency_finder is not used for RubyGems >= 0.9.5
7: raise RuntimeError.new("Internal GemInstaller Error: MissingDependencyFinder should not be used for RubyGems >= 0.9.5")
8: end
9:
10: # NOTE: this doesn't resolve platforms, there's currently no way to know what
11: # platform should be selected for a dependency gem. Best-effort handling
12: # of ambiguous platforms on dependency gems will be handled elsewhere
13: matching_dependent_gems = @gem_spec_manager.local_matching_gems(dependent_gem)
14: missing_dependencies = []
15: install_options = dependent_gem.install_options
16: add_include_dependency_option(install_options)
17: common_args = @gem_arg_processor.strip_non_common_gem_args(install_options)
18: matching_dependent_gems.each do |matching_dependent_gem|
19: message_already_printed = false
20: dependency_gems = @gem_command_manager.dependency(matching_dependent_gem.name, matching_dependent_gem.version.to_s, common_args)
21: dependency_gems.each do |dependency_gem|
22: dependency_gem.install_options = install_options
23: local_matching_dependency_gems = @gem_spec_manager.local_matching_gems(dependency_gem, false)
24: unless local_matching_dependency_gems.size > 0
25: unless message_already_printed
26: @output_filter.geminstaller_output(:info, "Missing dependencies found for #{matching_dependent_gem.name} (#{matching_dependent_gem.version}):\n")
27: message_already_printed = true
28: end
29: # TODO: print install options too?
30: @output_filter.geminstaller_output(:info, " #{dependency_gem.name} (#{dependency_gem.version})\n")
31: missing_dependencies << dependency_gem
32: end
33: # recurse to find any missing dependencies in the tree
34: sub_dependencies = find(dependency_gem)
35: missing_dependencies += sub_dependencies if sub_dependencies.size > 0
36: end
37: end
38: return missing_dependencies
39: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.