зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] This sorting seems unnecessary too
https://github.com/rubygems/rubygems/commit/823cb1fef9
This commit is contained in:
Родитель
a4860e043e
Коммит
8d2bcc88ff
|
@ -67,7 +67,6 @@ module Bundler
|
|||
|
||||
gemspecs = Gem::Util.glob_files_in_dir("{,*}.gemspec", expanded_path).map {|g| Bundler.load_gemspec(g) }.compact
|
||||
gemspecs.reject! {|s| s.name != name } if name
|
||||
Index.sort_specs(gemspecs)
|
||||
specs_by_name_and_version = gemspecs.group_by {|s| [s.name, s.version] }
|
||||
|
||||
case specs_by_name_and_version.size
|
||||
|
|
|
@ -78,17 +78,13 @@ module Bundler
|
|||
end
|
||||
protected :unsorted_search
|
||||
|
||||
def self.sort_specs(specs)
|
||||
def sort_specs(specs)
|
||||
specs.sort_by do |s|
|
||||
platform_string = s.platform.to_s
|
||||
[s.version, platform_string == RUBY ? NULL : platform_string]
|
||||
end
|
||||
end
|
||||
|
||||
def sort_specs(specs)
|
||||
self.class.sort_specs(specs)
|
||||
end
|
||||
|
||||
def local_search(query)
|
||||
case query
|
||||
when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query)
|
||||
|
|
Загрузка…
Ссылка в новой задаче