mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] This sorting seems unnecessary too
https://github.com/rubygems/rubygems/commit/823cb1fef9
This commit is contained in:
parent
a4860e043e
commit
8d2bcc88ff
2 changed files with 1 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue