spider 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/README +4 -4
- data/doc/classes/Net/HTTPRedirection.html +144 -0
- data/doc/classes/Net/HTTPResponse.html +166 -0
- data/doc/classes/Net/HTTPSuccess.html +144 -0
- data/doc/classes/NilClass.html +144 -0
- data/doc/classes/Spider.html +12 -12
- data/doc/classes/SpiderInstance.html +109 -32
- data/doc/created.rid +1 -1
- data/doc/files/README.html +5 -5
- data/doc/files/lib/spider_rb.html +5 -5
- data/doc/fr_class_index.html +0 -1
- data/doc/fr_file_index.html +1 -0
- data/doc/fr_method_index.html +5 -2
- data/lib/spider.rb +100 -58
- data/spec/spider_instance_spec.rb +115 -30
- data/spider.gemspec +1 -1
- data/test_server/client.rb +4 -4
- metadata +7 -2
data/spider.gemspec
CHANGED
data/test_server/client.rb
CHANGED
@@ -8,15 +8,15 @@ Spider.start_at('http://localhost:8880/page1.html') do |s|
|
|
8
8
|
a_url =~ %r{^http://localhost:8880.*}
|
9
9
|
end
|
10
10
|
|
11
|
-
s.on 404 do |a_url,
|
11
|
+
s.on 404 do |a_url, resp, prior|
|
12
12
|
puts "URL not found: #{a_url}"
|
13
13
|
end
|
14
14
|
|
15
|
-
s.on :success do |a_url,
|
16
|
-
puts "body: #{body}"
|
15
|
+
s.on :success do |a_url, resp, prior|
|
16
|
+
puts "body: #{resp.body}"
|
17
17
|
end
|
18
18
|
|
19
|
-
s.on :any do |a_url, resp|
|
19
|
+
s.on :any do |a_url, resp, prior|
|
20
20
|
puts "URL returned anything: #{a_url} with this code #{resp.code}"
|
21
21
|
end
|
22
22
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: spider
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.3.0
|
7
|
+
date: 2007-11-01 00:00:00 -04:00
|
8
8
|
summary: A Web spidering library
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -39,6 +39,11 @@ files:
|
|
39
39
|
- doc/classes/SpiderInstance.html
|
40
40
|
- doc/classes/Spider.html
|
41
41
|
- doc/classes/Net.html
|
42
|
+
- doc/classes/NilClass.html
|
43
|
+
- doc/classes/Net
|
44
|
+
- doc/classes/Net/HTTPRedirection.html
|
45
|
+
- doc/classes/Net/HTTPSuccess.html
|
46
|
+
- doc/classes/Net/HTTPResponse.html
|
42
47
|
- doc/fr_file_index.html
|
43
48
|
- doc/fr_class_index.html
|
44
49
|
- doc/fr_method_index.html
|