lib/rubygems/super_search.rb in gem_grep-0.1.1 vs lib/rubygems/super_search.rb in gem_grep-0.1.2

- old
+ new

@@ -31,11 +31,12 @@ unless Gem::Requirement === version_requirement then version_requirement = Gem::Requirement.create version_requirement end # only changes from original method - search_fields = Gem::CommandManager.instance['grep'].options[:fields] || ['name'] - specs = @gems.values.select do |spec| + # search_fields = Gem::CommandManager.instance['grep'].options[:fields] || ['name'] + search_fields = GemGrep.grep_fields + specs = all_gems.values.select do |spec| search_fields.map {|e| spec.send(e).to_s}.any? {|e| e =~ gem_pattern} and version_requirement.satisfied_by? spec.version end if only_platform then