w3clove 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -14,7 +14,7 @@ w3clove is a Ruby gem that can be installed on the usual way
14
14
 
15
15
  Pass it the url of an XML sitemap to be checked, and the filename where you want your report to be generated, like:
16
16
 
17
- w3clove https://github.com/jaimeiniesta/w3clove/raw/master/spec/samples/sitemap.xml report.html
17
+ w3clove http://ryanair.com/sitemap.xml report.html
18
18
 
19
19
  This will validate all the URLs of your sitemap.xml (so be sure to pass it a short one or you'll wait for ages), and generate an HTML file with the full report.
20
20
 
@@ -14,18 +14,27 @@ module W3Clove
14
14
  @url = url
15
15
  end
16
16
 
17
+ ##
18
+ # Returns the first 100 unique URLs from the sitemap
17
19
  def pages
18
- @pages ||= pages_in_sitemap.uniq {|p| p.url}
20
+ @pages ||= pages_in_sitemap.uniq {|p| p.url}[0..99]
19
21
  end
20
22
 
23
+ ##
24
+ # Returns the combined validation errors of all the pages
21
25
  def errors
22
26
  @errors ||= pages.map {|p| p.errors}.flatten.reject {|e| e.nil?}
23
27
  end
24
28
 
29
+ ##
30
+ # Returns the combined validation warnings of all the pages
25
31
  def warnings
26
32
  @warnings ||= pages.map {|p| p.warnings}.flatten.reject {|e| e.nil?}
27
33
  end
28
34
 
35
+ ##
36
+ # Returns the binding, needed to paint the ERB template when generating
37
+ # the HTML report (see w3clove/reporter.rb)
29
38
  def get_binding
30
39
  binding
31
40
  end
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module W3Clove
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jaime Iniesta