aurb 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.2.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{aurb}
8
- s.version = "1.2.2"
8
+ s.version = "1.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gigamo"]
@@ -80,18 +80,11 @@ module Aurb
80
80
  # Returns an array containing a hash of search results
81
81
  # for a given +package+.
82
82
  def list_search_results(package)
83
- json = parse_json(Aurb.aur_rpc_path(:search, URI.escape(package.to_s)))
84
- return [] if json.type =~ /error/
85
- ids = json.results.map(&:ID)
86
83
  results = []
87
- ids.inject([]) do |ary, id|
88
- ary << Thread.new do
89
- parse_json Aurb.aur_rpc_path(:info, id) do |json|
90
- next if json.type =~ /error/
91
- results << json.results.symbolize_keys
92
- end
93
- end
94
- end.each(&:join)
84
+ parse_json Aurb.aur_rpc_path(:search, URI.escape(package.to_s)) do |json|
85
+ next if json.type =~ /error/
86
+ results << json.results
87
+ end
95
88
  results
96
89
  end
97
90
 
@@ -1,3 +1,3 @@
1
1
  module Aurb
2
- VERSION = '1.2.2'.freeze
2
+ VERSION = '1.2.3'.freeze
3
3
  end
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
5
5
 
6
6
  require 'aurb'
7
7
 
8
- Benchmark.bm 5 do |x|
8
+ Benchmark.bm 7 do |x|
9
9
  x.report 'search' do
10
10
  Aurb.aur.search *:quake
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aurb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gigamo