cobweb 1.0.22 → 1.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.textile +1 -1
- data/lib/cobweb_version.rb +1 -1
- data/lib/report_command.rb +4 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a4dac5d8a0745f5ab077f79f14db2f09ebd110c
|
4
|
+
data.tar.gz: c94965108d453320f28ccb1d54eb8e6026bd9f8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78c1a393efc45984459ee20c2e6f1662501794b0f56c7824d4e6db8eefcfad011576a81949b535d9374ad3e80005f6ed4a13ea0993b82d5d6bf9b9147186b06f
|
7
|
+
data.tar.gz: 268695b9124db64f838105011dfbabc5ba402155edb19a42450071926c7bf88d2f474060bd9d27dba9c947f6ef21e916e78c0bf2a604be02de7bd030c7f41ba8
|
data/README.textile
CHANGED
data/lib/cobweb_version.rb
CHANGED
data/lib/report_command.rb
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
class ReportCommand
|
2
2
|
def self.start(opts)
|
3
|
-
|
3
|
+
|
4
4
|
if opts[:output]
|
5
|
-
options = opts.to_hash.delete_if { |k, v| v.nil?
|
5
|
+
options = opts.to_hash.delete_if { |k, v| v.nil?}
|
6
6
|
options[:quiet] = !opts[:verbose]
|
7
7
|
|
8
8
|
@crawler = CobwebCrawler.new({:cache_type => :full, :raise_exceptions => true}.merge(options))
|
9
9
|
|
10
|
-
columns = nil
|
10
|
+
columns = nil
|
11
11
|
|
12
12
|
CSV.open(options[:output], "wb", :force_quotes => true) do |csv|
|
13
|
+
|
13
14
|
statistics = @crawler.crawl(options[:url]) do |page|
|
14
15
|
puts "Reporting on #{page[:url]}"
|
15
16
|
@doc = page[:body]
|
16
|
-
|
17
|
-
|
18
17
|
page["link_rel"] = scope.link_tag_with_rel("canonical")["href"]
|
19
18
|
page["title"] = scope.head_tag.title_tag.contents
|
20
19
|
page["description"] = scope.meta_tag_with_name("description")["content"]
|