Parent

GemInstaller::SourceIndexSearchAdapter

Attributes

gem_source_index_proxy[W]

Public Instance Methods

all_local_specs() click to toggle source
    # File lib/geminstaller/source_index_search_adapter.rb, line 5
 5:     def all_local_specs
 6:       if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
 7:         search_less_than_or_equal_0_9_4('',GemInstaller::RubyGem.default_version)
 8:       else
 9:         dependency = Gem::Dependency.new('', GemInstaller::RubyGem.default_version)
10:         @gem_source_index_proxy.refresh!
11:         @gem_source_index_proxy.search(dependency, false)
12:       end
13:     end
search(gem, version_requirement, platform_only = false) click to toggle source
    # File lib/geminstaller/source_index_search_adapter.rb, line 15
15:     def search(gem, version_requirement, platform_only = false)
16:       if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.4')
17:         gem_pattern = /^#{gem.regexp_escaped_name}$/
18:         search_less_than_or_equal_0_9_4(gem_pattern, version_requirement)
19:       else
20:         search_greater_than_0_9_4(gem, version_requirement, platform_only)
21:       end
22:     end
search_greater_than_0_9_4(gem, version_requirement, platform_only = false) click to toggle source
    # File lib/geminstaller/source_index_search_adapter.rb, line 29
29:     def search_greater_than_0_9_4(gem, version_requirement, platform_only = false)
30:       dependency = nil
31:       begin
32:         dependency = Gem::Dependency.new(gem.name, version_requirement)
33:       rescue => e
34:         msg = "Rubygems failed to parse gem: name='#{gem.name}', version='#{version_requirement}'.  Original Error:\n" +
35:               "  #{e.inspect}\n" +
36:               "If you are having problems with prerelease gems or non-numeric versions, please upgrade to the latest Rubygems."
37:         raise GemInstaller::GemInstallerError.new(msg)
38:       end
39:       @gem_source_index_proxy.refresh!
40:       @gem_source_index_proxy.search(dependency, platform_only)
41:     end
search_less_than_or_equal_0_9_4(gem_pattern, version_requirement) click to toggle source
    # File lib/geminstaller/source_index_search_adapter.rb, line 24
24:     def search_less_than_or_equal_0_9_4(gem_pattern, version_requirement)
25:       @gem_source_index_proxy.refresh!
26:       @gem_source_index_proxy.search(gem_pattern, version_requirement)
27:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.