yahoo-se 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/yahoo-se.rb +8 -2
- data/lib/yahoo-se/version.rb +1 -1
- data/spec/yahoo-se_spec.rb +7 -0
- metadata +2 -2
data/lib/yahoo-se.rb
CHANGED
@@ -17,8 +17,14 @@ module Yahoo
|
|
17
17
|
|
18
18
|
if obj.total_results_available > 100
|
19
19
|
# The rest of the page results
|
20
|
-
|
21
|
-
|
20
|
+
begin
|
21
|
+
(obj.total_results_available/100).ceil.times do |i|
|
22
|
+
results += obj.next
|
23
|
+
end
|
24
|
+
rescue ResponseError => e
|
25
|
+
# error output
|
26
|
+
ensure
|
27
|
+
results
|
22
28
|
end
|
23
29
|
end
|
24
30
|
results
|
data/lib/yahoo-se/version.rb
CHANGED
data/spec/yahoo-se_spec.rb
CHANGED
@@ -9,4 +9,11 @@ describe Yahoo::SE do
|
|
9
9
|
it "should have a path to the service api" do
|
10
10
|
Yahoo::SE::SERVICE_PATH.should == "http://search.yahooapis.com/SiteExplorerService/V1"
|
11
11
|
end
|
12
|
+
|
13
|
+
it "should return the results after a ResponseError was raised" do
|
14
|
+
Yahoo::SE.application_id = "123"
|
15
|
+
@url = "http://vielmetti.typepad.com/vacuum"
|
16
|
+
@results = Yahoo::SE.all(::Yahoo::SE.pages(@url, :results => 100))
|
17
|
+
@results.size.should > 0
|
18
|
+
end
|
12
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yahoo-se
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lance Carlson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-09 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|