Class Gem::RemoteInstaller
In: lib/raven/gem_init.rb
Parent: Object

Making the remote installer silent. Otherwise it always asks you to choose the version you want to install.

Methods

Public Instance methods

[Source]

    # File lib/raven/gem_init.rb, line 73
73:       def find_gem_to_install(gem_name, version_requirement)
74:         specs_n_sources = specs_n_sources_matching gem_name, version_requirement
75:         # we always give exact name / version to RubyGems

76:         specs_n_sources.first
77:       end

[Source]

    # File lib/raven/gem_init.rb, line 79
79:       def find_gem_to_install(gem_name, version_requirement, caches)
80:         specs_n_sources = []
81:         caches.each do |source, cache|
82:           cache.each do |name, spec|
83:             if /^#{gem_name}$/i === spec.name &&
84:               version_requirement.satisfied_by?(spec.version) then
85:               specs_n_sources << [spec, source]
86:             end
87:           end
88:         end
89:         if specs_n_sources.empty? then
90:           raise GemNotFoundException.new("Could not find #{gem_name} (#{version_requirement}) in the repository")
91:         end
92:         specs_n_sources = specs_n_sources.sort_by { |gs,| gs.version }.reverse
93:         specs_n_sources[0]
94:       end

[Validate]